@itwin/core-common 4.3.0-dev.9 → 4.4.0-dev.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAC;IAC7D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAChD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EA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,IAAI,CAAC;QAoB5C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,mCAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACrG,CAAC;CACF;AA/GD,8CA+GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\r\nimport { CommonLoggerCategory } from \"../../CommonLoggerCategory\";\r\nimport { BackendReadable, BackendWritable } from \"../../BackendTypes\";\r\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\r\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { RpcOperation } from \"../core/RpcOperation\";\r\nimport { RpcProtocol, SerializedRpcRequest } from \"../core/RpcProtocol\";\r\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\r\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\r\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** An HTTP server request object.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in version 5.0.\r\n */\r\nexport interface HttpServerRequest extends BackendReadable {\r\n aborted: boolean;\r\n httpVersion: string;\r\n httpVersionMajor: number;\r\n httpVersionMinor: number;\r\n complete: boolean;\r\n connection: any;\r\n headers: { [header: string]: string | string[] | undefined };\r\n rawHeaders: string[];\r\n trailers: { [key: string]: string | undefined };\r\n rawTrailers: string[];\r\n setTimeout(msecs: number, callback: () => void): void;\r\n setTimeout(msecs: number, callback: () => void): this;\r\n url?: string;\r\n statusCode?: number;\r\n statusMessage?: string;\r\n socket: any;\r\n destroy(error?: Error): this;\r\n body: string | Buffer;\r\n path: string;\r\n method: string;\r\n ip?: string;\r\n header: (field: string) => string | undefined;\r\n}\r\n\r\n/** An HTTP server response object.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in version 5.0.\r\n */\r\nexport interface HttpServerResponse extends BackendWritable {\r\n send(body?: any): HttpServerResponse;\r\n status(code: number): HttpServerResponse;\r\n set(field: string, value: string): void;\r\n}\r\n\r\n/** The HTTP application protocol.\r\n * @internal\r\n */\r\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\r\n public override preserveStreams = true;\r\n\r\n /** Convenience handler for an RPC operation get request for an HTTP server. */\r\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n return this.handleOperationPostRequest(req, res);\r\n }\r\n\r\n /** Convenience handler for an RPC operation post request for an HTTP server. */\r\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n let request: SerializedRpcRequest;\r\n try {\r\n request = await WebAppRpcRequest.parseRequest(this, req);\r\n } catch (error) {\r\n const message = BentleyError.getErrorMessage(error);\r\n Logger.logError(CommonLoggerCategory.RpcInterfaceBackend, `Failed to parse request: ${message}`, BentleyError.getErrorMetadata(error));\r\n res.status(400);\r\n res.send(JSON.stringify({ message, isError: true }));\r\n return;\r\n }\r\n const fulfillment = await this.fulfill(request);\r\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\r\n }\r\n\r\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\r\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\r\n const description = JSON.stringify(this.openAPIDescription);\r\n res.send(description);\r\n }\r\n\r\n /** Converts an HTTP content type value to an RPC content type value. */\r\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\r\n if (!httpType)\r\n return RpcContentType.Unknown;\r\n\r\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\r\n return RpcContentType.Text;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\r\n return RpcContentType.Binary;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\r\n return RpcContentType.Multipart;\r\n } else {\r\n return RpcContentType.Unknown;\r\n }\r\n }\r\n\r\n /** The OpenAPI-compatible info object for this protocol. */\r\n public abstract info: OpenAPIInfo;\r\n\r\n /** An optional prefix for RPC operation URI paths. */\r\n public pathPrefix: string = \"\";\r\n\r\n /** The RPC request class for this protocol. */\r\n public readonly requestType = WebAppRpcRequest;\r\n\r\n /** Supplies the status corresponding to a protocol-specific code value. */\r\n public override getStatus(code: number): RpcRequestStatus {\r\n switch (code) {\r\n case 404: return RpcRequestStatus.NotFound;\r\n case 202: return RpcRequestStatus.Pending;\r\n case 200: return RpcRequestStatus.Resolved;\r\n case 500: return RpcRequestStatus.Rejected;\r\n case 204: return RpcRequestStatus.NoContent;\r\n case 502: return RpcRequestStatus.BadGateway;\r\n case 503: return RpcRequestStatus.ServiceUnavailable;\r\n case 504: return RpcRequestStatus.GatewayTimeout;\r\n case 408: return RpcRequestStatus.RequestTimeout;\r\n case 429: return RpcRequestStatus.TooManyRequests;\r\n default: return RpcRequestStatus.Unknown;\r\n }\r\n }\r\n\r\n /** Supplies the protocol-specific code corresponding to a status value. */\r\n public override getCode(status: RpcRequestStatus): number {\r\n switch (status) {\r\n case RpcRequestStatus.NotFound: return 404;\r\n case RpcRequestStatus.Pending: return 202;\r\n case RpcRequestStatus.Resolved: return 200;\r\n case RpcRequestStatus.Rejected: return 500;\r\n case RpcRequestStatus.NoContent: return 204;\r\n case RpcRequestStatus.BadGateway: return 502;\r\n case RpcRequestStatus.ServiceUnavailable: return 503;\r\n case RpcRequestStatus.GatewayTimeout: return 504;\r\n case RpcRequestStatus.RequestTimeout: return 408;\r\n case RpcRequestStatus.TooManyRequests: return 429;\r\n default: return 501;\r\n }\r\n }\r\n\r\n public override supportsStatusCategory = true;\r\n\r\n /** Whether an HTTP status code indicates a request timeout. */\r\n public isTimeout(code: number): boolean {\r\n return code === 504;\r\n }\r\n\r\n /** An OpenAPI-compatible description of this protocol.\r\n * @internal\r\n */\r\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\r\n\r\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\r\n * @internal\r\n */\r\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\r\n\r\n /** Constructs an HTTP protocol. */\r\n public constructor(configuration: RpcConfiguration) {\r\n super(configuration);\r\n this.events.addListener(async (event, object) => WebAppRpcLogging.logProtocolEvent(event, object));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"WebAppRpcProtocol.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,qEAAkE;AAGlE,uDAA2F;AAE3F,qDAAwE;AACxE,uCAAiF;AACjF,yDAAsD;AACtD,yDAAsD;AA6CtD;;GAEG;AACH,MAAsB,iBAAkB,SAAQ,yBAAW;IAGzD,+EAA+E;IACxE,KAAK,CAAC,yBAAyB,CAAC,GAAsB,EAAE,GAAuB;QACpF,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,0BAA0B,CAAC,GAAsB,EAAE,GAAuB;QACrF,IAAI,OAA6B,CAAC;QAClC,IAAI;YACF,OAAO,GAAG,MAAM,mCAAgB,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC1D;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,OAAO,GAAG,2BAAY,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YACpD,qBAAM,CAAC,QAAQ,CAAC,2CAAoB,CAAC,mBAAmB,EAAE,4BAA4B,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AAC,OAAO,GAAG,CAAC;YACrD,KAAK,+BAAgB,CAAC,cAAc,CAAC,CAAC,OAAO,GAAG,CAAC;YACjD,KAAK,+BAAgB,CAAC,cAAc,CAAC,CAAC,OAAO,GAAG,CAAC;YACjD,KAAK,+BAAgB,CAAC,eAAe,CAAC,CAAC,OAAO,GAAG,CAAC;YAClD,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC;SACrB;IACH,CAAC;IAID,+DAA+D;IACxD,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,KAAK,GAAG,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,kBAAkB,KAAK,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAO3E,mCAAmC;IACnC,YAAmB,aAA+B;QAChD,KAAK,CAAC,aAAa,CAAC,CAAC;QA3GP,oBAAe,GAAG,IAAI,CAAC;QAgDvC,sDAAsD;QAC/C,eAAU,GAAW,EAAE,CAAC;QAE/B,+CAA+C;QAC/B,gBAAW,GAAG,mCAAgB,CAAC;QAoC/B,2BAAsB,GAAG,IAAI,CAAC;QAoB5C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,mCAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACrG,CAAC;CACF;AA/GD,8CA+GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\r\nimport { CommonLoggerCategory } from \"../../CommonLoggerCategory\";\r\nimport { BackendReadable, BackendWritable } from \"../../BackendTypes\";\r\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\r\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { RpcOperation } from \"../core/RpcOperation\";\r\nimport { RpcProtocol, SerializedRpcRequest } from \"../core/RpcProtocol\";\r\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\r\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\r\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** An HTTP server request object.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in version 5.0.\r\n */\r\nexport interface HttpServerRequest extends BackendReadable {\r\n aborted: boolean;\r\n httpVersion: string;\r\n httpVersionMajor: number;\r\n httpVersionMinor: number;\r\n complete: boolean;\r\n connection: any;\r\n headers: { [header: string]: string | string[] | undefined };\r\n rawHeaders: string[];\r\n trailers: { [key: string]: string | undefined };\r\n trailersDistinct: NodeJS.Dict<string[]>;\r\n rawTrailers: string[];\r\n setTimeout(msecs: number, callback: () => void): void;\r\n setTimeout(msecs: number, callback: () => void): this;\r\n url?: string;\r\n statusCode?: number;\r\n statusMessage?: string;\r\n socket: any;\r\n destroy(error?: Error): this;\r\n body: string | Buffer;\r\n path: string;\r\n method: string;\r\n ip?: string;\r\n header: (field: string) => string | undefined;\r\n headersDistinct: NodeJS.Dict<string[]>;\r\n}\r\n\r\n/** An HTTP server response object.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in version 5.0.\r\n */\r\nexport interface HttpServerResponse extends BackendWritable {\r\n send(body?: any): HttpServerResponse;\r\n status(code: number): HttpServerResponse;\r\n set(field: string, value: string): void;\r\n}\r\n\r\n/** The HTTP application protocol.\r\n * @internal\r\n */\r\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\r\n public override preserveStreams = true;\r\n\r\n /** Convenience handler for an RPC operation get request for an HTTP server. */\r\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n return this.handleOperationPostRequest(req, res);\r\n }\r\n\r\n /** Convenience handler for an RPC operation post request for an HTTP server. */\r\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n let request: SerializedRpcRequest;\r\n try {\r\n request = await WebAppRpcRequest.parseRequest(this, req);\r\n } catch (error) {\r\n const message = BentleyError.getErrorMessage(error);\r\n Logger.logError(CommonLoggerCategory.RpcInterfaceBackend, `Failed to parse request: ${message}`, BentleyError.getErrorMetadata(error));\r\n res.status(400);\r\n res.send(JSON.stringify({ message, isError: true }));\r\n return;\r\n }\r\n const fulfillment = await this.fulfill(request);\r\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\r\n }\r\n\r\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\r\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\r\n const description = JSON.stringify(this.openAPIDescription);\r\n res.send(description);\r\n }\r\n\r\n /** Converts an HTTP content type value to an RPC content type value. */\r\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\r\n if (!httpType)\r\n return RpcContentType.Unknown;\r\n\r\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\r\n return RpcContentType.Text;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\r\n return RpcContentType.Binary;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\r\n return RpcContentType.Multipart;\r\n } else {\r\n return RpcContentType.Unknown;\r\n }\r\n }\r\n\r\n /** The OpenAPI-compatible info object for this protocol. */\r\n public abstract info: OpenAPIInfo;\r\n\r\n /** An optional prefix for RPC operation URI paths. */\r\n public pathPrefix: string = \"\";\r\n\r\n /** The RPC request class for this protocol. */\r\n public readonly requestType = WebAppRpcRequest;\r\n\r\n /** Supplies the status corresponding to a protocol-specific code value. */\r\n public override getStatus(code: number): RpcRequestStatus {\r\n switch (code) {\r\n case 404: return RpcRequestStatus.NotFound;\r\n case 202: return RpcRequestStatus.Pending;\r\n case 200: return RpcRequestStatus.Resolved;\r\n case 500: return RpcRequestStatus.Rejected;\r\n case 204: return RpcRequestStatus.NoContent;\r\n case 502: return RpcRequestStatus.BadGateway;\r\n case 503: return RpcRequestStatus.ServiceUnavailable;\r\n case 504: return RpcRequestStatus.GatewayTimeout;\r\n case 408: return RpcRequestStatus.RequestTimeout;\r\n case 429: return RpcRequestStatus.TooManyRequests;\r\n default: return RpcRequestStatus.Unknown;\r\n }\r\n }\r\n\r\n /** Supplies the protocol-specific code corresponding to a status value. */\r\n public override getCode(status: RpcRequestStatus): number {\r\n switch (status) {\r\n case RpcRequestStatus.NotFound: return 404;\r\n case RpcRequestStatus.Pending: return 202;\r\n case RpcRequestStatus.Resolved: return 200;\r\n case RpcRequestStatus.Rejected: return 500;\r\n case RpcRequestStatus.NoContent: return 204;\r\n case RpcRequestStatus.BadGateway: return 502;\r\n case RpcRequestStatus.ServiceUnavailable: return 503;\r\n case RpcRequestStatus.GatewayTimeout: return 504;\r\n case RpcRequestStatus.RequestTimeout: return 408;\r\n case RpcRequestStatus.TooManyRequests: return 429;\r\n default: return 501;\r\n }\r\n }\r\n\r\n public override supportsStatusCategory = true;\r\n\r\n /** Whether an HTTP status code indicates a request timeout. */\r\n public isTimeout(code: number): boolean {\r\n return code === 504;\r\n }\r\n\r\n /** An OpenAPI-compatible description of this protocol.\r\n * @internal\r\n */\r\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\r\n\r\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\r\n * @internal\r\n */\r\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\r\n\r\n /** Constructs an HTTP protocol. */\r\n public constructor(configuration: RpcConfiguration) {\r\n super(configuration);\r\n this.events.addListener(async (event, object) => WebAppRpcLogging.logProtocolEvent(event, object));\r\n }\r\n}\r\n"]}
@@ -40,6 +40,58 @@ export declare class CutStyle {
40
40
  /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */
41
41
  get matchesDefaults(): boolean;
42
42
  }
