@itwin/core-common 4.10.0-dev.30 → 4.10.0-dev.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/BackendTypes.d.ts +0 -2
- package/lib/cjs/BackendTypes.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/ElementMesh.js +1 -2
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js +3 -3
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js +2 -2
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/Image.js +4 -4
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/QPoint.d.ts +1 -1
- package/lib/cjs/SolarCalculate.js +4 -5
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/TileProps.js +2 -2
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +1 -1
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/lib/cjs/tile/TileIO.js +4 -4
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +12 -12
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackendTypes.d.ts +0 -2
- package/lib/esm/BackendTypes.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/QPoint.d.ts +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +1 -1
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -2
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpatialClassification.js","sourceRoot":"","sources":["../../src/SpatialClassification.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAN,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,qCAAqC;IACrC,iFAAO,CAAA;IACP,oDAAoD;IACpD,+EAAM,CAAA;IACN,gCAAgC;IAChC,uFAAU,CAAA;IACV,wEAAwE;IACxE,uFAAU,CAAA;IACV,yEAAyE;IACzE,mGAAgB,CAAA;AAClB,CAAC,EAXW,8BAA8B,KAA9B,8BAA8B,QAWzC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,qC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,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IACpF,CAAC;CACF;AAED,SAAS,aAAa,CAAC,OAAe;IACpC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,8BAA8B,CAAC,GAAG,CAAC;QACxC,KAAK,8BAA8B,CAAC,EAAE,CAAC;QACvC,KAAK,8BAA8B,CAAC,MAAM,CAAC;QAC3C,KAAK,8BAA8B,CAAC,MAAM,CAAC;QAC3C,KAAK,8BAA8B,CAAC,YAAY;YAC9C,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,8BAA8B,CAAC,YAAY,CAAC;IACvD,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,OAAe;IACrC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,+BAA+B,CAAC,GAAG,CAAC;QACzC,KAAK,+BAA+B,CAAC,EAAE,CAAC;QACxC,KAAK,+BAA+B,CAAC,MAAM;YACzC,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,+BAA+B,CAAC,MAAM,CAAC;IAClD,CAAC;AACH,CAAC","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 DisplayStyles\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { ModelMapLayerSettings } from \"./MapLayerSettings\";\r\n\r\n/** Describes how a [[SpatialClassifier]] affects the display of classified geometry - that is, geometry intersecting\r\n * the classifier.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SpatialClassifierInsideDisplay {\r\n /** The geometry is not displayed. */\r\n Off = 0,\r\n /** The geometry is displayed without alteration. */\r\n On = 1,\r\n /** The geometry is darkened. */\r\n Dimmed = 2,\r\n /** The geometry is tinted by the [Viewport.hilite]($frontend) color. */\r\n Hilite = 3,\r\n /** The geometry is tinted with the colors of the classifier elements. */\r\n ElementColor = 4,\r\n}\r\n\r\n/** Describes how a [[SpatialClassifier]] affects the display of unclassified geometry - that is, geometry not intersecting\r\n * the classifier.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SpatialClassifierOutsideDisplay {\r\n /** The geometry is not displayed. */\r\n Off = 0,\r\n /** The geometry is displayed without alteration. */\r\n On = 1,\r\n /** The geometry is darkened. */\r\n Dimmed = 2,\r\n}\r\n\r\n/** JSON representation of a [[SpatialClassifierFlags]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifierFlagsProps {\r\n /** See [[SpatialClassifierFlags.inside]]. */\r\n inside: SpatialClassifierInsideDisplay;\r\n /** See [[SpatialClassifierFlags.outside]]. */\r\n outside: SpatialClassifierOutsideDisplay;\r\n /** See [[SpatialClassifierFlags.isVolumeClassifier]]. */\r\n isVolumeClassifier?: boolean;\r\n}\r\n\r\n/** Flags affecting how a [[SpatialClassifier]] is applied.\r\n * @public\r\n */\r\nexport class SpatialClassifierFlags {\r\n /** How geometry intersecting the classifier should be displayed. */\r\n public readonly inside: SpatialClassifierInsideDisplay;\r\n /** How geometry not intersecting the classifier should be displayed. */\r\n public readonly outside: SpatialClassifierOutsideDisplay;\r\n /** True for volume classification; false for planar classification. */\r\n public readonly isVolumeClassifier: boolean;\r\n\r\n /** Construct new flags. */\r\n public constructor(inside = SpatialClassifierInsideDisplay.ElementColor, outside = SpatialClassifierOutsideDisplay.Dimmed, isVolumeClassifier = false) {\r\n this.inside = insideDisplay(inside);\r\n this.outside = outsideDisplay(outside);\r\n this.isVolumeClassifier = isVolumeClassifier;\r\n }\r\n\r\n /** Construct from JSON representation. */\r\n public static fromJSON(props: SpatialClassifierFlagsProps): SpatialClassifierFlags {\r\n return new SpatialClassifierFlags(props.inside, props.outside, true === props.isVolumeClassifier);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): SpatialClassifierFlagsProps {\r\n const props: SpatialClassifierFlagsProps = {\r\n inside: this.inside,\r\n outside: this.outside,\r\n };\r\n\r\n if (this.isVolumeClassifier)\r\n props.isVolumeClassifier = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Create flags indentical to these ones except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps?: Partial<SpatialClassifierFlagsProps>): SpatialClassifierFlags {\r\n if (!changedProps)\r\n return this;\r\n\r\n return SpatialClassifierFlags.fromJSON({ ...this.toJSON(), ...changedProps });\r\n }\r\n\r\n /** Return true if these flags are equivalent to `other`. */\r\n public equals(other: SpatialClassifierFlags): boolean {\r\n if (other === this)\r\n return true;\r\n\r\n return other.inside === this.inside && other.outside === this.outside && other.isVolumeClassifier === this.isVolumeClassifier;\r\n }\r\n\r\n /** Return true if these flags are equivalent to `props`. */\r\n public equalsProps(props: SpatialClassifierFlagsProps): boolean {\r\n return this.inside === props.inside && this.outside === props.outside && this.isVolumeClassifier === (true === props.isVolumeClassifier);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[SpatialClassifier]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifierProps {\r\n /** See [[SpatialClassifier.modelId]]. */\r\n modelId: Id64String;\r\n /** See [[SpatialClassifier.expand]]. */\r\n expand: number;\r\n /** See [[SpatialClassifier.flags]]. */\r\n flags: SpatialClassifierFlagsProps;\r\n /** See [[SpatialClassifier.name]]. */\r\n name: string;\r\n /** Records whether this is the active classifier.\r\n * See [[SpatialClassifier.active]].\r\n */\r\n isActive?: boolean;\r\n}\r\n\r\n/** Describes how to use the geometry of one [GeometricModel]($backend) to classify the contents of other models - most typically, reality models.\r\n * Applying a classifier divides the geometry of the classified model into two groups:\r\n * - Classified (intersecting the classifier); and\r\n * - Unclassified (not intersecting the classifier).\r\n * For example, a model containing the building footprints for a city block could be used to classify a reality mesh captured from photographs of the\r\n * real-world block. Then, buildings within the reality mesh can be selected individually, and present the properties of the classifier geometry (e.g.,\r\n * the address of the building). The appearance of the geometry can also be customized based using [[SpatialClassifierInsideDisplay]] and [[SpatialClassifierOutsideDisplay]].\r\n * Two types of classification are supported:\r\n * - Planar classification, in which the geometry of the classifier model is projected onto a plane to classify geometry within a region extruded perpendicular\r\n * the plane (e.g., the building footprints example); and\r\n * - Volume classification, in which closed, non-intersecting volumes within the classifier classify geometry that intersects (i.e. is contained within) those same volumes (e.g., imagine using boxes instead\r\n * of footprints to classify buildings, or floors of buildings).\r\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\r\n * @see [[SpatialClassifiers]] to define a set of classifiers.\r\n * @see [[ContextRealityModel.classifiers]] to classify a context reality model.\r\n * @see [SpatialModelState.classifiers]($frontend) to classify a persistent reality model.\r\n * @public\r\n */\r\nexport class SpatialClassifier {\r\n /** The Id of the [GeometricModel]($backend) whose geometry is used to produce the classifier. */\r\n public readonly modelId: Id64String;\r\n /** A distance in meters by which to expand the classifier geometry. For example, if line strings are used to represent streets,\r\n * you might expand them to the average width of a street.\r\n */\r\n public readonly expand: number;\r\n /** Flags controlling how to apply the classifier. */\r\n public readonly flags: SpatialClassifierFlags;\r\n /** A user-friendly name, useful for identifying individual classifiers within a [[SpatialClassifiers]]. */\r\n public readonly name: string;\r\n\r\n /** Construct a new classifier. */\r\n public constructor(modelId: Id64String, name: string, flags = new SpatialClassifierFlags(), expand = 0) {\r\n this.modelId = modelId;\r\n this.expand = expand;\r\n this.flags = flags;\r\n this.name = name;\r\n }\r\n\r\n /** Construct from JSON representation. */\r\n public static fromJSON(props: SpatialClassifierProps): SpatialClassifier {\r\n return new SpatialClassifier(props.modelId, props.name, SpatialClassifierFlags.fromJSON(props.flags), props.expand);\r\n }\r\n\r\n /** Convert to JSON representation.\r\n * @note This method always sets the [[SpatialClassifierProps.isActive]] property to `false`.\r\n */\r\n public toJSON(): SpatialClassifierProps {\r\n return {\r\n modelId: this.modelId,\r\n expand: this.expand,\r\n flags: this.flags.toJSON(),\r\n name: this.name,\r\n isActive: false,\r\n };\r\n }\r\n\r\n /** Construct from Model Map Layer.\r\n * @beta\r\n */\r\n public static fromModelMapLayer(mapLayer: ModelMapLayerSettings): SpatialClassifier {\r\n const flags = SpatialClassifierFlags.fromJSON({ inside: SpatialClassifierInsideDisplay.Off, outside: SpatialClassifierOutsideDisplay.Off });\r\n\r\n return new SpatialClassifier(mapLayer.modelId, mapLayer.name, flags);\r\n }\r\n\r\n /** Create a classifier identical to this one except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier {\r\n if (!changedProps)\r\n return this;\r\n\r\n return SpatialClassifier.fromJSON({ ...this.toJSON(), ...changedProps });\r\n }\r\n\r\n /** Return true if this classifier is equivalent to `other`. */\r\n public equals(other: SpatialClassifier): boolean {\r\n if (other === this)\r\n return true;\r\n\r\n return this.modelId === other.modelId && this.expand === other.expand && this.name === other.name && this.flags.equals(other.flags);\r\n }\r\n\r\n /** Return true if this classifier is equivalent to `props`. */\r\n public equalsProps(props: SpatialClassifierProps): boolean {\r\n return this.modelId === props.modelId && this.expand === props.expand && this.name === props.name && this.flags.equalsProps(props.flags);\r\n }\r\n}\r\n\r\n/** An object that can store the JSON representation of a list of [[SpatialClassifier]]s.\r\n * @see [[SpatialClassifiers]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifiersContainer {\r\n /** The list of classifiers. */\r\n classifiers?: SpatialClassifierProps[];\r\n}\r\n\r\n/** A set of [[SpatialClassifier]]s for a given reality model. At most one of the classifiers can be actively classifying the model at any given time.\r\n * The set of classifiers can be presented to the user, listed by name, so that the active classifier can be changed.\r\n * The set of classifiers is populated from its JSON representation and that representation is kept in sync as the set of classifiers is modified.\r\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\r\n * @see [[SpatialClassifier]] for details on how spatial classification works.\r\n * @see [[ContextRealityModel.classifiers]] to define classifiers for a context reality model.\r\n * @see [SpatialModelState.classifiers]($frontend) to define classifiers for a persistent reality model.\r\n * @public\r\n */\r\nexport class SpatialClassifiers implements Iterable<SpatialClassifier> {\r\n private readonly _json: SpatialClassifiersContainer;\r\n private readonly _classifiers: SpatialClassifier[] = [];\r\n private _active?: SpatialClassifier;\r\n\r\n /** Construct a new set of classifiers from the JSON representation. The set will be initialized from `container.classifiers` and that JSON representation\r\n * will be kept in sync with changes made to the set. The caller should not directly modify `container.classifiers` or its contents as that will cause the set to become out\r\n * of sync with the JSON representation.\r\n * The [[active]] classifier will be determined by the first [[SpatialClassifierProps]] whose `isActive` property is set to `true`, if any.\r\n */\r\n public constructor(container: SpatialClassifiersContainer) {\r\n this._json = container;\r\n\r\n const json = this._array;\r\n if (!json)\r\n return;\r\n\r\n for (const props of json) {\r\n const classifier = SpatialClassifier.fromJSON(props);\r\n this._classifiers.push(classifier);\r\n if (props.isActive) {\r\n if (!this._active)\r\n this._active = classifier;\r\n else\r\n props.isActive = false;\r\n }\r\n }\r\n }\r\n\r\n /** The classifier currently classifying the target reality model. The classifier passed to the setter must be one obtained from this set, or one equivalent to\r\n * one contained in this set; in the latter case, the equivalent classifier contained in this set becomes active.\r\n */\r\n /** The classifier currently classifying the target reality model, if any.\r\n * @see [[setActive]] to change the active classifier.\r\n */\r\n public get active(): SpatialClassifier | undefined {\r\n return this._active;\r\n }\r\n\r\n /** Change the [[active]] classifier. The input must be a classifier belonging to this set, or equivalent to one in the set.\r\n * If no equivalent classifier exists in the set, the active classifier remains unchanged.\r\n * @param The classifier to set as active, or `undefined` to clear the active classifier.\r\n * @returns the active classifier.\r\n */\r\n public setActive(active: SpatialClassifier | undefined): SpatialClassifier | undefined {\r\n const array = this._array;\r\n if (!array)\r\n return this.active;\r\n\r\n if (active) {\r\n active = this.findEquivalent(active);\r\n if (!active)\r\n return this.active;\r\n }\r\n\r\n if (active === this.active)\r\n return this.active;\r\n\r\n let propsIndex = -1;\r\n if (active) {\r\n propsIndex = array.findIndex((x) => active!.equalsProps(x));\r\n if (-1 === propsIndex)\r\n return this.active;\r\n }\r\n\r\n this._active = active;\r\n for (let i = 0; i < array.length; i++)\r\n array[i].isActive = (i === propsIndex);\r\n\r\n return this.active;\r\n }\r\n\r\n /** Obtain an iterator over the classifiers contained in this set. */\r\n public [Symbol.iterator](): Iterator<SpatialClassifier> {\r\n return this._classifiers[Symbol.iterator]();\r\n }\r\n\r\n /** The number of classifiers in this set. */\r\n public get size(): number {\r\n return this._array?.length ?? 0;\r\n }\r\n\r\n /** Returns the first classifier that satisfies `criterion`, or `undefined` if no classifier satisfies it. */\r\n public find(criterion: (classifier: SpatialClassifier) => boolean): SpatialClassifier | undefined {\r\n return this._classifiers.find(criterion);\r\n }\r\n\r\n /** Find the first classifier that is equivalent to the supplied classifier, or `undefined` if no equivalent classifier exists in this set. */\r\n public findEquivalent(classifier: SpatialClassifier): SpatialClassifier | undefined {\r\n return this.find((x) => x.equals(classifier));\r\n }\r\n\r\n /** Return true if the specified classifier or one equivalent to it exists in this set. */\r\n public has(classifier: SpatialClassifier): boolean {\r\n return undefined !== this.findEquivalent(classifier);\r\n }\r\n\r\n /** Add a classifier to this set. If an equivalent classifier already exists, the supplied classifier is not added.\r\n * @param classifier The classifier to add.\r\n * @returns The equivalent pre-existing classifier, if one existed; or the supplied classifier, if it was added to the set.\r\n */\r\n public add(classifier: SpatialClassifier): SpatialClassifier {\r\n const existing = this.findEquivalent(classifier);\r\n if (existing)\r\n return existing;\r\n\r\n let array = this._array;\r\n if (!array)\r\n array = this._json.classifiers = [];\r\n\r\n this._classifiers.push(classifier);\r\n array.push(classifier.toJSON());\r\n return classifier;\r\n }\r\n\r\n /** Replace an existing classifier with a different one.\r\n * @param toReplace The classifier to be replaced.\r\n * @param replacement The classifier to replace `toReplace`.\r\n * @returns true if a classifier equivalent to `toReplace` existed in the set and was replaced by `replacement`.\r\n * @note If `toReplace` was the [[active]] classifier, `replacement` will become active.\r\n */\r\n public replace(toReplace: SpatialClassifier, replacement: SpatialClassifier): boolean {\r\n const list = this._array;\r\n if (!list)\r\n return false;\r\n\r\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(toReplace));\r\n if (-1 === classifierIndex)\r\n return false;\r\n\r\n const propsIndex = list.findIndex((x) => toReplace.equalsProps(x));\r\n assert(propsIndex === classifierIndex);\r\n if (-1 === propsIndex)\r\n return false;\r\n\r\n toReplace = this._classifiers[classifierIndex];\r\n const wasActive = this.active === toReplace;\r\n\r\n this._classifiers[classifierIndex] = replacement;\r\n const props = list[propsIndex] = replacement.toJSON();\r\n\r\n if (wasActive) {\r\n props.isActive = true;\r\n this._active = replacement;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** Remove the first classifier equivalent to `classifier` from this set.\r\n * @param classifier The classifier to remove.\r\n * @returns The classifier that was actually removed, or `undefined` if none was removed.\r\n */\r\n public delete(classifier: SpatialClassifier): SpatialClassifier | undefined {\r\n const list = this._array;\r\n if (!list)\r\n return undefined;\r\n\r\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(classifier));\r\n if (-1 === classifierIndex)\r\n return undefined;\r\n\r\n classifier = this._classifiers[classifierIndex];\r\n const propsIndex = list.findIndex((x) => classifier.equalsProps(x));\r\n assert(propsIndex === classifierIndex);\r\n if (-1 === propsIndex)\r\n return undefined;\r\n\r\n list.splice(propsIndex, 1);\r\n this._classifiers.splice(classifierIndex, 1);\r\n if (list.length === 0)\r\n this._json.classifiers = undefined;\r\n\r\n if (classifier === this.active)\r\n this._active = undefined;\r\n\r\n return classifier;\r\n }\r\n\r\n /** Remove all classifiers from this set. */\r\n public clear(): void {\r\n this._classifiers.length = 0;\r\n this._json.classifiers = undefined;\r\n this._active = undefined;\r\n }\r\n\r\n private get _array(): SpatialClassifierProps[] | undefined {\r\n return Array.isArray(this._json.classifiers) ? this._json.classifiers : undefined;\r\n }\r\n}\r\n\r\nfunction insideDisplay(display: number): SpatialClassifierInsideDisplay {\r\n switch (display) {\r\n case SpatialClassifierInsideDisplay.Off:\r\n case SpatialClassifierInsideDisplay.On:\r\n case SpatialClassifierInsideDisplay.Dimmed:\r\n case SpatialClassifierInsideDisplay.Hilite:\r\n case SpatialClassifierInsideDisplay.ElementColor:\r\n return display;\r\n default:\r\n return SpatialClassifierInsideDisplay.ElementColor;\r\n }\r\n}\r\n\r\nfunction outsideDisplay(display: number): SpatialClassifierOutsideDisplay {\r\n switch (display) {\r\n case SpatialClassifierOutsideDisplay.Off:\r\n case SpatialClassifierOutsideDisplay.On:\r\n case SpatialClassifierOutsideDisplay.Dimmed:\r\n return display;\r\n default:\r\n return SpatialClassifierOutsideDisplay.Dimmed;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"SpatialClassification.js","sourceRoot":"","sources":["../../src/SpatialClassification.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAN,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,qCAAqC;IACrC,iFAAO,CAAA;IACP,oDAAoD;IACpD,+EAAM,CAAA;IACN,gCAAgC;IAChC,uFAAU,CAAA;IACV,wEAAwE;IACxE,uFAAU,CAAA;IACV,yEAAyE;IACzE,mGAAgB,CAAA;AAClB,CAAC,EAXW,8BAA8B,KAA9B,8BAA8B,QAWzC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,+BAOX;AAPD,WAAY,+BAA+B;IACzC,qCAAqC;IACrC,mFAAO,CAAA;IACP,oDAAoD;IACpD,iFAAM,CAAA;IACN,gCAAgC;IAChC,yFAAU,CAAA;AACZ,CAAC,EAPW,+BAA+B,KAA/B,+BAA+B,QAO1C;AAeD;;GAEG;AACH,MAAM,OAAO,sBAAsB;IAQjC,2BAA2B;IAC3B,YAAmB,MAAM,GAAG,8BAA8B,CAAC,YAAY,EAAE,OAAO,GAAG,+BAA+B,CAAC,MAAM,EAAE,kBAAkB,GAAG,KAAK;QACnJ,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,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AAY,CAAC;IACvD,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,OAAe;IACrC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,+BAA+B,CAAC,GAAG,CAAC;QACzC,KAAK,+BAA+B,CAAC,EAAE,CAAC;QACxC,KAAK,+BAA+B,CAAC,MAAM;YACzC,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,+BAA+B,CAAC,MAAM,CAAC;IAClD,CAAC;AACH,CAAC","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 DisplayStyles\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { ModelMapLayerSettings } from \"./MapLayerSettings\";\r\n\r\n/** Describes how a [[SpatialClassifier]] affects the display of classified geometry - that is, geometry intersecting\r\n * the classifier.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SpatialClassifierInsideDisplay {\r\n /** The geometry is not displayed. */\r\n Off = 0,\r\n /** The geometry is displayed without alteration. */\r\n On = 1,\r\n /** The geometry is darkened. */\r\n Dimmed = 2,\r\n /** The geometry is tinted by the [Viewport.hilite]($frontend) color. */\r\n Hilite = 3,\r\n /** The geometry is tinted with the colors of the classifier elements. */\r\n ElementColor = 4,\r\n}\r\n\r\n/** Describes how a [[SpatialClassifier]] affects the display of unclassified geometry - that is, geometry not intersecting\r\n * the classifier.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum SpatialClassifierOutsideDisplay {\r\n /** The geometry is not displayed. */\r\n Off = 0,\r\n /** The geometry is displayed without alteration. */\r\n On = 1,\r\n /** The geometry is darkened. */\r\n Dimmed = 2,\r\n}\r\n\r\n/** JSON representation of a [[SpatialClassifierFlags]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifierFlagsProps {\r\n /** See [[SpatialClassifierFlags.inside]]. */\r\n inside: SpatialClassifierInsideDisplay;\r\n /** See [[SpatialClassifierFlags.outside]]. */\r\n outside: SpatialClassifierOutsideDisplay;\r\n /** See [[SpatialClassifierFlags.isVolumeClassifier]]. */\r\n isVolumeClassifier?: boolean;\r\n}\r\n\r\n/** Flags affecting how a [[SpatialClassifier]] is applied.\r\n * @public\r\n */\r\nexport class SpatialClassifierFlags {\r\n /** How geometry intersecting the classifier should be displayed. */\r\n public readonly inside: SpatialClassifierInsideDisplay;\r\n /** How geometry not intersecting the classifier should be displayed. */\r\n public readonly outside: SpatialClassifierOutsideDisplay;\r\n /** True for volume classification; false for planar classification. */\r\n public readonly isVolumeClassifier: boolean;\r\n\r\n /** Construct new flags. */\r\n public constructor(inside = SpatialClassifierInsideDisplay.ElementColor, outside = SpatialClassifierOutsideDisplay.Dimmed, isVolumeClassifier = false) {\r\n this.inside = insideDisplay(inside);\r\n this.outside = outsideDisplay(outside);\r\n this.isVolumeClassifier = isVolumeClassifier;\r\n }\r\n\r\n /** Construct from JSON representation. */\r\n public static fromJSON(props: SpatialClassifierFlagsProps): SpatialClassifierFlags {\r\n return new SpatialClassifierFlags(props.inside, props.outside, true === props.isVolumeClassifier);\r\n }\r\n\r\n /** Convert to JSON representation. */\r\n public toJSON(): SpatialClassifierFlagsProps {\r\n const props: SpatialClassifierFlagsProps = {\r\n inside: this.inside,\r\n outside: this.outside,\r\n };\r\n\r\n if (this.isVolumeClassifier)\r\n props.isVolumeClassifier = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Create flags indentical to these ones except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps?: Partial<SpatialClassifierFlagsProps>): SpatialClassifierFlags {\r\n if (!changedProps)\r\n return this;\r\n\r\n return SpatialClassifierFlags.fromJSON({ ...this.toJSON(), ...changedProps });\r\n }\r\n\r\n /** Return true if these flags are equivalent to `other`. */\r\n public equals(other: SpatialClassifierFlags): boolean {\r\n if (other === this)\r\n return true;\r\n\r\n return other.inside === this.inside && other.outside === this.outside && other.isVolumeClassifier === this.isVolumeClassifier;\r\n }\r\n\r\n /** Return true if these flags are equivalent to `props`. */\r\n public equalsProps(props: SpatialClassifierFlagsProps): boolean {\r\n return this.inside === props.inside && this.outside === props.outside && this.isVolumeClassifier === (true === props.isVolumeClassifier);\r\n }\r\n}\r\n\r\n/** JSON representation of a [[SpatialClassifier]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifierProps {\r\n /** See [[SpatialClassifier.modelId]]. */\r\n modelId: Id64String;\r\n /** See [[SpatialClassifier.expand]]. */\r\n expand: number;\r\n /** See [[SpatialClassifier.flags]]. */\r\n flags: SpatialClassifierFlagsProps;\r\n /** See [[SpatialClassifier.name]]. */\r\n name: string;\r\n /** Records whether this is the active classifier.\r\n * See [[SpatialClassifier.active]].\r\n */\r\n isActive?: boolean;\r\n}\r\n\r\n/** Describes how to use the geometry of one [GeometricModel]($backend) to classify the contents of other models - most typically, reality models.\r\n * Applying a classifier divides the geometry of the classified model into two groups:\r\n * - Classified (intersecting the classifier); and\r\n * - Unclassified (not intersecting the classifier).\r\n * For example, a model containing the building footprints for a city block could be used to classify a reality mesh captured from photographs of the\r\n * real-world block. Then, buildings within the reality mesh can be selected individually, and present the properties of the classifier geometry (e.g.,\r\n * the address of the building). The appearance of the geometry can also be customized based using [[SpatialClassifierInsideDisplay]] and [[SpatialClassifierOutsideDisplay]].\r\n * Two types of classification are supported:\r\n * - Planar classification, in which the geometry of the classifier model is projected onto a plane to classify geometry within a region extruded perpendicular\r\n * the plane (e.g., the building footprints example); and\r\n * - Volume classification, in which closed, non-intersecting volumes within the classifier classify geometry that intersects (i.e. is contained within) those same volumes (e.g., imagine using boxes instead\r\n * of footprints to classify buildings, or floors of buildings).\r\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\r\n * @see [[SpatialClassifiers]] to define a set of classifiers.\r\n * @see [[ContextRealityModel.classifiers]] to classify a context reality model.\r\n * @see [SpatialModelState.classifiers]($frontend) to classify a persistent reality model.\r\n * @public\r\n */\r\nexport class SpatialClassifier {\r\n /** The Id of the [GeometricModel]($backend) whose geometry is used to produce the classifier. */\r\n public readonly modelId: Id64String;\r\n /** A distance in meters by which to expand the classifier geometry. For example, if line strings are used to represent streets,\r\n * you might expand them to the average width of a street.\r\n */\r\n public readonly expand: number;\r\n /** Flags controlling how to apply the classifier. */\r\n public readonly flags: SpatialClassifierFlags;\r\n /** A user-friendly name, useful for identifying individual classifiers within a [[SpatialClassifiers]]. */\r\n public readonly name: string;\r\n\r\n /** Construct a new classifier. */\r\n public constructor(modelId: Id64String, name: string, flags = new SpatialClassifierFlags(), expand = 0) {\r\n this.modelId = modelId;\r\n this.expand = expand;\r\n this.flags = flags;\r\n this.name = name;\r\n }\r\n\r\n /** Construct from JSON representation. */\r\n public static fromJSON(props: SpatialClassifierProps): SpatialClassifier {\r\n return new SpatialClassifier(props.modelId, props.name, SpatialClassifierFlags.fromJSON(props.flags), props.expand);\r\n }\r\n\r\n /** Convert to JSON representation.\r\n * @note This method always sets the [[SpatialClassifierProps.isActive]] property to `false`.\r\n */\r\n public toJSON(): SpatialClassifierProps {\r\n return {\r\n modelId: this.modelId,\r\n expand: this.expand,\r\n flags: this.flags.toJSON(),\r\n name: this.name,\r\n isActive: false,\r\n };\r\n }\r\n\r\n /** Construct from Model Map Layer.\r\n * @beta\r\n */\r\n public static fromModelMapLayer(mapLayer: ModelMapLayerSettings): SpatialClassifier {\r\n const flags = SpatialClassifierFlags.fromJSON({ inside: SpatialClassifierInsideDisplay.Off, outside: SpatialClassifierOutsideDisplay.Off });\r\n\r\n return new SpatialClassifier(mapLayer.modelId, mapLayer.name, flags);\r\n }\r\n\r\n /** Create a classifier identical to this one except for any properties explicitly specified by `changedProps`. */\r\n public clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier {\r\n if (!changedProps)\r\n return this;\r\n\r\n return SpatialClassifier.fromJSON({ ...this.toJSON(), ...changedProps });\r\n }\r\n\r\n /** Return true if this classifier is equivalent to `other`. */\r\n public equals(other: SpatialClassifier): boolean {\r\n if (other === this)\r\n return true;\r\n\r\n return this.modelId === other.modelId && this.expand === other.expand && this.name === other.name && this.flags.equals(other.flags);\r\n }\r\n\r\n /** Return true if this classifier is equivalent to `props`. */\r\n public equalsProps(props: SpatialClassifierProps): boolean {\r\n return this.modelId === props.modelId && this.expand === props.expand && this.name === props.name && this.flags.equalsProps(props.flags);\r\n }\r\n}\r\n\r\n/** An object that can store the JSON representation of a list of [[SpatialClassifier]]s.\r\n * @see [[SpatialClassifiers]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialClassifiersContainer {\r\n /** The list of classifiers. */\r\n classifiers?: SpatialClassifierProps[];\r\n}\r\n\r\n/** A set of [[SpatialClassifier]]s for a given reality model. At most one of the classifiers can be actively classifying the model at any given time.\r\n * The set of classifiers can be presented to the user, listed by name, so that the active classifier can be changed.\r\n * The set of classifiers is populated from its JSON representation and that representation is kept in sync as the set of classifiers is modified.\r\n * @see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].\r\n * @see [[SpatialClassifier]] for details on how spatial classification works.\r\n * @see [[ContextRealityModel.classifiers]] to define classifiers for a context reality model.\r\n * @see [SpatialModelState.classifiers]($frontend) to define classifiers for a persistent reality model.\r\n * @public\r\n */\r\nexport class SpatialClassifiers implements Iterable<SpatialClassifier> {\r\n private readonly _json: SpatialClassifiersContainer;\r\n private readonly _classifiers: SpatialClassifier[] = [];\r\n private _active?: SpatialClassifier;\r\n\r\n /** Construct a new set of classifiers from the JSON representation. The set will be initialized from `container.classifiers` and that JSON representation\r\n * will be kept in sync with changes made to the set. The caller should not directly modify `container.classifiers` or its contents as that will cause the set to become out\r\n * of sync with the JSON representation.\r\n * The [[active]] classifier will be determined by the first [[SpatialClassifierProps]] whose `isActive` property is set to `true`, if any.\r\n */\r\n public constructor(container: SpatialClassifiersContainer) {\r\n this._json = container;\r\n\r\n const json = this._array;\r\n if (!json)\r\n return;\r\n\r\n for (const props of json) {\r\n const classifier = SpatialClassifier.fromJSON(props);\r\n this._classifiers.push(classifier);\r\n if (props.isActive) {\r\n if (!this._active)\r\n this._active = classifier;\r\n else\r\n props.isActive = false;\r\n }\r\n }\r\n }\r\n\r\n /** The classifier currently classifying the target reality model. The classifier passed to the setter must be one obtained from this set, or one equivalent to\r\n * one contained in this set; in the latter case, the equivalent classifier contained in this set becomes active.\r\n */\r\n /** The classifier currently classifying the target reality model, if any.\r\n * @see [[setActive]] to change the active classifier.\r\n */\r\n public get active(): SpatialClassifier | undefined {\r\n return this._active;\r\n }\r\n\r\n /** Change the [[active]] classifier. The input must be a classifier belonging to this set, or equivalent to one in the set.\r\n * If no equivalent classifier exists in the set, the active classifier remains unchanged.\r\n * @param The classifier to set as active, or `undefined` to clear the active classifier.\r\n * @returns the active classifier.\r\n */\r\n public setActive(active: SpatialClassifier | undefined): SpatialClassifier | undefined {\r\n const array = this._array;\r\n if (!array)\r\n return this.active;\r\n\r\n if (active) {\r\n active = this.findEquivalent(active);\r\n if (!active)\r\n return this.active;\r\n }\r\n\r\n if (active === this.active)\r\n return this.active;\r\n\r\n let propsIndex = -1;\r\n if (active) {\r\n propsIndex = array.findIndex((x) => active.equalsProps(x));\r\n if (-1 === propsIndex)\r\n return this.active;\r\n }\r\n\r\n this._active = active;\r\n for (let i = 0; i < array.length; i++)\r\n array[i].isActive = (i === propsIndex);\r\n\r\n return this.active;\r\n }\r\n\r\n /** Obtain an iterator over the classifiers contained in this set. */\r\n public [Symbol.iterator](): Iterator<SpatialClassifier> {\r\n return this._classifiers[Symbol.iterator]();\r\n }\r\n\r\n /** The number of classifiers in this set. */\r\n public get size(): number {\r\n return this._array?.length ?? 0;\r\n }\r\n\r\n /** Returns the first classifier that satisfies `criterion`, or `undefined` if no classifier satisfies it. */\r\n public find(criterion: (classifier: SpatialClassifier) => boolean): SpatialClassifier | undefined {\r\n return this._classifiers.find(criterion);\r\n }\r\n\r\n /** Find the first classifier that is equivalent to the supplied classifier, or `undefined` if no equivalent classifier exists in this set. */\r\n public findEquivalent(classifier: SpatialClassifier): SpatialClassifier | undefined {\r\n return this.find((x) => x.equals(classifier));\r\n }\r\n\r\n /** Return true if the specified classifier or one equivalent to it exists in this set. */\r\n public has(classifier: SpatialClassifier): boolean {\r\n return undefined !== this.findEquivalent(classifier);\r\n }\r\n\r\n /** Add a classifier to this set. If an equivalent classifier already exists, the supplied classifier is not added.\r\n * @param classifier The classifier to add.\r\n * @returns The equivalent pre-existing classifier, if one existed; or the supplied classifier, if it was added to the set.\r\n */\r\n public add(classifier: SpatialClassifier): SpatialClassifier {\r\n const existing = this.findEquivalent(classifier);\r\n if (existing)\r\n return existing;\r\n\r\n let array = this._array;\r\n if (!array)\r\n array = this._json.classifiers = [];\r\n\r\n this._classifiers.push(classifier);\r\n array.push(classifier.toJSON());\r\n return classifier;\r\n }\r\n\r\n /** Replace an existing classifier with a different one.\r\n * @param toReplace The classifier to be replaced.\r\n * @param replacement The classifier to replace `toReplace`.\r\n * @returns true if a classifier equivalent to `toReplace` existed in the set and was replaced by `replacement`.\r\n * @note If `toReplace` was the [[active]] classifier, `replacement` will become active.\r\n */\r\n public replace(toReplace: SpatialClassifier, replacement: SpatialClassifier): boolean {\r\n const list = this._array;\r\n if (!list)\r\n return false;\r\n\r\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(toReplace));\r\n if (-1 === classifierIndex)\r\n return false;\r\n\r\n const propsIndex = list.findIndex((x) => toReplace.equalsProps(x));\r\n assert(propsIndex === classifierIndex);\r\n if (-1 === propsIndex)\r\n return false;\r\n\r\n toReplace = this._classifiers[classifierIndex];\r\n const wasActive = this.active === toReplace;\r\n\r\n this._classifiers[classifierIndex] = replacement;\r\n const props = list[propsIndex] = replacement.toJSON();\r\n\r\n if (wasActive) {\r\n props.isActive = true;\r\n this._active = replacement;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** Remove the first classifier equivalent to `classifier` from this set.\r\n * @param classifier The classifier to remove.\r\n * @returns The classifier that was actually removed, or `undefined` if none was removed.\r\n */\r\n public delete(classifier: SpatialClassifier): SpatialClassifier | undefined {\r\n const list = this._array;\r\n if (!list)\r\n return undefined;\r\n\r\n const classifierIndex = this._classifiers.findIndex((x) => x.equals(classifier));\r\n if (-1 === classifierIndex)\r\n return undefined;\r\n\r\n classifier = this._classifiers[classifierIndex];\r\n const propsIndex = list.findIndex((x) => classifier.equalsProps(x));\r\n assert(propsIndex === classifierIndex);\r\n if (-1 === propsIndex)\r\n return undefined;\r\n\r\n list.splice(propsIndex, 1);\r\n this._classifiers.splice(classifierIndex, 1);\r\n if (list.length === 0)\r\n this._json.classifiers = undefined;\r\n\r\n if (classifier === this.active)\r\n this._active = undefined;\r\n\r\n return classifier;\r\n }\r\n\r\n /** Remove all classifiers from this set. */\r\n public clear(): void {\r\n this._classifiers.length = 0;\r\n this._json.classifiers = undefined;\r\n this._active = undefined;\r\n }\r\n\r\n private get _array(): SpatialClassifierProps[] | undefined {\r\n return Array.isArray(this._json.classifiers) ? this._json.classifiers : undefined;\r\n }\r\n}\r\n\r\nfunction insideDisplay(display: number): SpatialClassifierInsideDisplay {\r\n switch (display) {\r\n case SpatialClassifierInsideDisplay.Off:\r\n case SpatialClassifierInsideDisplay.On:\r\n case SpatialClassifierInsideDisplay.Dimmed:\r\n case SpatialClassifierInsideDisplay.Hilite:\r\n case SpatialClassifierInsideDisplay.ElementColor:\r\n return display;\r\n default:\r\n return SpatialClassifierInsideDisplay.ElementColor;\r\n }\r\n}\r\n\r\nfunction outsideDisplay(display: number): SpatialClassifierOutsideDisplay {\r\n switch (display) {\r\n case SpatialClassifierOutsideDisplay.Off:\r\n case SpatialClassifierOutsideDisplay.On:\r\n case SpatialClassifierOutsideDisplay.Dimmed:\r\n return display;\r\n default:\r\n return SpatialClassifierOutsideDisplay.Dimmed;\r\n }\r\n}\r\n"]}
|
package/lib/esm/ViewProps.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ export declare namespace ViewStoreRpc {
|
|
|
227
227
|
* be incremented according to the rules of semantic versioning. See .\rpc\README-RpcInterfaceVersioning.md for more information.
|
|
228
228
|
* @internal
|
|
229
229
|
*/
|
|
230
|
-
const version
|
|
230
|
+
const version = "4.0.0";
|
|
231
231
|
/** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.
|
|
232
232
|
* Will be a base-36 number with a leading "@".
|
|
233
233
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewProps.d.ts","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnJ,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC;AAEtC;;;;GAIG;AACH,MAA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AE,MAAM,EAAE,QAAQ,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEpE,oCAAoC;QACpC,eAAe,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,QAAQ,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAE1E,8BAA8B;QAC9B,SAAS,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACxE;CACF"}
|
package/lib/esm/ViewProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgPH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAgB,CAAC;IAkCxC,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","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 { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\" as const;\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ViewProps.js","sourceRoot":"","sources":["../../src/ViewProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAgPH;;;GAGG;AACH,MAAM,KAAW,YAAY,CA0W5B;AA1WD,WAAiB,YAAY;IAE3B;;;;OAIG;IACU,oBAAO,GAAG,OAAO,CAAC;IAkC/B,qGAAqG;IACxF,0BAAa,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAgUnF,CAAC,EA1WgB,YAAY,KAAZ,YAAY,QA0W5B","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 { CompressedId64Set, Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { AngleProps, Range3dProps, TransformProps, XYProps, XYZProps, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { CameraProps } from \"./Camera\";\r\nimport { DisplayStyleProps, DisplayStyleSettingsProps } from \"./DisplayStyleSettings\";\r\nimport { DefinitionElementProps, DisplayStyleLoadProps, ElementProps, RenderTimelineProps, SheetProps, ViewAttachmentProps } from \"./ElementProps\";\r\nimport { EntityQueryParams } from \"./EntityProps\";\r\nimport { ModelProps } from \"./ModelProps\";\r\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\r\nimport { ViewDetails3dProps, ViewDetailsProps } from \"./ViewDetails\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\nimport { RenderSchedule } from \"./RenderSchedule\";\r\n\r\n/** The id of either an element or an entry in a ViewStore.\r\n * @public\r\n */\r\nexport type ViewIdString = Id64String; // should also include ViewStoreRpc.IdString when that's @public\r\n\r\n/** As part of a [[ViewStateProps]], describes the [[SpatialViewDefinition]] from which a [SectionDrawing]($backend) was generated.\r\n * @see [[SectionDrawingProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SectionDrawingViewProps {\r\n /** The Id of the spatial view from which the SectionDrawing was generated. */\r\n spatialView: Id64String;\r\n /** If true, the spatial view should be displayed in the context of the drawing view. */\r\n displaySpatialView: boolean;\r\n /** Transform from drawing coordinates to spatial coordinates. If undefined, use identity transform. */\r\n drawingToSpatialTransform?: TransformProps;\r\n}\r\n\r\n/** The response props from the getCustomViewState3dData RPC endpoint\r\n * @internal\r\n */\r\nexport interface CustomViewState3dProps {\r\n modelIds: CompressedId64Set;\r\n modelExtents: Range3dProps;\r\n categoryIds: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * The options passed to the getCustomViewState3dData RPC endpoint.\r\n * @internal\r\n */\r\nexport interface CustomViewState3dCreatorOptions {\r\n modelIds?: CompressedId64Set;\r\n}\r\n\r\n/**\r\n * A result row from querying for subcategories\r\n * @internal\r\n */\r\nexport interface SubCategoryResultRow {\r\n parentId: Id64String;\r\n id: Id64String;\r\n appearance: SubCategoryAppearance.Props;\r\n}\r\n\r\n/**\r\n * Request props for the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateRequestProps {\r\n acsId?: string;\r\n notLoadedModelSelectorStateModels?: CompressedId64Set;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n notLoadedCategoryIds?: CompressedId64Set;\r\n sheetViewAttachmentIds?: CompressedId64Set;\r\n viewStateLoadProps?: ViewStateLoadProps;\r\n baseModelId?: Id64String;\r\n spatialViewId?: Id64String;\r\n}\r\n\r\n/** Response props from the hydrateViewState RPC endpoint.\r\n * @internal\r\n */\r\nexport interface HydrateViewStateResponseProps {\r\n acsElementProps?: ElementProps;\r\n modelSelectorStateModels?: ModelProps[];\r\n // cast this to viewAttachmentInfo[] on the frontend.\r\n sheetViewAttachmentProps?: ViewAttachmentProps[];\r\n sheetViewViews?: (ViewStateProps | undefined)[];\r\n baseModelProps?: ModelProps;\r\n spatialViewProps?: ViewStateProps;\r\n /** @deprecated in 3.x. If loading categoryIds is necessary, see [IModelConnection.SubCategoriesCache.load]($frontend)*/\r\n categoryIdsResult?: SubCategoryResultRow[];\r\n}\r\n\r\n/** Returned from [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateProps {\r\n viewDefinitionProps: ViewDefinitionProps;\r\n categorySelectorProps: CategorySelectorProps;\r\n modelSelectorProps?: ModelSelectorProps;\r\n displayStyleProps: DisplayStyleProps;\r\n /** Sheet-specific properties, if this is a view of a [SheetModel]($backend). */\r\n sheetProps?: SheetProps;\r\n /** The Ids of the [ViewAttachment]($backend)s contained within the [SheetModel]($backend), if this is a sheet view. */\r\n sheetAttachments?: Id64Array;\r\n /** For a [DrawingViewState]($frontend), the extents of the [DrawingModel]($backend), used for determining the upper limits of the view's extents. */\r\n modelExtents?: Range3dProps;\r\n /** Information about the [SectionDrawing]($backend) relevant to displaying a drawing view. */\r\n sectionDrawing?: SectionDrawingViewProps;\r\n}\r\n\r\n/** Options for loading a [[ViewStateProps]] via [IModelConnection.Views.load]($frontend) or [IModelDb.Views.getViewStateData]($backend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewStateLoadProps {\r\n /** Options for loading the view's [[DisplayStyleProps]]. */\r\n displayStyle?: DisplayStyleLoadProps;\r\n\r\n /**\r\n * bindings for query-based selectors\r\n * @beta\r\n */\r\n queryBindings?: {\r\n modelSelector?: ViewStoreRpc.QueryBindings;\r\n categorySelector?: ViewStoreRpc.QueryBindings;\r\n };\r\n}\r\n\r\n/** Properties that define a ModelSelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelSelectorProps extends DefinitionElementProps {\r\n models: Id64Array;\r\n}\r\n\r\n/** Properties that define a CategorySelector\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CategorySelectorProps extends DefinitionElementProps {\r\n categories: Id64Array;\r\n}\r\n\r\n/** Parameters for performing a query on [ViewDefinition]($backend) classes.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewQueryParams extends EntityQueryParams {\r\n wantPrivate?: boolean;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinitionProps extends DefinitionElementProps {\r\n categorySelectorId: ViewIdString;\r\n displayStyleId: ViewIdString;\r\n description?: string;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetailsProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a ViewDefinition3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition3dProps extends ViewDefinitionProps {\r\n /** if true, camera is valid. */\r\n cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n origin: XYZProps;\r\n /** The extent of the view frustum. */\r\n extents: XYZProps;\r\n /** Rotation of the view frustum (could be undefined if going Matrix3d -> YawPitchRoll). */\r\n angles?: YawPitchRollProps;\r\n /** The camera used for this view. */\r\n camera: CameraProps;\r\n jsonProperties?: {\r\n /** Additional properties of the view. */\r\n viewDetails?: ViewDetails3dProps;\r\n };\r\n}\r\n\r\n/** Parameters to construct a SpatialViewDefinition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface SpatialViewDefinitionProps extends ViewDefinition3dProps {\r\n modelSelectorId: ViewIdString;\r\n}\r\n\r\n/** Parameters used to construct a ViewDefinition2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewDefinition2dProps extends ViewDefinitionProps {\r\n baseModelId: Id64String;\r\n origin: XYProps;\r\n delta: XYProps;\r\n angle: AngleProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystemProps extends ElementProps {\r\n type?: number;\r\n description?: string;\r\n}\r\n\r\n/** Properties of AuxCoordSystem2d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem2dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem2d */\r\n origin?: XYProps;\r\n /** Rotation angle */\r\n angle?: AngleProps;\r\n}\r\n\r\n/** Properties of AuxCoordSystem3d\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AuxCoordSystem3dProps extends AuxCoordSystemProps {\r\n /** Origin of the AuxCoordSystem3d */\r\n origin?: XYZProps;\r\n /** Yaw angle */\r\n yaw?: AngleProps;\r\n /** Pitch angle */\r\n pitch?: AngleProps;\r\n /** Roll angle */\r\n roll?: AngleProps;\r\n}\r\n\r\n/**\r\n * Access to a ViewStore from the frontend.\r\n * @beta\r\n */\r\nexport namespace ViewStoreRpc {\r\n\r\n /**\r\n * Version of the Rpc interface. If any methods or interfaces of this API change, this number should\r\n * be incremented according to the rules of semantic versioning. See .\\rpc\\README-RpcInterfaceVersioning.md for more information.\r\n * @internal\r\n */\r\n export const version = \"4.0.0\";\r\n\r\n /** an Id of a View, DisplayStyle, ModelSelector, CategorySelector, or Timeline in a ViewStore.\r\n * Will be a base-36 number with a leading \"@\".\r\n * @public\r\n */\r\n export type IdString = string;\r\n\r\n /**\r\n * A string identifying a group. This may either be a \"group name path\" or the RowString of a group (e.g. either \"group1/design/issues\" or \"@4e3\")\r\n * The syntax is not ambiguous because ViewStoreIdStrings always start with \"@\" and Group names can never contain \"@\".\r\n */\r\n export type ViewGroupSpec = IdString | ViewGroupPath;\r\n\r\n /** The name for a view. */\r\n export type ViewName = string;\r\n\r\n /** The name for a Tag. */\r\n export type TagName = string;\r\n\r\n /** The name of an \"owner\". Should come from the authentication system, so it will be guaranteed unique.\r\n * This name should be chosen by the user rather than their email address.\r\n */\r\n export type OwnerName = string;\r\n\r\n /** The path name of a view group (e.g. \"group1/design/issues\"). Does not include the \"root\" group. */\r\n export type ViewGroupPath = string;\r\n\r\n /** The name for a view group. */\r\n export type ViewGroupName = string;\r\n\r\n /** The name for a view group. */\r\n export type ClassFullName = string;\r\n\r\n /** Determine if a string is an Id of an entry in a ViewStore (base-36 integer with a leading \"@\") */\r\n export const isViewStoreId = (id?: ViewIdString) => true === id?.startsWith(\"@\");\r\n\r\n /** Parameters for querying for views in a ViewStore. */\r\n export interface QueryParams {\r\n /** a list of classFullNames to accept. If not present, all classes are returned. */\r\n readonly classNames?: ClassFullName[];\r\n /** Optional \"LIMIT\" clause to limit the number of views returned. */\r\n readonly limit?: number;\r\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\r\n readonly offset?: number;\r\n /** A string to filter view names. May include wildcards if the `nameCompare` uses LIKE or GLOB (see SQLite documentation for LIKE and GLOB). */\r\n readonly nameSearch?: string;\r\n /** The comparison operator for `nameSearch`. Default is `=` */\r\n readonly nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /* the Id of the view group to query. If not present, the root group is used. There is no way to query for views from multiple view groups in one request. */\r\n readonly group?: IdString;\r\n /** A list of tags to filter views. If present, only views that have one or more of the tags will be returned. */\r\n readonly tags?: TagName[];\r\n /* The name of an owner for private views. If present, private views owned by the owner will also be returned. Shared views are always returned. */\r\n readonly owner?: OwnerName;\r\n }\r\n\r\n /** Parameters for specifying a Query to select Categories or Models. */\r\n export interface SelectorQuery {\r\n /**\r\n * The full ClassName from which to select. If this SelectorQuery is for Categories, this must be or derive from \"BisCore:Category\".\r\n * If this SelectorQuery is for Models, this must be or derive from \"BisCore:Model\".\r\n */\r\n from: ClassFullName;\r\n /** If true, only return instances of `from`. Otherwise, return instances of `from` and any subclasses of `from`. */\r\n only?: boolean;\r\n /**\r\n * filter for query. If present, only instances of `from` that satisfy the filter will be returned.\r\n * If not supplied, all instances of `from` are returned.\r\n * @note\r\n * This value is used into the ECQuery:`SELECT ECInstanceId FROM ${query.from} WHERE ${query.where}`.\r\n */\r\n where?: string;\r\n /** List of Model or Category ids to add to the query results.\r\n * @note This is only valid if there is a `where` clause. Otherwise all instances of `from` will be returned so there is no value in adding ids.\r\n */\r\n adds?: Id64Array | CompressedId64Set;\r\n /** List of Model or Category Ids to remove from the query results. */\r\n removes?: Id64Array | CompressedId64Set;\r\n }\r\n\r\n /** A Model or Category selector may either be a query or a list of Ids. */\r\n export type SelectorProps = { query: SelectorQuery, ids?: never } | { query?: never, ids: Id64Array | CompressedId64Set };\r\n\r\n /** Information about a View in a ViewStore. */\r\n export interface ViewInfo {\r\n /** The Id of the view. */\r\n id: IdString;\r\n /** The name of the view. */\r\n name?: ViewName;\r\n /** The name of the owner of the view. */\r\n owner?: OwnerName;\r\n /** The className of the view. */\r\n className: ClassFullName;\r\n /** The Id of the view group containing the view. */\r\n groupId: IdString;\r\n /** If true, the view is private (unshared) and will only be returned by queries that specify the owner's name. */\r\n isPrivate: boolean;\r\n /** The Id of a ModelSelector, if the view has one. */\r\n modelSelectorId?: IdString;\r\n /** The Id of the CategorySelector for this view. */\r\n categorySelectorId: IdString;\r\n /** The Id of a DisplayStyle for the view. */\r\n displayStyleId: IdString;\r\n /** a list of tags for the view. */\r\n tags?: TagName[];\r\n }\r\n\r\n /** Information about a ViewGroup in a ViewStore. */\r\n export interface ViewGroupInfo {\r\n /** The Id of this view group. */\r\n id: IdString;\r\n /** The name of this view group. */\r\n name: ViewGroupName;\r\n /** The Id of the parent of this view group. If undefined, this is the root group. */\r\n parent?: IdString;\r\n /** The Id of the default view for this view group. */\r\n defaultView?: IdString;\r\n }\r\n\r\n /** Arguments for adding a new view to a ViewStore. */\r\n export interface AddViewArgs {\r\n /** the properties of the ViewDefinition for the new view. */\r\n readonly viewDefinition: ViewDefinitionProps;\r\n\r\n /**\r\n * The properties of a category selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.categorySelectorId` **not** a valid\r\n * `IdString`. In that case, a new category selector will be created with these properties and its Id will be used.\r\n * Otherwise, the categorySelectorId from the ViewDefinition is used. If it does not represent a valid category\r\n * selector, an error is thrown.\r\n */\r\n readonly categorySelectorProps?: CategorySelectorProps;\r\n\r\n /** The properties of a model selector for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.modelSelectorId` **not** a valid\r\n * `IdString`. In that case, a new model selector will be created with these properties and its Id will be used.\r\n * Otherwise, the modelSelectorId from the ViewDefinition is used. If it does not represent a valid model selector,\r\n * an error is thrown.\r\n */\r\n readonly modelSelectorProps?: ModelSelectorProps;\r\n\r\n /** The properties of a display style for the new view.\r\n * @note This value is only used, and should only be present if `viewDefinition.displayStyleId` **not** a valid\r\n * `IdString`. In that case, a new display style will be created with these properties and its Id will be used.\r\n * Otherwise, the displayStyleId from the ViewDefinition is used. If it does not represent a valid display style, an\r\n * error is thrown.\r\n */\r\n readonly displayStyleProps?: DisplayStyleProps;\r\n\r\n /* the owner of the view. Must be present if isPrivate is true. */\r\n readonly owner?: OwnerName;\r\n\r\n /* the Id of the view group for the view. If not present, the view is added to the root group. */\r\n readonly group?: IdString;\r\n\r\n /* if true, the view is private (unshared). */\r\n readonly isPrivate?: boolean;\r\n\r\n /* an optional list of tags for the view. */\r\n readonly tags?: TagName[];\r\n\r\n /** optional thumbnail for the view. */\r\n readonly thumbnail?: ThumbnailProps;\r\n }\r\n\r\n /** Argument for finding a category selector, model selector, display style, or timeline by name or Id. */\r\n export type NameOrId = { name: string, id?: never } | { id: IdString, name?: never };\r\n\r\n /** Bindings for parameterized values in where clause of SelectorQuery\r\n * @see[[ECSqlStatement.bindValues]]\r\n */\r\n export interface QueryBindings {\r\n bindings?: any[] | object;\r\n }\r\n\r\n /**\r\n * Methods for reading from a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreReader`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user only needs read permission to the ViewStore.\r\n */\r\n export interface Reader {\r\n /** Find all views owned by the supplied owner name. */\r\n findViewsByOwner(args: { owner: OwnerName }): Promise<ViewInfo[]>;\r\n\r\n /** Get a category selector by Id. Throws if it does not exist. */\r\n getCategorySelector(args: NameOrId & QueryBindings): Promise<CategorySelectorProps>;\r\n\r\n /** Get a display style by Id. Throws if it does not exist. */\r\n getDisplayStyle(args: NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps>;\r\n\r\n /** Get a model selector by Id. Throws if it does not exist. */\r\n getModelSelector(args: NameOrId & QueryBindings): Promise<ModelSelectorProps>;\r\n\r\n /** Get a thumbnail for a view. */\r\n getThumbnail(args: { viewId: IdString }): Promise<ThumbnailProps | undefined>;\r\n\r\n /** Get a render timeline by Id. Throws if it does not exist. */\r\n getTimeline(args: NameOrId): Promise<RenderTimelineProps>;\r\n\r\n /** Get a view by name. The name can include the *view group path*, if no `groupId` is supplied. */\r\n getViewByName(arg: { name: ViewName, groupId?: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Get a view definition by viewId. Throws if it does not exist. */\r\n getViewDefinition(args: { viewId: IdString }): Promise<ViewDefinitionProps>;\r\n\r\n /** get the properties of a ViewGroup by id. This will include the defaultViewId, if one exists. */\r\n getViewGroupInfo(args: { groupId?: IdString }): Promise<ViewGroupInfo | undefined>;\r\n\r\n /** Get a list of ViewGroups that are children of the supplied parent. If no parent is supplied, the root group is used.\r\n * Each entry in the list includes the id and name of the ViewGroup.\r\n */\r\n getViewGroups(args: { parent?: ViewGroupSpec }): Promise<{ id: IdString, name: string }[]>;\r\n\r\n /** Get the ViewInfo for a view by Id. Returns undefined if the view does not exist. */\r\n getViewInfo(args: { viewId: IdString }): Promise<ViewInfo | undefined>;\r\n\r\n /** Query for a list of ViewInfos for views that match the supplied [[QueryParams]].\r\n * @note The array will be sorted by name, ascending. To limit the size of the array, supply `limit` and `offset` in the QueryParams.\r\n */\r\n queryViews(queryParams: QueryParams): Promise<ViewInfo[]>;\r\n }\r\n\r\n /**\r\n * Methods for writing to a ViewStore via Rpc from a frontend via `IModelConnection.views.viewsStoreWriter`. These\r\n * methods use the *current* ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is\r\n * currently loaded. They will throw exceptions if the request cannot be fulfilled.\r\n * @note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the\r\n * user must have write permission to the ViewStore.\r\n */\r\n export interface Writer {\r\n /**\r\n * Add a category selector to a ViewStore.\r\n * @returns The IdString of the new category selector.\r\n */\r\n addCategorySelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a display style to a ViewStore.\r\n * @returns The IdString of the new display style.\r\n */\r\n addDisplayStyle(args: { name?: string, className: string, settings: DisplayStyleSettingsProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a model selector to a ViewStore.\r\n * @returns The IdString of the new model selector.\r\n */\r\n addModelSelector(args: { name?: string, selector: SelectorProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /**\r\n * Add a thumbnail for a view. If the view already has a thumbnail, it is replaced.\r\n * If a view is deleted, its thumbnail is also deleted.\r\n * @note The thumbnail must be a valid image in PNG or JPEG format.\r\n */\r\n addOrReplaceThumbnail(args: { viewId: IdString, thumbnail: ThumbnailProps }): Promise<void>;\r\n\r\n /** Add tags to a view. If the view already has tags, the new tags are appended to the existing tags. */\r\n addTagsToView(args: { viewId: IdString, tags: TagName[] }): Promise<void>;\r\n\r\n /** Add a render timeline to a ViewStore.\r\n * @returns The IdString of the new timeline.\r\n */\r\n addTimeline(args: { name?: string, timeline: RenderSchedule.ScriptProps, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Add a view to a ViewStore. If no group is supplied, the new view is added to the root view group.\r\n * @returns The IdString of the new view\r\n */\r\n addView(args: AddViewArgs): Promise<IdString>;\r\n\r\n /** Add a view group to a ViewStore. If no parent is supplied, the new group is added to the root view group.\r\n * @returns the IdString of new view group\r\n */\r\n addViewGroup(args: { name: string, parentId?: IdString, owner?: OwnerName }): Promise<IdString>;\r\n\r\n /** Change the default view for a view group. If no group is supplied, this changes the default view for the root view group. */\r\n changeDefaultViewId(args: { defaultView: IdString, group?: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete the thumbnail for a view. */\r\n deleteThumbnail(args: { viewId: IdString }): Promise<void>;\r\n\r\n /**\r\n * Delete a view from a ViewStore. If this is the default view for a view group, it cannot be deleted until another\r\n * view is set as the default.\r\n * @note If this view references a category selector, model selector, or display style that is not referenced by any\r\n * other view, *and do not have a name*, they will each also be deleted. If the view has a thumbnail, it is also\r\n * deleted.\r\n */\r\n deleteView(args: { viewId: IdString }): Promise<void>;\r\n\r\n /** Delete a view group from a ViewStore. This will also delete all views in the group. */\r\n deleteViewGroup(args: { name: ViewGroupSpec }): Promise<void>;\r\n\r\n /** Delete a display style from a ViewStore. If the display style is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown.\r\n */\r\n deleteDisplayStyle(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a model selector from a ViewStore. If the model selector is referenced by any view, it cannot be deleted\r\n * and an exception will be thrown. */\r\n deleteModelSelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a category selector from a ViewStore. If the category selector is referenced by any view, it cannot be\r\n * deleted and an exception will be thrown.\r\n */\r\n deleteCategorySelector(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a render timeline from a ViewStore. */\r\n deleteTimeline(args: { id: IdString }): Promise<void>;\r\n\r\n /** Delete a tag. This removes it from all views where it was used. */\r\n deleteTag(args: { name: TagName }): Promise<void>;\r\n\r\n /** remove a tag from a view. */\r\n removeTagFromView(args: { viewId: IdString, tag: TagName }): Promise<void>;\r\n\r\n /** Update the properties of a category selector. */\r\n updateCategorySelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a display style. */\r\n updateDisplayStyle(args: NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void>;\r\n\r\n /** Update the properties of a model selector. */\r\n updateModelSelector(args: NameOrId & { selector: SelectorProps }): Promise<void>;\r\n\r\n /** Update the properties of a render timeline. */\r\n updateTimeline(args: NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void>;\r\n\r\n /** Update the properties of a view definition. */\r\n updateViewDefinition(args: { viewId: IdString, viewDefinition: ViewDefinitionProps }): Promise<void>;\r\n\r\n /** Change a view from shared to private, or vice versa. If changing to private, the owner must be supplied. */\r\n updateViewShared(arg: { viewId: IdString, isShared: boolean, owner?: string }): Promise<void>;\r\n\r\n /** Set the name of a category selector. */\r\n renameCategorySelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a display style. */\r\n renameDisplayStyle(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a model selector. */\r\n renameModelSelector(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a render timeline. */\r\n renameTimeline(args: { id: IdString, name?: string }): Promise<void>;\r\n\r\n /** Set the name of a view. */\r\n renameView(args: { viewId: IdString, name: string }): Promise<void>;\r\n\r\n /** Set the name of a view group. */\r\n renameViewGroup(args: { groupId: IdString, name: string }): Promise<void>;\r\n\r\n /** rename an existing tag. */\r\n renameTag(args: { oldName: TagName, newName: TagName }): Promise<void>;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,MAAM,KAAW,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC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AG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF","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 IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners!.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,MAAM,KAAW,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC;IAFe,4BAAQ,WAEvB,CAAA;IAED,SAAgB,SAAS;QACvB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACrG,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,SAAgB,IAAI,CAAC,OAA4B;QAC/C,OAAO,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,SAAS,CAAC;IACjH,CAAC;IAFe,wBAAI,OAEnB,CAAA;AACH,CAAC,EAZgB,mBAAmB,KAAnB,mBAAmB,QAYnC;AAED,gBAAgB;AAChB,MAAM,OAAgB,YAAY;IAMhC;QAFU,cAAS,GAAG,IAAI,GAAG,EAA4B,CAAC;QAGxD,YAAY,CAAC,SAAS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C,IAAI,KAAK,uBAAuB,CAAC,MAAM;YACjD,OAAO;QAET,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,eAAe;QAC3B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF","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 IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
|
|
@@ -50,7 +50,7 @@ export declare enum RpcRequestStatus {
|
|
|
50
50
|
}
|
|
51
51
|
/** @public @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future. */
|
|
52
52
|
export declare namespace RpcRequestStatus {
|
|
53
|
-
function isTransientError(status: RpcRequestStatus):
|
|
53
|
+
function isTransientError(status: RpcRequestStatus): status is RpcRequestStatus.BadGateway | RpcRequestStatus.ServiceUnavailable | RpcRequestStatus.GatewayTimeout | RpcRequestStatus.RequestTimeout | RpcRequestStatus.TooManyRequests;
|
|
54
54
|
}
|
|
55
55
|
/** RPC request event types.
|
|
56
56
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcConstants.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConstants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH;;GAEG;AACH,oBAAY,uBAAuB;IACjC,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,cAAc,IAAA;IACd,cAAc,IAAA;IACd,eAAe,IAAA;IACf,uBAAuB,IAAA;IACvB,oBAAoB,IAAA;IACpB,oBAAoB,IAAA;IACpB,iBAAiB,IAAA;IACjB,eAAe,IAAA;IACf,sBAAsB,IAAA;IACtB,sBAAsB,IAAA;IACtB,uBAAuB,KAAA;IACvB,oBAAoB,KAAA;IACpB,wBAAwB,KAAA;CACzB;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,IAAA;IACP,OAAO,IAAA;IACP,SAAS,IAAA;IACT,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,SAAS,IAAA;IACT,UAAU,KAAA;IACV,kBAAkB,KAAA;IAClB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,eAAe,KAAA;CAChB;AAED,+GAA+G;AAC/G,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"RpcConstants.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConstants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH;;GAEG;AACH,oBAAY,uBAAuB;IACjC,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,cAAc,IAAA;IACd,cAAc,IAAA;IACd,eAAe,IAAA;IACf,uBAAuB,IAAA;IACvB,oBAAoB,IAAA;IACpB,oBAAoB,IAAA;IACpB,iBAAiB,IAAA;IACjB,eAAe,IAAA;IACf,sBAAsB,IAAA;IACtB,sBAAsB,IAAA;IACtB,uBAAuB,KAAA;IACvB,oBAAoB,KAAA;IACpB,wBAAwB,KAAA;CACzB;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,IAAA;IACP,OAAO,IAAA;IACP,SAAS,IAAA;IACT,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,SAAS,IAAA;IACT,UAAU,KAAA;IACV,kBAAkB,KAAA;IAClB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,eAAe,KAAA;CAChB;AAED,+GAA+G;AAC/G,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,sLAGxD;CACF;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,aAAa,IAAA;IACb,qBAAqB,IAAA;IACrB,sBAAsB,IAAA;CACvB;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AAED;;;GAGG;AACH,oBAAY,WAAW;IACrB,QAAQ,IAAA;IACR,OAAO,IAAA;CACR;AAID,gBAAgB;AAChB,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcOperation.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcOperation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EACL,oBAAoB,EAAE,wCAAwC,EAAE,yBAAyB,EAAE,4BAA4B,EACxH,MAAM,cAAc,CAAC;AAItB;;GAEG;AACH,q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a,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrF;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,UAAU,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,YAAY;IACvB,wDAAwD;WAC1C,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,QAAQ;IAM7D,mDAAmD;WACrC,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,gBAAgB;IAIvE,2DAA2D;WACvC,YAAY,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIrF,gBAAgB;WACF,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB;IAQ9E,gBAAgB;IAChB,OAAc,QAAQ;6BACC,kBAAkB,GAAG,gBAAgB;2BAGjC,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;wBAGxD,MAAM,QAAQ,cAAc,SAAS,kBAAkB,GAAG,IAAI;MAG9E;CACH"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module RpcInterface
|
|
3
3
|
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
4
|
import { BackendReadable, BackendWritable } from "../../BackendTypes";
|
|
7
5
|
import { RpcConfiguration } from "../core/RpcConfiguration";
|
|
8
6
|
import { RpcContentType, RpcRequestStatus } from "../core/RpcConstants";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[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-
"version": "4.10.0-dev.
|
|
3
|
+
"version": "4.10.0-dev.32",
|
|
4
4
|
"description": "iTwin.js components common to frontend and backend",
|
|
5
5
|
"main": "lib/cjs/core-common.js",
|
|
6
6
|
"module": "lib/esm/core-common.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"js-base64": "^3.6.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@itwin/core-bentley": "^4.10.0-dev.
|
|
31
|
-
"@itwin/core-geometry": "^4.10.0-dev.
|
|
30
|
+
"@itwin/core-bentley": "^4.10.0-dev.32",
|
|
31
|
+
"@itwin/core-geometry": "^4.10.0-dev.32"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@itwin/eslint-plugin": "^4.0.2",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"eslint": "^8.56.0",
|
|
41
41
|
"nyc": "^15.1.0",
|
|
42
42
|
"rimraf": "^3.0.2",
|
|
43
|
-
"typescript": "~5.
|
|
43
|
+
"typescript": "~5.6.2",
|
|
44
44
|
"vitest": "^2.1.0",
|
|
45
|
-
"@itwin/build-tools": "4.10.0-dev.
|
|
46
|
-
"@itwin/core-
|
|
47
|
-
"@itwin/core-
|
|
45
|
+
"@itwin/build-tools": "4.10.0-dev.32",
|
|
46
|
+
"@itwin/core-bentley": "4.10.0-dev.32",
|
|
47
|
+
"@itwin/core-geometry": "4.10.0-dev.32"
|
|
48
48
|
},
|
|
49
49
|
"nyc": {
|
|
50
50
|
"extends": "./node_modules/@itwin/build-tools/.nycrc",
|