@itwin/presentation-frontend 3.7.0-dev.7 → 3.7.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  3. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +47 -47
  4. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  5. package/lib/cjs/presentation-frontend/Diagnostics.d.ts +14 -14
  6. package/lib/cjs/presentation-frontend/Diagnostics.js +61 -61
  7. package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
  8. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  9. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +20 -20
  10. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  11. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  12. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +41 -41
  13. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  14. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +10 -10
  15. package/lib/cjs/presentation-frontend/LocalizationHelper.js +31 -31
  16. package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
  17. package/lib/cjs/presentation-frontend/Presentation.d.ts +75 -75
  18. package/lib/cjs/presentation-frontend/Presentation.js +162 -162
  19. package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
  20. package/lib/cjs/presentation-frontend/PresentationManager.d.ts +186 -186
  21. package/lib/cjs/presentation-frontend/PresentationManager.js +436 -436
  22. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  23. package/lib/cjs/presentation-frontend/RulesetManager.d.ts +63 -63
  24. package/lib/cjs/presentation-frontend/RulesetManager.js +85 -85
  25. package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
  26. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  27. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +195 -195
  28. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  29. package/lib/cjs/presentation-frontend/StateTracker.d.ts +38 -38
  30. package/lib/cjs/presentation-frontend/StateTracker.js +129 -129
  31. package/lib/cjs/presentation-frontend/StateTracker.js.map +1 -1
  32. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  33. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +526 -526
  34. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  35. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  36. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +293 -293
  37. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  38. package/lib/cjs/presentation-frontend/selection/HiliteRules.json +172 -172
  39. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  40. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +97 -97
  41. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  42. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  43. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +9 -9
  44. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  45. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  46. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +33 -33
  47. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  48. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  49. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +108 -108
  50. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  51. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +14 -14
  52. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +37 -37
  53. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  54. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  55. package/lib/cjs/presentation-frontend/selection/SelectionManager.js +414 -414
  56. package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
  57. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  58. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +91 -91
  59. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  60. package/lib/cjs/presentation-frontend.d.ts +34 -34
  61. package/lib/cjs/presentation-frontend.js +50 -50
  62. package/lib/cjs/presentation-frontend.js.map +1 -1
  63. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  64. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +43 -43
  65. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  66. package/lib/esm/presentation-frontend/Diagnostics.d.ts +14 -14
  67. package/lib/esm/presentation-frontend/Diagnostics.js +56 -56
  68. package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
  69. package/lib/esm/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  70. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +17 -17
  71. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  72. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  73. package/lib/esm/presentation-frontend/IpcRequestsHandler.js +37 -37
  74. package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  75. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +10 -10
  76. package/lib/esm/presentation-frontend/LocalizationHelper.js +27 -27
  77. package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
  78. package/lib/esm/presentation-frontend/Presentation.d.ts +75 -75
  79. package/lib/esm/presentation-frontend/Presentation.js +158 -158
  80. package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
  81. package/lib/esm/presentation-frontend/PresentationManager.d.ts +186 -186
  82. package/lib/esm/presentation-frontend/PresentationManager.js +431 -431
  83. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  84. package/lib/esm/presentation-frontend/RulesetManager.d.ts +63 -63
  85. package/lib/esm/presentation-frontend/RulesetManager.js +81 -81
  86. package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
  87. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  88. package/lib/esm/presentation-frontend/RulesetVariablesManager.js +191 -191
  89. package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  90. package/lib/esm/presentation-frontend/StateTracker.d.ts +38 -38
  91. package/lib/esm/presentation-frontend/StateTracker.js +125 -125
  92. package/lib/esm/presentation-frontend/StateTracker.js.map +1 -1
  93. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  94. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +520 -520
  95. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  96. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  97. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +285 -285
  98. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  99. package/lib/esm/presentation-frontend/selection/HiliteRules.json +172 -172
  100. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  101. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +93 -93
  102. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  103. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  104. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +8 -8
  105. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  106. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  107. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +29 -29
  108. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  109. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  110. package/lib/esm/presentation-frontend/selection/SelectionHandler.js +104 -104
  111. package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  112. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +14 -14
  113. package/lib/esm/presentation-frontend/selection/SelectionHelper.js +33 -33
  114. package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  115. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  116. package/lib/esm/presentation-frontend/selection/SelectionManager.js +409 -409
  117. package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
  118. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  119. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +85 -85
  120. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  121. package/lib/esm/presentation-frontend.d.ts +34 -34
  122. package/lib/esm/presentation-frontend.js +38 -38
  123. package/lib/esm/presentation-frontend.js.map +1 -1
  124. package/package.json +14 -14