43
+ /** Wire format describing a [[ClipIntersectionStyle]].
44
+ * @see [[ClipStyleProps.ClipIntersectionStyle]].
45
+ * @public
46
+ * @extensions
47
+ */
48
+ export interface ClipIntersectionStyleProps {
49
+ /** Color to apply to intersection of geometry and clip planes, default white */
50
+ color?: RgbColorProps;
51
+ /** Number of pixels to be considered intersecting the clip plane, default 1 */
52
+ width?: number;
53
+ }
54
+ /** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.
55
+ * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.
56
+ * @public
57
+ * @extensions
58
+ */
59
+ export declare class ClipIntersectionStyle {
60
+ /** Color to apply to intersection of geometry and clip planes, default white */
61
+ readonly color: RgbColor;
62
+ /** Number of pixels to be considered intersecting the clip plane, default 1 */
63
+ readonly width: number;
64
+ private constructor();
65
+ /** Create a highlight from its components. */
66
+ static create(color?: RgbColor, width?: number): ClipIntersectionStyle;
67
+ static readonly defaults: ClipIntersectionStyle;
68
+ static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle;
69
+ /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */
70
+ toJSON(): ClipIntersectionStyleProps | undefined;
71
+ get matchesDefaults(): boolean;
72
+ }
73
+ /** Arguments supplied to [[ClipStyle.create]].
74
+ * @public
75
+ * @extensions
76
+ */
77
+ export interface ClipStyleCreateArgs {
78
+ /** If `true`, geometry will be produced at the clip planes in a 3d view.
79
+ * - Solids (closed volumes) will produce facets on the clip planes.
80
+ * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.
81
+ * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.
82
+ */
83
+ produceCutGeometry?: boolean;
84
+ /** If `true`, intersection of geometry and clip planes will be colorized */
85
+ colorizeIntersection?: boolean;
86
+ /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */
87
+ cutStyle?: CutStyle;
88
+ /** If defined, geometry inside the clip planes will be drawn in this color. */
89
+ insideColor?: RgbColor;
90
+ /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */
91
+ outsideColor?: RgbColor;
92
+ /** Controls the style of the intersection of geometry and clip planes */
93
+ intersectionStyle?: ClipIntersectionStyle;
94
+ }
43
95
  /** Wire format describing a [[ClipStyle]].
44
96
  * @see [[DisplayStyleSettingsProps.clipStyle]].
45
97
  * @public
@@ -52,12 +104,16 @@ export interface ClipStyleProps {
52
104
  * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.
53
105
  */
