@itwin/core-common 5.1.0-dev.4 → 5.1.0-dev.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  3. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  4. package/lib/cjs/ClipStyle.d.ts +1 -1
  5. package/lib/cjs/ClipStyle.d.ts.map +1 -1
  6. package/lib/cjs/ClipStyle.js.map +1 -1
  7. package/lib/cjs/ConcurrentQuery.d.ts +3 -3
  8. package/lib/cjs/ConcurrentQuery.js +1 -1
  9. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  10. package/lib/cjs/ElementProps.d.ts +42 -42
  11. package/lib/cjs/ElementProps.js +6 -6
  12. package/lib/cjs/ElementProps.js.map +1 -1
  13. package/lib/cjs/EntityProps.d.ts +4 -4
  14. package/lib/cjs/EntityProps.js.map +1 -1
  15. package/lib/cjs/GeometryParams.d.ts +3 -1
  16. package/lib/cjs/GeometryParams.d.ts.map +1 -1
  17. package/lib/cjs/GeometryParams.js +3 -1
  18. package/lib/cjs/GeometryParams.js.map +1 -1
  19. package/lib/cjs/GraphicParams.d.ts +1 -0
  20. package/lib/cjs/GraphicParams.d.ts.map +1 -1
  21. package/lib/cjs/GraphicParams.js +1 -0
  22. package/lib/cjs/GraphicParams.js.map +1 -1
  23. package/lib/cjs/ITwinCoreErrors.d.ts +1 -1
  24. package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
  25. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  26. package/lib/cjs/MassProperties.d.ts +2 -2
  27. package/lib/cjs/MassProperties.js.map +1 -1
  28. package/lib/cjs/MaterialProps.d.ts +1 -1
  29. package/lib/cjs/MaterialProps.js.map +1 -1
  30. package/lib/cjs/TerrainSettings.d.ts +1 -1
  31. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  32. package/lib/cjs/TerrainSettings.js.map +1 -1
  33. package/lib/cjs/annotation/TextAnnotation.d.ts +33 -1
  34. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  35. package/lib/cjs/annotation/TextAnnotation.js +18 -4
  36. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  37. package/lib/cjs/annotation/TextBlockGeometryProps.d.ts +1 -1
  38. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  39. package/lib/cjs/geometry/ElementGeometry.d.ts +1 -1
  40. package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
  41. package/lib/cjs/geometry/ElementGeometry.js +2 -2
  42. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  43. package/lib/cjs/internal/BackendTypes.d.ts +3 -3
  44. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
  45. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  46. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
  47. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  48. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
  49. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  50. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +1 -1
  51. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +1 -1
  52. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  53. package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -6
  54. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  55. package/lib/cjs/rpc/core/RpcConstants.js +6 -6
  56. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  57. package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -1
  58. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  59. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  60. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  61. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  62. package/lib/cjs/tile/IModelTileIO.js +2 -2
  63. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  64. package/lib/cjs/tile/TileMetadata.d.ts +6 -2
  65. package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
  66. package/lib/cjs/tile/TileMetadata.js +10 -4
  67. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  68. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  69. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  70. package/lib/esm/ClipStyle.d.ts +1 -1
  71. package/lib/esm/ClipStyle.d.ts.map +1 -1
  72. package/lib/esm/ClipStyle.js.map +1 -1
  73. package/lib/esm/ConcurrentQuery.d.ts +3 -3
  74. package/lib/esm/ConcurrentQuery.js +1 -1
  75. package/lib/esm/ConcurrentQuery.js.map +1 -1
  76. package/lib/esm/ElementProps.d.ts +42 -42
  77. package/lib/esm/ElementProps.js +6 -6
  78. package/lib/esm/ElementProps.js.map +1 -1
  79. package/lib/esm/EntityProps.d.ts +4 -4
  80. package/lib/esm/EntityProps.js.map +1 -1
  81. package/lib/esm/GeometryParams.d.ts +3 -1
  82. package/lib/esm/GeometryParams.d.ts.map +1 -1
  83. package/lib/esm/GeometryParams.js +3 -1
  84. package/lib/esm/GeometryParams.js.map +1 -1
  85. package/lib/esm/GraphicParams.d.ts +1 -0
  86. package/lib/esm/GraphicParams.d.ts.map +1 -1
  87. package/lib/esm/GraphicParams.js +1 -0
  88. package/lib/esm/GraphicParams.js.map +1 -1
  89. package/lib/esm/ITwinCoreErrors.d.ts +1 -1
  90. package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
  91. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  92. package/lib/esm/MassProperties.d.ts +2 -2
  93. package/lib/esm/MassProperties.js.map +1 -1
  94. package/lib/esm/MaterialProps.d.ts +1 -1
  95. package/lib/esm/MaterialProps.js.map +1 -1
  96. package/lib/esm/TerrainSettings.d.ts +1 -1
  97. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  98. package/lib/esm/TerrainSettings.js.map +1 -1
  99. package/lib/esm/annotation/TextAnnotation.d.ts +33 -1
  100. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  101. package/lib/esm/annotation/TextAnnotation.js +18 -4
  102. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  103. package/lib/esm/annotation/TextBlockGeometryProps.d.ts +1 -1
  104. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  105. package/lib/esm/geometry/ElementGeometry.d.ts +1 -1
  106. package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
  107. package/lib/esm/geometry/ElementGeometry.js +2 -2
  108. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  109. package/lib/esm/internal/BackendTypes.d.ts +3 -3
  110. package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
  111. package/lib/esm/internal/BackendTypes.js.map +1 -1
  112. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
  113. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  114. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
  115. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  116. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +1 -1
  117. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +1 -1
  118. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  119. package/lib/esm/rpc/core/RpcConstants.d.ts +6 -6
  120. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  121. package/lib/esm/rpc/core/RpcConstants.js +6 -6
  122. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  123. package/lib/esm/rpc/web/OpenAPI.d.ts +1 -1
  124. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  125. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  126. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  127. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  128. package/lib/esm/tile/IModelTileIO.js +2 -2
  129. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  130. package/lib/esm/tile/TileMetadata.d.ts +6 -2
  131. package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
  132. package/lib/esm/tile/TileMetadata.js +10 -4
  133. package/lib/esm/tile/TileMetadata.js.map +1 -1
  134. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,6 +1,42 @@