@@ -1,187 +1,187 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
- import { IModelConnection } from "@itwin/core-frontend";
6
- import { UnitSystemKey } from "@itwin/core-quantity";
7
- import { ClientDiagnosticsAttribute, Content, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, ContentUpdateInfo, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, HierarchyUpdateInfo, InstanceKey, KeySet, LabelDefinition, Node, NodeKey, NodePathElement, Paged, PagedResponse, PageOptions, RpcRequestsHandler, RulesetVariable, SelectClassInfo, SingleElementPropertiesRequestOptions } from "@itwin/presentation-common";
8
- import { IpcRequestsHandler } from "./IpcRequestsHandler";
9
- import { RulesetManager } from "./RulesetManager";
10
- import { RulesetVariablesManager } from "./RulesetVariablesManager";
11
- import { StateTracker } from "./StateTracker";
12
- /**
13
- * Data structure that describes IModel hierarchy change event arguments.
14
- * @alpha
15
- */
16
- export interface IModelHierarchyChangeEventArgs {
17
- /** Id of ruleset that was used to create hierarchy. */
18
- rulesetId: string;
19
- /** Hierarchy changes info. */
20
- updateInfo: HierarchyUpdateInfo;
21
- /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */
22
- imodelKey: string;
23
- }
24
- /**
25
- * Data structure that describes iModel content change event arguments.
26
- * @alpha
27
- */
28
- export interface IModelContentChangeEventArgs {
29
- /** Id of ruleset that was used to create content. */
30
- rulesetId: string;
31
- /** Content changes info. */
32
- updateInfo: ContentUpdateInfo;
33
- /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */
34
- imodelKey: string;
35
- }
36
- /**
37
- * Properties used to configure [[PresentationManager]]
38
- * @public
39
- */
40
- export interface PresentationManagerProps {
41
- /**
42
- * Sets the active locale to use when localizing presentation-related
43
- * strings. It can later be changed through [[PresentationManager]].
44
- */
45
- activeLocale?: string;
46
- /**
47
- * Sets the active unit system to use for formatting property values with
48
- * units. Default presentation units are used if this is not specified. The active unit
49
- * system can later be changed through [[PresentationManager]] or overriden for each request.
50
- */
51
- activeUnitSystem?: UnitSystemKey;
52
- /**
53
- * ID used to identify client that requests data. Generally, clients should
54
- * store this ID in their local storage so the ID can be reused across
55
- * sessions - this allows reusing some caches.
56
- *
57
- * Defaults to a unique GUID as a client id.
58
- */
59
- clientId?: string;
60
- /** @internal */
61
- rpcRequestsHandler?: RpcRequestsHandler;
62
- /** @internal */
63
- ipcRequestsHandler?: IpcRequestsHandler;
64
- /** @internal */
65
- stateTracker?: StateTracker;
66
- }
67
- /**
68
- * Frontend Presentation manager which basically just forwards all calls to
69
- * the backend implementation.
70
- *
71
- * @public
72
- */
73
- export declare class PresentationManager implements IDisposable {
74
- private _requestsHandler;
75
- private _rulesets;
76
- private _localizationHelper;
77
- private _rulesetVars;
78
- private _clearEventListener?;
79
- private _connections;
80
- private _ipcRequestsHandler?;
81
- private _stateTracker?;
82
- /**
83
- * An event raised when hierarchies created using specific ruleset change
84
- * @alpha
85
- */
86
- onIModelHierarchyChanged: BeEvent<(args: IModelHierarchyChangeEventArgs) => void>;
87
- /**
88
- * An event raised when content created using specific ruleset changes
89
- * @alpha
90
- */
91
- onIModelContentChanged: BeEvent<(args: IModelContentChangeEventArgs) => void>;
92
- /** Get / set active unit system used to format property values with units */
93
- activeUnitSystem: UnitSystemKey | undefined;
94
- private constructor();
95
- /** Get / set active locale used for localizing presentation data */
96
- get activeLocale(): string | undefined;
97
- set activeLocale(locale: string | undefined);
98
- dispose(): void;
99
- private onConnection;
100
- private initializeIModel;
101
- private onUpdate;
102
- /** @note This is only called in native apps after changes in iModels */
103
- private handleUpdateAsync;
104
- /** Function that is called when a new IModelConnection is used to retrieve data.
105
- * @internal
106
- */
107
- onNewiModelConnection(_: IModelConnection): Promise<void>;
108
- /**
109
- * Create a new PresentationManager instance
110
- * @param props Optional properties used to configure the manager
111
- */
112
- static create(props?: PresentationManagerProps): PresentationManager;
113
- /** @internal */
114
- get rpcRequestsHandler(): RpcRequestsHandler;
115
- /** @internal */
116
- get ipcRequestsHandler(): IpcRequestsHandler | undefined;
117
- /** @internal */
118
- get stateTracker(): StateTracker | undefined;
119
- /**
120
- * Get rulesets manager
121
- */
122
- rulesets(): RulesetManager;
123
- /**
124
- * Get ruleset variables manager for specific ruleset
125
- * @param rulesetId Id of the ruleset to get the vars manager for
126
- */
127
- vars(rulesetId: string): RulesetVariablesManager;
128
- private toRpcTokenOptions;
129
- private addRulesetAndVariablesToOptions;
130
- /** Retrieves nodes */
131
- getNodes(requestOptions: Paged<HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<Node[]>;
132
- /** Retrieves nodes count. */
133
- getNodesCount(requestOptions: HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<number>;
134
- /** Retrieves total nodes count and a single page of nodes. */
135
- getNodesAndCount(requestOptions: Paged<HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<{
136
- count: number;
137
- nodes: Node[];
138
- }>;
139
- /**
140
- * Retrieves hierarchy level descriptor.
141
- * @beta
142
- */
143
- getNodesDescriptor(requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
144
- /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
145
- getNodePaths(requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
146
- /** Retrieves paths from root nodes to nodes containing filter text in their label. */
147
- getFilteredNodePaths(requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
148
- /**
149
- * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
150
- * its related instances for loading related and navigation properties.
151
- * @public
152
- */
153
- getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]>;
154
- /** Retrieves the content descriptor which describes the content and can be used to customize it. */
155
- getContentDescriptor(requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
156
- /** Retrieves overall content set size. */
157
- getContentSetSize(requestOptions: ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<number>;
158
- /** Retrieves content which consists of a content descriptor and a page of records. */
159
- getContent(requestOptions: Paged<ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<Content | undefined>;
160
- /** Retrieves content set size and content which consists of a content descriptor and a page of records. */
161
- getContentAndSize(requestOptions: Paged<ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<{
162
- content: Content;
163
- size: number;
164
- } | undefined>;
165
- /** Retrieves distinct values of specific field from the content. */
166
- getPagedDistinctValues(requestOptions: DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<PagedResponse<DisplayValueGroup>>;
167
- /**
168
- * Retrieves property data in a simplified format for a single element specified by ID.
169
- * @public
170
- */
171
- getElementProperties(requestOptions: SingleElementPropertiesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<ElementProperties | undefined>;
172
- /**
173
- * Retrieves content item instance keys.
174
- * @public
175
- */
176
- getContentInstanceKeys(requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<{
177
- total: number;
178
- items: () => AsyncGenerator<InstanceKey>;
179
- }>;
180
- /** Retrieves display label definition of specific item. */
181
- getDisplayLabelDefinition(requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute): Promise<LabelDefinition>;
182
- /** Retrieves display label definition of specific items. */
183
- getDisplayLabelDefinitions(requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute): Promise<LabelDefinition[]>;
184
- }
185
- /** @internal */
186
- export declare const buildPagedArrayResponse: <TItem>(requestedPage: PageOptions | undefined, getter: (page: Required<PageOptions>, requestIndex: number) => Promise<PagedResponse<TItem>>) => Promise<PagedResponse<TItem>>;
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
+ import { IModelConnection } from "@itwin/core-frontend";
6
+ import { UnitSystemKey } from "@itwin/core-quantity";
7
+ import { ClientDiagnosticsAttribute, Content, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, ContentUpdateInfo, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, HierarchyUpdateInfo, InstanceKey, KeySet, LabelDefinition, Node, NodeKey, NodePathElement, Paged, PagedResponse, PageOptions, RpcRequestsHandler, RulesetVariable, SelectClassInfo, SingleElementPropertiesRequestOptions } from "@itwin/presentation-common";
8
+ import { IpcRequestsHandler } from "./IpcRequestsHandler";
9
+ import { RulesetManager } from "./RulesetManager";
10
+ import { RulesetVariablesManager } from "./RulesetVariablesManager";
11
+ import { StateTracker } from "./StateTracker";
12
+ /**
13
+ * Data structure that describes IModel hierarchy change event arguments.
14
+ * @alpha
15
+ */
16
+ export interface IModelHierarchyChangeEventArgs {
17
+ /** Id of ruleset that was used to create hierarchy. */
18
+ rulesetId: string;
19
+ /** Hierarchy changes info. */
20
+ updateInfo: HierarchyUpdateInfo;
21
+ /** Key of iModel that was used to create hierarchy. It matches [[IModelConnection.key]] property. */
22
+ imodelKey: string;
23
+ }
24
+ /**
25
+ * Data structure that describes iModel content change event arguments.
26
+ * @alpha
27
+ */
28
+ export interface IModelContentChangeEventArgs {
29
+ /** Id of ruleset that was used to create content. */
30
+ rulesetId: string;
31
+ /** Content changes info. */
32
+ updateInfo: ContentUpdateInfo;
33
+ /** Key of iModel that was used to create content. It matches [[IModelConnection.key]] property. */
34
+ imodelKey: string;
35
+ }
36
+ /**
37
+ * Properties used to configure [[PresentationManager]]
38
+ * @public
39
+ */
40
+ export interface PresentationManagerProps {
41
+ /**
42
+ * Sets the active locale to use when localizing presentation-related
43
+ * strings. It can later be changed through [[PresentationManager]].
44
+ */
45
+ activeLocale?: string;
46
+ /**
47
+ * Sets the active unit system to use for formatting property values with
48
+ * units. Default presentation units are used if this is not specified. The active unit
49
+ * system can later be changed through [[PresentationManager]] or overriden for each request.
50
+ */
51
+ activeUnitSystem?: UnitSystemKey;
52
+ /**
53
+ * ID used to identify client that requests data. Generally, clients should
54
+ * store this ID in their local storage so the ID can be reused across
55
+ * sessions - this allows reusing some caches.
56
+ *
57
+ * Defaults to a unique GUID as a client id.
58
+ */
59
+ clientId?: string;
60
+ /** @internal */
61
+ rpcRequestsHandler?: RpcRequestsHandler;
62
+ /** @internal */
63
+ ipcRequestsHandler?: IpcRequestsHandler;
64
+ /** @internal */
65
+ stateTracker?: StateTracker;
66
+ }
67
+ /**
68
+ * Frontend Presentation manager which basically just forwards all calls to
69
+ * the backend implementation.
70
+ *
71
+ * @public
72
+ */
73
+ export declare class PresentationManager implements IDisposable {
74
+ private _requestsHandler;
75
+ private _rulesets;
76
+ private _localizationHelper;
77
+ private _rulesetVars;
78
+ private _clearEventListener?;
79
+ private _connections;
80
+ private _ipcRequestsHandler?;
81
+ private _stateTracker?;
82
+ /**
83
+ * An event raised when hierarchies created using specific ruleset change
84
+ * @alpha
85
+ */
86
+ onIModelHierarchyChanged: BeEvent<(args: IModelHierarchyChangeEventArgs) => void>;
87
+ /**
88
+ * An event raised when content created using specific ruleset changes
89
+ * @alpha
90
+ */
91
+ onIModelContentChanged: BeEvent<(args: IModelContentChangeEventArgs) => void>;
92
+ /** Get / set active unit system used to format property values with units */
93
+ activeUnitSystem: UnitSystemKey | undefined;
94
+ private constructor();
95
+ /** Get / set active locale used for localizing presentation data */
96
+ get activeLocale(): string | undefined;
97
+ set activeLocale(locale: string | undefined);
98
+ dispose(): void;
99
+ private onConnection;
100
+ private initializeIModel;
101
+ private onUpdate;
102
+ /** @note This is only called in native apps after changes in iModels */
103
+ private handleUpdateAsync;
104
+ /** Function that is called when a new IModelConnection is used to retrieve data.
105
+ * @internal
106
+ */
107
+ onNewiModelConnection(_: IModelConnection): Promise<void>;
108
+ /**
109
+ * Create a new PresentationManager instance
110
+ * @param props Optional properties used to configure the manager
111
+ */
112
+ static create(props?: PresentationManagerProps): PresentationManager;
113
+ /** @internal */
114
+ get rpcRequestsHandler(): RpcRequestsHandler;
115
+ /** @internal */
116
+ get ipcRequestsHandler(): IpcRequestsHandler | undefined;
117
+ /** @internal */
118
+ get stateTracker(): StateTracker | undefined;
119
+ /**
120
+ * Get rulesets manager
121
+ */
122
+ rulesets(): RulesetManager;
123
+ /**
124
+ * Get ruleset variables manager for specific ruleset
125
+ * @param rulesetId Id of the ruleset to get the vars manager for
126
+ */
127
+ vars(rulesetId: string): RulesetVariablesManager;
128
+ private toRpcTokenOptions;
129
+ private addRulesetAndVariablesToOptions;
130
+ /** Retrieves nodes */
131
+ getNodes(requestOptions: Paged<HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<Node[]>;
132
+ /** Retrieves nodes count. */
133
+ getNodesCount(requestOptions: HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<number>;
134
+ /** Retrieves total nodes count and a single page of nodes. */
135
+ getNodesAndCount(requestOptions: Paged<HierarchyRequestOptions<IModelConnection, NodeKey, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<{
136
+ count: number;
137
+ nodes: Node[];
138
+ }>;
139
+ /**
140
+ * Retrieves hierarchy level descriptor.
141
+ * @beta
142
+ */
143
+ getNodesDescriptor(requestOptions: HierarchyLevelDescriptorRequestOptions<IModelConnection, NodeKey, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
144
+ /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
145
+ getNodePaths(requestOptions: FilterByInstancePathsHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
146
+ /** Retrieves paths from root nodes to nodes containing filter text in their label. */
147
+ getFilteredNodePaths(requestOptions: FilterByTextHierarchyRequestOptions<IModelConnection, RulesetVariable> & ClientDiagnosticsAttribute): Promise<NodePathElement[]>;
148
+ /**
149
+ * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
150
+ * its related instances for loading related and navigation properties.
151
+ * @public
152
+ */
153
+ getContentSources(requestOptions: ContentSourcesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<SelectClassInfo[]>;
154
+ /** Retrieves the content descriptor which describes the content and can be used to customize it. */
155
+ getContentDescriptor(requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<Descriptor | undefined>;
156
+ /** Retrieves overall content set size. */
157
+ getContentSetSize(requestOptions: ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<number>;
158
+ /** Retrieves content which consists of a content descriptor and a page of records. */
159
+ getContent(requestOptions: Paged<ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<Content | undefined>;
160
+ /** Retrieves content set size and content which consists of a content descriptor and a page of records. */
161
+ getContentAndSize(requestOptions: Paged<ContentRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>> & ClientDiagnosticsAttribute): Promise<{
162
+ content: Content;
163
+ size: number;
164
+ } | undefined>;
165
+ /** Retrieves distinct values of specific field from the content. */
166
+ getPagedDistinctValues(requestOptions: DistinctValuesRequestOptions<IModelConnection, Descriptor | DescriptorOverrides, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<PagedResponse<DisplayValueGroup>>;
167
+ /**
168
+ * Retrieves property data in a simplified format for a single element specified by ID.
169
+ * @public
170
+ */
171
+ getElementProperties(requestOptions: SingleElementPropertiesRequestOptions<IModelConnection> & ClientDiagnosticsAttribute): Promise<ElementProperties | undefined>;
172
+ /**
173
+ * Retrieves content item instance keys.
174
+ * @public
175
+ */
176
+ getContentInstanceKeys(requestOptions: ContentInstanceKeysRequestOptions<IModelConnection, KeySet, RulesetVariable> & ClientDiagnosticsAttribute): Promise<{
177
+ total: number;
178
+ items: () => AsyncGenerator<InstanceKey>;
179
+ }>;
180
+ /** Retrieves display label definition of specific item. */
181
+ getDisplayLabelDefinition(requestOptions: DisplayLabelRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute): Promise<LabelDefinition>;
182
+ /** Retrieves display label definition of specific items. */
183
+ getDisplayLabelDefinitions(requestOptions: DisplayLabelsRequestOptions<IModelConnection, InstanceKey> & ClientDiagnosticsAttribute): Promise<LabelDefinition[]>;
184
+ }
185
+ /** @internal */
186
+ export declare const buildPagedArrayResponse: <TItem>(requestedPage: PageOptions | undefined, getter: (page: Required<PageOptions>, requestIndex: number) => Promise<PagedResponse<TItem>>) => Promise<PagedResponse<TItem>>;
187
187
  //# sourceMappingURL=PresentationManager.d.ts.map