54
106
  produceCutGeometry?: boolean;
107
+ /** If 'true', intersection of geometry and clip planes will be colorized */
108
+ colorizeIntersection?: boolean;
55
109
  /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */
56
110
  cutStyle?: CutStyleProps;
57
111
  /** If defined, geometry inside the clip planes will be drawn in this color. */
58
112
  insideColor?: RgbColorProps;
59
113
  /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */
60
114
  outsideColor?: RgbColorProps;
115
+ /** Controls the style of the intersection of geometry and clip planes */
116
+ intersectionStyle?: ClipIntersectionStyleProps;
61
117
  }
62
118
  /** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].
63
119
  * @see [[DisplayStyleSettings.clipStyle]].
@@ -70,17 +126,23 @@ export declare class ClipStyle {
70
126
  * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.
71
127
  */
72
128
  readonly produceCutGeometry: boolean;
129
+ /** If 'true', intersection of geometry and clip planes will be colorized */
130
+ readonly colorizeIntersection: boolean;
73
131
  /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */
74
132
  readonly cutStyle: CutStyle;
75
133
  /** If defined, geometry inside the clip planes will be drawn in this color. */
76
134
  readonly insideColor?: RgbColor;
77
135
  /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */
78
136
  readonly outsideColor?: RgbColor;
