@itwin/presentation-frontend 5.2.0-dev.8 → 5.3.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,36 @@
1
1
  # Change Log - @itwin/presentation-frontend
2
2
 
3
- This log was last generated on Thu, 14 Aug 2025 19:42:13 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 17 Sep 2025 17:22:51 GMT and should not be manually modified.
4
+
5
+ ## 5.1.8
6
+ Wed, 17 Sep 2025 17:17:16 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 5.1.7
11
+ Tue, 09 Sep 2025 19:28:04 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 5.1.6
16
+ Mon, 08 Sep 2025 13:53:47 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 5.1.5
21
+ Thu, 04 Sep 2025 13:51:09 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 5.1.4
26
+ Fri, 22 Aug 2025 14:22:33 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 5.1.3
31
+ Wed, 20 Aug 2025 13:57:10 GMT
32
+
33
+ _Version update only_
4
34
 
5
35
  ## 5.1.2
6
36
  Thu, 14 Aug 2025 19:38:08 GMT
@@ -14,6 +14,8 @@ import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
14
14
  /**
15
15
  * Data structure that describes IModel hierarchy change event arguments.
16
16
  * @public
17
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
18
+ * package for creating hierarchies.
17
19
  */
18
20
  export interface IModelHierarchyChangeEventArgs {
19
21
  /** Id of ruleset that was used to create hierarchy. */
@@ -55,6 +57,8 @@ export type MultipleValuesRequestOptions = Paged<{
55
57
  /**
56
58
  * Options for requests that retrieve nodes.
57
59
  * @public
60
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
61
+ * package for creating hierarchies.
58
62
  */
59
63
  export type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;
60
64
  /**
@@ -136,7 +140,10 @@ export declare class PresentationManager implements Disposable {
136
140
  private _defaultFormats?;
137
141
  private _ipcRequestsHandler?;
138
142
  /**
139
- * An event raised when hierarchies created using specific ruleset change
143
+ * An event raised when hierarchies created using specific ruleset change.
144
+ *
145
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
146
+ * package for creating hierarchies.
140
147
  */
141
148
  onIModelHierarchyChanged: BeEvent<(args: IModelHierarchyChangeEventArgs) => void>;
142
149
  /**
@@ -182,17 +189,25 @@ export declare class PresentationManager implements Disposable {
182
189
  vars(rulesetId: string): RulesetVariablesManager;
183
190
  private toRpcTokenOptions;
184
191
  private addRulesetAndVariablesToOptions;
185
- /** Returns an iterator that polls nodes asynchronously. */
192
+ /**
193
+ * Returns an iterator that polls nodes asynchronously.
194
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
195
+ * package for creating hierarchies.
196
+ */
186
197
  getNodesIterator(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{
187
198
  total: number;
188
199
  items: AsyncIterableIterator<Node>;
189
200
  }>;
190
201
  /**
191
- * Retrieves nodes
202
+ * Retrieves nodes.
192
203
  * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
193
204
  */
194
205
  getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]>;
195
- /** Retrieves nodes count. */
206
+ /**
207
+ * Retrieves nodes count.
208
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
209
+ * package for creating hierarchies.
210
+ */
196
211
  getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number>;
197
212
  /**
198
213
  * Retrieves total nodes count and a single page of nodes.
@@ -205,11 +220,21 @@ export declare class PresentationManager implements Disposable {
205
220
  /**
206
221
  * Retrieves hierarchy level descriptor.
207
222
  * @public
223
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
224
+ * package for creating hierarchies.
208
225
  */
209
226
  getNodesDescriptor(requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
210
- /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
227
+ /**
228
+ * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
229
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
230
+ * package for creating hierarchies.
231
+ */
211
232
  getNodePaths(requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
212
- /** Retrieves paths from root nodes to nodes containing filter text in their label. */
233
+ /**
234
+ * Retrieves paths from root nodes to nodes containing filter text in their label.
235
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
236
+ * package for creating hierarchies.
237
+ */
213
238
  getFilteredNodePaths(requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
214
239
  /**
215
240
  * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAA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AC,GAAG,0BAA0B,GACrG,OAAO,CAAC,eAAe,CAAC;IAO3B,4DAA4D;IAC/C,kCAAkC,CAC7C,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;KAAE,CAAC;IAgB5E;;;OAGG;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
1
+ {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EAEjB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,4CAA4C,EAC5C,mCAAmC,EACnC,UAAU,EACV,sCAAsC,EACtC,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,IAAI,EAGJ,MAAM,EAEN,eAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,KAAK,EACL,aAAa,EAGb,eAAe,EACf,eAAe,EACf,qCAAqC,EAGtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EA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A+B,GAAG,4BAA4B,GAC7E,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAQ5C;;;OAGG;IACU,oBAAoB,CAAC,cAAc,GAAG,iBAAiB,EAClE,cAAc,EAAE,qCAAqC,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG,0BAA0B,GACnH,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAoBtC;;;OAGG;IACU,sBAAsB,CACjC,cAAc,EAAE,iCAAiC,CAAC,gBAAgB,EAAE,MAAM,EAAE,eAAe,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACvJ,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,cAAc,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC;IAiCvE,2DAA2D;IAC9C,yBAAyB,CACpC,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GACrG,OAAO,CAAC,eAAe,CAAC;IAO3B,4DAA4D;IAC/C,kCAAkC,CAC7C,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;KAAE,CAAC;IAgB5E;;;OAGG;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
@@ -38,8 +38,12 @@ class PresentationManager {
38
38
  _defaultFormats;
39
39
  _ipcRequestsHandler;
40
40
  /**
41
- * An event raised when hierarchies created using specific ruleset change
41
+ * An event raised when hierarchies created using specific ruleset change.
42
+ *
43
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
44
+ * package for creating hierarchies.
42
45
  */
46
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
43
47
  onIModelHierarchyChanged = new core_bentley_1.BeEvent();
44
48
  /**
45
49
  * An event raised when content created using specific ruleset changes
@@ -118,7 +122,9 @@ class PresentationManager {
118
122
  if (updateInfo.content) {
119
123
  this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });
120
124
  }
125
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
121
126
  if (updateInfo.hierarchy) {
127
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
122
128
  this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });
123
129
  }
124
130
  }
@@ -200,7 +206,12 @@ class PresentationManager {
200
206
  }
201
207
  return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };
202
208
  }
203
- /** Returns an iterator that polls nodes asynchronously. */
209
+ /* eslint-disable @typescript-eslint/no-deprecated */
210
+ /**
211
+ * Returns an iterator that polls nodes asynchronously.
212
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
213
+ * package for creating hierarchies.
214
+ */
204
215
  async getNodesIterator(requestOptions) {
205
216
  (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
206
217
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -218,14 +229,18 @@ class PresentationManager {
218
229
  return generator.createAsyncIteratorResponse();
219
230
  }
220
231
  /**
221
- * Retrieves nodes
232
+ * Retrieves nodes.
222
233
  * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
223
234
  */
224
235
  async getNodes(requestOptions) {
225
236
  const result = await this.getNodesIterator(requestOptions);
226
237
  return collect(result.items);
227
238
  }
228
- /** Retrieves nodes count. */
239
+ /**
240
+ * Retrieves nodes count.
241
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
242
+ * package for creating hierarchies.
243
+ */
229
244
  async getNodesCount(requestOptions) {
230
245
  (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
231
246
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -246,6 +261,8 @@ class PresentationManager {
246
261
  /**
247
262
  * Retrieves hierarchy level descriptor.
248
263
  * @public
264
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
265
+ * package for creating hierarchies.
249
266
  */
250
267
  async getNodesDescriptor(requestOptions) {
251
268
  (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
@@ -260,7 +277,11 @@ class PresentationManager {
260
277
  await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
261
278
  }
262
279
  }
263
- /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
280
+ /**
281
+ * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
282
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
283
+ * package for creating hierarchies.
284
+ */
264
285
  async getNodePaths(requestOptions) {
265
286
  (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
266
287
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -268,13 +289,18 @@ class PresentationManager {
268
289
  const result = await this._requestsHandler.getNodePaths(rpcOptions);
269
290
  return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
270
291
  }
271
- /** Retrieves paths from root nodes to nodes containing filter text in their label. */
292
+ /**
293
+ * Retrieves paths from root nodes to nodes containing filter text in their label.
294
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
295
+ * package for creating hierarchies.
296
+ */
272
297
  async getFilteredNodePaths(requestOptions) {
273
298
  (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
274
299
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
275
300
  const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));
276
301
  return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
277
302
  }
303
+ /* eslint-enable @typescript-eslint/no-deprecated */
278
304
  /**
279
305
  * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
280
306
  * its related instances for loading related and navigation properties.
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManager.js","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAsF;AACtF,wDAA2E;AAG3E,oEA0CoC;AACpC,kEAM6C;AAC7C,gEAAuE;AACvE,2FAAyG;AACzG,6DAA0H;AAC1H,mEAA6D;AAC7D,mEAAqE;AACrE,2DAAyE;AACzE,6EAAoG;AACpG,iFAA2E;AAoI3E;;;;;GAKG;AACH,MAAa,mBAAmB;IACtB,gBAAgB,CAAqB;IACrC,SAAS,CAAiB;IAC1B,mBAAmB,CAA6B;IAChD,yBAAyB,CAA4B;IACrD,YAAY,CAAuC;IACnD,mBAAmB,CAAc;IACjC,sBAAsB,CAA8C;IAC5E,4DAA4D;IACpD,eAAe,CAAc;IAC7B,mBAAmB,CAAsB;IAEjD;;OAEG;IACI,wBAAwB,GAAG,IAAI,sBAAO,EAAkD,CAAC;IAEhG;;OAEG;IACI,sBAAsB,GAAG,IAAI,sBAAO,EAAgD,CAAC;IAE5F;;;;;;OAMG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,yBAAyB,IAAI,yBAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;IACxF,CAAC;IACD,IAAW,gBAAgB,CAAC,KAAgC;QAC1D,IAAI,CAAC,yB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KAAK,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent, CompressedId64Set, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { IModelApp, IModelConnection, IpcApp } from \"@itwin/core-frontend\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { SchemaContext } from \"@itwin/ecschema-metadata\";\nimport {\n ClientDiagnosticsAttribute,\n Content,\n ContentDescriptorRequestOptions,\n ContentFlags,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n ContentUpdateInfo,\n DefaultContentDisplayTypes,\n Descriptor,\n DescriptorOverrides,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DisplayValueGroup,\n DistinctValuesRequestOptions,\n ElementProperties,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n FormatsMap,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n HierarchyUpdateInfo,\n InstanceKey,\n Item,\n ItemJSON,\n Key,\n KeySet,\n KoqPropertyValueFormatter,\n LabelDefinition,\n Node,\n NodeKey,\n NodePathElement,\n Paged,\n PagedResponse,\n PageOptions,\n Ruleset,\n RulesetVariable,\n SelectClassInfo,\n SingleElementPropertiesRequestOptions,\n UpdateInfo,\n VariableValueTypes,\n} from \"@itwin/presentation-common\";\nimport {\n buildElementProperties,\n ContentFormatter,\n ContentPropertyValueFormatter,\n PresentationIpcEvents,\n RpcRequestsHandler,\n} from \"@itwin/presentation-common/internal\";\nimport { TRANSIENT_ELEMENT_CLASSNAME } from \"@itwin/unified-selection\";\nimport { ensureIModelInitialized, startIModelInitialization } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { RulesetManager, RulesetManagerImpl } from \"./RulesetManager.js\";\nimport { RulesetVariablesManager, RulesetVariablesManagerImpl } from \"./RulesetVariablesManager.js\";\nimport { StreamedResponseGenerator } from \"./StreamedResponseGenerator.js\";\n\n/**\n * Data structure that describes IModel hierarchy change event arguments.\n * @public\n */\nexport interface IModelHierarchyChangeEventArgs {\n /** Id of ruleset that was used to create hierarchy. */\n rulesetId: string;\n /** Hierarchy changes info. */\n updateInfo: HierarchyUpdateInfo;\n /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Data structure that describes iModel content change event arguments.\n * @public\n */\nexport interface IModelContentChangeEventArgs {\n /** Id of ruleset that was used to create content. */\n rulesetId: string;\n /** Content changes info. */\n updateInfo: ContentUpdateInfo;\n /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Options for requests that can return multiple pages of items concurrently.\n * @public\n */\nexport type MultipleValuesRequestOptions = Paged<{\n /**\n * Max number of requests that should be made to the backend to fulfill the whole request.\n * `undefined` means no limit, so in that case all requests are sent at once.\n */\n maxParallelRequests?: number;\n\n /**\n * Size of a single batch when fetching data through multiple requests. If not set,\n * the fall back is requested page size. If the page size is not set, the backend\n * decides how many items to return.\n */\n batchSize?: number;\n}>;\n\n/**\n * Options for requests that retrieve nodes.\n * @public\n */\nexport type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve content.\n * @public\n */\nexport type GetContentRequestOptions = ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve distinct values.\n * @public\n */\nexport type GetDistinctValuesRequestOptions = DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Properties used to configure [[PresentationManager]]\n * @public\n */\nexport interface PresentationManagerProps {\n /**\n * Sets the active locale to use when localizing presentation-related\n * strings. It can later be changed through [[PresentationManager]].\n */\n activeLocale?: string;\n\n /**\n * Sets the active unit system to use for formatting property values with\n * units. The value can later be changed through [[PresentationManager.activeUnitSystem]] setter or\n * overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`\n * is used by default.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.\n */\n activeUnitSystem?: UnitSystemKey;\n\n /**\n * ID used to identify client that requests data. Generally, clients should\n * store this ID in their local storage so the ID can be reused across\n * sessions - this allows reusing some caches.\n *\n * Defaults to a unique GUID as a client id.\n */\n clientId?: string;\n\n /**\n * Timeout (in milliseconds) for how long we're going to wait for RPC request to be fulfilled before throwing\n * a timeout error.\n *\n * Defaults to 10 minutes.\n */\n requestTimeout?: number;\n\n /**\n * Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelConnection]($core-frontend).\n * [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. By default [IModelConnection.schemaContext]($core-frontend) is now used instead.\n */\n schemaContextProvider?: (imodel: IModelConnection) => SchemaContext;\n\n /**\n * A map of default unit formats to use for formatting properties that don't have a presentation format\n * in requested unit system.\n *\n * @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when\n * supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n defaultFormats?: FormatsMap;\n}\n\n/** @internal */\ninterface PresentationManagerInternalProps {\n rpcRequestsHandler?: RpcRequestsHandler;\n ipcRequestsHandler?: IpcRequestsHandler;\n}\n\n/**\n * Frontend Presentation manager which basically just forwards all calls to\n * the backend implementation.\n *\n * @public\n */\nexport class PresentationManager implements Disposable {\n private _requestsHandler: RpcRequestsHandler;\n private _rulesets: RulesetManager;\n private _localizationHelper: FrontendLocalizationHelper;\n private _explicitActiveUnitSystem: UnitSystemKey | undefined;\n private _rulesetVars: Map<string, RulesetVariablesManager>;\n private _clearEventListener?: () => void;\n private _schemaContextProvider: (imodel: IModelConnection) => SchemaContext;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _defaultFormats?: FormatsMap;\n private _ipcRequestsHandler?: IpcRequestsHandler;\n\n /**\n * An event raised when hierarchies created using specific ruleset change\n */\n public onIModelHierarchyChanged = new BeEvent<(args: IModelHierarchyChangeEventArgs) => void>();\n\n /**\n * An event raised when content created using specific ruleset changes\n */\n public onIModelContentChanged = new BeEvent<(args: IModelContentChangeEventArgs) => void>();\n\n /**\n * Get / set active unit system used to format property values with units.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment\n * [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override\n * is not set.\n */\n public get activeUnitSystem(): UnitSystemKey {\n return this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n }\n public set activeUnitSystem(value: UnitSystemKey | undefined) {\n this._explicitActiveUnitSystem = value;\n }\n\n private constructor(props?: PresentationManagerProps) {\n if (props) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._explicitActiveUnitSystem = props.activeUnitSystem;\n }\n\n this._requestsHandler =\n (props as PresentationManagerInternalProps)?.rpcRequestsHandler ??\n new RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);\n this._rulesetVars = new Map<string, RulesetVariablesManager>();\n this._rulesets = RulesetManagerImpl.create();\n this._localizationHelper = new FrontendLocalizationHelper(props?.activeLocale);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel: IModelConnection) => imodel.schemaContext);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._defaultFormats = props?.defaultFormats;\n\n if (IpcApp.isValid) {\n // Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.\n this._clearEventListener = IpcApp.addListener(PresentationIpcEvents.Update, this.onUpdate);\n this._ipcRequestsHandler = (props as PresentationManagerInternalProps)?.ipcRequestsHandler ?? new IpcRequestsHandler(this._requestsHandler.clientId);\n }\n }\n\n /** Get / set active locale used for localizing presentation data */\n public get activeLocale(): string | undefined {\n return this._localizationHelper.locale;\n }\n public set activeLocale(locale: string | undefined) {\n this._localizationHelper.locale = locale;\n }\n\n public [Symbol.dispose]() {\n if (this._clearEventListener) {\n this._clearEventListener();\n this._clearEventListener = undefined;\n }\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n private onUpdate = (_evt: Event, report: UpdateInfo) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleUpdateAsync(report);\n };\n\n /** @note This is only called in native apps after changes in iModels */\n private async handleUpdateAsync(report: UpdateInfo) {\n for (const imodelKey in report) {\n /* c8 ignore next 3 */\n if (!report.hasOwnProperty(imodelKey)) {\n continue;\n }\n\n const imodelReport = report[imodelKey];\n for (const rulesetId in imodelReport) {\n /* c8 ignore next 3 */\n if (!imodelReport.hasOwnProperty(rulesetId)) {\n continue;\n }\n\n const updateInfo = imodelReport[rulesetId];\n if (updateInfo.content) {\n this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });\n }\n if (updateInfo.hierarchy) {\n this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });\n }\n }\n }\n }\n\n /**\n * Create a new PresentationManager instance\n * @param props Optional properties used to configure the manager\n */\n public static create(props?: PresentationManagerProps) {\n return new PresentationManager(props);\n }\n\n /** @internal */\n public get [_presentation_manager_rpcRequestsHandler]() {\n return this._requestsHandler;\n }\n\n /** @internal */\n public get [_presentation_manager_ipcRequestsHandler]() {\n return this._ipcRequestsHandler;\n }\n\n /**\n * Get rulesets manager\n */\n public rulesets() {\n return this._rulesets;\n }\n\n /**\n * Get ruleset variables manager for specific ruleset\n * @param rulesetId Id of the ruleset to get the vars manager for\n */\n public vars(rulesetId: string) {\n if (!this._rulesetVars.has(rulesetId)) {\n const varsManager = new RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);\n this._rulesetVars.set(rulesetId, varsManager);\n }\n return this._rulesetVars.get(rulesetId)!;\n }\n\n private toRpcTokenOptions<TOptions extends { imodel: IModelConnection; locale?: string; unitSystem?: UnitSystemKey; rulesetVariables?: RulesetVariable[] }>(\n requestOptions: TOptions,\n ) {\n // 1. put default `locale` and `unitSystem`\n // 2. put all `requestOptions` members (if `locale` or `unitSystem` are set, they'll override the defaults put at #1)\n // 3. put `imodel` of type `IModelRpcProps` which overwrites the `imodel` from `requestOptions` put at #2\n const defaultOptions: Pick<TOptions, \"locale\" | \"unitSystem\"> = {};\n if (this.activeLocale) {\n defaultOptions.locale = this.activeLocale;\n }\n defaultOptions.unitSystem = this.activeUnitSystem; // eslint-disable-line @typescript-eslint/no-deprecated\n\n const { imodel, rulesetVariables, ...rpcRequestOptions } = requestOptions;\n return {\n ...defaultOptions,\n ...rpcRequestOptions,\n ...(rulesetVariables ? { rulesetVariables: rulesetVariables.map(RulesetVariable.toJSON) } : {}),\n imodel: imodel.getRpcProps(),\n };\n }\n\n private async addRulesetAndVariablesToOptions<TOptions extends { rulesetOrId: Ruleset | string; rulesetVariables?: RulesetVariable[] }>(options: TOptions) {\n const { rulesetOrId, rulesetVariables } = options;\n let foundRulesetOrId: Ruleset | string;\n if (typeof rulesetOrId === \"object\") {\n foundRulesetOrId = rulesetOrId;\n } else {\n const foundRuleset = await this._rulesets.get(rulesetOrId);\n foundRulesetOrId = foundRuleset ? foundRuleset.toJSON() : rulesetOrId;\n }\n const rulesetId = typeof foundRulesetOrId === \"object\" ? foundRulesetOrId.id : foundRulesetOrId;\n\n // All Id64Array variable values must be sorted for serialization to JSON to work. RulesetVariablesManager\n // sorts them before storing, so that part is taken care of, but we need to ensure that variables coming from\n // request options are also sorted.\n const variables = (rulesetVariables ?? []).map((variable) => {\n if (variable.type === VariableValueTypes.Id64Array) {\n return { ...variable, value: OrderedId64Iterable.sortArray(variable.value) };\n }\n return variable;\n });\n if (!this._ipcRequestsHandler) {\n // only need to add variables from variables manager if there's no IPC\n // handler - if there is one, the variables are already known by the backend\n variables.push(...this.vars(rulesetId).getAllVariables());\n }\n\n return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };\n }\n\n /** Returns an iterator that polls nodes asynchronously. */\n public async getNodesIterator(\n requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<Node> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });\n return {\n total: result.total,\n items: this._localizationHelper.getLocalizedNodes(result.items),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves nodes\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]> {\n const result = await this.getNodesIterator(requestOptions);\n return collect(result.items);\n }\n\n /** Retrieves nodes count. */\n public async getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n return this._requestsHandler.getNodesCount(rpcOptions);\n }\n\n /**\n * Retrieves total nodes count and a single page of nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{ count: number; nodes: Node[] }> {\n const result = await this.getNodesIterator(requestOptions);\n return {\n count: result.total,\n nodes: await collect(result.items),\n };\n }\n\n /**\n * Retrieves hierarchy level descriptor.\n * @public\n */\n public async getNodesDescriptor(\n requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodesDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */\n public async getNodePaths(\n requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodePaths(rpcOptions);\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /** Retrieves paths from root nodes to nodes containing filter text in their label. */\n public async getFilteredNodePaths(\n requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /**\n * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,\n * its related instances for loading related and navigation properties.\n * @public\n */\n public async getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions(requestOptions);\n const result = await this._requestsHandler.getContentSources(rpcOptions);\n return result.sources.map((sourceJson) => SelectClassInfo.fromCompressedJSON(sourceJson, result.classesMap));\n }\n\n /** Retrieves the content descriptor which describes the content and can be used to customize it. */\n public async getContentDescriptor(\n requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n keys: stripTransientElementKeys(options.keys).toJSON(),\n });\n const result = await this._requestsHandler.getContentDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves overall content set size. */\n public async getContentSetSize(requestOptions: GetContentRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n });\n return this._requestsHandler.getContentSetSize(rpcOptions);\n }\n\n private async getContentIteratorInternal(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const firstPageSize = options.batchSize ?? requestOptions.paging?.size;\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n omitFormattedValues: true,\n ...(firstPageSize ? { paging: { ...requestOptions.paging, size: firstPageSize } } : undefined),\n });\n\n let contentFormatter: ContentFormatter | undefined;\n if (!requestOptions.omitFormattedValues) {\n const schemaContext = this._schemaContextProvider(requestOptions.imodel);\n const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n const koqPropertyFormatter = new KoqPropertyValueFormatter({\n schemaContext,\n formatsProvider: IModelApp.formatsProvider,\n });\n koqPropertyFormatter.defaultFormats = this._defaultFormats;\n contentFormatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);\n }\n\n let descriptor = requestOptions.descriptor instanceof Descriptor ? requestOptions.descriptor : undefined;\n let firstPage: PagedResponse<ItemJSON> | undefined;\n if (!descriptor) {\n const firstPageResponse = await this._requestsHandler.getPagedContent(rpcOptions);\n if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {\n return undefined;\n }\n descriptor = Descriptor.fromJSON(firstPageResponse?.descriptor);\n firstPage = firstPageResponse?.contentSet;\n }\n\n /* c8 ignore next 3 */\n if (!descriptor) {\n return undefined;\n }\n\n descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);\n\n const getPage = async (paging: Required<PageOptions>, requestIndex: number) => {\n let contentSet = requestIndex === 0 ? firstPage : undefined;\n contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });\n\n let items = contentSet.items.map((x) => Item.fromJSON(x)).filter((x): x is Item => x !== undefined);\n if (contentFormatter) {\n items = await contentFormatter.formatContentItems(items, descriptor);\n }\n\n items = this._localizationHelper.getLocalizedContentItems(items);\n return {\n total: contentSet.total,\n items,\n };\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: getPage,\n });\n\n return {\n ...(await generator.createAsyncIteratorResponse()),\n descriptor,\n };\n }\n\n /** Retrieves a content descriptor, item count and async generator for the items themselves. */\n public async getContentIterator(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n startIModelInitialization(requestOptions.imodel);\n const response = await this.getContentIteratorInternal(requestOptions);\n if (!response) {\n return undefined;\n }\n\n await ensureIModelInitialized(requestOptions.imodel);\n return response;\n }\n\n /**\n * Retrieves content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.getContentAndSize(requestOptions))?.content;\n }\n\n /**\n * Retrieves content set size and content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContentAndSize(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ content: Content; size: number } | undefined> {\n const response = await this.getContentIterator(requestOptions);\n if (!response) {\n return undefined;\n }\n\n const { descriptor, total } = response;\n const items = await collect(response.items);\n return {\n content: new Content(descriptor, items),\n size: total,\n };\n }\n\n /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */\n public async getDistinctValuesIterator(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<DisplayValueGroup> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n descriptor: getDescriptorOverrides(options.descriptor),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });\n return {\n total: response.total,\n items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(x)),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves distinct values of specific field from the content.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.\n */\n public async getPagedDistinctValues(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<PagedResponse<DisplayValueGroup>> {\n const result = await this.getDistinctValuesIterator(requestOptions);\n return {\n total: result.total,\n items: await collect(result.items),\n };\n }\n\n /**\n * Retrieves property data in a simplified format for a single element specified by ID.\n * @public\n */\n public async getElementProperties<TParsedContent = ElementProperties>(\n requestOptions: SingleElementPropertiesRequestOptions<IModelConnection, TParsedContent> & ClientDiagnosticsAttribute,\n ): Promise<TParsedContent | undefined> {\n startIModelInitialization(requestOptions.imodel);\n type TParser = Required<typeof requestOptions>[\"contentParser\"];\n const { elementId, contentParser, ...optionsNoElementId } = requestOptions;\n const parser: TParser = contentParser ?? (buildElementProperties as TParser);\n const iter = await this.getContentIterator({\n ...optionsNoElementId,\n descriptor: {\n displayType: DefaultContentDisplayTypes.PropertyPane,\n contentFlags: ContentFlags.ShowLabels,\n },\n rulesetOrId: \"ElementProperties\",\n keys: new KeySet([{ className: \"BisCore:Element\", id: elementId }]),\n });\n if (!iter || iter.total === 0) {\n return undefined;\n }\n return parser(iter.descriptor, (await iter.items.next()).value);\n }\n\n /**\n * Retrieves content item instance keys.\n * @public\n */\n public async getContentInstanceKeys(\n requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: () => AsyncGenerator<InstanceKey> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });\n return {\n total: keys.total,\n items: keys.items.instanceKeys.reduce((instanceKeys, entry) => {\n for (const id of CompressedId64Set.iterable(entry[1])) {\n instanceKeys.push({ className: entry[0], id });\n }\n return instanceKeys;\n }, new Array<InstanceKey>()),\n };\n },\n });\n\n const { total, items } = await generator.createAsyncIteratorResponse();\n return {\n total,\n async *items() {\n yield* items;\n },\n };\n }\n\n /** Retrieves display label definition of specific item. */\n public async getDisplayLabelDefinition(\n requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute,\n ): Promise<LabelDefinition> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);\n return this._localizationHelper.getLocalizedLabelDefinition(result);\n }\n\n /** Retrieves display label definition of specific items. */\n public async getDisplayLabelDefinitionsIterator(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<LabelDefinition> }> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);\n const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });\n result.items = this._localizationHelper.getLocalizedLabelDefinitions(result.items);\n return result;\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves display label definition of specific items.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.\n */\n public async getDisplayLabelDefinitions(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<LabelDefinition[]> {\n const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);\n return collect(items);\n }\n}\n\nconst getDescriptorOverrides = (descriptorOrOverrides: Descriptor | DescriptorOverrides): DescriptorOverrides => {\n if (descriptorOrOverrides instanceof Descriptor) {\n return descriptorOrOverrides.createDescriptorOverrides();\n }\n return descriptorOrOverrides;\n};\n\nconst stripTransientElementKeys = (keys: KeySet) => {\n if (!keys.some((key) => Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME)) {\n return keys;\n }\n\n const copy = new KeySet();\n copy.add(keys, (key) => {\n // the callback is not going to be called with EntityProps as KeySet converts them\n // to InstanceKeys, but we want to keep the EntityProps case for correctness\n /* c8 ignore next 3 */\n const isTransient =\n (Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME) ||\n (Key.isEntityProps(key) && key.classFullName === TRANSIENT_ELEMENT_CLASSNAME);\n return !isTransient;\n });\n return copy;\n};\n\nasync function collect<T>(iter: AsyncIterable<T>): Promise<T[]> {\n const result = new Array<T>();\n for await (const value of iter) {\n result.push(value);\n }\n return result;\n}\n"]}
1
+ {"version":3,"file":"PresentationManager.js","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAsF;AACtF,wDAA2E;AAG3E,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I,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,yBAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,+CAA2B,CAAC,EAAE,CAAC;QACjG,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,4BAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;QACrB,kFAAkF;QAClF,4EAA4E;QAC5E,sBAAsB;QACtB,MAAM,WAAW,GACf,CAAC,yBAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,+CAA2B,CAAC;YACzE,CAAC,yBAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,aAAa,KAAK,+CAA2B,CAAC,CAAC;QAChF,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,KAAK,UAAU,OAAO,CAAI,IAAsB;IAC9C,MAAM,MAAM,GAAG,IAAI,KAAK,EAAK,CAAC;IAC9B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent, CompressedId64Set, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { IModelApp, IModelConnection, IpcApp } from \"@itwin/core-frontend\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { SchemaContext } from \"@itwin/ecschema-metadata\";\nimport {\n ClientDiagnosticsAttribute,\n Content,\n ContentDescriptorRequestOptions,\n ContentFlags,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n ContentUpdateInfo,\n DefaultContentDisplayTypes,\n Descriptor,\n DescriptorOverrides,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DisplayValueGroup,\n DistinctValuesRequestOptions,\n ElementProperties,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n FormatsMap,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n HierarchyUpdateInfo,\n InstanceKey,\n Item,\n ItemJSON,\n Key,\n KeySet,\n KoqPropertyValueFormatter,\n LabelDefinition,\n Node,\n NodeKey,\n NodePathElement,\n Paged,\n PagedResponse,\n PageOptions,\n Ruleset,\n RulesetVariable,\n SelectClassInfo,\n SingleElementPropertiesRequestOptions,\n UpdateInfo,\n VariableValueTypes,\n} from \"@itwin/presentation-common\";\nimport {\n buildElementProperties,\n ContentFormatter,\n ContentPropertyValueFormatter,\n PresentationIpcEvents,\n RpcRequestsHandler,\n} from \"@itwin/presentation-common/internal\";\nimport { TRANSIENT_ELEMENT_CLASSNAME } from \"@itwin/unified-selection\";\nimport { ensureIModelInitialized, startIModelInitialization } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { RulesetManager, RulesetManagerImpl } from \"./RulesetManager.js\";\nimport { RulesetVariablesManager, RulesetVariablesManagerImpl } from \"./RulesetVariablesManager.js\";\nimport { StreamedResponseGenerator } from \"./StreamedResponseGenerator.js\";\n\n/**\n * Data structure that describes IModel hierarchy change event arguments.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface IModelHierarchyChangeEventArgs {\n /** Id of ruleset that was used to create hierarchy. */\n rulesetId: string;\n /** Hierarchy changes info. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n updateInfo: HierarchyUpdateInfo;\n /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Data structure that describes iModel content change event arguments.\n * @public\n */\nexport interface IModelContentChangeEventArgs {\n /** Id of ruleset that was used to create content. */\n rulesetId: string;\n /** Content changes info. */\n updateInfo: ContentUpdateInfo;\n /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Options for requests that can return multiple pages of items concurrently.\n * @public\n */\nexport type MultipleValuesRequestOptions = Paged<{\n /**\n * Max number of requests that should be made to the backend to fulfill the whole request.\n * `undefined` means no limit, so in that case all requests are sent at once.\n */\n maxParallelRequests?: number;\n\n /**\n * Size of a single batch when fetching data through multiple requests. If not set,\n * the fall back is requested page size. If the page size is not set, the backend\n * decides how many items to return.\n */\n batchSize?: number;\n}>;\n\n/**\n * Options for requests that retrieve nodes.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve content.\n * @public\n */\nexport type GetContentRequestOptions = ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve distinct values.\n * @public\n */\nexport type GetDistinctValuesRequestOptions = DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Properties used to configure [[PresentationManager]]\n * @public\n */\nexport interface PresentationManagerProps {\n /**\n * Sets the active locale to use when localizing presentation-related\n * strings. It can later be changed through [[PresentationManager]].\n */\n activeLocale?: string;\n\n /**\n * Sets the active unit system to use for formatting property values with\n * units. The value can later be changed through [[PresentationManager.activeUnitSystem]] setter or\n * overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`\n * is used by default.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.\n */\n activeUnitSystem?: UnitSystemKey;\n\n /**\n * ID used to identify client that requests data. Generally, clients should\n * store this ID in their local storage so the ID can be reused across\n * sessions - this allows reusing some caches.\n *\n * Defaults to a unique GUID as a client id.\n */\n clientId?: string;\n\n /**\n * Timeout (in milliseconds) for how long we're going to wait for RPC request to be fulfilled before throwing\n * a timeout error.\n *\n * Defaults to 10 minutes.\n */\n requestTimeout?: number;\n\n /**\n * Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelConnection]($core-frontend).\n * [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. By default [IModelConnection.schemaContext]($core-frontend) is now used instead.\n */\n schemaContextProvider?: (imodel: IModelConnection) => SchemaContext;\n\n /**\n * A map of default unit formats to use for formatting properties that don't have a presentation format\n * in requested unit system.\n *\n * @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when\n * supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n defaultFormats?: FormatsMap;\n}\n\n/** @internal */\ninterface PresentationManagerInternalProps {\n rpcRequestsHandler?: RpcRequestsHandler;\n ipcRequestsHandler?: IpcRequestsHandler;\n}\n\n/**\n * Frontend Presentation manager which basically just forwards all calls to\n * the backend implementation.\n *\n * @public\n */\nexport class PresentationManager implements Disposable {\n private _requestsHandler: RpcRequestsHandler;\n private _rulesets: RulesetManager;\n private _localizationHelper: FrontendLocalizationHelper;\n private _explicitActiveUnitSystem: UnitSystemKey | undefined;\n private _rulesetVars: Map<string, RulesetVariablesManager>;\n private _clearEventListener?: () => void;\n private _schemaContextProvider: (imodel: IModelConnection) => SchemaContext;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _defaultFormats?: FormatsMap;\n private _ipcRequestsHandler?: IpcRequestsHandler;\n\n /**\n * An event raised when hierarchies created using specific ruleset change.\n *\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public onIModelHierarchyChanged = new BeEvent<(args: IModelHierarchyChangeEventArgs) => void>();\n\n /**\n * An event raised when content created using specific ruleset changes\n */\n public onIModelContentChanged = new BeEvent<(args: IModelContentChangeEventArgs) => void>();\n\n /**\n * Get / set active unit system used to format property values with units.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment\n * [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override\n * is not set.\n */\n public get activeUnitSystem(): UnitSystemKey {\n return this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n }\n public set activeUnitSystem(value: UnitSystemKey | undefined) {\n this._explicitActiveUnitSystem = value;\n }\n\n private constructor(props?: PresentationManagerProps) {\n if (props) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._explicitActiveUnitSystem = props.activeUnitSystem;\n }\n\n this._requestsHandler =\n (props as PresentationManagerInternalProps)?.rpcRequestsHandler ??\n new RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);\n this._rulesetVars = new Map<string, RulesetVariablesManager>();\n this._rulesets = RulesetManagerImpl.create();\n this._localizationHelper = new FrontendLocalizationHelper(props?.activeLocale);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel: IModelConnection) => imodel.schemaContext);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._defaultFormats = props?.defaultFormats;\n\n if (IpcApp.isValid) {\n // Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.\n this._clearEventListener = IpcApp.addListener(PresentationIpcEvents.Update, this.onUpdate);\n this._ipcRequestsHandler = (props as PresentationManagerInternalProps)?.ipcRequestsHandler ?? new IpcRequestsHandler(this._requestsHandler.clientId);\n }\n }\n\n /** Get / set active locale used for localizing presentation data */\n public get activeLocale(): string | undefined {\n return this._localizationHelper.locale;\n }\n public set activeLocale(locale: string | undefined) {\n this._localizationHelper.locale = locale;\n }\n\n public [Symbol.dispose]() {\n if (this._clearEventListener) {\n this._clearEventListener();\n this._clearEventListener = undefined;\n }\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n private onUpdate = (_evt: Event, report: UpdateInfo) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleUpdateAsync(report);\n };\n\n /** @note This is only called in native apps after changes in iModels */\n private async handleUpdateAsync(report: UpdateInfo) {\n for (const imodelKey in report) {\n /* c8 ignore next 3 */\n if (!report.hasOwnProperty(imodelKey)) {\n continue;\n }\n\n const imodelReport = report[imodelKey];\n for (const rulesetId in imodelReport) {\n /* c8 ignore next 3 */\n if (!imodelReport.hasOwnProperty(rulesetId)) {\n continue;\n }\n\n const updateInfo = imodelReport[rulesetId];\n if (updateInfo.content) {\n this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (updateInfo.hierarchy) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });\n }\n }\n }\n }\n\n /**\n * Create a new PresentationManager instance\n * @param props Optional properties used to configure the manager\n */\n public static create(props?: PresentationManagerProps) {\n return new PresentationManager(props);\n }\n\n /** @internal */\n public get [_presentation_manager_rpcRequestsHandler]() {\n return this._requestsHandler;\n }\n\n /** @internal */\n public get [_presentation_manager_ipcRequestsHandler]() {\n return this._ipcRequestsHandler;\n }\n\n /**\n * Get rulesets manager\n */\n public rulesets() {\n return this._rulesets;\n }\n\n /**\n * Get ruleset variables manager for specific ruleset\n * @param rulesetId Id of the ruleset to get the vars manager for\n */\n public vars(rulesetId: string) {\n if (!this._rulesetVars.has(rulesetId)) {\n const varsManager = new RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);\n this._rulesetVars.set(rulesetId, varsManager);\n }\n return this._rulesetVars.get(rulesetId)!;\n }\n\n private toRpcTokenOptions<TOptions extends { imodel: IModelConnection; locale?: string; unitSystem?: UnitSystemKey; rulesetVariables?: RulesetVariable[] }>(\n requestOptions: TOptions,\n ) {\n // 1. put default `locale` and `unitSystem`\n // 2. put all `requestOptions` members (if `locale` or `unitSystem` are set, they'll override the defaults put at #1)\n // 3. put `imodel` of type `IModelRpcProps` which overwrites the `imodel` from `requestOptions` put at #2\n const defaultOptions: Pick<TOptions, \"locale\" | \"unitSystem\"> = {};\n if (this.activeLocale) {\n defaultOptions.locale = this.activeLocale;\n }\n defaultOptions.unitSystem = this.activeUnitSystem; // eslint-disable-line @typescript-eslint/no-deprecated\n\n const { imodel, rulesetVariables, ...rpcRequestOptions } = requestOptions;\n return {\n ...defaultOptions,\n ...rpcRequestOptions,\n ...(rulesetVariables ? { rulesetVariables: rulesetVariables.map(RulesetVariable.toJSON) } : {}),\n imodel: imodel.getRpcProps(),\n };\n }\n\n private async addRulesetAndVariablesToOptions<TOptions extends { rulesetOrId: Ruleset | string; rulesetVariables?: RulesetVariable[] }>(options: TOptions) {\n const { rulesetOrId, rulesetVariables } = options;\n let foundRulesetOrId: Ruleset | string;\n if (typeof rulesetOrId === \"object\") {\n foundRulesetOrId = rulesetOrId;\n } else {\n const foundRuleset = await this._rulesets.get(rulesetOrId);\n foundRulesetOrId = foundRuleset ? foundRuleset.toJSON() : rulesetOrId;\n }\n const rulesetId = typeof foundRulesetOrId === \"object\" ? foundRulesetOrId.id : foundRulesetOrId;\n\n // All Id64Array variable values must be sorted for serialization to JSON to work. RulesetVariablesManager\n // sorts them before storing, so that part is taken care of, but we need to ensure that variables coming from\n // request options are also sorted.\n const variables = (rulesetVariables ?? []).map((variable) => {\n if (variable.type === VariableValueTypes.Id64Array) {\n return { ...variable, value: OrderedId64Iterable.sortArray(variable.value) };\n }\n return variable;\n });\n if (!this._ipcRequestsHandler) {\n // only need to add variables from variables manager if there's no IPC\n // handler - if there is one, the variables are already known by the backend\n variables.push(...this.vars(rulesetId).getAllVariables());\n }\n\n return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };\n }\n\n /* eslint-disable @typescript-eslint/no-deprecated */\n\n /**\n * Returns an iterator that polls nodes asynchronously.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesIterator(\n requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<Node> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });\n return {\n total: result.total,\n items: this._localizationHelper.getLocalizedNodes(result.items),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]> {\n const result = await this.getNodesIterator(requestOptions);\n return collect(result.items);\n }\n\n /**\n * Retrieves nodes count.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n return this._requestsHandler.getNodesCount(rpcOptions);\n }\n\n /**\n * Retrieves total nodes count and a single page of nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{ count: number; nodes: Node[] }> {\n const result = await this.getNodesIterator(requestOptions);\n return {\n count: result.total,\n nodes: await collect(result.items),\n };\n }\n\n /**\n * Retrieves hierarchy level descriptor.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesDescriptor(\n requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodesDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /**\n * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodePaths(\n requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodePaths(rpcOptions);\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /**\n * Retrieves paths from root nodes to nodes containing filter text in their label.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getFilteredNodePaths(\n requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /* eslint-enable @typescript-eslint/no-deprecated */\n\n /**\n * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,\n * its related instances for loading related and navigation properties.\n * @public\n */\n public async getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions(requestOptions);\n const result = await this._requestsHandler.getContentSources(rpcOptions);\n return result.sources.map((sourceJson) => SelectClassInfo.fromCompressedJSON(sourceJson, result.classesMap));\n }\n\n /** Retrieves the content descriptor which describes the content and can be used to customize it. */\n public async getContentDescriptor(\n requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n keys: stripTransientElementKeys(options.keys).toJSON(),\n });\n const result = await this._requestsHandler.getContentDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves overall content set size. */\n public async getContentSetSize(requestOptions: GetContentRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n });\n return this._requestsHandler.getContentSetSize(rpcOptions);\n }\n\n private async getContentIteratorInternal(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const firstPageSize = options.batchSize ?? requestOptions.paging?.size;\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n omitFormattedValues: true,\n ...(firstPageSize ? { paging: { ...requestOptions.paging, size: firstPageSize } } : undefined),\n });\n\n let contentFormatter: ContentFormatter | undefined;\n if (!requestOptions.omitFormattedValues) {\n const schemaContext = this._schemaContextProvider(requestOptions.imodel);\n const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n const koqPropertyFormatter = new KoqPropertyValueFormatter({\n schemaContext,\n formatsProvider: IModelApp.formatsProvider,\n });\n koqPropertyFormatter.defaultFormats = this._defaultFormats;\n contentFormatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);\n }\n\n let descriptor = requestOptions.descriptor instanceof Descriptor ? requestOptions.descriptor : undefined;\n let firstPage: PagedResponse<ItemJSON> | undefined;\n if (!descriptor) {\n const firstPageResponse = await this._requestsHandler.getPagedContent(rpcOptions);\n if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {\n return undefined;\n }\n descriptor = Descriptor.fromJSON(firstPageResponse?.descriptor);\n firstPage = firstPageResponse?.contentSet;\n }\n\n /* c8 ignore next 3 */\n if (!descriptor) {\n return undefined;\n }\n\n descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);\n\n const getPage = async (paging: Required<PageOptions>, requestIndex: number) => {\n let contentSet = requestIndex === 0 ? firstPage : undefined;\n contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });\n\n let items = contentSet.items.map((x) => Item.fromJSON(x)).filter((x): x is Item => x !== undefined);\n if (contentFormatter) {\n items = await contentFormatter.formatContentItems(items, descriptor);\n }\n\n items = this._localizationHelper.getLocalizedContentItems(items);\n return {\n total: contentSet.total,\n items,\n };\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: getPage,\n });\n\n return {\n ...(await generator.createAsyncIteratorResponse()),\n descriptor,\n };\n }\n\n /** Retrieves a content descriptor, item count and async generator for the items themselves. */\n public async getContentIterator(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n startIModelInitialization(requestOptions.imodel);\n const response = await this.getContentIteratorInternal(requestOptions);\n if (!response) {\n return undefined;\n }\n\n await ensureIModelInitialized(requestOptions.imodel);\n return response;\n }\n\n /**\n * Retrieves content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.getContentAndSize(requestOptions))?.content;\n }\n\n /**\n * Retrieves content set size and content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContentAndSize(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ content: Content; size: number } | undefined> {\n const response = await this.getContentIterator(requestOptions);\n if (!response) {\n return undefined;\n }\n\n const { descriptor, total } = response;\n const items = await collect(response.items);\n return {\n content: new Content(descriptor, items),\n size: total,\n };\n }\n\n /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */\n public async getDistinctValuesIterator(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<DisplayValueGroup> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n descriptor: getDescriptorOverrides(options.descriptor),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });\n return {\n total: response.total,\n items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(x)),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves distinct values of specific field from the content.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.\n */\n public async getPagedDistinctValues(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<PagedResponse<DisplayValueGroup>> {\n const result = await this.getDistinctValuesIterator(requestOptions);\n return {\n total: result.total,\n items: await collect(result.items),\n };\n }\n\n /**\n * Retrieves property data in a simplified format for a single element specified by ID.\n * @public\n */\n public async getElementProperties<TParsedContent = ElementProperties>(\n requestOptions: SingleElementPropertiesRequestOptions<IModelConnection, TParsedContent> & ClientDiagnosticsAttribute,\n ): Promise<TParsedContent | undefined> {\n startIModelInitialization(requestOptions.imodel);\n type TParser = Required<typeof requestOptions>[\"contentParser\"];\n const { elementId, contentParser, ...optionsNoElementId } = requestOptions;\n const parser: TParser = contentParser ?? (buildElementProperties as TParser);\n const iter = await this.getContentIterator({\n ...optionsNoElementId,\n descriptor: {\n displayType: DefaultContentDisplayTypes.PropertyPane,\n contentFlags: ContentFlags.ShowLabels,\n },\n rulesetOrId: \"ElementProperties\",\n keys: new KeySet([{ className: \"BisCore:Element\", id: elementId }]),\n });\n if (!iter || iter.total === 0) {\n return undefined;\n }\n return parser(iter.descriptor, (await iter.items.next()).value);\n }\n\n /**\n * Retrieves content item instance keys.\n * @public\n */\n public async getContentInstanceKeys(\n requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: () => AsyncGenerator<InstanceKey> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });\n return {\n total: keys.total,\n items: keys.items.instanceKeys.reduce((instanceKeys, entry) => {\n for (const id of CompressedId64Set.iterable(entry[1])) {\n instanceKeys.push({ className: entry[0], id });\n }\n return instanceKeys;\n }, new Array<InstanceKey>()),\n };\n },\n });\n\n const { total, items } = await generator.createAsyncIteratorResponse();\n return {\n total,\n async *items() {\n yield* items;\n },\n };\n }\n\n /** Retrieves display label definition of specific item. */\n public async getDisplayLabelDefinition(\n requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute,\n ): Promise<LabelDefinition> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);\n return this._localizationHelper.getLocalizedLabelDefinition(result);\n }\n\n /** Retrieves display label definition of specific items. */\n public async getDisplayLabelDefinitionsIterator(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<LabelDefinition> }> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);\n const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });\n result.items = this._localizationHelper.getLocalizedLabelDefinitions(result.items);\n return result;\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves display label definition of specific items.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.\n */\n public async getDisplayLabelDefinitions(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<LabelDefinition[]> {\n const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);\n return collect(items);\n }\n}\n\nconst getDescriptorOverrides = (descriptorOrOverrides: Descriptor | DescriptorOverrides): DescriptorOverrides => {\n if (descriptorOrOverrides instanceof Descriptor) {\n return descriptorOrOverrides.createDescriptorOverrides();\n }\n return descriptorOrOverrides;\n};\n\nconst stripTransientElementKeys = (keys: KeySet) => {\n if (!keys.some((key) => Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME)) {\n return keys;\n }\n\n const copy = new KeySet();\n copy.add(keys, (key) => {\n // the callback is not going to be called with EntityProps as KeySet converts them\n // to InstanceKeys, but we want to keep the EntityProps case for correctness\n /* c8 ignore next 3 */\n const isTransient =\n (Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME) ||\n (Key.isEntityProps(key) && key.classFullName === TRANSIENT_ELEMENT_CLASSNAME);\n return !isTransient;\n });\n return copy;\n};\n\nasync function collect<T>(iter: AsyncIterable<T>): Promise<T[]> {\n const result = new Array<T>();\n for await (const value of iter) {\n result.push(value);\n }\n return result;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionHelper.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAW,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,qBAAa,eAAe;IAE1B,OAAO;IAEP;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE;CAe/D"}
1
+ {"version":3,"file":"SelectionHelper.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAW,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,qBAAa,eAAe;IAE1B,OAAO;IAEP;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE;CAiB/D"}
@@ -26,7 +26,9 @@ class SelectionHelper {
26
26
  static getKeysForSelection(keys) {
27
27
  const result = new Array();
28
28
  keys.forEach((key) => {
29
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
29
30
  if (presentation_common_1.Key.isNodeKey(key)) {
31
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
30
32
  if (presentation_common_1.NodeKey.isInstancesNodeKey(key)) {
31
33
  result.push(...key.instanceKeys);
32
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionHelper.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,oEAAgE;AAEhE;;;;;GAKG;AACH,MAAa,eAAe;IAC1B,oBAAoB;IACpB,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAoB;QACpD,MAAM,MAAM,GAAG,IAAI,KAAK,EAAO,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;YACxB,IAAI,yBAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,IAAI,6BAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxBD,0CAwBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\nimport { Key, Keys, NodeKey } from \"@itwin/presentation-common\";\n\n/**\n * Helper class for working with selection.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. This is unnecessary after switching to [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md)\n * package. A similar method to this in the new system is `Selectables.load()`.\n */\nexport class SelectionHelper {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Re-map the given keyset for selection. This means all instance node keys get converted\n * to instance keys, because in that case we want to select instances instead of nodes. All\n * other types of keys ar left as is.\n */\n public static getKeysForSelection(keys: Readonly<Keys>): Key[] {\n const result = new Array<Key>();\n keys.forEach((key: Key) => {\n if (Key.isNodeKey(key)) {\n if (NodeKey.isInstancesNodeKey(key)) {\n result.push(...key.instanceKeys);\n } else {\n result.push(key);\n }\n } else {\n result.push(key);\n }\n });\n return result;\n }\n}\n"]}
1
+ {"version":3,"file":"SelectionHelper.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,oEAAgE;AAEhE;;;;;GAKG;AACH,MAAa,eAAe;IAC1B,oBAAoB;IACpB,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAoB;QACpD,MAAM,MAAM,GAAG,IAAI,KAAK,EAAO,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;YACxB,4DAA4D;YAC5D,IAAI,yBAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,4DAA4D;gBAC5D,IAAI,6BAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA1BD,0CA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\nimport { Key, Keys, NodeKey } from \"@itwin/presentation-common\";\n\n/**\n * Helper class for working with selection.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. This is unnecessary after switching to [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md)\n * package. A similar method to this in the new system is `Selectables.load()`.\n */\nexport class SelectionHelper {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Re-map the given keyset for selection. This means all instance node keys get converted\n * to instance keys, because in that case we want to select instances instead of nodes. All\n * other types of keys ar left as is.\n */\n public static getKeysForSelection(keys: Readonly<Keys>): Key[] {\n const result = new Array<Key>();\n keys.forEach((key: Key) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (Key.isNodeKey(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (NodeKey.isInstancesNodeKey(key)) {\n result.push(...key.instanceKeys);\n } else {\n result.push(key);\n }\n } else {\n result.push(key);\n }\n });\n return result;\n }\n}\n"]}
@@ -14,6 +14,8 @@ import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
14
14
  /**
15
15
  * Data structure that describes IModel hierarchy change event arguments.
16
16
  * @public
17
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
18
+ * package for creating hierarchies.
17
19
  */
18
20
  export interface IModelHierarchyChangeEventArgs {
19
21
  /** Id of ruleset that was used to create hierarchy. */
@@ -55,6 +57,8 @@ export type MultipleValuesRequestOptions = Paged<{
55
57
  /**
56
58
  * Options for requests that retrieve nodes.
57
59
  * @public
60
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
61
+ * package for creating hierarchies.
58
62
  */
59
63
  export type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;
60
64
  /**
@@ -136,7 +140,10 @@ export declare class PresentationManager implements Disposable {
136
140
  private _defaultFormats?;
137
141
  private _ipcRequestsHandler?;
138
142
  /**
139
- * An event raised when hierarchies created using specific ruleset change
143
+ * An event raised when hierarchies created using specific ruleset change.
144
+ *
145
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
146
+ * package for creating hierarchies.
140
147
  */
141
148
  onIModelHierarchyChanged: BeEvent<(args: IModelHierarchyChangeEventArgs) => void>;
142
149
  /**
@@ -182,17 +189,25 @@ export declare class PresentationManager implements Disposable {
182
189
  vars(rulesetId: string): RulesetVariablesManager;
183
190
  private toRpcTokenOptions;
184
191
  private addRulesetAndVariablesToOptions;
185
- /** Returns an iterator that polls nodes asynchronously. */
192
+ /**
193
+ * Returns an iterator that polls nodes asynchronously.
194
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
195
+ * package for creating hierarchies.
196
+ */
186
197
  getNodesIterator(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{
187
198
  total: number;
188
199
  items: AsyncIterableIterator<Node>;
189
200
  }>;
190
201
  /**
191
- * Retrieves nodes
202
+ * Retrieves nodes.
192
203
  * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
193
204
  */
194
205
  getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]>;
195
- /** Retrieves nodes count. */
206
+ /**
207
+ * Retrieves nodes count.
208
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
209
+ * package for creating hierarchies.
210
+ */
196
211
  getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number>;
197
212
  /**
198
213
  * Retrieves total nodes count and a single page of nodes.
@@ -205,11 +220,21 @@ export declare class PresentationManager implements Disposable {
205
220
  /**
206
221
  * Retrieves hierarchy level descriptor.
207
222
  * @public
223
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
224
+ * package for creating hierarchies.
208
225
  */
209
226
  getNodesDescriptor(requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
210
- /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
227
+ /**
228
+ * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
229
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
230
+ * package for creating hierarchies.
231
+ */
211
232
  getNodePaths(requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
212
- /** Retrieves paths from root nodes to nodes containing filter text in their label. */
233
+ /**
234
+ * Retrieves paths from root nodes to nodes containing filter text in their label.
235
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
236
+ * package for creating hierarchies.
237
+ */
213
238
  getFilteredNodePaths(requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
214
239
  /**
215
240
  * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,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B,GACrG,OAAO,CAAC,eAAe,CAAC;IAO3B,4DAA4D;IAC/C,kCAAkC,CAC7C,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;KAAE,CAAC;IAgB5E;;;OAGG;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
1
+ {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAA0C,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAE/B,iCAAiC,EACjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EAEjB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,4CAA4C,EAC5C,mCAAmC,EACnC,UAAU,EACV,sCAAsC,EACtC,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,IAAI,EAGJ,MAAM,EAEN,eAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,KAAK,EACL,aAAa,EAGb,eAAe,EACf,eAAe,EACf,qCAAqC,EAGtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAKL,kBAAkB,EACn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4B,GAC7E,OAAO,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAQ5C;;;OAGG;IACU,oBAAoB,CAAC,cAAc,GAAG,iBAAiB,EAClE,cAAc,EAAE,qCAAqC,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG,0BAA0B,GACnH,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAoBtC;;;OAGG;IACU,sBAAsB,CACjC,cAAc,EAAE,iCAAiC,CAAC,gBAAgB,EAAE,MAAM,EAAE,eAAe,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACvJ,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,cAAc,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC;IAiCvE,2DAA2D;IAC9C,yBAAyB,CACpC,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GACrG,OAAO,CAAC,eAAe,CAAC;IAO3B,4DAA4D;IAC/C,kCAAkC,CAC7C,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;KAAE,CAAC;IAgB5E;;;OAGG;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
@@ -35,8 +35,12 @@ export class PresentationManager {
35
35
  _defaultFormats;
36
36
  _ipcRequestsHandler;
37
37
  /**
38
- * An event raised when hierarchies created using specific ruleset change
38
+ * An event raised when hierarchies created using specific ruleset change.
39
+ *
40
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
41
+ * package for creating hierarchies.
39
42
  */
43
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
40
44
  onIModelHierarchyChanged = new BeEvent();
41
45
  /**
42
46
  * An event raised when content created using specific ruleset changes
@@ -115,7 +119,9 @@ export class PresentationManager {
115
119
  if (updateInfo.content) {
116
120
  this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });
117
121
  }
122
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
118
123
  if (updateInfo.hierarchy) {
124
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
119
125
  this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });
120
126
  }
121
127
  }
@@ -197,7 +203,12 @@ export class PresentationManager {
197
203
  }
198
204
  return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };
199
205
  }
200
- /** Returns an iterator that polls nodes asynchronously. */
206
+ /* eslint-disable @typescript-eslint/no-deprecated */
207
+ /**
208
+ * Returns an iterator that polls nodes asynchronously.
209
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
210
+ * package for creating hierarchies.
211
+ */
201
212
  async getNodesIterator(requestOptions) {
202
213
  startIModelInitialization(requestOptions.imodel);
203
214
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -215,14 +226,18 @@ export class PresentationManager {
215
226
  return generator.createAsyncIteratorResponse();
216
227
  }
217
228
  /**
218
- * Retrieves nodes
229
+ * Retrieves nodes.
219
230
  * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.
220
231
  */
221
232
  async getNodes(requestOptions) {
222
233
  const result = await this.getNodesIterator(requestOptions);
223
234
  return collect(result.items);
224
235
  }
225
- /** Retrieves nodes count. */
236
+ /**
237
+ * Retrieves nodes count.
238
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
239
+ * package for creating hierarchies.
240
+ */
226
241
  async getNodesCount(requestOptions) {
227
242
  startIModelInitialization(requestOptions.imodel);
228
243
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -243,6 +258,8 @@ export class PresentationManager {
243
258
  /**
244
259
  * Retrieves hierarchy level descriptor.
245
260
  * @public
261
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
262
+ * package for creating hierarchies.
246
263
  */
247
264
  async getNodesDescriptor(requestOptions) {
248
265
  startIModelInitialization(requestOptions.imodel);
@@ -257,7 +274,11 @@ export class PresentationManager {
257
274
  await ensureIModelInitialized(requestOptions.imodel);
258
275
  }
259
276
  }
260
- /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
277
+ /**
278
+ * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.
279
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
280
+ * package for creating hierarchies.
281
+ */
261
282
  async getNodePaths(requestOptions) {
262
283
  startIModelInitialization(requestOptions.imodel);
263
284
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
@@ -265,13 +286,18 @@ export class PresentationManager {
265
286
  const result = await this._requestsHandler.getNodePaths(rpcOptions);
266
287
  return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
267
288
  }
268
- /** Retrieves paths from root nodes to nodes containing filter text in their label. */
289
+ /**
290
+ * Retrieves paths from root nodes to nodes containing filter text in their label.
291
+ * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)
292
+ * package for creating hierarchies.
293
+ */
269
294
  async getFilteredNodePaths(requestOptions) {
270
295
  startIModelInitialization(requestOptions.imodel);
271
296
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
272
297
  const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));
273
298
  return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
274
299
  }
300
+ /* eslint-enable @typescript-eslint/no-deprecated */
275
301
  /**
276
302
  * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
277
303
  * its related instances for loading related and navigation properties.
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManager.js","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAoB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,EAEL,OAAO,EAEP,YAAY,EAKZ,0BAA0B,EAC1B,UAAU,EAcV,IAAI,EAEJ,GAAG,EACH,MAAM,EACN,yBAAyB,EASzB,eAAe,EACf,eAAe,EAGf,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACzG,OAAO,EAAE,wCAAwC,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAC;AAC1H,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAkB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAA2B,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC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WAAW,GACf,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,2BAA2B,CAAC;YACzE,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,aAAa,KAAK,2BAA2B,CAAC,CAAC;QAChF,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,KAAK,UAAU,OAAO,CAAI,IAAsB;IAC9C,MAAM,MAAM,GAAG,IAAI,KAAK,EAAK,CAAC;IAC9B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent, CompressedId64Set, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { IModelApp, IModelConnection, IpcApp } from \"@itwin/core-frontend\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { SchemaContext } from \"@itwin/ecschema-metadata\";\nimport {\n ClientDiagnosticsAttribute,\n Content,\n ContentDescriptorRequestOptions,\n ContentFlags,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n ContentUpdateInfo,\n DefaultContentDisplayTypes,\n Descriptor,\n DescriptorOverrides,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DisplayValueGroup,\n DistinctValuesRequestOptions,\n ElementProperties,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n FormatsMap,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n HierarchyUpdateInfo,\n InstanceKey,\n Item,\n ItemJSON,\n Key,\n KeySet,\n KoqPropertyValueFormatter,\n LabelDefinition,\n Node,\n NodeKey,\n NodePathElement,\n Paged,\n PagedResponse,\n PageOptions,\n Ruleset,\n RulesetVariable,\n SelectClassInfo,\n SingleElementPropertiesRequestOptions,\n UpdateInfo,\n VariableValueTypes,\n} from \"@itwin/presentation-common\";\nimport {\n buildElementProperties,\n ContentFormatter,\n ContentPropertyValueFormatter,\n PresentationIpcEvents,\n RpcRequestsHandler,\n} from \"@itwin/presentation-common/internal\";\nimport { TRANSIENT_ELEMENT_CLASSNAME } from \"@itwin/unified-selection\";\nimport { ensureIModelInitialized, startIModelInitialization } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { RulesetManager, RulesetManagerImpl } from \"./RulesetManager.js\";\nimport { RulesetVariablesManager, RulesetVariablesManagerImpl } from \"./RulesetVariablesManager.js\";\nimport { StreamedResponseGenerator } from \"./StreamedResponseGenerator.js\";\n\n/**\n * Data structure that describes IModel hierarchy change event arguments.\n * @public\n */\nexport interface IModelHierarchyChangeEventArgs {\n /** Id of ruleset that was used to create hierarchy. */\n rulesetId: string;\n /** Hierarchy changes info. */\n updateInfo: HierarchyUpdateInfo;\n /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Data structure that describes iModel content change event arguments.\n * @public\n */\nexport interface IModelContentChangeEventArgs {\n /** Id of ruleset that was used to create content. */\n rulesetId: string;\n /** Content changes info. */\n updateInfo: ContentUpdateInfo;\n /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Options for requests that can return multiple pages of items concurrently.\n * @public\n */\nexport type MultipleValuesRequestOptions = Paged<{\n /**\n * Max number of requests that should be made to the backend to fulfill the whole request.\n * `undefined` means no limit, so in that case all requests are sent at once.\n */\n maxParallelRequests?: number;\n\n /**\n * Size of a single batch when fetching data through multiple requests. If not set,\n * the fall back is requested page size. If the page size is not set, the backend\n * decides how many items to return.\n */\n batchSize?: number;\n}>;\n\n/**\n * Options for requests that retrieve nodes.\n * @public\n */\nexport type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve content.\n * @public\n */\nexport type GetContentRequestOptions = ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve distinct values.\n * @public\n */\nexport type GetDistinctValuesRequestOptions = DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Properties used to configure [[PresentationManager]]\n * @public\n */\nexport interface PresentationManagerProps {\n /**\n * Sets the active locale to use when localizing presentation-related\n * strings. It can later be changed through [[PresentationManager]].\n */\n activeLocale?: string;\n\n /**\n * Sets the active unit system to use for formatting property values with\n * units. The value can later be changed through [[PresentationManager.activeUnitSystem]] setter or\n * overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`\n * is used by default.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.\n */\n activeUnitSystem?: UnitSystemKey;\n\n /**\n * ID used to identify client that requests data. Generally, clients should\n * store this ID in their local storage so the ID can be reused across\n * sessions - this allows reusing some caches.\n *\n * Defaults to a unique GUID as a client id.\n */\n clientId?: string;\n\n /**\n * Timeout (in milliseconds) for how long we're going to wait for RPC request to be fulfilled before throwing\n * a timeout error.\n *\n * Defaults to 10 minutes.\n */\n requestTimeout?: number;\n\n /**\n * Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelConnection]($core-frontend).\n * [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. By default [IModelConnection.schemaContext]($core-frontend) is now used instead.\n */\n schemaContextProvider?: (imodel: IModelConnection) => SchemaContext;\n\n /**\n * A map of default unit formats to use for formatting properties that don't have a presentation format\n * in requested unit system.\n *\n * @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when\n * supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n defaultFormats?: FormatsMap;\n}\n\n/** @internal */\ninterface PresentationManagerInternalProps {\n rpcRequestsHandler?: RpcRequestsHandler;\n ipcRequestsHandler?: IpcRequestsHandler;\n}\n\n/**\n * Frontend Presentation manager which basically just forwards all calls to\n * the backend implementation.\n *\n * @public\n */\nexport class PresentationManager implements Disposable {\n private _requestsHandler: RpcRequestsHandler;\n private _rulesets: RulesetManager;\n private _localizationHelper: FrontendLocalizationHelper;\n private _explicitActiveUnitSystem: UnitSystemKey | undefined;\n private _rulesetVars: Map<string, RulesetVariablesManager>;\n private _clearEventListener?: () => void;\n private _schemaContextProvider: (imodel: IModelConnection) => SchemaContext;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _defaultFormats?: FormatsMap;\n private _ipcRequestsHandler?: IpcRequestsHandler;\n\n /**\n * An event raised when hierarchies created using specific ruleset change\n */\n public onIModelHierarchyChanged = new BeEvent<(args: IModelHierarchyChangeEventArgs) => void>();\n\n /**\n * An event raised when content created using specific ruleset changes\n */\n public onIModelContentChanged = new BeEvent<(args: IModelContentChangeEventArgs) => void>();\n\n /**\n * Get / set active unit system used to format property values with units.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment\n * [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override\n * is not set.\n */\n public get activeUnitSystem(): UnitSystemKey {\n return this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n }\n public set activeUnitSystem(value: UnitSystemKey | undefined) {\n this._explicitActiveUnitSystem = value;\n }\n\n private constructor(props?: PresentationManagerProps) {\n if (props) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._explicitActiveUnitSystem = props.activeUnitSystem;\n }\n\n this._requestsHandler =\n (props as PresentationManagerInternalProps)?.rpcRequestsHandler ??\n new RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);\n this._rulesetVars = new Map<string, RulesetVariablesManager>();\n this._rulesets = RulesetManagerImpl.create();\n this._localizationHelper = new FrontendLocalizationHelper(props?.activeLocale);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel: IModelConnection) => imodel.schemaContext);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._defaultFormats = props?.defaultFormats;\n\n if (IpcApp.isValid) {\n // Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.\n this._clearEventListener = IpcApp.addListener(PresentationIpcEvents.Update, this.onUpdate);\n this._ipcRequestsHandler = (props as PresentationManagerInternalProps)?.ipcRequestsHandler ?? new IpcRequestsHandler(this._requestsHandler.clientId);\n }\n }\n\n /** Get / set active locale used for localizing presentation data */\n public get activeLocale(): string | undefined {\n return this._localizationHelper.locale;\n }\n public set activeLocale(locale: string | undefined) {\n this._localizationHelper.locale = locale;\n }\n\n public [Symbol.dispose]() {\n if (this._clearEventListener) {\n this._clearEventListener();\n this._clearEventListener = undefined;\n }\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n private onUpdate = (_evt: Event, report: UpdateInfo) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleUpdateAsync(report);\n };\n\n /** @note This is only called in native apps after changes in iModels */\n private async handleUpdateAsync(report: UpdateInfo) {\n for (const imodelKey in report) {\n /* c8 ignore next 3 */\n if (!report.hasOwnProperty(imodelKey)) {\n continue;\n }\n\n const imodelReport = report[imodelKey];\n for (const rulesetId in imodelReport) {\n /* c8 ignore next 3 */\n if (!imodelReport.hasOwnProperty(rulesetId)) {\n continue;\n }\n\n const updateInfo = imodelReport[rulesetId];\n if (updateInfo.content) {\n this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });\n }\n if (updateInfo.hierarchy) {\n this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });\n }\n }\n }\n }\n\n /**\n * Create a new PresentationManager instance\n * @param props Optional properties used to configure the manager\n */\n public static create(props?: PresentationManagerProps) {\n return new PresentationManager(props);\n }\n\n /** @internal */\n public get [_presentation_manager_rpcRequestsHandler]() {\n return this._requestsHandler;\n }\n\n /** @internal */\n public get [_presentation_manager_ipcRequestsHandler]() {\n return this._ipcRequestsHandler;\n }\n\n /**\n * Get rulesets manager\n */\n public rulesets() {\n return this._rulesets;\n }\n\n /**\n * Get ruleset variables manager for specific ruleset\n * @param rulesetId Id of the ruleset to get the vars manager for\n */\n public vars(rulesetId: string) {\n if (!this._rulesetVars.has(rulesetId)) {\n const varsManager = new RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);\n this._rulesetVars.set(rulesetId, varsManager);\n }\n return this._rulesetVars.get(rulesetId)!;\n }\n\n private toRpcTokenOptions<TOptions extends { imodel: IModelConnection; locale?: string; unitSystem?: UnitSystemKey; rulesetVariables?: RulesetVariable[] }>(\n requestOptions: TOptions,\n ) {\n // 1. put default `locale` and `unitSystem`\n // 2. put all `requestOptions` members (if `locale` or `unitSystem` are set, they'll override the defaults put at #1)\n // 3. put `imodel` of type `IModelRpcProps` which overwrites the `imodel` from `requestOptions` put at #2\n const defaultOptions: Pick<TOptions, \"locale\" | \"unitSystem\"> = {};\n if (this.activeLocale) {\n defaultOptions.locale = this.activeLocale;\n }\n defaultOptions.unitSystem = this.activeUnitSystem; // eslint-disable-line @typescript-eslint/no-deprecated\n\n const { imodel, rulesetVariables, ...rpcRequestOptions } = requestOptions;\n return {\n ...defaultOptions,\n ...rpcRequestOptions,\n ...(rulesetVariables ? { rulesetVariables: rulesetVariables.map(RulesetVariable.toJSON) } : {}),\n imodel: imodel.getRpcProps(),\n };\n }\n\n private async addRulesetAndVariablesToOptions<TOptions extends { rulesetOrId: Ruleset | string; rulesetVariables?: RulesetVariable[] }>(options: TOptions) {\n const { rulesetOrId, rulesetVariables } = options;\n let foundRulesetOrId: Ruleset | string;\n if (typeof rulesetOrId === \"object\") {\n foundRulesetOrId = rulesetOrId;\n } else {\n const foundRuleset = await this._rulesets.get(rulesetOrId);\n foundRulesetOrId = foundRuleset ? foundRuleset.toJSON() : rulesetOrId;\n }\n const rulesetId = typeof foundRulesetOrId === \"object\" ? foundRulesetOrId.id : foundRulesetOrId;\n\n // All Id64Array variable values must be sorted for serialization to JSON to work. RulesetVariablesManager\n // sorts them before storing, so that part is taken care of, but we need to ensure that variables coming from\n // request options are also sorted.\n const variables = (rulesetVariables ?? []).map((variable) => {\n if (variable.type === VariableValueTypes.Id64Array) {\n return { ...variable, value: OrderedId64Iterable.sortArray(variable.value) };\n }\n return variable;\n });\n if (!this._ipcRequestsHandler) {\n // only need to add variables from variables manager if there's no IPC\n // handler - if there is one, the variables are already known by the backend\n variables.push(...this.vars(rulesetId).getAllVariables());\n }\n\n return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };\n }\n\n /** Returns an iterator that polls nodes asynchronously. */\n public async getNodesIterator(\n requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<Node> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });\n return {\n total: result.total,\n items: this._localizationHelper.getLocalizedNodes(result.items),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves nodes\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]> {\n const result = await this.getNodesIterator(requestOptions);\n return collect(result.items);\n }\n\n /** Retrieves nodes count. */\n public async getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n return this._requestsHandler.getNodesCount(rpcOptions);\n }\n\n /**\n * Retrieves total nodes count and a single page of nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{ count: number; nodes: Node[] }> {\n const result = await this.getNodesIterator(requestOptions);\n return {\n count: result.total,\n nodes: await collect(result.items),\n };\n }\n\n /**\n * Retrieves hierarchy level descriptor.\n * @public\n */\n public async getNodesDescriptor(\n requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodesDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */\n public async getNodePaths(\n requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodePaths(rpcOptions);\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /** Retrieves paths from root nodes to nodes containing filter text in their label. */\n public async getFilteredNodePaths(\n requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /**\n * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,\n * its related instances for loading related and navigation properties.\n * @public\n */\n public async getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions(requestOptions);\n const result = await this._requestsHandler.getContentSources(rpcOptions);\n return result.sources.map((sourceJson) => SelectClassInfo.fromCompressedJSON(sourceJson, result.classesMap));\n }\n\n /** Retrieves the content descriptor which describes the content and can be used to customize it. */\n public async getContentDescriptor(\n requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n keys: stripTransientElementKeys(options.keys).toJSON(),\n });\n const result = await this._requestsHandler.getContentDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves overall content set size. */\n public async getContentSetSize(requestOptions: GetContentRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n });\n return this._requestsHandler.getContentSetSize(rpcOptions);\n }\n\n private async getContentIteratorInternal(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const firstPageSize = options.batchSize ?? requestOptions.paging?.size;\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n omitFormattedValues: true,\n ...(firstPageSize ? { paging: { ...requestOptions.paging, size: firstPageSize } } : undefined),\n });\n\n let contentFormatter: ContentFormatter | undefined;\n if (!requestOptions.omitFormattedValues) {\n const schemaContext = this._schemaContextProvider(requestOptions.imodel);\n const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n const koqPropertyFormatter = new KoqPropertyValueFormatter({\n schemaContext,\n formatsProvider: IModelApp.formatsProvider,\n });\n koqPropertyFormatter.defaultFormats = this._defaultFormats;\n contentFormatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);\n }\n\n let descriptor = requestOptions.descriptor instanceof Descriptor ? requestOptions.descriptor : undefined;\n let firstPage: PagedResponse<ItemJSON> | undefined;\n if (!descriptor) {\n const firstPageResponse = await this._requestsHandler.getPagedContent(rpcOptions);\n if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {\n return undefined;\n }\n descriptor = Descriptor.fromJSON(firstPageResponse?.descriptor);\n firstPage = firstPageResponse?.contentSet;\n }\n\n /* c8 ignore next 3 */\n if (!descriptor) {\n return undefined;\n }\n\n descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);\n\n const getPage = async (paging: Required<PageOptions>, requestIndex: number) => {\n let contentSet = requestIndex === 0 ? firstPage : undefined;\n contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });\n\n let items = contentSet.items.map((x) => Item.fromJSON(x)).filter((x): x is Item => x !== undefined);\n if (contentFormatter) {\n items = await contentFormatter.formatContentItems(items, descriptor);\n }\n\n items = this._localizationHelper.getLocalizedContentItems(items);\n return {\n total: contentSet.total,\n items,\n };\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: getPage,\n });\n\n return {\n ...(await generator.createAsyncIteratorResponse()),\n descriptor,\n };\n }\n\n /** Retrieves a content descriptor, item count and async generator for the items themselves. */\n public async getContentIterator(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n startIModelInitialization(requestOptions.imodel);\n const response = await this.getContentIteratorInternal(requestOptions);\n if (!response) {\n return undefined;\n }\n\n await ensureIModelInitialized(requestOptions.imodel);\n return response;\n }\n\n /**\n * Retrieves content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.getContentAndSize(requestOptions))?.content;\n }\n\n /**\n * Retrieves content set size and content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContentAndSize(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ content: Content; size: number } | undefined> {\n const response = await this.getContentIterator(requestOptions);\n if (!response) {\n return undefined;\n }\n\n const { descriptor, total } = response;\n const items = await collect(response.items);\n return {\n content: new Content(descriptor, items),\n size: total,\n };\n }\n\n /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */\n public async getDistinctValuesIterator(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<DisplayValueGroup> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n descriptor: getDescriptorOverrides(options.descriptor),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });\n return {\n total: response.total,\n items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(x)),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves distinct values of specific field from the content.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.\n */\n public async getPagedDistinctValues(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<PagedResponse<DisplayValueGroup>> {\n const result = await this.getDistinctValuesIterator(requestOptions);\n return {\n total: result.total,\n items: await collect(result.items),\n };\n }\n\n /**\n * Retrieves property data in a simplified format for a single element specified by ID.\n * @public\n */\n public async getElementProperties<TParsedContent = ElementProperties>(\n requestOptions: SingleElementPropertiesRequestOptions<IModelConnection, TParsedContent> & ClientDiagnosticsAttribute,\n ): Promise<TParsedContent | undefined> {\n startIModelInitialization(requestOptions.imodel);\n type TParser = Required<typeof requestOptions>[\"contentParser\"];\n const { elementId, contentParser, ...optionsNoElementId } = requestOptions;\n const parser: TParser = contentParser ?? (buildElementProperties as TParser);\n const iter = await this.getContentIterator({\n ...optionsNoElementId,\n descriptor: {\n displayType: DefaultContentDisplayTypes.PropertyPane,\n contentFlags: ContentFlags.ShowLabels,\n },\n rulesetOrId: \"ElementProperties\",\n keys: new KeySet([{ className: \"BisCore:Element\", id: elementId }]),\n });\n if (!iter || iter.total === 0) {\n return undefined;\n }\n return parser(iter.descriptor, (await iter.items.next()).value);\n }\n\n /**\n * Retrieves content item instance keys.\n * @public\n */\n public async getContentInstanceKeys(\n requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: () => AsyncGenerator<InstanceKey> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });\n return {\n total: keys.total,\n items: keys.items.instanceKeys.reduce((instanceKeys, entry) => {\n for (const id of CompressedId64Set.iterable(entry[1])) {\n instanceKeys.push({ className: entry[0], id });\n }\n return instanceKeys;\n }, new Array<InstanceKey>()),\n };\n },\n });\n\n const { total, items } = await generator.createAsyncIteratorResponse();\n return {\n total,\n async *items() {\n yield* items;\n },\n };\n }\n\n /** Retrieves display label definition of specific item. */\n public async getDisplayLabelDefinition(\n requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute,\n ): Promise<LabelDefinition> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);\n return this._localizationHelper.getLocalizedLabelDefinition(result);\n }\n\n /** Retrieves display label definition of specific items. */\n public async getDisplayLabelDefinitionsIterator(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<LabelDefinition> }> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);\n const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });\n result.items = this._localizationHelper.getLocalizedLabelDefinitions(result.items);\n return result;\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves display label definition of specific items.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.\n */\n public async getDisplayLabelDefinitions(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<LabelDefinition[]> {\n const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);\n return collect(items);\n }\n}\n\nconst getDescriptorOverrides = (descriptorOrOverrides: Descriptor | DescriptorOverrides): DescriptorOverrides => {\n if (descriptorOrOverrides instanceof Descriptor) {\n return descriptorOrOverrides.createDescriptorOverrides();\n }\n return descriptorOrOverrides;\n};\n\nconst stripTransientElementKeys = (keys: KeySet) => {\n if (!keys.some((key) => Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME)) {\n return keys;\n }\n\n const copy = new KeySet();\n copy.add(keys, (key) => {\n // the callback is not going to be called with EntityProps as KeySet converts them\n // to InstanceKeys, but we want to keep the EntityProps case for correctness\n /* c8 ignore next 3 */\n const isTransient =\n (Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME) ||\n (Key.isEntityProps(key) && key.classFullName === TRANSIENT_ELEMENT_CLASSNAME);\n return !isTransient;\n });\n return copy;\n};\n\nasync function collect<T>(iter: AsyncIterable<T>): Promise<T[]> {\n const result = new Array<T>();\n for await (const value of iter) {\n result.push(value);\n }\n return result;\n}\n"]}
1
+ {"version":3,"file":"PresentationManager.js","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAoB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,EAEL,OAAO,EAEP,YAAY,EAKZ,0BAA0B,EAC1B,UAAU,EAcV,IAAI,EAEJ,GAAG,EACH,MAAM,EACN,yBAAyB,EASzB,eAAe,EACf,eAAe,EAGf,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACzG,OAAO,EAAE,wCAAwC,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAC;AAC1H,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAkB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAA2B,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,yBAAy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CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;QACrB,kFAAkF;QAClF,4EAA4E;QAC5E,sBAAsB;QACtB,MAAM,WAAW,GACf,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,2BAA2B,CAAC;YACzE,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,aAAa,KAAK,2BAA2B,CAAC,CAAC;QAChF,OAAO,CAAC,WAAW,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,KAAK,UAAU,OAAO,CAAI,IAAsB;IAC9C,MAAM,MAAM,GAAG,IAAI,KAAK,EAAK,CAAC;IAC9B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BeEvent, CompressedId64Set, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { IModelApp, IModelConnection, IpcApp } from \"@itwin/core-frontend\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { SchemaContext } from \"@itwin/ecschema-metadata\";\nimport {\n ClientDiagnosticsAttribute,\n Content,\n ContentDescriptorRequestOptions,\n ContentFlags,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n ContentUpdateInfo,\n DefaultContentDisplayTypes,\n Descriptor,\n DescriptorOverrides,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DisplayValueGroup,\n DistinctValuesRequestOptions,\n ElementProperties,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n FormatsMap,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n HierarchyUpdateInfo,\n InstanceKey,\n Item,\n ItemJSON,\n Key,\n KeySet,\n KoqPropertyValueFormatter,\n LabelDefinition,\n Node,\n NodeKey,\n NodePathElement,\n Paged,\n PagedResponse,\n PageOptions,\n Ruleset,\n RulesetVariable,\n SelectClassInfo,\n SingleElementPropertiesRequestOptions,\n UpdateInfo,\n VariableValueTypes,\n} from \"@itwin/presentation-common\";\nimport {\n buildElementProperties,\n ContentFormatter,\n ContentPropertyValueFormatter,\n PresentationIpcEvents,\n RpcRequestsHandler,\n} from \"@itwin/presentation-common/internal\";\nimport { TRANSIENT_ELEMENT_CLASSNAME } from \"@itwin/unified-selection\";\nimport { ensureIModelInitialized, startIModelInitialization } from \"./IModelConnectionInitialization.js\";\nimport { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler.js\";\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\nimport { RulesetManager, RulesetManagerImpl } from \"./RulesetManager.js\";\nimport { RulesetVariablesManager, RulesetVariablesManagerImpl } from \"./RulesetVariablesManager.js\";\nimport { StreamedResponseGenerator } from \"./StreamedResponseGenerator.js\";\n\n/**\n * Data structure that describes IModel hierarchy change event arguments.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface IModelHierarchyChangeEventArgs {\n /** Id of ruleset that was used to create hierarchy. */\n rulesetId: string;\n /** Hierarchy changes info. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n updateInfo: HierarchyUpdateInfo;\n /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Data structure that describes iModel content change event arguments.\n * @public\n */\nexport interface IModelContentChangeEventArgs {\n /** Id of ruleset that was used to create content. */\n rulesetId: string;\n /** Content changes info. */\n updateInfo: ContentUpdateInfo;\n /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */\n imodelKey: string;\n}\n\n/**\n * Options for requests that can return multiple pages of items concurrently.\n * @public\n */\nexport type MultipleValuesRequestOptions = Paged<{\n /**\n * Max number of requests that should be made to the backend to fulfill the whole request.\n * `undefined` means no limit, so in that case all requests are sent at once.\n */\n maxParallelRequests?: number;\n\n /**\n * Size of a single batch when fetching data through multiple requests. If not set,\n * the fall back is requested page size. If the page size is not set, the backend\n * decides how many items to return.\n */\n batchSize?: number;\n}>;\n\n/**\n * Options for requests that retrieve nodes.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport type GetNodesRequestOptions = HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve content.\n * @public\n */\nexport type GetContentRequestOptions = ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Options for requests that retrieve distinct values.\n * @public\n */\nexport type GetDistinctValuesRequestOptions = DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> &\n ClientDiagnosticsAttribute;\n\n/**\n * Properties used to configure [[PresentationManager]]\n * @public\n */\nexport interface PresentationManagerProps {\n /**\n * Sets the active locale to use when localizing presentation-related\n * strings. It can later be changed through [[PresentationManager]].\n */\n activeLocale?: string;\n\n /**\n * Sets the active unit system to use for formatting property values with\n * units. The value can later be changed through [[PresentationManager.activeUnitSystem]] setter or\n * overriden for each request through request parameters. If not set, `IModelApp.quantityFormatter.activeUnitSystem`\n * is used by default.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [IModelApp.quantityFormatter]($core-frontend) to set the active unit system.\n */\n activeUnitSystem?: UnitSystemKey;\n\n /**\n * ID used to identify client that requests data. Generally, clients should\n * store this ID in their local storage so the ID can be reused across\n * sessions - this allows reusing some caches.\n *\n * Defaults to a unique GUID as a client id.\n */\n clientId?: string;\n\n /**\n * Timeout (in milliseconds) for how long we're going to wait for RPC request to be fulfilled before throwing\n * a timeout error.\n *\n * Defaults to 10 minutes.\n */\n requestTimeout?: number;\n\n /**\n * Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelConnection]($core-frontend).\n * [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. By default [IModelConnection.schemaContext]($core-frontend) is now used instead.\n */\n schemaContextProvider?: (imodel: IModelConnection) => SchemaContext;\n\n /**\n * A map of default unit formats to use for formatting properties that don't have a presentation format\n * in requested unit system.\n *\n * @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.\n *\n * @deprecated in 5.1 - will not be removed until after 2026-08-08. All formats' logic is now handled by [IModelApp.formatsProvider]($core-frontend). Until the prop is removed, when\n * supplied, this map will be used as a fallback if IModelApp's formats provider doesn't return anything for requested format.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n defaultFormats?: FormatsMap;\n}\n\n/** @internal */\ninterface PresentationManagerInternalProps {\n rpcRequestsHandler?: RpcRequestsHandler;\n ipcRequestsHandler?: IpcRequestsHandler;\n}\n\n/**\n * Frontend Presentation manager which basically just forwards all calls to\n * the backend implementation.\n *\n * @public\n */\nexport class PresentationManager implements Disposable {\n private _requestsHandler: RpcRequestsHandler;\n private _rulesets: RulesetManager;\n private _localizationHelper: FrontendLocalizationHelper;\n private _explicitActiveUnitSystem: UnitSystemKey | undefined;\n private _rulesetVars: Map<string, RulesetVariablesManager>;\n private _clearEventListener?: () => void;\n private _schemaContextProvider: (imodel: IModelConnection) => SchemaContext;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _defaultFormats?: FormatsMap;\n private _ipcRequestsHandler?: IpcRequestsHandler;\n\n /**\n * An event raised when hierarchies created using specific ruleset change.\n *\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public onIModelHierarchyChanged = new BeEvent<(args: IModelHierarchyChangeEventArgs) => void>();\n\n /**\n * An event raised when content created using specific ruleset changes\n */\n public onIModelContentChanged = new BeEvent<(args: IModelContentChangeEventArgs) => void>();\n\n /**\n * Get / set active unit system used to format property values with units.\n *\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. `IModelApp.quantityFormatter` should be used to get/set the active unit system. At the moment\n * [[PresentationManager]] allows overriding it, but returns `IModelApp.quantityFormatter.activeUnitSystem` if override\n * is not set.\n */\n public get activeUnitSystem(): UnitSystemKey {\n return this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n }\n public set activeUnitSystem(value: UnitSystemKey | undefined) {\n this._explicitActiveUnitSystem = value;\n }\n\n private constructor(props?: PresentationManagerProps) {\n if (props) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._explicitActiveUnitSystem = props.activeUnitSystem;\n }\n\n this._requestsHandler =\n (props as PresentationManagerInternalProps)?.rpcRequestsHandler ??\n new RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);\n this._rulesetVars = new Map<string, RulesetVariablesManager>();\n this._rulesets = RulesetManagerImpl.create();\n this._localizationHelper = new FrontendLocalizationHelper(props?.activeLocale);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel: IModelConnection) => imodel.schemaContext);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._defaultFormats = props?.defaultFormats;\n\n if (IpcApp.isValid) {\n // Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.\n this._clearEventListener = IpcApp.addListener(PresentationIpcEvents.Update, this.onUpdate);\n this._ipcRequestsHandler = (props as PresentationManagerInternalProps)?.ipcRequestsHandler ?? new IpcRequestsHandler(this._requestsHandler.clientId);\n }\n }\n\n /** Get / set active locale used for localizing presentation data */\n public get activeLocale(): string | undefined {\n return this._localizationHelper.locale;\n }\n public set activeLocale(locale: string | undefined) {\n this._localizationHelper.locale = locale;\n }\n\n public [Symbol.dispose]() {\n if (this._clearEventListener) {\n this._clearEventListener();\n this._clearEventListener = undefined;\n }\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n private onUpdate = (_evt: Event, report: UpdateInfo) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.handleUpdateAsync(report);\n };\n\n /** @note This is only called in native apps after changes in iModels */\n private async handleUpdateAsync(report: UpdateInfo) {\n for (const imodelKey in report) {\n /* c8 ignore next 3 */\n if (!report.hasOwnProperty(imodelKey)) {\n continue;\n }\n\n const imodelReport = report[imodelKey];\n for (const rulesetId in imodelReport) {\n /* c8 ignore next 3 */\n if (!imodelReport.hasOwnProperty(rulesetId)) {\n continue;\n }\n\n const updateInfo = imodelReport[rulesetId];\n if (updateInfo.content) {\n this.onIModelContentChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.content, imodelKey });\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (updateInfo.hierarchy) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.onIModelHierarchyChanged.raiseEvent({ rulesetId, updateInfo: updateInfo.hierarchy, imodelKey });\n }\n }\n }\n }\n\n /**\n * Create a new PresentationManager instance\n * @param props Optional properties used to configure the manager\n */\n public static create(props?: PresentationManagerProps) {\n return new PresentationManager(props);\n }\n\n /** @internal */\n public get [_presentation_manager_rpcRequestsHandler]() {\n return this._requestsHandler;\n }\n\n /** @internal */\n public get [_presentation_manager_ipcRequestsHandler]() {\n return this._ipcRequestsHandler;\n }\n\n /**\n * Get rulesets manager\n */\n public rulesets() {\n return this._rulesets;\n }\n\n /**\n * Get ruleset variables manager for specific ruleset\n * @param rulesetId Id of the ruleset to get the vars manager for\n */\n public vars(rulesetId: string) {\n if (!this._rulesetVars.has(rulesetId)) {\n const varsManager = new RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);\n this._rulesetVars.set(rulesetId, varsManager);\n }\n return this._rulesetVars.get(rulesetId)!;\n }\n\n private toRpcTokenOptions<TOptions extends { imodel: IModelConnection; locale?: string; unitSystem?: UnitSystemKey; rulesetVariables?: RulesetVariable[] }>(\n requestOptions: TOptions,\n ) {\n // 1. put default `locale` and `unitSystem`\n // 2. put all `requestOptions` members (if `locale` or `unitSystem` are set, they'll override the defaults put at #1)\n // 3. put `imodel` of type `IModelRpcProps` which overwrites the `imodel` from `requestOptions` put at #2\n const defaultOptions: Pick<TOptions, \"locale\" | \"unitSystem\"> = {};\n if (this.activeLocale) {\n defaultOptions.locale = this.activeLocale;\n }\n defaultOptions.unitSystem = this.activeUnitSystem; // eslint-disable-line @typescript-eslint/no-deprecated\n\n const { imodel, rulesetVariables, ...rpcRequestOptions } = requestOptions;\n return {\n ...defaultOptions,\n ...rpcRequestOptions,\n ...(rulesetVariables ? { rulesetVariables: rulesetVariables.map(RulesetVariable.toJSON) } : {}),\n imodel: imodel.getRpcProps(),\n };\n }\n\n private async addRulesetAndVariablesToOptions<TOptions extends { rulesetOrId: Ruleset | string; rulesetVariables?: RulesetVariable[] }>(options: TOptions) {\n const { rulesetOrId, rulesetVariables } = options;\n let foundRulesetOrId: Ruleset | string;\n if (typeof rulesetOrId === \"object\") {\n foundRulesetOrId = rulesetOrId;\n } else {\n const foundRuleset = await this._rulesets.get(rulesetOrId);\n foundRulesetOrId = foundRuleset ? foundRuleset.toJSON() : rulesetOrId;\n }\n const rulesetId = typeof foundRulesetOrId === \"object\" ? foundRulesetOrId.id : foundRulesetOrId;\n\n // All Id64Array variable values must be sorted for serialization to JSON to work. RulesetVariablesManager\n // sorts them before storing, so that part is taken care of, but we need to ensure that variables coming from\n // request options are also sorted.\n const variables = (rulesetVariables ?? []).map((variable) => {\n if (variable.type === VariableValueTypes.Id64Array) {\n return { ...variable, value: OrderedId64Iterable.sortArray(variable.value) };\n }\n return variable;\n });\n if (!this._ipcRequestsHandler) {\n // only need to add variables from variables manager if there's no IPC\n // handler - if there is one, the variables are already known by the backend\n variables.push(...this.vars(rulesetId).getAllVariables());\n }\n\n return { ...options, rulesetOrId: foundRulesetOrId, rulesetVariables: variables };\n }\n\n /* eslint-disable @typescript-eslint/no-deprecated */\n\n /**\n * Returns an iterator that polls nodes asynchronously.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesIterator(\n requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<Node> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });\n return {\n total: result.total,\n items: this._localizationHelper.getLocalizedNodes(result.items),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodes(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<Node[]> {\n const result = await this.getNodesIterator(requestOptions);\n return collect(result.items);\n }\n\n /**\n * Retrieves nodes count.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesCount(requestOptions: GetNodesRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n return this._requestsHandler.getNodesCount(rpcOptions);\n }\n\n /**\n * Retrieves total nodes count and a single page of nodes.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getNodesIterator]] instead.\n */\n public async getNodesAndCount(requestOptions: GetNodesRequestOptions & MultipleValuesRequestOptions): Promise<{ count: number; nodes: Node[] }> {\n const result = await this.getNodesIterator(requestOptions);\n return {\n count: result.total,\n nodes: await collect(result.items),\n };\n }\n\n /**\n * Retrieves hierarchy level descriptor.\n * @public\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodesDescriptor(\n requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodesDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /**\n * Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getNodePaths(\n requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({ ...options });\n const result = await this._requestsHandler.getNodePaths(rpcOptions);\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /**\n * Retrieves paths from root nodes to nodes containing filter text in their label.\n * @deprecated in 5.2. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n public async getFilteredNodePaths(\n requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<NodePathElement[]> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));\n return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));\n }\n\n /* eslint-enable @typescript-eslint/no-deprecated */\n\n /**\n * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,\n * its related instances for loading related and navigation properties.\n * @public\n */\n public async getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions(requestOptions);\n const result = await this._requestsHandler.getContentSources(rpcOptions);\n return result.sources.map((sourceJson) => SelectClassInfo.fromCompressedJSON(sourceJson, result.classesMap));\n }\n\n /** Retrieves the content descriptor which describes the content and can be used to customize it. */\n public async getContentDescriptor(\n requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute,\n ): Promise<Descriptor | undefined> {\n startIModelInitialization(requestOptions.imodel);\n try {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n keys: stripTransientElementKeys(options.keys).toJSON(),\n });\n const result = await this._requestsHandler.getContentDescriptor(rpcOptions);\n const descriptor = Descriptor.fromJSON(result);\n return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;\n } finally {\n await ensureIModelInitialized(requestOptions.imodel);\n }\n }\n\n /** Retrieves overall content set size. */\n public async getContentSetSize(requestOptions: GetContentRequestOptions): Promise<number> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n });\n return this._requestsHandler.getContentSetSize(rpcOptions);\n }\n\n private async getContentIteratorInternal(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const firstPageSize = options.batchSize ?? requestOptions.paging?.size;\n const rpcOptions = this.toRpcTokenOptions({\n ...options,\n descriptor: getDescriptorOverrides(requestOptions.descriptor),\n keys: stripTransientElementKeys(requestOptions.keys).toJSON(),\n omitFormattedValues: true,\n ...(firstPageSize ? { paging: { ...requestOptions.paging, size: firstPageSize } } : undefined),\n });\n\n let contentFormatter: ContentFormatter | undefined;\n if (!requestOptions.omitFormattedValues) {\n const schemaContext = this._schemaContextProvider(requestOptions.imodel);\n const unitSystem = requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? IModelApp.quantityFormatter.activeUnitSystem;\n const koqPropertyFormatter = new KoqPropertyValueFormatter({\n schemaContext,\n formatsProvider: IModelApp.formatsProvider,\n });\n koqPropertyFormatter.defaultFormats = this._defaultFormats;\n contentFormatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);\n }\n\n let descriptor = requestOptions.descriptor instanceof Descriptor ? requestOptions.descriptor : undefined;\n let firstPage: PagedResponse<ItemJSON> | undefined;\n if (!descriptor) {\n const firstPageResponse = await this._requestsHandler.getPagedContent(rpcOptions);\n if (!firstPageResponse?.descriptor || !firstPageResponse.contentSet) {\n return undefined;\n }\n descriptor = Descriptor.fromJSON(firstPageResponse?.descriptor);\n firstPage = firstPageResponse?.contentSet;\n }\n\n /* c8 ignore next 3 */\n if (!descriptor) {\n return undefined;\n }\n\n descriptor = this._localizationHelper.getLocalizedContentDescriptor(descriptor);\n\n const getPage = async (paging: Required<PageOptions>, requestIndex: number) => {\n let contentSet = requestIndex === 0 ? firstPage : undefined;\n contentSet ??= await this._requestsHandler.getPagedContentSet({ ...rpcOptions, paging });\n\n let items = contentSet.items.map((x) => Item.fromJSON(x)).filter((x): x is Item => x !== undefined);\n if (contentFormatter) {\n items = await contentFormatter.formatContentItems(items, descriptor);\n }\n\n items = this._localizationHelper.getLocalizedContentItems(items);\n return {\n total: contentSet.total,\n items,\n };\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: getPage,\n });\n\n return {\n ...(await generator.createAsyncIteratorResponse()),\n descriptor,\n };\n }\n\n /** Retrieves a content descriptor, item count and async generator for the items themselves. */\n public async getContentIterator(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ descriptor: Descriptor; total: number; items: AsyncIterableIterator<Item> } | undefined> {\n startIModelInitialization(requestOptions.imodel);\n const response = await this.getContentIteratorInternal(requestOptions);\n if (!response) {\n return undefined;\n }\n\n await ensureIModelInitialized(requestOptions.imodel);\n return response;\n }\n\n /**\n * Retrieves content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContent(requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions): Promise<Content | undefined> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.getContentAndSize(requestOptions))?.content;\n }\n\n /**\n * Retrieves content set size and content which consists of a content descriptor and a page of records.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getContentIterator]] instead.\n */\n public async getContentAndSize(\n requestOptions: GetContentRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ content: Content; size: number } | undefined> {\n const response = await this.getContentIterator(requestOptions);\n if (!response) {\n return undefined;\n }\n\n const { descriptor, total } = response;\n const items = await collect(response.items);\n return {\n content: new Content(descriptor, items),\n size: total,\n };\n }\n\n /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */\n public async getDistinctValuesIterator(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<DisplayValueGroup> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n descriptor: getDescriptorOverrides(options.descriptor),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (paging) => {\n const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });\n return {\n total: response.total,\n items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(x)),\n };\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves distinct values of specific field from the content.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDistinctValuesIterator]] instead.\n */\n public async getPagedDistinctValues(\n requestOptions: GetDistinctValuesRequestOptions & MultipleValuesRequestOptions,\n ): Promise<PagedResponse<DisplayValueGroup>> {\n const result = await this.getDistinctValuesIterator(requestOptions);\n return {\n total: result.total,\n items: await collect(result.items),\n };\n }\n\n /**\n * Retrieves property data in a simplified format for a single element specified by ID.\n * @public\n */\n public async getElementProperties<TParsedContent = ElementProperties>(\n requestOptions: SingleElementPropertiesRequestOptions<IModelConnection, TParsedContent> & ClientDiagnosticsAttribute,\n ): Promise<TParsedContent | undefined> {\n startIModelInitialization(requestOptions.imodel);\n type TParser = Required<typeof requestOptions>[\"contentParser\"];\n const { elementId, contentParser, ...optionsNoElementId } = requestOptions;\n const parser: TParser = contentParser ?? (buildElementProperties as TParser);\n const iter = await this.getContentIterator({\n ...optionsNoElementId,\n descriptor: {\n displayType: DefaultContentDisplayTypes.PropertyPane,\n contentFlags: ContentFlags.ShowLabels,\n },\n rulesetOrId: \"ElementProperties\",\n keys: new KeySet([{ className: \"BisCore:Element\", id: elementId }]),\n });\n if (!iter || iter.total === 0) {\n return undefined;\n }\n return parser(iter.descriptor, (await iter.items.next()).value);\n }\n\n /**\n * Retrieves content item instance keys.\n * @public\n */\n public async getContentInstanceKeys(\n requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: () => AsyncGenerator<InstanceKey> }> {\n startIModelInitialization(requestOptions.imodel);\n const options = await this.addRulesetAndVariablesToOptions(requestOptions);\n const rpcOptions = {\n ...this.toRpcTokenOptions(options),\n keys: stripTransientElementKeys(options.keys).toJSON(),\n };\n\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });\n return {\n total: keys.total,\n items: keys.items.instanceKeys.reduce((instanceKeys, entry) => {\n for (const id of CompressedId64Set.iterable(entry[1])) {\n instanceKeys.push({ className: entry[0], id });\n }\n return instanceKeys;\n }, new Array<InstanceKey>()),\n };\n },\n });\n\n const { total, items } = await generator.createAsyncIteratorResponse();\n return {\n total,\n async *items() {\n yield* items;\n },\n };\n }\n\n /** Retrieves display label definition of specific item. */\n public async getDisplayLabelDefinition(\n requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute,\n ): Promise<LabelDefinition> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);\n return this._localizationHelper.getLocalizedLabelDefinition(result);\n }\n\n /** Retrieves display label definition of specific items. */\n public async getDisplayLabelDefinitionsIterator(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<{ total: number; items: AsyncIterableIterator<LabelDefinition> }> {\n startIModelInitialization(requestOptions.imodel);\n const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });\n const generator = new StreamedResponseGenerator({\n ...requestOptions,\n getBatch: async (page) => {\n const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);\n const result = await this._requestsHandler.getPagedDisplayLabelDefinitions({ ...rpcOptions, keys: partialKeys });\n result.items = this._localizationHelper.getLocalizedLabelDefinitions(result.items);\n return result;\n },\n });\n\n return generator.createAsyncIteratorResponse();\n }\n\n /**\n * Retrieves display label definition of specific items.\n * @deprecated in 4.5 - will not be removed until after 2026-06-13. Use [[getDisplayLabelDefinitionsIterator]] instead.\n */\n public async getDisplayLabelDefinitions(\n requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute & MultipleValuesRequestOptions,\n ): Promise<LabelDefinition[]> {\n const { items } = await this.getDisplayLabelDefinitionsIterator(requestOptions);\n return collect(items);\n }\n}\n\nconst getDescriptorOverrides = (descriptorOrOverrides: Descriptor | DescriptorOverrides): DescriptorOverrides => {\n if (descriptorOrOverrides instanceof Descriptor) {\n return descriptorOrOverrides.createDescriptorOverrides();\n }\n return descriptorOrOverrides;\n};\n\nconst stripTransientElementKeys = (keys: KeySet) => {\n if (!keys.some((key) => Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME)) {\n return keys;\n }\n\n const copy = new KeySet();\n copy.add(keys, (key) => {\n // the callback is not going to be called with EntityProps as KeySet converts them\n // to InstanceKeys, but we want to keep the EntityProps case for correctness\n /* c8 ignore next 3 */\n const isTransient =\n (Key.isInstanceKey(key) && key.className === TRANSIENT_ELEMENT_CLASSNAME) ||\n (Key.isEntityProps(key) && key.classFullName === TRANSIENT_ELEMENT_CLASSNAME);\n return !isTransient;\n });\n return copy;\n};\n\nasync function collect<T>(iter: AsyncIterable<T>): Promise<T[]> {\n const result = new Array<T>();\n for await (const value of iter) {\n result.push(value);\n }\n return result;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionHelper.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAW,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,qBAAa,eAAe;IAE1B,OAAO;IAEP;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE;CAe/D"}
1
+ {"version":3,"file":"SelectionHelper.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAW,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,qBAAa,eAAe;IAE1B,OAAO;IAEP;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE;CAiB/D"}
@@ -23,7 +23,9 @@ export class SelectionHelper {
23
23
  static getKeysForSelection(keys) {
24
24
  const result = new Array();
25
25
  keys.forEach((key) => {
26
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
26
27
  if (Key.isNodeKey(key)) {
28
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
27
29
  if (NodeKey.isInstancesNodeKey(key)) {
28
30
  result.push(...key.instanceKeys);
29
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionHelper.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAQ,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,oBAAoB;IACpB,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAoB;QACpD,MAAM,MAAM,GAAG,IAAI,KAAK,EAAO,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;YACxB,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\nimport { Key, Keys, NodeKey } from \"@itwin/presentation-common\";\n\n/**\n * Helper class for working with selection.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. This is unnecessary after switching to [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md)\n * package. A similar method to this in the new system is `Selectables.load()`.\n */\nexport class SelectionHelper {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Re-map the given keyset for selection. This means all instance node keys get converted\n * to instance keys, because in that case we want to select instances instead of nodes. All\n * other types of keys ar left as is.\n */\n public static getKeysForSelection(keys: Readonly<Keys>): Key[] {\n const result = new Array<Key>();\n keys.forEach((key: Key) => {\n if (Key.isNodeKey(key)) {\n if (NodeKey.isInstancesNodeKey(key)) {\n result.push(...key.instanceKeys);\n } else {\n result.push(key);\n }\n } else {\n result.push(key);\n }\n });\n return result;\n }\n}\n"]}
1
+ {"version":3,"file":"SelectionHelper.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAQ,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAC1B,oBAAoB;IACpB,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAoB;QACpD,MAAM,MAAM,GAAG,IAAI,KAAK,EAAO,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;YACxB,4DAA4D;YAC5D,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,4DAA4D;gBAC5D,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\nimport { Key, Keys, NodeKey } from \"@itwin/presentation-common\";\n\n/**\n * Helper class for working with selection.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. This is unnecessary after switching to [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md)\n * package. A similar method to this in the new system is `Selectables.load()`.\n */\nexport class SelectionHelper {\n /* c8 ignore next */\n private constructor() {}\n\n /**\n * Re-map the given keyset for selection. This means all instance node keys get converted\n * to instance keys, because in that case we want to select instances instead of nodes. All\n * other types of keys ar left as is.\n */\n public static getKeysForSelection(keys: Readonly<Keys>): Key[] {\n const result = new Array<Key>();\n keys.forEach((key: Key) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (Key.isNodeKey(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (NodeKey.isInstancesNodeKey(key)) {\n result.push(...key.instanceKeys);\n } else {\n result.push(key);\n }\n } else {\n result.push(key);\n }\n });\n return result;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/presentation-frontend",
3
- "version": "5.2.0-dev.8",
3
+ "version": "5.3.0-dev.1",
4
4
  "description": "Frontend of iModel.js Presentation library",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,12 +36,12 @@
36
36
  "rxjs-for-await": "^1.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@itwin/core-bentley": "5.2.0-dev.8",
40
- "@itwin/core-quantity": "5.2.0-dev.8",
41
- "@itwin/core-frontend": "5.2.0-dev.8",
42
- "@itwin/presentation-common": "5.2.0-dev.8",
43
- "@itwin/ecschema-metadata": "5.2.0-dev.8",
44
- "@itwin/core-common": "5.2.0-dev.8"
39
+ "@itwin/core-bentley": "5.3.0-dev.1",
40
+ "@itwin/core-common": "5.3.0-dev.1",
41
+ "@itwin/core-frontend": "5.3.0-dev.1",
42
+ "@itwin/ecschema-metadata": "5.3.0-dev.1",
43
+ "@itwin/core-quantity": "5.3.0-dev.1",
44
+ "@itwin/presentation-common": "5.3.0-dev.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@itwin/eslint-plugin": "5.2.2-dev.2",
@@ -71,15 +71,15 @@
71
71
  "sinon-chai": "^3.7.0",
72
72
  "typemoq": "^2.1.0",
73
73
  "typescript": "~5.6.2",
74
- "@itwin/build-tools": "5.2.0-dev.8",
75
- "@itwin/core-frontend": "5.2.0-dev.8",
76
- "@itwin/core-common": "5.2.0-dev.8",
77
- "@itwin/core-bentley": "5.2.0-dev.8",
74
+ "@itwin/build-tools": "5.3.0-dev.1",
75
+ "@itwin/core-frontend": "5.3.0-dev.1",
76
+ "@itwin/core-common": "5.3.0-dev.1",
77
+ "@itwin/core-i18n": "5.3.0-dev.1",
78
+ "@itwin/core-quantity": "5.3.0-dev.1",
79
+ "@itwin/core-bentley": "5.3.0-dev.1",
80
+ "@itwin/ecschema-metadata": "5.3.0-dev.1",
78
81
  "internal-tools": "3.0.0-dev.69",
79
- "@itwin/presentation-common": "5.2.0-dev.8",
80
- "@itwin/ecschema-metadata": "5.2.0-dev.8",
81
- "@itwin/core-i18n": "5.2.0-dev.8",
82
- "@itwin/core-quantity": "5.2.0-dev.8"
82
+ "@itwin/presentation-common": "5.3.0-dev.1"
83
83
  },
84
84
  "scripts": {
85
85
  "build": "npm run -s build:cjs && npm run -s build:esm",