1
1
  # Change Log - @itwin/core-common
2
2
 
3
- This log was last generated on Thu, 10 Apr 2025 17:50:15 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 06 Jun 2025 13:44:02 GMT and should not be manually modified.
4
+
5
+ ## 4.11.5
6
+ Fri, 06 Jun 2025 13:41:18 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.11.4
11
+ Tue, 03 Jun 2025 16:15:19 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.11.3
16
+ Wed, 28 May 2025 13:56:22 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.11.2
21
+ Tue, 20 May 2025 20:14:45 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.11.1
26
+ Wed, 30 Apr 2025 13:13:21 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.11.0
31
+ Wed, 16 Apr 2025 15:50:28 GMT
32
+
33
+ ### Updates
34
+
35
+ - Deprecated the property extendType of QueryPropertyMetaData and added new property extendedType to QueryPropertyMetaData
36
+ - Deprecate ECSqlStatement API
37
+ - Update ECSql reader api to support no stat and error code.
38
+ - Resolves CVE-2025-27152
39
+ - Deprecated `MassPropertiesPerCandidateRequestProps` and `MassPropertiesPerCandidateResponseProps`
4
40
 
5
41
  ## 4.10.13
6
42
  Thu, 10 Apr 2025 17:47:21 GMT
@@ -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.x. use MapImageryProps.backgroundBase.
61
+ * @deprecated in 3.x - 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.x. use MapImageryProps.backgroundBase
65
+ * @deprecated in 3.x - 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,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAa,qBAAqB;IAChC,yCAAyC;IACxB,SAAS,CAAwB;IAElD,yDAAyD;IACzC,UAAU,CAAS;IACnC,2MAA2M;IAC3L,YAAY,CAAiB;IAC7C,+L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D,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. 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. 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/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,IA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AC,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.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"]}
@@ -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.x. Use [[create(style: ClipStyleCreateArgs]] */
142
+ /** @deprecated in 4.x - might be removed in next major version. 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;IAC9B,8FAA8F;IAC9F,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC;IACtC,qEAAqE;IACrE,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,oGAAoG;IACpG,SAAgB,SAAS,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACvD,sGAAsG;IACtG,SAAgB,UAAU,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;IACjD,kFAAkF;IAClF,SAAgB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/C,sHAAsH;IACtH,gB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AAC,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. 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,kFAAkF;IAClE,UAAU,CAAqB;IAE/C,sHAAsH;IAC/G,MAAM,CAAU,QAAQ,GAAG,IAAI,QAAQ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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 - might be removed in next major version. 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"]}
@@ -55,7 +55,7 @@ export interface QueryPropertyMetaData {
55
55
  /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */
56
56
  name: string;
57
57
  /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.
58
- * @deprecated in 4.11 Use extendedType instead
58
+ * @deprecated in 4.11 - might be removed in next major version. Use extendedType instead
59
59
  */
60
60
  extendType: string;
61
61
  /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */
@@ -133,7 +133,7 @@ export interface QueryOptions extends BaseReaderOptions {
133
133
  /**
134
134
  * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.
135
135
  * When true, XXXXClassId property will be returned as className.
136
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
136
+ * @deprecated in 4.11 - might be removed in next major version. Use ecsql function ec_classname to get class name instead.
137
137
  * */
138
138
  convertClassIdsToClassNames?: boolean;
139
139
  /**
@@ -194,7 +194,7 @@ export declare class QueryOptionsBuilder {
194
194
  * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
195
195
  * @param val A boolean value.
196
196
  * @returns @type QueryOptionsBuilder for fluent interface.
197
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
197
+ * @deprecated in 4.11 - might be removed in next major version. Use ecsql function ec_classname to get class name instead.
198
198
  */
199
199
  setConvertClassIdsToNames(val: boolean): this;
200
200
  /**
@@ -101,7 +101,7 @@ class QueryOptionsBuilder {
101
101
  * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
102
102
  * @param val A boolean value.
103
103
  * @returns @type QueryOptionsBuilder for fluent interface.
104
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
104
+ * @deprecated in 4.11 - might be removed in next major version. Use ecsql function ec_classname to get class name instead.
105
105
  */
106
106
  setConvertClassIdsToNames(val) {
107
107
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1 +1 @@
1
- {"version":3,"file":"ConcurrentQuery.js","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAuH;AACvH,wDAAwD;AACxD,yCAAmC;AAEnC;;;;;;GAMG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qFAAqB,CAAA;IACrB;;OAEG;IACH,yFAAuB,CAAA;IACvB;;;OAGG;IACH,+EAAkB,CAAA;AACpB,CAAC,EAdW,cAAc,8BAAd,cAAc,QAczB;AAmID,cAAc;AACd,MAAa,mBAAmB;IACH;IAA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T;IAA+B;IAAlE,YAAmC,QAAa,EAAkB,OAAa,EAAE,EAAa;QAC5F,KAAK,CAAC,EAAE,IAAI,uBAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAD5C,aAAQ,GAAR,QAAQ,CAAK;QAAkB,YAAO,GAAP,OAAO,CAAM;IAE/E,CAAC;IACM,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAa;QACrD,IAAK,QAAQ,CAAC,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,uBAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF;AAZD,oCAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n * @depreacted in 4.11. Switch to UseECSqlPropertyIndexes for best performance, and UseECSqlPropertyNames if you want a JSON object as the result.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.\n * @deprecated in 4.11 Use extendedType instead\n */\n extendType: string;\n /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */\n extendedType?: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n prepareTime: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n /**\n * @internal\n */\n testingArgs?: TestingArgs;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.\n */\n public setConvertClassIdsToNames(val: boolean) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n /**\n * @internal\n * Use for testing internal logic. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Testing arguments.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setTestingArgs(val: TestingArgs) {\n this._options.testingArgs = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n ShuttingDown = 6, /* Shutdown is in progress. */\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport interface TestingArgs {\n interrupt?: boolean\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n testingArgs?: TestingArgs\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n /** For testing */\n ignoreDelay?: boolean;\n /** Priority of request is ignored */\n ignorePriority?: boolean;\n /** Max queue size after which queries are rejected with error QueueFull */\n requestQueueSize?: number;\n /** Number of worker thread, default to 4 */\n workerThreads?: number;\n doNotUsePrimaryConnToPrepare?: boolean;\n /** After no activity for given time concurrenty query will automatically shutdown */\n autoShutdowWhenIdlelForSeconds?: number;\n /** Maximum number of statement cache per worker. Default to 40 */\n statementCacheSizePerWorker?: number;\n /* Monitor poll interval in milliseconds. Its responsable for cancelling queries that pass quota. It can be set between 1000 and Max time quota for query */\n monitorPollInterval?: number;\n /** Set memory map io for each worker connection size in bytes. Default to zero mean do not use mmap io */\n memoryMapFileSize?: number;\n /** Used by test to simulate certain test cases. Its is false by default. */\n allowTestingArgs?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ConcurrentQuery.js","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAuH;AACvH,wDAAwD;AACxD,yCAAmC;AAEnC;;;;;;GAMG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qFAAqB,CAAA;IACrB;;OAEG;IACH,yFAAuB,CAAA;IACvB;;;OAGG;IACH,+EAAkB,CAAA;AACpB,CAAC,EAdW,cAAc,8BAAd,cAAc,QAczB;AAmID,cAAc;AACd,MAAa,mBAAmB;IACH;IAA3B,YAA2B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAI,CAAC;IACpD,UAAU,KAAmB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D;;;;;OAKG;IACI,WAAW,CAAC,GAAW;QAC5B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,OAAO,IAAI,CAAC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AC;IACM,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAa;QACrD,IAAK,QAAQ,CAAC,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,uBAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF;AAZD,oCAYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n * @depreacted in 4.11. Switch to UseECSqlPropertyIndexes for best performance, and UseECSqlPropertyNames if you want a JSON object as the result.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.\n * @deprecated in 4.11 - might be removed in next major version. Use extendedType instead\n */\n extendType: string;\n /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */\n extendedType?: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n prepareTime: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n /**\n * @internal\n */\n testingArgs?: TestingArgs;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * @deprecated in 4.11 - might be removed in next major version. Use ecsql function ec_classname to get class name instead.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n * @deprecated in 4.11 - might be removed in next major version. Use ecsql function ec_classname to get class name instead.\n */\n public setConvertClassIdsToNames(val: boolean) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n /**\n * @internal\n * Use for testing internal logic. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Testing arguments.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setTestingArgs(val: TestingArgs) {\n this._options.testingArgs = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n ShuttingDown = 6, /* Shutdown is in progress. */\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport interface TestingArgs {\n interrupt?: boolean\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n testingArgs?: TestingArgs\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n /** For testing */\n ignoreDelay?: boolean;\n /** Priority of request is ignored */\n ignorePriority?: boolean;\n /** Max queue size after which queries are rejected with error QueueFull */\n requestQueueSize?: number;\n /** Number of worker thread, default to 4 */\n workerThreads?: number;\n doNotUsePrimaryConnToPrepare?: boolean;\n /** After no activity for given time concurrenty query will automatically shutdown */\n autoShutdowWhenIdlelForSeconds?: number;\n /** Maximum number of statement cache per worker. Default to 40 */\n statementCacheSizePerWorker?: number;\n /* Monitor poll interval in milliseconds. Its responsable for cancelling queries that pass quota. It can be set between 1000 and Max time quota for query */\n monitorPollInterval?: number;\n /** Set memory map io for each worker connection size in bytes. Default to zero mean do not use mmap io */\n memoryMapFileSize?: number;\n /** Used by test to simulate certain test cases. Its is false by default. */\n allowTestingArgs?: boolean;\n}\n"]}