137
+ /** Controls the style of the intersection of geometry and clip planes */
138
+ readonly intersectionStyle?: ClipIntersectionStyle;
79
139
  /** The default style, which overrides none of the view's settings. */
80
140
  static readonly defaults: ClipStyle;
81
141
  private constructor();
82
- /** Create a style from its components. */
142
+ /** @deprecated in 4.x. Use [[create(style: ClipStyleCreateArgs]] */
83
143
  static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;
144
+ /** Create a style from its components. */
145
+ static create(style: ClipStyleCreateArgs): ClipStyle;
84
146
  static fromJSON(props?: ClipStyleProps): ClipStyle;
85
147
  /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */
86
148
  toJSON(): ClipStyleProps | undefined;
@@ -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;AAE/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;IA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W,CAAC,EAAE,aAAa,CAAC;IAC5B,4GAA4G;IAC5G,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;CAChD;AAED;;;GAGG;AACH,qBAAa,SAAS;IACpB;;;;OAIG;IACH,SAAgB,kBAAkB,EAAE,OAAO,CAAC;IAC5C,4EAA4E;IAC5E,SAAgB,oBAAoB,EAAE,OAAO,CAAC;IAC9C,kGAAkG;IAClG,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC,+EAA+E;IAC/E,SAAgB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvC,4GAA4G;IAC5G,SAAgB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxC,yEAAyE;IACzE,SAAgB,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAE1D,sEAAsE;IACtE,gBAAuB,QAAQ,YAAmF;IAElH,OAAO;IASP,oEAAoE;WACtD,MAAM,CAAC,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,QAAQ,GAAG,SAAS;IAEjI,0CAA0C;WAC5B,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS;WA0B7C,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,SAAS;IAezD,mGAAmG;IAC5F,MAAM,IAAI,cAAc,GAAG,SAAS;IA6B3C,uHAAuH;IACvH,IAAW,eAAe,IAAI,OAAO,CAKpC;CACF"}
@@ -9,6 +9,7 @@ import { assert, JsonUtils } from "@itwin/core-bentley";
9
9
  import { RgbColor } from "./RgbColor";
10
10
  import { HiddenLine } from "./HiddenLine";
11
11
  import { FeatureAppearance } from "./FeatureSymbology";
12
+ import { ColorDef } from "./ColorDef";
12
13
  /** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.
13
14
  * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.
14
15
  * @public
@@ -61,30 +62,89 @@ class CutStyle {
61
62
  /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */
62
63
  CutStyle.defaults = new CutStyle();
63
64
  export { CutStyle };
65
+ /** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.
66
+ * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.
67
+ * @public
68
+ * @extensions
69
+ */
70
+ class ClipIntersectionStyle {
71
+ constructor(color = RgbColor.fromColorDef(ColorDef.white), width = 1) {
72
+ this.color = color;
73
+ this.width = width;
74
+ }
75
+ /** Create a highlight from its components. */
76
+ static create(color, width) {
77
+ if (!color && !width)
78
+ return this.defaults;
79
+ return new ClipIntersectionStyle(color, width);
80
+ }
81
+ static fromJSON(props) {
82
+ if (props === undefined) {
83
+ return ClipIntersectionStyle.defaults;
84
+ }
85
+ const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);
86
+ const width = props.width ? props.width : 1;
87
+ return new ClipIntersectionStyle(color, width);
88
+ }
89
+ /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */
90
+ toJSON() {
91
+ const props = {};
92
+ if (this.matchesDefaults) {
93
+ return undefined;
94
+ }
95
+ if (this.color)
96
+ props.color = this.color.toJSON();
97
+ if (this.width)
98
+ props.width = this.width;
99
+ return props;
100
+ }
101
+ get matchesDefaults() {
102
+ if (this === ClipIntersectionStyle.defaults)
103
+ return true;
104
+ return !this.color && !this.width;
105
+ }
106
+ }
107
+ ClipIntersectionStyle.defaults = new ClipIntersectionStyle();
108
+ export { ClipIntersectionStyle };
64
109
  /** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].
65
110
  * @see [[DisplayStyleSettings.clipStyle]].
66
111
  * @public
67
112
  */
68
113
  class ClipStyle {
69
- constructor(produceCutGeometry, cutStyle, inside, outside) {
114
+ constructor(produceCutGeometry, colorizeIntersection, cutStyle, inside, outside, intersectionStyle) {
70
115
  this.produceCutGeometry = produceCutGeometry;
116
+ this.colorizeIntersection = colorizeIntersection;
71
117
  this.cutStyle = cutStyle;
72
118
  this.insideColor = inside;
73
119
  this.outsideColor = outside;
120
+ this.intersectionStyle = intersectionStyle;
74
121
  }
75
- /** Create a style from its components. */
76
- static create(produceCutGeometry, cutStyle, insideColor, outsideColor) {
77
- if (!produceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor)
122
+ /** @internal */
123
+ static create(styleOrProduceCutGeometry, cutStyle, insideColor, outsideColor) {
124
+ if (typeof styleOrProduceCutGeometry === "boolean") {
125
+ cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;
126
+ if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {
127
+ return this.defaults;
128
+ }
129
+ return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);
130
+ }
131
+ const style = styleOrProduceCutGeometry;
132
+ if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)
78
133
  return this.defaults;
79
- return new ClipStyle(produceCutGeometry, cutStyle, insideColor, outsideColor);
134
+ const produceCutGeometry = style.produceCutGeometry ? true : false;
135
+ const colorizeIntersection = style.colorizeIntersection ? true : false;
136
+ cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;
137
+ return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);
80
138
  }
