@itwin/presentation-hierarchies 2.0.0-alpha.14 → 2.0.0-alpha.16
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 +142 -0
- package/README.md +12 -22
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts +1 -1
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyMerge.js +1 -1
- package/lib/cjs/hierarchies/HierarchyMerge.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +7 -3
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchySearch.js +19 -12
- package/lib/cjs/hierarchies/HierarchySearch.js.map +1 -1
- package/lib/cjs/hierarchies/Logging.js +1 -1
- package/lib/cjs/hierarchies/Logging.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +1 -4
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +4 -2
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +20 -2
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +157 -85
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +12 -9
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +4 -3
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +44 -68
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +11 -4
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +3 -5
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts +1 -0
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.js +21 -7
- package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +10 -4
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js +32 -18
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +31 -9
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +30 -14
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +4 -6
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +4 -9
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +24 -28
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +3 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +2 -2
- package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.js +0 -2
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +1 -4
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.d.ts +2 -4
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js +1 -4
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.d.ts +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.js +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js +7 -3
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/HierarchySearch.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchySearch.js +19 -12
- package/lib/esm/hierarchies/HierarchySearch.js.map +1 -1
- package/lib/esm/hierarchies/Logging.js +1 -1
- package/lib/esm/hierarchies/Logging.js.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js +1 -4
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +4 -2
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +20 -2
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +160 -88
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +13 -10
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts +4 -3
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +45 -69
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js +11 -4
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js +3 -5
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts +1 -0
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.js +20 -7
- package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js +11 -5
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.js +33 -19
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +32 -10
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js +31 -15
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +5 -7
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +5 -10
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -5
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +24 -28
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js +3 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +2 -2
- package/lib/esm/hierarchies/internal/Common.js.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.js +0 -2
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js +1 -4
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Partition.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.d.ts +2 -4
- package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.js +2 -3
- package/lib/esm/presentation-hierarchies.js.map +1 -1
- package/package.json +17 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,107 @@
|
|
|
1
1
|
# @itwin/presentation-hierarchies
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.16
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1350](https://github.com/iTwin/presentation/pull/1350): **Breaking:** `createInstanceKeysFilteredQuery` now correctly appends `IdSet` bindings in both positional and named binding formats, using the `IdSet` virtual table instead of `InVirtualSet`.
|
|
8
|
+
|
|
9
|
+
Consumers that provide their own `LimitingECSqlQueryExecutor` or `imodelAccess` may now receive named bindings (`Record<string, ECSqlBinding>`) through the public `createQueryReader` path.
|
|
10
|
+
|
|
11
|
+
To migrate, update custom query reader / executor implementations to handle both positional bindings (`ECSqlBinding[]`) and named bindings (`Record<string, ECSqlBinding>`), or use the default implementation provided by the `@itwin/presentation-core-interop` package, `createECSqlQueryExecutor` function.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies:
|
|
16
|
+
- @itwin/presentation-shared@2.0.0-alpha.11
|
|
17
|
+
|
|
18
|
+
## 2.0.0-alpha.15
|
|
19
|
+
|
|
20
|
+
### Major Changes
|
|
21
|
+
|
|
22
|
+
- [#1307](https://github.com/iTwin/presentation/pull/1307): `HierarchyDefinition.defineHierarchyLevel` props (`DefineHierarchyLevelProps`) now includes two new properties: `instanceLabelSelectClauseFactory` and `nodeSelectClauseFactory`.
|
|
23
|
+
|
|
24
|
+
These factories are automatically created and cached per-iModel by `createIModelHierarchyProvider` and passed to `HierarchyDefinition.defineHierarchyLevel` calls. Consumers may use these factories from props instead of creating their own, unless some custom behavior is required - consumers who need custom behavior can ignore the provided factories and create their own inside `defineHierarchyLevel`.
|
|
25
|
+
|
|
26
|
+
While this change can be considered **breaking** as it adds two new required parameters to `defineHierarchyLevel`, it would only affect anyone calling `defineHierarchyLevel` directly, which is not a common scenario as this method is usually called by the presentation hierarchies framework. For typical consumers who are implementing `HierarchyDefinition` and defining `defineHierarchyLevel`, it should not cause any compile-time errors, as the new parameters are passed as a single object and can be easily ignored by using rest/spread operator.
|
|
27
|
+
|
|
28
|
+
Before:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const labelSelectClauseFactory = createIModelInstanceLabelSelectClauseFactory(
|
|
32
|
+
{ imodelAccess }
|
|
33
|
+
);
|
|
34
|
+
const nodeSelectClauseFactory = createNodesQueryClauseFactory({
|
|
35
|
+
imodelAccess,
|
|
36
|
+
instanceLabelSelectClauseFactory: labelSelectClauseFactory,
|
|
37
|
+
});
|
|
38
|
+
const hierarchyDefinition: HierarchyDefinition = {
|
|
39
|
+
async defineHierarchyLevel() {
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
fullClassName: "SomeClass",
|
|
43
|
+
query: {
|
|
44
|
+
// use `labelSelectClauseFactory` and `nodeSelectClauseFactory` from the outer scope
|
|
45
|
+
ecsql: `
|
|
46
|
+
SELECT ${await nodeSelectClauseFactory.createSelectClause({
|
|
47
|
+
ecClassId: { selector: "this.ECClassId" },
|
|
48
|
+
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
49
|
+
nodeLabel: {
|
|
50
|
+
selector: await labelSelectClauseFactory.createSelectClause({
|
|
51
|
+
classAlias: "this",
|
|
52
|
+
className: "SomeClass",
|
|
53
|
+
}),
|
|
54
|
+
},
|
|
55
|
+
})}
|
|
56
|
+
FROM SomeClass this
|
|
57
|
+
`,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
After:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
const hierarchyDefinition: HierarchyDefinition = {
|
|
69
|
+
async defineHierarchyLevel({
|
|
70
|
+
instanceLabelSelectClauseFactory,
|
|
71
|
+
nodeSelectClauseFactory,
|
|
72
|
+
}) {
|
|
73
|
+
return [
|
|
74
|
+
{
|
|
75
|
+
fullClassName: "SomeClass",
|
|
76
|
+
query: {
|
|
77
|
+
// use `instanceLabelSelectClauseFactory` and `nodeSelectClauseFactory` from props
|
|
78
|
+
ecsql: `
|
|
79
|
+
SELECT ${await nodeSelectClauseFactory.createSelectClause({
|
|
80
|
+
ecClassId: { selector: "this.ECClassId" },
|
|
81
|
+
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
82
|
+
nodeLabel: {
|
|
83
|
+
selector:
|
|
84
|
+
await instanceLabelSelectClauseFactory.createSelectClause({
|
|
85
|
+
classAlias: "this",
|
|
86
|
+
className: "SomeClass",
|
|
87
|
+
}),
|
|
88
|
+
},
|
|
89
|
+
})}
|
|
90
|
+
FROM SomeClass this
|
|
91
|
+
`,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- [#1308](https://github.com/iTwin/presentation/pull/1308): Adjust provider created by `createMergedIModelHierarchyProvider` to be more performant when dealing with a single iModel.
|
|
102
|
+
- Updated dependencies:
|
|
103
|
+
- @itwin/presentation-shared@2.0.0-alpha.10
|
|
104
|
+
|
|
3
105
|
## 2.0.0-alpha.14
|
|
4
106
|
|
|
5
107
|
### Minor Changes
|
|
@@ -508,6 +610,46 @@
|
|
|
508
610
|
- Updated dependencies:
|
|
509
611
|
- @itwin/presentation-shared@2.0.0-alpha.0
|
|
510
612
|
|
|
613
|
+
## 1.7.16
|
|
614
|
+
|
|
615
|
+
### Patch Changes
|
|
616
|
+
|
|
617
|
+
- [#1390](https://github.com/iTwin/presentation/pull/1390): Update `@itwin/core-*` dependencies to `^5.10.0`.
|
|
618
|
+
- Updated dependencies:
|
|
619
|
+
- @itwin/presentation-shared@1.2.16
|
|
620
|
+
|
|
621
|
+
## 1.7.15
|
|
622
|
+
|
|
623
|
+
### Patch Changes
|
|
624
|
+
|
|
625
|
+
- [#1358](https://github.com/iTwin/presentation/pull/1358): Bump dependencies.
|
|
626
|
+
- Updated dependencies:
|
|
627
|
+
- @itwin/presentation-shared@1.2.14
|
|
628
|
+
|
|
629
|
+
## 1.7.14
|
|
630
|
+
|
|
631
|
+
### Patch Changes
|
|
632
|
+
|
|
633
|
+
- [#1338](https://github.com/iTwin/presentation/pull/1338): Bump iTwin.js core dependencies to `^5.9.1`.
|
|
634
|
+
- Updated dependencies:
|
|
635
|
+
- @itwin/presentation-shared@1.2.13
|
|
636
|
+
|
|
637
|
+
## 1.7.13
|
|
638
|
+
|
|
639
|
+
### Patch Changes
|
|
640
|
+
|
|
641
|
+
- [#1313](https://github.com/iTwin/presentation/pull/1313): Bump dependencies.
|
|
642
|
+
- Updated dependencies:
|
|
643
|
+
- @itwin/presentation-shared@1.2.12
|
|
644
|
+
|
|
645
|
+
## 1.7.12
|
|
646
|
+
|
|
647
|
+
### Patch Changes
|
|
648
|
+
|
|
649
|
+
- [#1286](https://github.com/iTwin/presentation/pull/1286): Bump dependencies.
|
|
650
|
+
- Updated dependencies:
|
|
651
|
+
- @itwin/presentation-shared@1.2.11
|
|
652
|
+
|
|
511
653
|
## 1.7.11
|
|
512
654
|
|
|
513
655
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -81,13 +81,12 @@ import { createCachingECClassHierarchyInspector, Props } from "@itwin/presentati
|
|
|
81
81
|
|
|
82
82
|
import {
|
|
83
83
|
createIModelHierarchyProvider,
|
|
84
|
-
createNodesQueryClauseFactory,
|
|
85
84
|
createPredicateBasedHierarchyDefinition,
|
|
86
85
|
DefineInstanceNodeChildHierarchyLevelProps,
|
|
87
86
|
HierarchyNode,
|
|
88
87
|
HierarchyProvider,
|
|
89
88
|
} from "@itwin/presentation-hierarchies";
|
|
90
|
-
import {
|
|
89
|
+
import { ECSqlBinding } from "@itwin/presentation-shared";
|
|
91
90
|
|
|
92
91
|
function createIModelAccess(imodel: IModelConnection) {
|
|
93
92
|
const schemaProvider = createECSchemaProvider(imodel.schemaContext);
|
|
@@ -105,29 +104,21 @@ function createIModelAccess(imodel: IModelConnection) {
|
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
function createProvider(imodelAccess: Props<typeof createIModelHierarchyProvider>["imodelAccess"]): HierarchyProvider {
|
|
108
|
-
//
|
|
109
|
-
const labelsQueryFactory = createBisInstanceLabelSelectClauseFactory({ classHierarchyInspector: imodelAccess });
|
|
110
|
-
|
|
111
|
-
// Create a factory for building nodes SELECT query clauses in a format understood by the provider
|
|
112
|
-
const nodesQueryFactory = createNodesQueryClauseFactory({ imodelAccess, instanceLabelSelectClauseFactory: labelsQueryFactory });
|
|
113
|
-
|
|
114
|
-
// Then, define the hierarchy
|
|
107
|
+
// Define the hierarchy
|
|
115
108
|
const hierarchyDefinition = createPredicateBasedHierarchyDefinition({
|
|
116
109
|
classHierarchyInspector: imodelAccess,
|
|
117
110
|
hierarchy: {
|
|
118
111
|
// For root nodes, select all BisCore.GeometricModel3d instances
|
|
119
|
-
rootNodes: async () => [
|
|
112
|
+
rootNodes: async ({ createSelectClause }) => [
|
|
120
113
|
{
|
|
121
114
|
fullClassName: "BisCore.GeometricModel3d",
|
|
122
115
|
query: {
|
|
123
116
|
ecsql: `
|
|
124
117
|
SELECT
|
|
125
|
-
${await
|
|
118
|
+
${await createSelectClause({
|
|
126
119
|
ecClassId: { selector: "this.ECClassId" },
|
|
127
120
|
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
128
|
-
nodeLabel: {
|
|
129
|
-
selector: await labelsQueryFactory.createSelectClause({ classAlias: "this", className: "BisCore.GeometricModel3d" }),
|
|
130
|
-
},
|
|
121
|
+
nodeLabel: { of: { classAlias: "this", className: "BisCore.GeometricModel3d" } },
|
|
131
122
|
})}
|
|
132
123
|
FROM BisCore.GeometricModel3d this
|
|
133
124
|
`,
|
|
@@ -138,21 +129,20 @@ function createProvider(imodelAccess: Props<typeof createIModelHierarchyProvider
|
|
|
138
129
|
{
|
|
139
130
|
// For BisCore.Model parent nodes, select all BisCore.Element instances contained in corresponding model
|
|
140
131
|
parentInstancesNodePredicate: "BisCore.Model",
|
|
141
|
-
definitions: async ({
|
|
132
|
+
definitions: async ({
|
|
133
|
+
parentNodeInstanceIds,
|
|
134
|
+
createSelectClause,
|
|
135
|
+
}: DefineInstanceNodeChildHierarchyLevelProps): Promise<HierarchyLevelDefinition> => [
|
|
142
136
|
{
|
|
143
137
|
fullClassName: "BisCore.Element",
|
|
144
138
|
query: {
|
|
145
139
|
ecsql: `
|
|
146
140
|
SELECT
|
|
147
|
-
${await
|
|
141
|
+
${await createSelectClause({
|
|
148
142
|
ecClassId: { selector: "this.ECClassId" },
|
|
149
143
|
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
150
|
-
nodeLabel: {
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
grouping: {
|
|
154
|
-
byClass: true,
|
|
155
|
-
},
|
|
144
|
+
nodeLabel: { of: { classAlias: "this", className: "BisCore.Element" } },
|
|
145
|
+
grouping: { byClass: true },
|
|
156
146
|
})}
|
|
157
147
|
FROM BisCore.Element this
|
|
158
148
|
WHERE this.Model.Id IN (${parentNodeInstanceIds.map(() => "?").join(",")})
|
|
@@ -12,7 +12,7 @@ interface MergeHierarchyProvidersProps {
|
|
|
12
12
|
* Creates a single, merged, hierarchy provider from multiple given providers.
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export declare function mergeProviders({ providers }: MergeHierarchyProvidersProps): HierarchyProvider & {
|
|
15
|
+
export declare function mergeProviders({ providers, }: MergeHierarchyProvidersProps): HierarchyProvider & {
|
|
16
16
|
[Symbol.dispose]: () => void;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyMerge.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAC;AASvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,UAAU,4BAA4B;IACpC,kCAAkC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"HierarchyMerge.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAC;AASvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,UAAU,4BAA4B;IACpC,kCAAkC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,GACV,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAyCrF"}
|
|
@@ -15,7 +15,7 @@ const Sorting_js_1 = require("./internal/operators/Sorting.js");
|
|
|
15
15
|
* Creates a single, merged, hierarchy provider from multiple given providers.
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
function mergeProviders({ providers }) {
|
|
18
|
+
function mergeProviders({ providers, }) {
|
|
19
19
|
const hierarchyChanged = new core_bentley_1.BeEvent();
|
|
20
20
|
providers.forEach((p) => {
|
|
21
21
|
p.hierarchyChanged.addListener((args) => hierarchyChanged.raiseEvent(args));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyMerge.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AA0BhG,wCA2CC;AAnED,yCAAuC;AAEvC,+BAA8D;AAC9D,sDAA8C;AAC9C,oDAAmD;AACnD,kEAA4D;AAC5D,gEAA2E;AAc3E;;;GAGG;AACH,SAAgB,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"HierarchyMerge.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AA0BhG,wCA2CC;AAnED,yCAAuC;AAEvC,+BAA8D;AAC9D,sDAA8C;AAC9C,oDAAmD;AACnD,kEAA4D;AAC5D,gEAA2E;AAc3E;;;GAGG;AACH,SAAgB,cAAc,CAAC,EAC7B,SAAS,GACoB;IAC7B,MAAM,gBAAgB,GAAG,IAAI,sBAAO,EAAoE,CAAC;IACzG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,C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B,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,IAAA,WAAI,EAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAA,eAAQ,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClH,YAAY,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChF,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;KAC1B,CAAC;AACJ,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\nimport \"./internal/DisposePolyfill.js\";\n\nimport { filter, first, from, map, mergeMap, of } from \"rxjs\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { safeDispose } from \"./internal/Common.js\";\nimport { eachValueFrom } from \"./internal/EachValueFrom.js\";\nimport { sortNodesByLabelOperator } from \"./internal/operators/Sorting.js\";\n\nimport type { EventArgs } from \"@itwin/presentation-shared\";\nimport type { HierarchyProvider } from \"./HierarchyProvider.js\";\n\n/**\n * Props for `mergeProviders` function.\n * @public\n */\ninterface MergeHierarchyProvidersProps {\n /** List of providers to merge. */\n providers: HierarchyProvider[];\n}\n\n/**\n * Creates a single, merged, hierarchy provider from multiple given providers.\n * @public\n */\nexport function mergeProviders({\n providers,\n}: MergeHierarchyProvidersProps): HierarchyProvider & { [Symbol.dispose]: () => void } {\n const hierarchyChanged = new BeEvent<(args: EventArgs<HierarchyProvider[\"hierarchyChanged\"]>) => void>();\n providers.forEach((p) => {\n p.hierarchyChanged.addListener((args) => hierarchyChanged.raiseEvent(args));\n });\n const dispose = () => {\n hierarchyChanged.clear();\n providers.forEach((p) => safeDispose(p));\n };\n\n return {\n hierarchyChanged,\n getNodes: (props) =>\n eachValueFrom(\n from(providers).pipe(\n mergeMap((provider) =>\n from(provider.getNodes(props)).pipe(\n mergeMap((node) => {\n if (node.children) {\n return of(node);\n }\n // each provider only considers its own data when determining node's children - in case it says\n // the node has no children, we have to check against the other providers too\n return from(providers).pipe(\n filter((p) => p !== provider),\n mergeMap((p) => p.getNodes({ parentNode: node })),\n map(() => true),\n first(undefined, false),\n map((hasChildren) => ({ ...node, children: hasChildren })),\n );\n }),\n ),\n ),\n sortNodesByLabelOperator,\n ),\n ),\n getNodeInstanceKeys: (props) => eachValueFrom(from(providers).pipe(mergeMap((p) => p.getNodeInstanceKeys(props)))),\n setFormatter: (formatter) => providers.forEach((p) => p.setFormatter(formatter)),\n setHierarchySearch: (props) => providers.forEach((p) => p.setHierarchySearch(props)),\n [Symbol.dispose]: dispose,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,cAAc;AACd,MAAM,WAAW,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AAK,SAAS;QAAE,GAAG,EAAE,gBAAgB,CAAA;KAAE,EAC5E,IAAI,EAAE,KAAK,GACV,IAAI,IAAI,KAAK,GAAG;QAAE,GAAG,EAAE,uBAAuB,CAAC;QAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,qBAAqB,CAEzG;IAED;;;;OAIG;IACH,SAAgB,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,qBAAqB,EAAE,KAAK,GAAG,YAAY,CAAC,GAAG,MAAM,CAU5G;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+DAAyD;AAuFzD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,aAAa,
|
|
1
|
+
{"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+DAAyD;AAuFzD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,aAAa,CAiF7B;AAjFD,WAAiB,aAAa;IAC5B,sDAAsD;IACtD,SAAgB,SAAS,CACvB,IAAW;QAEX,OAAO,sCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAJe,uBAAS,YAIxB,CAAA;IACD,8EAA8E;IAC9E,SAAgB,YAAY,CAC1B,IAAW;QAEX,OAAO,sCAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAJe,0BAAY,eAI3B,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAC7B,IAAW;QAEX,OAAO,sCAAgB,CAAC,WAA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A+D;QAClG,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7D,IAAI,sCAAgB,CAAC,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5D,KAAK,EAAE,CAAC;YACV,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAVe,kCAAoB,uBAUnC,CAAA;AACH,CAAC,EAjFgB,aAAa,6BAAb,aAAa,QAiF7B","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\nimport { HierarchyNodeKey } from \"./HierarchyNodeKey.js\";\n\nimport type { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport type {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey.js\";\nimport type { HierarchySearchTree } from \"./HierarchySearch.js\";\n\n/** @public */\nexport interface HierarchyNodeSearchProps {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the search target. */\n hasSearchTargetAncestor?: boolean;\n /** Paths to node's children that are search targets. */\n childrenTargetPaths?: HierarchySearchTree[];\n /** Whether or not this node is a search target. */\n isSearchTarget?: boolean;\n /** Options assigned to this node through search. */\n options?: HierarchySearchTree[\"options\"];\n}\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @public\n */\ninterface BaseHierarchyNode {\n /** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */\n parentKeys: HierarchyNodeKey[];\n /** Node's display label. */\n label: string;\n /** A flag indicating whether the node has children or not. */\n children: boolean;\n /** A flag indicating whether this node should be auto-expanded in the UI. */\n autoExpand?: boolean;\n /** Additional data that may be assigned to this node. */\n extendedData?: { [key: string]: any };\n}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @public\n */\nexport interface NonGroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify the node in its hierarchy level. */\n key: GenericNodeKey | InstancesNodeKey;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance\n * filter when requesting child hierarchy level will have no effect.\n */\n supportsFiltering?: boolean;\n /** Data that is assigned to the node if hierarchy search is enabled */\n search?: HierarchyNodeSearchProps;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @public\n */\nexport interface GroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify this grouping node in its hierarchy level. */\n key: GroupingNodeKey;\n\n /**\n * Keys of all instances grouped by this node, including deeply nested under\n * other grouping nodes.\n */\n groupedInstanceKeys: IModelInstanceKey[];\n\n /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */\n nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;\n}\n\n/**\n * A data structure that represents a single hierarchy node.\n * @public\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & {\n key: PropertyOtherValuesGroupingNodeKey;\n supportsFiltering?: undefined;\n } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n\n /**\n * Gets the grouping level of the given grouping node.\n *\n * May be useful when setting `groupingLevel` for `HierarchySearchTree.options.autoExpand` or `HierarchySearchPathOptions.reveal`.\n */\n export function getGroupingNodeLevel(groupingNode: Pick<GroupingHierarchyNode, \"key\" | \"parentKeys\">): number {\n let level = 1;\n for (let i = groupingNode.parentKeys.length - 1; i >= 0; i--) {\n if (HierarchyNodeKey.isGrouping(groupingNode.parentKeys[i])) {\n level++;\n } else {\n break;\n }\n }\n return level;\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @public\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNodeKey.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAA0B,MAAM,4BAA4B,CAAC;AAEjF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,IAAI,EAAE,SAAS,CAAC;IAEhB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,WAAW,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,iBAAiB,EAAE,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,IAAI,EAAE,gBAAgB,CAAC;IAEvB,uEAAuE;IACvE,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,IAAI,EAAE,gBAAgB,CAAC;IAEvB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,uBAAuB;IACvB,IAAI,EAAE,yBAAyB,CAAC;IAChC,0EAA0E;IAC1E,UAAU,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"HierarchyNodeKey.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAA0B,MAAM,4BAA4B,CAAC;AAEjF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,IAAI,EAAE,SAAS,CAAC;IAEhB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,WAAW,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,iBAAiB,EAAE,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WA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A8B,GAAG,IAAA,6BAAc,EACnD,IAAA,4CAAsB,EAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,EAAE,EACjE,IAAA,4CAAsB,EAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,EAAE,CAClE,CAAC;gBACF,IAAI,8BAA8B,KAAK,CAAC,EAAE,CAAC;oBACzC,OAAO,8BAA8B,CAAC;gBACxC,CAAC;gBACD,MAAM,yBAAyB,GAAG,IAAA,6BAAc,EAAC,GAAG,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,CAAC;gBAC7H,IAAI,yBAAyB,KAAK,CAAC,EAAE,CAAC;oBACpC,OAAO,yBAAyB,CAAC;gBACnC,CAAC;gBACD,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC;oBACpC,OAAO,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;IACH,CAAC;IAjGe,wBAAO,UAiGtB,CAAA;IAED,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAqB,EAAE,GAAqB;QACjE,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,uBAAM,SAErB,CAAA;AACH,CAAC,EAhKgB,gBAAgB,gCAAhB,gBAAgB,QAgKhC","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\nimport { assert, compareStrings, compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport { InstanceKey, normalizeFullClassName } from \"@itwin/presentation-shared\";\n\nimport type { EC } from \"@itwin/presentation-shared\";\n\n/**\n * An instance key that may be associated with specific iModel.\n * @public\n */\nexport interface IModelInstanceKey extends InstanceKey {\n imodelKey?: string;\n}\n\n/**\n * A key for a generic node.\n * @public\n */\nexport interface GenericNodeKey {\n /** Type of the node */\n type: \"generic\";\n\n /**\n * Node key identifier, which uniquely identifies the node within the hierarchy level the node is used.\n * The format of the identifier is not specified and is up to the data source.\n */\n id: string;\n\n /**\n * Optional data source identifier. Useful when a hierarchy is built using multiple hierarchy providers - in that\n * case each provider can assign a unique source identifier to its nodes.\n */\n source?: string;\n}\n\n/**\n * A key for a node that represents one or more ECInstances.\n * @public\n */\nexport interface InstancesNodeKey {\n /** Type of the node */\n type: \"instances\";\n\n /**\n * Keys of ECInstances that are represented by the node. Generally, one node represents a single\n * ECInstance, but in some cases (e.g. node merging) there could be more.\n */\n instanceKeys: IModelInstanceKey[];\n}\n\n/**\n * A key for a class-grouping node.\n * @public\n */\nexport interface ClassGroupingNodeKey {\n /** Type of the node */\n type: \"class-grouping\";\n\n /** Full name of the ECClass that this grouping node is grouping by. */\n className: EC.FullClassName;\n}\n\n/**\n * A key for a label-grouping node.\n * @public\n */\nexport interface LabelGroupingNodeKey {\n /** Type of the node */\n type: \"label-grouping\";\n\n /** Node label that this grouping node is grouping by. */\n label: string;\n\n /**\n * Optional group identifier that is assigned to the node key when multiple nodes\n * with the same label shouldn't be grouped together.\n */\n groupId?: string;\n}\n\n/**\n * A key property grouping node that groups nodes whose values don't fall into any other\n * property group in the hierarchy level.\n * @public\n */\nexport interface PropertyOtherValuesGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:other\";\n /** Identifiers of properties whose values are grouped under this node. */\n properties: Array<{\n className: EC.FullClassName;\n propertyName: string;\n }>;\n}\n\n/**\n * A key for a property grouping node that groups nodes by formatted property value.\n * @public\n */\nexport interface PropertyValueGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:value\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassName;\n\n /** Formatted property value that this node is grouping by. */\n formattedPropertyValue: string;\n}\n\n/**\n * A key for a property grouping node that groups nodes by a range of property values.\n * @public\n */\nexport interface PropertyValueRangeGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:range\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassName;\n\n /** Defines the start of the values' range that this node is grouping by. */\n fromValue: number;\n\n /** Defines the end of the values' range that this node is grouping by. */\n toValue: number;\n}\n\n/**\n * A key for a property grouping node.\n * @public\n */\nexport type PropertyGroupingNodeKey = PropertyValueRangeGroupingNodeKey | PropertyValueGroupingNodeKey | PropertyOtherValuesGroupingNodeKey;\n\n/**\n * A key for one of the instance grouping nodes.\n * @public\n */\nexport type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;\n\n/**\n * A key for either an instance node or one of the instance grouping nodes.\n * @public\n */\nexport type IModelHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;\n\n/**\n * A key that uniquely identifies a node in a hierarchy level.\n * @public\n */\nexport type HierarchyNodeKey = IModelHierarchyNodeKey | GenericNodeKey;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeKey {\n /** Checks whether the given node key is a generic node key. */\n export function isGeneric(key: HierarchyNodeKey): key is GenericNodeKey {\n return key.type === \"generic\";\n }\n\n /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */\n export function isIModelNodeKey(key: HierarchyNodeKey): key is IModelHierarchyNodeKey {\n return !isGeneric(key);\n }\n\n /** Checks whether the given node key is an `InstancesNodeKey`. */\n export function isInstances(key: HierarchyNodeKey): key is InstancesNodeKey {\n return key.type === \"instances\";\n }\n\n /** Checks whether the given node key is a `GroupingNodeKey`. */\n export function isGrouping(key: HierarchyNodeKey): key is GroupingNodeKey {\n return !isGeneric(key) && !isInstances(key);\n }\n\n /** Checks whether the given node key is a `ClassGroupingNodeKey`. */\n export function isClassGrouping(key: HierarchyNodeKey): key is ClassGroupingNodeKey {\n return key.type === \"class-grouping\";\n }\n\n /** Checks whether the given node key is a `LabelGroupingNodeKey`. */\n export function isLabelGrouping(key: HierarchyNodeKey): key is LabelGroupingNodeKey {\n return key.type === \"label-grouping\";\n }\n\n /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */\n export function isPropertyOtherValuesGrouping(key: HierarchyNodeKey): key is PropertyOtherValuesGroupingNodeKey {\n return key.type === \"property-grouping:other\";\n }\n\n /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */\n export function isPropertyValueRangeGrouping(key: HierarchyNodeKey): key is PropertyValueRangeGroupingNodeKey {\n return key.type === \"property-grouping:range\";\n }\n\n /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */\n export function isPropertyValueGrouping(key: HierarchyNodeKey): key is PropertyValueGroupingNodeKey {\n return key.type === \"property-grouping:value\";\n }\n\n /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */\n export function isPropertyGrouping(key: HierarchyNodeKey): key is PropertyGroupingNodeKey {\n return isPropertyOtherValuesGrouping(key) || isPropertyValueRangeGrouping(key) || isPropertyValueGrouping(key);\n }\n\n /**\n * Compares two given keys. Returns:\n * - `0` if they are equal,\n * - `negative value` if lhs key is less than rhs key,\n * - `positive value` if lhs key is more than rhs key.\n */\n export function compare(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): number {\n const typeCompareResult = compareStrings(lhs.type, rhs.type);\n if (typeCompareResult !== 0) {\n return typeCompareResult;\n }\n switch (lhs.type) {\n case \"generic\": {\n assert(rhs.type === \"generic\");\n const idCompareResult = compareStrings(lhs.id, rhs.id);\n if (idCompareResult !== 0) {\n return idCompareResult;\n }\n return compareStringsOrUndefined(lhs.source, rhs.source);\n }\n case \"instances\": {\n assert(rhs.type === \"instances\");\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\n return lhs.instanceKeys.length > rhs.instanceKeys.length ? 1 : -1;\n }\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\n const instanceKeyCompareResult = InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]);\n if (instanceKeyCompareResult !== 0) {\n return instanceKeyCompareResult;\n }\n const imodelKeyCompareResult = compareStringsOrUndefined(lhs.instanceKeys[i].imodelKey, rhs.instanceKeys[i].imodelKey);\n if (imodelKeyCompareResult !== 0) {\n return imodelKeyCompareResult;\n }\n }\n return 0;\n }\n case \"class-grouping\": {\n assert(rhs.type === \"class-grouping\");\n return compareStrings(normalizeFullClassName(lhs.className).toLocaleLowerCase(), normalizeFullClassName(rhs.className).toLocaleLowerCase());\n }\n case \"label-grouping\": {\n assert(rhs.type === \"label-grouping\");\n const labelCompareResult = compareStrings(lhs.label, rhs.label);\n if (labelCompareResult !== 0) {\n return labelCompareResult;\n }\n return compareStringsOrUndefined(lhs.groupId, rhs.groupId);\n }\n case \"property-grouping:other\": {\n assert(rhs.type === \"property-grouping:other\");\n if (lhs.properties.length !== rhs.properties.length) {\n return lhs.properties.length - rhs.properties.length;\n }\n for (let i = 0; i < lhs.properties.length; ++i) {\n const classCompareResult = compareStrings(\n normalizeFullClassName(lhs.properties[i].className).toLocaleLowerCase(),\n normalizeFullClassName(rhs.properties[i].className).toLocaleLowerCase(),\n );\n if (classCompareResult !== 0) {\n return classCompareResult;\n }\n const nameCompareResult = compareStrings(lhs.properties[i].propertyName.toLocaleLowerCase(), rhs.properties[i].propertyName.toLocaleLowerCase());\n if (nameCompareResult !== 0) {\n return nameCompareResult;\n }\n }\n return 0;\n }\n case \"property-grouping:value\": {\n assert(rhs.type === \"property-grouping:value\");\n const propertyClassNameCompareResult = compareStrings(\n normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(),\n normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(lhs.propertyName.toLocaleLowerCase(), rhs.propertyName.toLocaleLowerCase());\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n return compareStrings(lhs.formattedPropertyValue, rhs.formattedPropertyValue);\n }\n case \"property-grouping:range\": {\n assert(rhs.type === \"property-grouping:range\");\n const propertyClassNameCompareResult = compareStrings(\n normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(),\n normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(lhs.propertyName.toLocaleLowerCase(), rhs.propertyName.toLocaleLowerCase());\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n if (lhs.fromValue !== rhs.fromValue) {\n return lhs.fromValue > rhs.fromValue ? 1 : -1;\n }\n return lhs.toValue > rhs.toValue ? 1 : lhs.toValue < rhs.toValue ? -1 : 0;\n }\n }\n }\n\n /** Checks whether the two given keys are equal. */\n export function equals(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): boolean {\n return compare(lhs, rhs) === 0;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HierarchyNodeKey.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAAwF;AACxF,oEAAiF;AA4JjF,cAAc;AACd,2DAA2D;AAC3D,IAAiB,gBAAgB,CA+KhC;AA/KD,WAAiB,gBAAgB;IAC/B,+DAA+D;IAC/D,SAAgB,SAAS,CAAC,GAAqB;QAC7C,OAAO,GAAG,CAAC,IAAI,KAAK,SAAS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B,CAAC;gBACnC,CAAC;gBACD,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC;oBACpC,OAAO,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;IACH,CAAC;IAhHe,wBAAO,UAgHtB,CAAA;IAED,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAqB,EAAE,GAAqB;QACjE,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,uBAAM,SAErB,CAAA;AACH,CAAC,EA/KgB,gBAAgB,gCAAhB,gBAAgB,QA+KhC","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\nimport { assert, compareStrings, compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport { InstanceKey, normalizeFullClassName } from \"@itwin/presentation-shared\";\n\nimport type { EC } from \"@itwin/presentation-shared\";\n\n/**\n * An instance key that may be associated with specific iModel.\n * @public\n */\nexport interface IModelInstanceKey extends InstanceKey {\n imodelKey?: string;\n}\n\n/**\n * A key for a generic node.\n * @public\n */\nexport interface GenericNodeKey {\n /** Type of the node */\n type: \"generic\";\n\n /**\n * Node key identifier, which uniquely identifies the node within the hierarchy level the node is used.\n * The format of the identifier is not specified and is up to the data source.\n */\n id: string;\n\n /**\n * Optional data source identifier. Useful when a hierarchy is built using multiple hierarchy providers - in that\n * case each provider can assign a unique source identifier to its nodes.\n */\n source?: string;\n}\n\n/**\n * A key for a node that represents one or more ECInstances.\n * @public\n */\nexport interface InstancesNodeKey {\n /** Type of the node */\n type: \"instances\";\n\n /**\n * Keys of ECInstances that are represented by the node. Generally, one node represents a single\n * ECInstance, but in some cases (e.g. node merging) there could be more.\n */\n instanceKeys: IModelInstanceKey[];\n}\n\n/**\n * A key for a class-grouping node.\n * @public\n */\nexport interface ClassGroupingNodeKey {\n /** Type of the node */\n type: \"class-grouping\";\n\n /** Full name of the ECClass that this grouping node is grouping by. */\n className: EC.FullClassName;\n}\n\n/**\n * A key for a label-grouping node.\n * @public\n */\nexport interface LabelGroupingNodeKey {\n /** Type of the node */\n type: \"label-grouping\";\n\n /** Node label that this grouping node is grouping by. */\n label: string;\n\n /**\n * Optional group identifier that is assigned to the node key when multiple nodes\n * with the same label shouldn't be grouped together.\n */\n groupId?: string;\n}\n\n/**\n * A key property grouping node that groups nodes whose values don't fall into any other\n * property group in the hierarchy level.\n * @public\n */\nexport interface PropertyOtherValuesGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:other\";\n /** Identifiers of properties whose values are grouped under this node. */\n properties: Array<{ className: EC.FullClassName; propertyName: string }>;\n}\n\n/**\n * A key for a property grouping node that groups nodes by formatted property value.\n * @public\n */\nexport interface PropertyValueGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:value\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassName;\n\n /** Formatted property value that this node is grouping by. */\n formattedPropertyValue: string;\n}\n\n/**\n * A key for a property grouping node that groups nodes by a range of property values.\n * @public\n */\nexport interface PropertyValueRangeGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:range\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassName;\n\n /** Defines the start of the values' range that this node is grouping by. */\n fromValue: number;\n\n /** Defines the end of the values' range that this node is grouping by. */\n toValue: number;\n}\n\n/**\n * A key for a property grouping node.\n * @public\n */\nexport type PropertyGroupingNodeKey =\n | PropertyValueRangeGroupingNodeKey\n | PropertyValueGroupingNodeKey\n | PropertyOtherValuesGroupingNodeKey;\n\n/**\n * A key for one of the instance grouping nodes.\n * @public\n */\nexport type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;\n\n/**\n * A key for either an instance node or one of the instance grouping nodes.\n * @public\n */\nexport type IModelHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;\n\n/**\n * A key that uniquely identifies a node in a hierarchy level.\n * @public\n */\nexport type HierarchyNodeKey = IModelHierarchyNodeKey | GenericNodeKey;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeKey {\n /** Checks whether the given node key is a generic node key. */\n export function isGeneric(key: HierarchyNodeKey): key is GenericNodeKey {\n return key.type === \"generic\";\n }\n\n /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */\n export function isIModelNodeKey(key: HierarchyNodeKey): key is IModelHierarchyNodeKey {\n return !isGeneric(key);\n }\n\n /** Checks whether the given node key is an `InstancesNodeKey`. */\n export function isInstances(key: HierarchyNodeKey): key is InstancesNodeKey {\n return key.type === \"instances\";\n }\n\n /** Checks whether the given node key is a `GroupingNodeKey`. */\n export function isGrouping(key: HierarchyNodeKey): key is GroupingNodeKey {\n return !isGeneric(key) && !isInstances(key);\n }\n\n /** Checks whether the given node key is a `ClassGroupingNodeKey`. */\n export function isClassGrouping(key: HierarchyNodeKey): key is ClassGroupingNodeKey {\n return key.type === \"class-grouping\";\n }\n\n /** Checks whether the given node key is a `LabelGroupingNodeKey`. */\n export function isLabelGrouping(key: HierarchyNodeKey): key is LabelGroupingNodeKey {\n return key.type === \"label-grouping\";\n }\n\n /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */\n export function isPropertyOtherValuesGrouping(key: HierarchyNodeKey): key is PropertyOtherValuesGroupingNodeKey {\n return key.type === \"property-grouping:other\";\n }\n\n /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */\n export function isPropertyValueRangeGrouping(key: HierarchyNodeKey): key is PropertyValueRangeGroupingNodeKey {\n return key.type === \"property-grouping:range\";\n }\n\n /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */\n export function isPropertyValueGrouping(key: HierarchyNodeKey): key is PropertyValueGroupingNodeKey {\n return key.type === \"property-grouping:value\";\n }\n\n /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */\n export function isPropertyGrouping(key: HierarchyNodeKey): key is PropertyGroupingNodeKey {\n return isPropertyOtherValuesGrouping(key) || isPropertyValueRangeGrouping(key) || isPropertyValueGrouping(key);\n }\n\n /**\n * Compares two given keys. Returns:\n * - `0` if they are equal,\n * - `negative value` if lhs key is less than rhs key,\n * - `positive value` if lhs key is more than rhs key.\n */\n export function compare(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): number {\n const typeCompareResult = compareStrings(lhs.type, rhs.type);\n if (typeCompareResult !== 0) {\n return typeCompareResult;\n }\n switch (lhs.type) {\n case \"generic\": {\n assert(rhs.type === \"generic\");\n const idCompareResult = compareStrings(lhs.id, rhs.id);\n if (idCompareResult !== 0) {\n return idCompareResult;\n }\n return compareStringsOrUndefined(lhs.source, rhs.source);\n }\n case \"instances\": {\n assert(rhs.type === \"instances\");\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\n return lhs.instanceKeys.length > rhs.instanceKeys.length ? 1 : -1;\n }\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\n const instanceKeyCompareResult = InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]);\n if (instanceKeyCompareResult !== 0) {\n return instanceKeyCompareResult;\n }\n const imodelKeyCompareResult = compareStringsOrUndefined(\n lhs.instanceKeys[i].imodelKey,\n rhs.instanceKeys[i].imodelKey,\n );\n if (imodelKeyCompareResult !== 0) {\n return imodelKeyCompareResult;\n }\n }\n return 0;\n }\n case \"class-grouping\": {\n assert(rhs.type === \"class-grouping\");\n return compareStrings(\n normalizeFullClassName(lhs.className).toLocaleLowerCase(),\n normalizeFullClassName(rhs.className).toLocaleLowerCase(),\n );\n }\n case \"label-grouping\": {\n assert(rhs.type === \"label-grouping\");\n const labelCompareResult = compareStrings(lhs.label, rhs.label);\n if (labelCompareResult !== 0) {\n return labelCompareResult;\n }\n return compareStringsOrUndefined(lhs.groupId, rhs.groupId);\n }\n case \"property-grouping:other\": {\n assert(rhs.type === \"property-grouping:other\");\n if (lhs.properties.length !== rhs.properties.length) {\n return lhs.properties.length - rhs.properties.length;\n }\n for (let i = 0; i < lhs.properties.length; ++i) {\n const classCompareResult = compareStrings(\n normalizeFullClassName(lhs.properties[i].className).toLocaleLowerCase(),\n normalizeFullClassName(rhs.properties[i].className).toLocaleLowerCase(),\n );\n if (classCompareResult !== 0) {\n return classCompareResult;\n }\n const nameCompareResult = compareStrings(\n lhs.properties[i].propertyName.toLocaleLowerCase(),\n rhs.properties[i].propertyName.toLocaleLowerCase(),\n );\n if (nameCompareResult !== 0) {\n return nameCompareResult;\n }\n }\n return 0;\n }\n case \"property-grouping:value\": {\n assert(rhs.type === \"property-grouping:value\");\n const propertyClassNameCompareResult = compareStrings(\n normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(),\n normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(\n lhs.propertyName.toLocaleLowerCase(),\n rhs.propertyName.toLocaleLowerCase(),\n );\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n return compareStrings(lhs.formattedPropertyValue, rhs.formattedPropertyValue);\n }\n case \"property-grouping:range\": {\n assert(rhs.type === \"property-grouping:range\");\n const propertyClassNameCompareResult = compareStrings(\n normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(),\n normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(\n lhs.propertyName.toLocaleLowerCase(),\n rhs.propertyName.toLocaleLowerCase(),\n );\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n if (lhs.fromValue !== rhs.fromValue) {\n return lhs.fromValue > rhs.fromValue ? 1 : -1;\n }\n return lhs.toValue > rhs.toValue ? 1 : lhs.toValue < rhs.toValue ? -1 : 0;\n }\n }\n }\n\n /** Checks whether the two given keys are equal. */\n export function equals(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): boolean {\n return compare(lhs, rhs) === 0;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"HierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,KAAK,EACL,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,2EAA2E;IAC3E,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAE5C,0FAA0F;IAC1F,cAAc,CAAC,EAAE,qBAAqB,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AAE;IACtB,gBAAgB,EAAE,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACvF,KAAK,gBAAgB,GACrB,gBAAgB,GAAG,iBAAiB,CAatC"}
|
|
@@ -52,9 +52,13 @@ function createHierarchyProvider(partialFactory) {
|
|
|
52
52
|
const impl = partialFactory({ hierarchyChanged });
|
|
53
53
|
return Object.assign(impl, {
|
|
54
54
|
hierarchyChanged,
|
|
55
|
-
...(impl.getNodeInstanceKeys
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
...(impl.getNodeInstanceKeys
|
|
56
|
+
? { getNodeInstanceKeys: impl.getNodeInstanceKeys }
|
|
57
|
+
: /* v8 ignore next */ { async *getNodeInstanceKeys() { } }),
|
|
58
|
+
...(impl.setFormatter ? { setFormatter: impl.setFormatter } : /* v8 ignore next */ { setFormatter() { } }),
|
|
59
|
+
...(impl.setHierarchySearch
|
|
60
|
+
? { setHierarchySearch: impl.setHierarchySearch }
|
|
61
|
+
: /* v8 ignore next */ { setHierarchySearch() { } }),
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
//# sourceMappingURL=HierarchyProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyProvider.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;
|
|
1
|
+
{"version":3,"file":"HierarchyProvider.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAwJhG,0DAmBC;AAzKD,sDAA8C;AA6G9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,uBAAuB,CAGrC,cAEsB;IAEtB,MAAM,gBAAgB,GAAqD,IAAI,sBAAO,EAAE,CAAC;IACzF,MAAM,IAAI,GAAG,cAAc,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QACzB,gBAAgB;QAChB,GAAG,CAAC,IAAI,CAAC,mBAAmB;YAC1B,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE;YACnD,CAAC,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,CAAC,mBAAmB,KAAI,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,YAAY,KAAI,CAAC,EAAE,CAAC;QACzG,GAAG,CAAC,IAAI,CAAC,kBAAkB;YACzB,CAAC,CAAC,EAAE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE;YACjD,CAAC,CAAC,oBAAoB,CAAC,EAAE,kBAAkB,KAAI,CAAC,EAAE,CAAC;KACtD,CAAC,CAAC;AACL,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\nimport { BeEvent } from \"@itwin/core-bentley\";\n\nimport type { GenericInstanceFilter } from \"@itwin/core-common\";\nimport type {\n Event,\n EventListener,\n InstanceKey,\n IPrimitiveValueFormatter,\n Props,\n RaisableEvent,\n} from \"@itwin/presentation-shared\";\nimport type { HierarchyNode, ParentHierarchyNode } from \"./HierarchyNode.js\";\nimport type { HierarchySearchTree } from \"./HierarchySearch.js\";\n\n/**\n * Props for the `HierarchyProvider.getNodes` call.\n * @public\n */\nexport interface GetHierarchyNodesProps {\n /** Parent node to get children for. Pass `undefined` to get root nodes. */\n parentNode: ParentHierarchyNode | undefined;\n\n /** Optional hierarchy level filter. Has no effect if `parentNode` is a `GroupingNode`. */\n instanceFilter?: GenericInstanceFilter;\n\n /**\n * Optional hierarchy level size limit override. This value is passed to `LimitingECSqlQueryExecutor` used\n * by this provider to override query rows limit per hierarchy level. If not provided, defaults to whatever\n * is used by the limiting query executor.\n *\n * Has no effect if `parentNode` is a `GroupingNode`.\n */\n hierarchyLevelSizeLimit?: number | \"unbounded\";\n\n /** When set to `true` ignores the cache and fetches the nodes again. */\n ignoreCache?: boolean;\n}\n\n/**\n * Event arguments for `HierarchyProvider.hierarchyChanged` event.\n * @public\n */\ninterface HierarchyChangedEventArgs {\n /** Set when the hierarchy change was caused by a formatter change. */\n formatterChange?: { newFormatter: IPrimitiveValueFormatter | undefined };\n\n /** Set when the hierarchy change was caused by a hierarchy search change. */\n searchChange?: { newSearch: Props<HierarchyProvider[\"setHierarchySearch\"]> };\n}\n\n/**\n * An interface for a hierarchy provider that knows how to create child nodes for a given parent node.\n * @public\n */\nexport interface HierarchyProvider {\n /**\n * An event that provider raises due to a hierarchy change that requires a reload.\n *\n * Consumers are expected to subscribe to this event and reload the hierarchy when it's raised.\n * Implementations may provide additional details on what caused the change through the\n * event arguments.\n */\n readonly hierarchyChanged: Event<(args: HierarchyChangedEventArgs) => void>;\n\n /**\n * Gets nodes for the specified parent node. This is **the method to implement**, otherwise\n * the provider doesn't return any nodes.\n */\n getNodes(props: GetHierarchyNodesProps): AsyncIterableIterator<HierarchyNode>;\n\n /**\n * Gets instance keys for the specified parent node.\n *\n * The result of this method may be used to determine instances whose nodes would be displayed as children\n * of the specified parent node. For such use cases calling this method should be more efficient compared\n * to calling `getNodes`.\n */\n getNodeInstanceKeys(props: Omit<GetHierarchyNodesProps, \"ignoreCache\">): AsyncIterableIterator<InstanceKey>;\n\n /**\n * Overrides the property value formatter used by the hierarchy provider. Setting to `undefined`\n * resets the formatter, but what that means depends on the provider implementation - it could just\n * use unformatted values, or use some default formatter, e.g. the on created by `createDefaultValueFormatter`\n * from `@itwin/presentation-shared` package.\n *\n * @note Changing formatter is expected to trigger the `hierarchyChanged` event with `formatterChange` arg.\n */\n setFormatter(formatter: IPrimitiveValueFormatter | undefined): void;\n\n /**\n * Sets the hierarchy search used by this hierarchy provider. Setting to `undefined`\n * removes the search.\n *\n * @note There's a difference between `undefined` search and search with empty paths list. The\n * former means no search is applied, while the latter means the search is applied and it filters-out\n * all hierarchy.\n *\n * @note Changing search is expected to trigger the `hierarchyChanged` event with `searchChange` arg.\n */\n setHierarchySearch(\n props:\n | {\n /** A list of search trees that define paths from root to search target nodes. */\n paths: HierarchySearchTree[];\n }\n | undefined,\n ): void;\n}\n\n/**\n * An utility to create a `HierarchyProvider` from a partial implementation.\n *\n * Creating a `HierarchyProvider` directly requires implementing all its methods:\n * ```ts\n * {\n * hierarchyChanged: new BeEvent(),\n * async *getNodes({ parentNode }) {\n * // yield nodes...\n * },\n * async *getNodeInstanceKeys() {},\n * setFormatter() {},\n * setHierarchySearch() {},\n * }\n * ```\n *\n * However, in many cases you may only need to implement the `getNodes` method and\n * can rely on default implementations for other methods.\n *\n * With this utility you can implement only part of it, e.g. just the `getNodes` method:\n * ```ts\n * // provide implementation as a javascript object\n * createHierarchyProvider(({ hierarchyChanged }) => ({\n * async *getNodes({ parentNode }) {\n * // yield nodes...\n * },\n * }));\n *\n * // or, provide implementation as a class instance:\n * createHierarchyProvider(\n * ({ hierarchyChanged }) =>\n * new (class implements Pick<HierarchyProvider, \"getNodes\"> {\n * public async *getNodes({ parentNode }): ReturnType<HierarchyProvider[\"getNodes\"]> {\n * // yield nodes...\n * }\n * })(),\n * );\n * ```\n *\n * @public\n */\nexport function createHierarchyProvider<\n TPartialProvider extends Partial<Omit<HierarchyProvider, \"hierarchyChanged\">> & Pick<HierarchyProvider, \"getNodes\">,\n>(\n partialFactory: (props: {\n hierarchyChanged: RaisableEvent<EventListener<HierarchyProvider[\"hierarchyChanged\"]>>;\n }) => TPartialProvider,\n): TPartialProvider & HierarchyProvider {\n const hierarchyChanged: Props<typeof partialFactory>[\"hierarchyChanged\"] = new BeEvent();\n const impl = partialFactory({ hierarchyChanged });\n return Object.assign(impl, {\n hierarchyChanged,\n ...(impl.getNodeInstanceKeys\n ? { getNodeInstanceKeys: impl.getNodeInstanceKeys }\n : /* v8 ignore next */ { async *getNodeInstanceKeys() {} }),\n ...(impl.setFormatter ? { setFormatter: impl.setFormatter } : /* v8 ignore next */ { setFormatter() {} }),\n ...(impl.setHierarchySearch\n ? { setHierarchySearch: impl.setHierarchySearch }\n : /* v8 ignore next */ { setHierarchySearch() {} }),\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchySearch.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchySearch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAIvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,cAAc;AACd,MAAM,WAAW,0BAA0B;IACzC;;;;;;OAMG;IACH,MAAM,CAAC,EACH,OAAO,GACP;QACE;;;;;;;;;;;;;;;;;WAiBG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,GACD;QACE;;;;;;WAMG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACN;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"HierarchySearch.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchySearch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAIvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAA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