81
139
  static fromJSON(props) {
82
140
  if (JsonUtils.isNonEmptyObject(props)) {
83
141
  const produceCutGeometry = props.produceCutGeometry ?? false;
142
+ const colorizeIntersection = props.colorizeIntersection ? true : false;
84
143
  const cutStyle = CutStyle.fromJSON(props.cutStyle);
85
- const inside = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;
86
- const outside = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;
87
- return this.create(produceCutGeometry, cutStyle, inside, outside);
144
+ const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;
145
+ const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;
146
+ const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;
147
+ return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });
88
148
  }
89
149
  return this.defaults;
90
150
  }
@@ -95,6 +155,8 @@ class ClipStyle {
95
155
  const props = {};
96
156
  if (this.produceCutGeometry)
97
157
  props.produceCutGeometry = true;
158
+ if (this.colorizeIntersection)
159
+ props.colorizeIntersection = true;
98
160
  const cutStyle = this.cutStyle.toJSON();
99
161
  if (cutStyle) {
100
162
  assert(!this.cutStyle.matchesDefaults);
@@ -104,16 +166,18 @@ class ClipStyle {
104
166
  props.insideColor = this.insideColor.toJSON();
105
167
  if (this.outsideColor)
106
168
  props.outsideColor = this.outsideColor.toJSON();
169
+ if (this.intersectionStyle)
170
+ props.intersectionStyle = this.intersectionStyle.toJSON();
107
171
  return props;
108
172
  }
109
173
  /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */
110
174
  get matchesDefaults() {
111
175
  if (this === ClipStyle.defaults)
112
176
  return true;
113
- return !this.produceCutGeometry && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults;
177
+ return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;
114
178
  }
115
179
  }
116
180
  /** The default style, which overrides none of the view's settings. */
117
- ClipStyle.defaults = new ClipStyle(false, CutStyle.defaults, undefined, undefined);
181
+ ClipStyle.defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);
118
182
  export { ClipStyle };
119
183
  //# sourceMappingURL=ClipStyle.js.map
@@ -1 +1 @@
1
- {"version":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C;SAfrF,SAAS","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ViewFlagOverrides } from \"./ViewFlags\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { HiddenLine } from \"./HiddenLine\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\n\r\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\r\n * @see [[ClipStyleProps.cutStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CutStyleProps {\r\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\r\n viewflags?: ViewFlagOverrides;\r\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\r\n hiddenLine?: HiddenLine.SettingsProps;\r\n /** If defined, overrides aspects of the cut geometry's symbology. */\r\n appearance?: FeatureAppearanceProps;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\r\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\r\n * @public\r\n */\r\nexport class CutStyle {\r\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\r\n public readonly viewflags: Readonly<ViewFlagOverrides>;\r\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\r\n public readonly hiddenLine?: HiddenLine.Settings;\r\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\r\n public readonly appearance?: FeatureAppearance;\r\n\r\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\r\n public static readonly defaults = new CutStyle();\r\n\r\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\r\n this.viewflags = viewflags ?? {};\r\n if (hiddenLine && !hiddenLine.matchesDefaults)\r\n this.hiddenLine = hiddenLine;\r\n\r\n if (appearance && !appearance.matchesDefaults)\r\n this.appearance = appearance;\r\n }\r\n\r\n /** Create a CutStyle from its components. */\r\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\r\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\r\n return new CutStyle(viewflags, hiddenLine, appearance);\r\n\r\n return this.defaults;\r\n }\r\n\r\n public static fromJSON(props?: CutStyleProps): CutStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const viewflags = { ...props?.viewflags };\r\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\r\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\r\n\r\n return this.create(viewflags, hiddenLine, appearance);\r\n } else {\r\n return this.defaults;\r\n }\r\n }\r\n\r\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\r\n public toJSON(): CutStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: CutStyleProps = {};\r\n if (JsonUtils.isNonEmptyObject(this.viewflags))\r\n props.viewflags = this.viewflags;\r\n\r\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\r\n props.hiddenLine = this.hiddenLine?.toJSON();\r\n\r\n if (this.appearance && !this.appearance.matchesDefaults)\r\n props.appearance = this.appearance.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\r\n public get matchesDefaults(): boolean {\r\n if (this === CutStyle.defaults)\r\n return true;\r\n\r\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\r\n }\r\n}\r\n\r\n/** Wire format describing a [[ClipStyle]].\r\n * @see [[DisplayStyleSettingsProps.clipStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleProps {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyleProps;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColorProps;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColorProps;\r\n}\r\n\r\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\r\n * @see [[DisplayStyleSettings.clipStyle]].\r\n * @public\r\n */\r\nexport class ClipStyle {\r\n /** If `true`, geometry will be produced at the clip planes.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n public readonly produceCutGeometry: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n public readonly cutStyle: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n public readonly insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n public readonly outsideColor?: RgbColor;\r\n\r\n /** The default style, which overrides none of the view's settings. */\r\n public static readonly defaults = new ClipStyle(false, CutStyle.defaults, undefined, undefined);\r\n\r\n private constructor(produceCutGeometry: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined) {\r\n this.produceCutGeometry = produceCutGeometry;\r\n this.cutStyle = cutStyle;\r\n this.insideColor = inside;\r\n this.outsideColor = outside;\r\n }\r\n\r\n /** Create a style from its components. */\r\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\r\n if (!produceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor)\r\n return this.defaults;\r\n\r\n return new ClipStyle(produceCutGeometry, cutStyle, insideColor, outsideColor);\r\n }\r\n\r\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const produceCutGeometry = props.produceCutGeometry ?? false;\r\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\r\n const inside = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\r\n const outside = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\r\n\r\n return this.create(produceCutGeometry, cutStyle, inside, outside);\r\n }\r\n\r\n return this.defaults;\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: ClipStyleProps = {};\r\n if (this.produceCutGeometry)\r\n props.produceCutGeometry = true;\r\n\r\n const cutStyle = this.cutStyle.toJSON();\r\n if (cutStyle) {\r\n assert(!this.cutStyle.matchesDefaults);\r\n props.cutStyle = cutStyle;\r\n }\r\n\r\n if (this.insideColor)\r\n props.insideColor = this.insideColor.toJSON();\r\n\r\n if (this.outsideColor)\r\n props.outsideColor = this.outsideColor.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipStyle.defaults)\r\n return true;\r\n\r\n return !this.produceCutGeometry && !this.insideColor && !this.outsideColor && this.cutStyle.matches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AAQ,GAAG,QAAQ,CAAC;SAC3B;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;;AA7FD,sEAAsE;AAC/C,kBAAQ,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;SAnBvG,SAAS","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ViewFlagOverrides } from \"./ViewFlags\";\r\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\r\nimport { HiddenLine } from \"./HiddenLine\";\r\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\r\nimport { ColorDef } from \"./ColorDef\";\r\n\r\n/** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry).\r\n * @see [[ClipStyleProps.cutStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CutStyleProps {\r\n /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */\r\n viewflags?: ViewFlagOverrides;\r\n /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */\r\n hiddenLine?: HiddenLine.SettingsProps;\r\n /** If defined, overrides aspects of the cut geometry's symbology. */\r\n appearance?: FeatureAppearanceProps;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.\r\n * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.\r\n * @public\r\n */\r\nexport class CutStyle {\r\n /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */\r\n public readonly viewflags: Readonly<ViewFlagOverrides>;\r\n /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */\r\n public readonly hiddenLine?: HiddenLine.Settings;\r\n /** If defined, overrides aspects of the symbology of the section-cut graphics. */\r\n public readonly appearance?: FeatureAppearance;\r\n\r\n /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */\r\n public static readonly defaults = new CutStyle();\r\n\r\n private constructor(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance) {\r\n this.viewflags = viewflags ?? {};\r\n if (hiddenLine && !hiddenLine.matchesDefaults)\r\n this.hiddenLine = hiddenLine;\r\n\r\n if (appearance && !appearance.matchesDefaults)\r\n this.appearance = appearance;\r\n }\r\n\r\n /** Create a CutStyle from its components. */\r\n public static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle {\r\n if ((viewflags && JsonUtils.isNonEmptyObject(viewflags)) || (hiddenLine && !hiddenLine.matchesDefaults) || (appearance && !appearance.matchesDefaults))\r\n return new CutStyle(viewflags, hiddenLine, appearance);\r\n\r\n return this.defaults;\r\n }\r\n\r\n public static fromJSON(props?: CutStyleProps): CutStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const viewflags = { ...props?.viewflags };\r\n const hiddenLine = props?.hiddenLine ? HiddenLine.Settings.fromJSON(props.hiddenLine) : undefined;\r\n const appearance = props?.appearance ? FeatureAppearance.fromJSON(props.appearance) : undefined;\r\n\r\n return this.create(viewflags, hiddenLine, appearance);\r\n } else {\r\n return this.defaults;\r\n }\r\n }\r\n\r\n /** Return JSON representation. The representation is `undefined` if this style matches the default style. */\r\n public toJSON(): CutStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: CutStyleProps = {};\r\n if (JsonUtils.isNonEmptyObject(this.viewflags))\r\n props.viewflags = this.viewflags;\r\n\r\n if (this.hiddenLine && !this.hiddenLine.matchesDefaults)\r\n props.hiddenLine = this.hiddenLine?.toJSON();\r\n\r\n if (this.appearance && !this.appearance.matchesDefaults)\r\n props.appearance = this.appearance.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */\r\n public get matchesDefaults(): boolean {\r\n if (this === CutStyle.defaults)\r\n return true;\r\n\r\n return !JsonUtils.isNonEmptyObject(this.viewflags) && (!this.hiddenLine || this.hiddenLine.matchesDefaults) && (!this.appearance || this.appearance.matchesDefaults);\r\n }\r\n}\r\n\r\n/** Wire format describing a [[ClipIntersectionStyle]].\r\n * @see [[ClipStyleProps.ClipIntersectionStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipIntersectionStyleProps {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n color?: RgbColorProps;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n width?: number;\r\n}\r\n\r\n/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.\r\n * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ClipIntersectionStyle {\r\n /** Color to apply to intersection of geometry and clip planes, default white */\r\n public readonly color: RgbColor;\r\n /** Number of pixels to be considered intersecting the clip plane, default 1 */\r\n public readonly width: number;\r\n\r\n private constructor(color: RgbColor = RgbColor.fromColorDef(ColorDef.white), width: number = 1) {\r\n this.color = color;\r\n this.width = width;\r\n }\r\n /** Create a highlight from its components. */\r\n public static create(color?: RgbColor, width?: number): ClipIntersectionStyle {\r\n if (!color && !width)\r\n return this.defaults;\r\n\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n public static readonly defaults = new ClipIntersectionStyle();\r\n\r\n public static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle {\r\n if (props === undefined) {\r\n return ClipIntersectionStyle.defaults;\r\n }\r\n\r\n const color = props.color ? RgbColor.fromJSON(props.color) : RgbColor.fromColorDef(ColorDef.white);\r\n const width = props.width ? props.width : 1;\r\n return new ClipIntersectionStyle(color, width);\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipIntersectionStyleProps | undefined {\r\n const props: ClipIntersectionStyleProps = {};\r\n\r\n if (this.matchesDefaults) {\r\n return undefined;\r\n }\r\n\r\n if (this.color)\r\n props.color = this.color.toJSON();\r\n\r\n if (this.width)\r\n props.width = this.width;\r\n\r\n return props;\r\n }\r\n\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipIntersectionStyle.defaults)\r\n return true;\r\n\r\n return !this.color && !this.width;\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[ClipStyle.create]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleCreateArgs {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If `true`, intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyle;\r\n}\r\n\r\n/** Wire format describing a [[ClipStyle]].\r\n * @see [[DisplayStyleSettingsProps.clipStyle]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ClipStyleProps {\r\n /** If `true`, geometry will be produced at the clip planes in a 3d view.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n produceCutGeometry?: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n colorizeIntersection?: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n cutStyle?: CutStyleProps;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n insideColor?: RgbColorProps;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n outsideColor?: RgbColorProps;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n intersectionStyle?: ClipIntersectionStyleProps;\r\n}\r\n\r\n/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].\r\n * @see [[DisplayStyleSettings.clipStyle]].\r\n * @public\r\n */\r\nexport class ClipStyle {\r\n /** If `true`, geometry will be produced at the clip planes.\r\n * - Solids (closed volumes) will produce facets on the clip planes.\r\n * - Other surfaces will produce line strings representing the edges of the surface at the clip planes.\r\n * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models.\r\n */\r\n public readonly produceCutGeometry: boolean;\r\n /** If 'true', intersection of geometry and clip planes will be colorized */\r\n public readonly colorizeIntersection: boolean;\r\n /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */\r\n public readonly cutStyle: CutStyle;\r\n /** If defined, geometry inside the clip planes will be drawn in this color. */\r\n public readonly insideColor?: RgbColor;\r\n /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */\r\n public readonly outsideColor?: RgbColor;\r\n /** Controls the style of the intersection of geometry and clip planes */\r\n public readonly intersectionStyle?: ClipIntersectionStyle;\r\n\r\n /** The default style, which overrides none of the view's settings. */\r\n public static readonly defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);\r\n\r\n private constructor(produceCutGeometry: boolean, colorizeIntersection: boolean, cutStyle: CutStyle, inside: RgbColor | undefined, outside: RgbColor | undefined, intersectionStyle: ClipIntersectionStyle | undefined) {\r\n this.produceCutGeometry = produceCutGeometry;\r\n this.colorizeIntersection = colorizeIntersection;\r\n this.cutStyle = cutStyle;\r\n this.insideColor = inside;\r\n this.outsideColor = outside;\r\n this.intersectionStyle = intersectionStyle;\r\n }\r\n\r\n /** @deprecated in 4.x. Use [[create(style: ClipStyleCreateArgs]] */\r\n public static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle;\r\n\r\n /** Create a style from its components. */\r\n public static create(style: ClipStyleCreateArgs): ClipStyle;\r\n\r\n /** @internal */\r\n public static create(styleOrProduceCutGeometry: ClipStyleCreateArgs | boolean, cutStyle?: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle {\r\n\r\n if (typeof styleOrProduceCutGeometry === \"boolean\") {\r\n cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;\r\n\r\n if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {\r\n return this.defaults;\r\n }\r\n\r\n return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);\r\n }\r\n\r\n const style = styleOrProduceCutGeometry;\r\n if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)\r\n return this.defaults;\r\n\r\n const produceCutGeometry = style.produceCutGeometry ? true : false;\r\n const colorizeIntersection = style.colorizeIntersection ? true : false;\r\n cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;\r\n\r\n return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);\r\n }\r\n\r\n public static fromJSON(props?: ClipStyleProps): ClipStyle {\r\n if (JsonUtils.isNonEmptyObject(props)) {\r\n const produceCutGeometry = props.produceCutGeometry ?? false;\r\n const colorizeIntersection = props.colorizeIntersection ? true : false;\r\n const cutStyle = CutStyle.fromJSON(props.cutStyle);\r\n const insideColor = props.insideColor ? RgbColor.fromJSON(props.insideColor) : undefined;\r\n const outsideColor = props.outsideColor ? RgbColor.fromJSON(props.outsideColor) : undefined;\r\n const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;\r\n\r\n return this.create({produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle});\r\n }\r\n\r\n return this.defaults;\r\n }\r\n\r\n /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */\r\n public toJSON(): ClipStyleProps | undefined {\r\n if (this.matchesDefaults)\r\n return undefined;\r\n\r\n const props: ClipStyleProps = {};\r\n if (this.produceCutGeometry)\r\n props.produceCutGeometry = true;\r\n\r\n if (this.colorizeIntersection)\r\n props.colorizeIntersection = true;\r\n\r\n const cutStyle = this.cutStyle.toJSON();\r\n if (cutStyle) {\r\n assert(!this.cutStyle.matchesDefaults);\r\n props.cutStyle = cutStyle;\r\n }\r\n\r\n if (this.insideColor)\r\n props.insideColor = this.insideColor.toJSON();\r\n\r\n if (this.outsideColor)\r\n props.outsideColor = this.outsideColor.toJSON();\r\n\r\n if (this.intersectionStyle)\r\n props.intersectionStyle = this.intersectionStyle.toJSON();\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */\r\n public get matchesDefaults(): boolean {\r\n if (this === ClipStyle.defaults)\r\n return true;\r\n\r\n return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;\r\n }\r\n}\r\n"]}
@@ -101,6 +101,12 @@ export interface ImageMapLayerProps extends CommonMapLayerProps {
101
101
  accessKey?: MapLayerKey;
102
102
  /** @internal */
103
103
  modelId?: never;
104
+ /** List of query parameters that will get appended to the source.
105
+ * @beta
106
+ */
107
+ queryParams?: {
108
+ [key: string]: string;
109
+ };
104
110
  }
105
111
  /** JSON representation of a [[ModelMapLayerSettings]].
106
112
  * @see [[MapImagerySettings]].
@@ -173,6 +179,19 @@ export declare class ImageMapLayerSettings extends MapLayerSettings {
173
179
  userName?: string;
174
180
  password?: string;
175
181
  accessKey?: MapLayerKey;
182
+ /** List of query parameters to append to the settings URL and persisted as part of the JSON representation.
183
+ * @note Sensitive information like user credentials should be provided in [[unsavedQueryParams]] to ensure it is never persisted.
184
+ * @beta
185
+ */
186
+ savedQueryParams?: {
187
+ [key: string]: string;
188
+ };
189
+ /** List of query parameters that will get appended to the settings URL that should *not* be be persisted part of the JSON representation.
190
+ * @beta
191
+ */
192
+ unsavedQueryParams?: {
193
+ [key: string]: string;
194
+ };
176
195
  readonly subLayers: MapSubLayerSettings[];
177
196
  get source(): string;
178
197
  /** @internal */
@@ -201,6 +220,12 @@ export declare class ImageMapLayerSettings extends MapLayerSettings {
201
220
  /** @internal */
202
221
  protected static mapTypeName(type: BackgroundMapType): "Aerial Imagery" | "Aerial Imagery with labels" | "Streets";
203
222
  setCredentials(userName?: string, password?: string): void;
223
+ /** Collect all query parameters
224
+ * @beta
225
+ */
226
+ collectQueryParams(): {
227
+ [key: string]: string;
228
+ };
204
229
  }
205
230
  /** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
206
231
  * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerSettings.d.ts","sourceRoot":"","sources":["../../src/MapLayerSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAI,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5G,cAAc;AACd,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC9B,mIAAmI;IACnI,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,aAAa;IACb,SAAgB,KAAK,CAAC,EAAE,MAAM,CAAC;IAC/B,gIAAgI;IAChI,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,oFAAoF;IACpF,SAAgB,EAAE,EAAE,UAAU,CAA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CAAC,kBAAkB,CAAC,GAAG,qBAAqB;IAI9E,gBAAgB;cACG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IAM5F,gBAAgB;IACA,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAOhE,0GAA0G;IAC1G,IAAW,qBAAqB,IAAI,OAAO,CAE1C;CACF;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,qBAAqB;IAC7D,OAAO,CAAC,SAAS,CAAC,CAAwB;IAE1C,sEAAsE;IACtE,IAAW,QAAQ,IAAI,qBAAqB,GAAG,SAAS,CAA2B;IAEnF;;;;OAIG;WACoB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,oBAAoB;IAS/E,qDAAqD;IACrC,MAAM,IAAI,iBAAiB;IAQ3C,gBAAgB;IACA,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB;IAWvF,mCAAmC;IACnB,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,oBAAoB;IAUrF,wDAAwD;WAC1C,YAAY,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB;IA2D3I,gBAAgB;WACF,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,GAAG,oBAAoB;IAI/F,aAAa;IACN,iBAAiB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,oBAAoB;CAGhF"}
@@ -1,3 +1,4 @@
1
+ /* eslint-disable deprecation/deprecation */
1
2
  /*---------------------------------------------------------------------------------------------
2
3
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -131,6 +132,9 @@ export class ImageMapLayerSettings extends MapLayerSettings {
131
132
  this.formatId = props.formatId;
132
133
  this.url = props.url;
133
134
  this.accessKey = props.accessKey;
135
+ if (props.queryParams) {
136
+ this.savedQueryParams = { ...props.queryParams };
137
+ }
134
138
  this.subLayers = [];
135
139
  if (!props.subLayers)
136
140
  return;
@@ -150,6 +154,8 @@ export class ImageMapLayerSettings extends MapLayerSettings {
150
154
  props.formatId = this.formatId;
151
155
  if (this.subLayers.length > 0)
152
156
  props.subLayers = this.subLayers.map((x) => x.toJSON());
157
+ if (this.savedQueryParams)
158
+ props.queryParams = { ...this.savedQueryParams };
153
159
  return props;
154
160
  }
155
161
  /** Create a copy of this MapLayerSettings, optionally modifying some of its properties.
@@ -162,6 +168,10 @@ export class ImageMapLayerSettings extends MapLayerSettings {
162
168
  clone.userName = this.userName;
163
169
  clone.password = this.password;
164
170
  clone.accessKey = this.accessKey;
171
+ if (this.unsavedQueryParams)
172
+ clone.unsavedQueryParams = { ...this.unsavedQueryParams };
173
+ if (this.savedQueryParams)
174
+ clone.savedQueryParams = { ...this.savedQueryParams };
165
175
  return clone;
166
176
  }
167
177
  /** @internal */
@@ -171,6 +181,12 @@ export class ImageMapLayerSettings extends MapLayerSettings {
171
181
  props.url = changedProps.url ?? this.url;
172
182
  props.accessKey = changedProps.accessKey ?? this.accessKey;
173
183
  props.subLayers = changedProps.subLayers ?? this.subLayers;
184
+ if (changedProps.queryParams) {
185
+ props.queryParams = { ...changedProps.queryParams };
186
+ }
187
+ else if (this.savedQueryParams) {
188
+ props.queryParams = { ...this.savedQueryParams };
189
+ }
174
190
  return props;
175
191
  }
176
192
  /** @internal */
@@ -239,6 +255,17 @@ export class ImageMapLayerSettings extends MapLayerSettings {
239
255
  this.userName = userName;
240
256
  this.password = password;
241
257
  }
258
+ /** Collect all query parameters
259
+ * @beta
260
+ */
261
+ collectQueryParams() {
262
+ let queryParams = {};
263
+ if (this.savedQueryParams)
264
+ queryParams = { ...this.savedQueryParams };
265
+ if (this.unsavedQueryParams)
266
+ queryParams = { ...queryParams, ...this.unsavedQueryParams };
267
+ return queryParams;
268
+ }
242
269
  }
243
270
  /** Normalized representation of a [[ModelMapLayerProps]] for which values have been validated and default values have been applied where explicit values not defined.
244
271
  * Model map layers are produced from models, typically from two dimensional geometry that may originate in a GIS system.