@itwin/presentation-hierarchies 2.0.0-alpha.1 → 2.0.0-alpha.11
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 +356 -8
- package/README.md +4 -22
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts +19 -0
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/cjs/hierarchies/HierarchyMerge.js +43 -0
- package/lib/cjs/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/cjs/hierarchies/HierarchyNode.d.ts +17 -26
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +1 -21
- package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js +8 -8
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts +58 -33
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +46 -30
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchySearch.d.ts +169 -0
- package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +1 -0
- package/lib/cjs/hierarchies/HierarchySearch.js +259 -0
- package/lib/cjs/hierarchies/HierarchySearch.js.map +1 -0
- package/lib/cjs/hierarchies/Logging.d.ts +1 -1
- package/lib/cjs/hierarchies/Logging.d.ts.map +1 -1
- package/lib/cjs/hierarchies/Logging.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +3 -3
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +30 -9
- 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 +3 -3
- 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 +50 -15
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +203 -76
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +5 -5
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +102 -43
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +4 -4
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts +35 -0
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +285 -0
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +9 -11
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +15 -6
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +5 -5
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +1 -0
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +4 -4
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +6 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +4 -4
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +4 -3
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +4 -4
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +22 -17
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts +5 -2
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +12 -1
- package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.js +3 -0
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts +19 -8
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +6 -5
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.d.ts +2 -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 +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +1 -1
- package/lib/cjs/presentation-hierarchies.d.ts +22 -11
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js +8 -6
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.d.ts +19 -0
- package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/esm/hierarchies/HierarchyMerge.js +40 -0
- package/lib/esm/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/esm/hierarchies/HierarchyNode.d.ts +17 -26
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.js +1 -21
- package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js +9 -9
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts +58 -33
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js +45 -29
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/HierarchySearch.d.ts +169 -0
- package/lib/esm/hierarchies/HierarchySearch.d.ts.map +1 -0
- package/lib/esm/hierarchies/HierarchySearch.js +254 -0
- package/lib/esm/hierarchies/HierarchySearch.js.map +1 -0
- package/lib/esm/hierarchies/Logging.d.ts +1 -1
- package/lib/esm/hierarchies/Logging.d.ts.map +1 -1
- package/lib/esm/hierarchies/Logging.js.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js +3 -3
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +30 -9
- 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 +3 -3
- 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 +50 -15
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +204 -78
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts +5 -5
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +104 -45
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +4 -4
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts +35 -0
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js +279 -0
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts +9 -11
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js +13 -5
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +5 -5
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +1 -0
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +4 -4
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +7 -6
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +4 -4
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +5 -4
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +4 -4
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +23 -18
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts +5 -2
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +11 -1
- package/lib/esm/hierarchies/internal/Common.js.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.js +3 -0
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +1 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.js.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts +19 -8
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +7 -6
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Partition.d.ts +2 -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 +1 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +1 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +1 -1
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts +1 -1
- package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +1 -1
- package/lib/esm/presentation-hierarchies.d.ts +22 -11
- package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.js +7 -6
- package/lib/esm/presentation-hierarchies.js.map +1 -1
- package/package.json +19 -19
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +0 -110
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.js +0 -215
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +0 -36
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +0 -274
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts +0 -110
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyFiltering.js +0 -210
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +0 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +0 -36
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +0 -268
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,242 @@
|
|
|
1
1
|
# @itwin/presentation-hierarchies
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.11
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1198](https://github.com/iTwin/presentation/pull/1198): Change `HierarchyProvider.hierarchyChanged` argument to be required.
|
|
8
|
+
|
|
9
|
+
This simplifies the API for users of `HierarchyProvider`, as they no longer need to check for `undefined` when handling hierarchy changes.
|
|
10
|
+
|
|
11
|
+
For implementors of custom `HierarchyProvider`, this change means that they must always provide an even argument when raising the `hierarchyChanged` event. Since all members of the argument type are optional, it's okay to raise the even with an empty object, e.g.: `this.hierarchyChanged.raiseEvent({})`.
|
|
12
|
+
|
|
13
|
+
- [#1202](https://github.com/iTwin/presentation/pull/1202): Change `NodePreProcessor` and `NodePostProcessor` function types to take a props object instead of a node.
|
|
14
|
+
|
|
15
|
+
In addition, the props object now contains the `parentNode` property, which provides access to the parent node of the current node being processed. This allows for more context-aware processing of nodes within the hierarchy.
|
|
16
|
+
|
|
17
|
+
The change breaks consumers that have `HierarchyDefinition` implementations with `preProcessNode` or `postProcessNode` functions defined. Reacting to the change is straightforward:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const myHierarchyDefinition: HierarchyDefinition = {
|
|
21
|
+
// Before:
|
|
22
|
+
preProcessNode: async (node) => {
|
|
23
|
+
// process node
|
|
24
|
+
},
|
|
25
|
+
postProcessNode: async (node) => {
|
|
26
|
+
// process node
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
// After:
|
|
30
|
+
preProcessNode: async ({ node, parentNode }) => {
|
|
31
|
+
// process node with access to parentNode
|
|
32
|
+
},
|
|
33
|
+
postProcessNode: async ({ node, parentNode }) => {
|
|
34
|
+
// process node with access to parentNode
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// ... the rest of implementation
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- [#1204](https://github.com/iTwin/presentation/pull/1204): Add `createHierarchyProvider` utility function.
|
|
44
|
+
|
|
45
|
+
This function simplifies the creation of custom hierarchy providers by allowing developers to define only the necessary methods, while providing default implementations for the rest. This enhancement improves developer experience and reduces boilerplate code when working with custom hierarchy providers in the `@itwin/presentation-hierarchies` package.
|
|
46
|
+
|
|
47
|
+
**Before:**
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
const beforeAsPlainObject: HierarchyProvider = {
|
|
51
|
+
hierarchyChanged: new BeEvent(),
|
|
52
|
+
async *getNodes({ parentNode }) {
|
|
53
|
+
// yield nodes...
|
|
54
|
+
},
|
|
55
|
+
async *getNodeInstanceKeys() {},
|
|
56
|
+
setFormatter() {},
|
|
57
|
+
setHierarchySearch() {},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const beforeAsClassObject = new (class implements HierarchyProvider {
|
|
61
|
+
public hierarchyChanged: new BeEvent(),
|
|
62
|
+
public async *getNodes({ parentNode }) {
|
|
63
|
+
// yield nodes...
|
|
64
|
+
},
|
|
65
|
+
public async *getNodeInstanceKeys() {},
|
|
66
|
+
public setFormatter(formatter: IPrimitiveValueFormatter | undefined) {
|
|
67
|
+
// set formatter...
|
|
68
|
+
hierarchyChanged.raiseEvent({ formatterChange: { newFormatter: formatter } });
|
|
69
|
+
},
|
|
70
|
+
public setHierarchySearch() {},
|
|
71
|
+
})();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**After:**
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const afterAsPlainObject = createHierarchyProvider(() => ({
|
|
78
|
+
async *getNodes({ parentNode }) {
|
|
79
|
+
// yield nodes...
|
|
80
|
+
},
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
// or, provide implementation as a class instance:
|
|
84
|
+
const afterAsClassObject = createHierarchyProvider(
|
|
85
|
+
({ hierarchyChanged }) =>
|
|
86
|
+
new (class implements Pick<HierarchyProvider, "getNodes" | "setFormatter"> {
|
|
87
|
+
public async *getNodes({ parentNode }): ReturnType<HierarchyProvider["getNodes"]> {
|
|
88
|
+
// yield nodes...
|
|
89
|
+
}
|
|
90
|
+
public setFormatter(formatter: IPrimitiveValueFormatter | undefined) {
|
|
91
|
+
// set formatter...
|
|
92
|
+
hierarchyChanged.raiseEvent({ formatterChange: { newFormatter: formatter } });
|
|
93
|
+
}
|
|
94
|
+
})(),
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Updated dependencies:
|
|
101
|
+
- @itwin/presentation-shared@2.0.0-alpha.7
|
|
102
|
+
|
|
103
|
+
## 2.0.0-alpha.10
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- [#1180](https://github.com/iTwin/presentation/pull/1180): Version bump
|
|
108
|
+
- Updated dependencies:
|
|
109
|
+
- @itwin/presentation-shared@2.0.0-alpha.6
|
|
110
|
+
|
|
111
|
+
## 2.0.0-alpha.9
|
|
112
|
+
|
|
113
|
+
### Major Changes
|
|
114
|
+
|
|
115
|
+
- [#1150](https://github.com/iTwin/presentation/pull/1150): Support creating ECSQL query definitions based on instance filters, containing schema items that don't exist in the _current_ iModel.
|
|
116
|
+
|
|
117
|
+
To support that, the `NodesQueryClauseFactory` created by `createNodesQueryClauseFactory` returns a query-disabling result when it encounters such schema items. To ensure that's possible,
|
|
118
|
+
the `createNodesQueryClauseFactory` function should be called with `imodelAccess` that is passed to `HierarchyDefinition.defineHierarchyLevel`.
|
|
119
|
+
|
|
120
|
+
**Breaking changes:**
|
|
121
|
+
- `DefineHierarchyLevelProps.imodelKey` was replaced with `imodelAccess`. If needed, the key can be accessed using `imodelAccess.imodelKey`. This affects the following APIs:
|
|
122
|
+
- `HierarchyDefinition.defineHierarchyLevel` (function that uses these props),
|
|
123
|
+
- `DefineRootHierarchyLevelProps` (extends the props type),
|
|
124
|
+
- `DefineInstanceNodeChildHierarchyLevelProps` (extends the props type).
|
|
125
|
+
|
|
126
|
+
## 2.0.0-alpha.8
|
|
127
|
+
|
|
128
|
+
### Minor Changes
|
|
129
|
+
|
|
130
|
+
- [#1137](https://github.com/iTwin/presentation/pull/1137): Fix hierarchy search only handling a single (latest) iModel results when searching multi-iModel hierarchies.
|
|
131
|
+
|
|
132
|
+
Notable API changes:
|
|
133
|
+
- **BREAKING:** `NodeParser` (type of `HierarchyDefinition.parseNode` function) now gets a single props argument instead of multiple arguments. In addition, the props object now also contains an imodel key argument.
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
// old:
|
|
137
|
+
function myParser(row: [columnName: string]: any, parentNode?: HierarchyDefinitionParentNode) {
|
|
138
|
+
// implementation...
|
|
139
|
+
}
|
|
140
|
+
// new:
|
|
141
|
+
function myParser(props: { row: [columnName: string]: any; parentNode?: HierarchyDefinitionParentNode; imodelKey: string; }) {
|
|
142
|
+
// implementation...
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- Exposed `IModelInstanceKey` type, which extends `InstanceKey` with an optional `imodelKey` prop. This type is used in iModel-based instance nodes and is useful outside of this package, too.
|
|
147
|
+
- Props for `HierarchyDefinition.defineHierarchyLevel` now include an `imodelKey` prop, identifying the iModel for which the hierarchy level is being requested. This change extends into `createPredicateBasedHierarchyDefinition` - it's props for defining root and child nodes also get the new prop.
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- [#1137](https://github.com/iTwin/presentation/pull/1137): Add and use a more robust way to check full class names for equality - `compareFullClassNames` function.
|
|
152
|
+
|
|
153
|
+
The function compares full class names in case-insensitive way, ignoring different supported schema-class name separators (`:` or `.`).
|
|
154
|
+
|
|
155
|
+
- Updated dependencies:
|
|
156
|
+
- @itwin/presentation-shared@2.0.0-alpha.5
|
|
157
|
+
|
|
158
|
+
## 2.0.0-alpha.7
|
|
159
|
+
|
|
160
|
+
### Minor Changes
|
|
161
|
+
|
|
162
|
+
- [#1011](https://github.com/iTwin/presentation/pull/1011): Rename full‑hierarchy "filtering" to "search" across the package.
|
|
163
|
+
|
|
164
|
+
Properties and APIs were renamed accordingly to clarify the distinction and avoid confusion between hierarchy‑wide search and per-hierarchy‑level filtering.
|
|
165
|
+
|
|
166
|
+
**Breaking changes:**
|
|
167
|
+
- Removed deprecated `extractFilteringProps`.
|
|
168
|
+
- Removed deprecated `HierarchyNodeFilteringProps.create`.
|
|
169
|
+
- Renamed `createHierarchyFilteringHelper` to `createHierarchySearchHelper`. It's return type was also adjusted for the rename:
|
|
170
|
+
- `hasFilter` renamed to `hasSearch`,
|
|
171
|
+
- `hasFilterTargetAncestor` renamed to `hasSearchTargetAncestor`,
|
|
172
|
+
- `getChildNodeFilteringIdentifiers` renamed to `getChildNodeSearchIdentifiers`.
|
|
173
|
+
- Renamed `HierarchyChangedEventArgs.filterChange` to `searchChange`.
|
|
174
|
+
- Renamed `HierarchyProvider.setHierarchyFilter` to `setHierarchySearch`.
|
|
175
|
+
- Renamed `createMergedIModelHierarchyProvider` prop `filtering` to `search.
|
|
176
|
+
- Renamed `HierarchyFilteringPath` to `HierarchySearchPath`.
|
|
177
|
+
- Renamed `HierarchyFilteringPathOptions` to `HierarchySearchPathOptions`.
|
|
178
|
+
- Renamed `NonGroupingHierarchyNode.filtering` to `search`. It's type was also adjusted for the rename:
|
|
179
|
+
- `hasFilterTargetAncestor` renamed to `hasSearchTargetAncestor`,
|
|
180
|
+
- `filteredChildrenIdentifierPaths` renamed to `childrenTargetPaths`,
|
|
181
|
+
- `isFilterTarget` renamed to `isSearchTarget`,
|
|
182
|
+
- `filterTargetOptions` renamed to `searchTargetOptions`.
|
|
183
|
+
|
|
184
|
+
## 2.0.0-alpha.6
|
|
185
|
+
|
|
186
|
+
### Major Changes
|
|
187
|
+
|
|
188
|
+
- 6a00754233e6d1b8956a5fc7680829562156d659: Fixed a bug causing `HierarchyNode.autoExpand` flag to be set on non-grouping nodes, when `HierarchyFilteringPathOptions.autoExpand.depthInHierarchy` points to a grouping node whose child non-grouping node is not a filter target.
|
|
189
|
+
|
|
190
|
+
**Breaking changes:**
|
|
191
|
+
- `GroupingHierarchyNode` no longer contains `filtering` attribute. This was always the case, but now the types have been updated to match it.
|
|
192
|
+
- Changed return type of `createHierarchyFilteringHelper`:
|
|
193
|
+
- Removed `createChildNodePropsAsync` - it became an overload of `createChildNodeProps`, whose path matching is done through `asyncPathMatcher` callback.
|
|
194
|
+
- `createChildNodeProps` now has multiple overloads and returns different types based on provided props. `autoExpand` flag is only returned when `parentKeys` are provided.
|
|
195
|
+
- Renamed `HierarchyFilteringPathOptions.autoExpand` -> `HierarchyFilteringPathOptions.reveal` to match intent.
|
|
196
|
+
- Changed `HierarchyFilteringPathOptions.reveal.depthInHierarchy` and `depthInPath` to use 0-based indexing instead of 1-based indexing.
|
|
197
|
+
- Changed `HierarchyFilteringPathOptions.reveal.depthInHierarchy` to not set `autoExpand` flag on the node that is at the `depthInHierarchy` position.
|
|
198
|
+
|
|
199
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: The hierarchy provider returned by `mergeProviders` doesn't have the deprecated `dispose` method anymore. Use `[Symbol.dispose]` instead.
|
|
200
|
+
|
|
201
|
+
### Minor Changes
|
|
202
|
+
|
|
203
|
+
- e9e42c3a513cb7d594351ee2244c7efe67cc4385: Added `HierarchyFilteringPathOptions.autoExpand` option to enable auto-expanding of filter target nodes.
|
|
204
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: Add an experimental (`@alpha`) function `createMergedIModelHierarchyProvider` for creating a hierarchy from multiple versions of the same iModel.
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: Fix `HierarchyNodeKey` methods `equals` and `compare` not handling different schema-class separators and casing.
|
|
209
|
+
- Updated dependencies:
|
|
210
|
+
- @itwin/presentation-shared@2.0.0-alpha.4
|
|
211
|
+
|
|
212
|
+
## 2.0.0-alpha.5
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- [#1112](https://github.com/iTwin/presentation/pull/1112): Version bump
|
|
217
|
+
- Updated dependencies:
|
|
218
|
+
- @itwin/presentation-shared@2.0.0-alpha.3
|
|
219
|
+
|
|
220
|
+
## 2.0.0-alpha.4
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- [#1042](https://github.com/iTwin/presentation/pull/1042): Version bump
|
|
225
|
+
- Updated dependencies:
|
|
226
|
+
- @itwin/presentation-shared@2.0.0-alpha.2
|
|
227
|
+
|
|
228
|
+
## 2.0.0-alpha.3
|
|
229
|
+
|
|
230
|
+
### Patch Changes
|
|
231
|
+
|
|
232
|
+
- [#1031](https://github.com/iTwin/presentation/pull/1031): Version bump
|
|
233
|
+
|
|
234
|
+
## 2.0.0-alpha.2
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- [#1005](https://github.com/iTwin/presentation/pull/1005): Removed deprecated `FilterTargetGroupingNodeInfo` interface.
|
|
239
|
+
|
|
3
240
|
## 2.0.0-alpha.1
|
|
4
241
|
|
|
5
242
|
### Patch Changes
|
|
@@ -13,7 +250,6 @@
|
|
|
13
250
|
### Major Changes
|
|
14
251
|
|
|
15
252
|
- [#954](https://github.com/iTwin/presentation/pull/954): Add additional requirements for types in `EC` metadata namespace, whose objects are returned by `ECSchemaProvider`.
|
|
16
|
-
|
|
17
253
|
- `EC.Schema`, `EC.Class` and `EC.Property` now all have an async `getCustomAttributes()` method that returns an `EC.CustomAttributeSet`, allowing consumers to access custom attributes of these schema items.
|
|
18
254
|
- `EC.Class` now additionally has these members:
|
|
19
255
|
- `baseClass: Promise<Class | undefined>`
|
|
@@ -32,6 +268,125 @@
|
|
|
32
268
|
- Updated dependencies:
|
|
33
269
|
- @itwin/presentation-shared@2.0.0-alpha.0
|
|
34
270
|
|
|
271
|
+
## 1.7.9
|
|
272
|
+
|
|
273
|
+
### Patch Changes
|
|
274
|
+
|
|
275
|
+
- [#1208](https://github.com/iTwin/presentation/pull/1208): Bump dependencies.
|
|
276
|
+
- Updated dependencies:
|
|
277
|
+
- @itwin/presentation-shared@1.2.8
|
|
278
|
+
|
|
279
|
+
## 1.7.8
|
|
280
|
+
|
|
281
|
+
### Patch Changes
|
|
282
|
+
|
|
283
|
+
- [#1168](https://github.com/iTwin/presentation/pull/1168): Bump dependencies.
|
|
284
|
+
- [#1161](https://github.com/iTwin/presentation/pull/1161): Bump iTwin.js dependencies to `^5.5.0`.
|
|
285
|
+
- Updated dependencies:
|
|
286
|
+
- @itwin/presentation-shared@1.2.7
|
|
287
|
+
|
|
288
|
+
## 1.7.7
|
|
289
|
+
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- [#1152](https://github.com/iTwin/presentation/pull/1152): Bump dependencies.
|
|
293
|
+
- Updated dependencies:
|
|
294
|
+
- @itwin/presentation-shared@1.2.6
|
|
295
|
+
|
|
296
|
+
## 1.7.6
|
|
297
|
+
|
|
298
|
+
### Patch Changes
|
|
299
|
+
|
|
300
|
+
- [#1139](https://github.com/iTwin/presentation/pull/1139): Bump dependencies.
|
|
301
|
+
- Updated dependencies:
|
|
302
|
+
- @itwin/presentation-shared@1.2.5
|
|
303
|
+
|
|
304
|
+
## 1.7.5
|
|
305
|
+
|
|
306
|
+
### Patch Changes
|
|
307
|
+
|
|
308
|
+
- [#1124](https://github.com/iTwin/presentation/pull/1124): Bump dependencies.
|
|
309
|
+
- Updated dependencies:
|
|
310
|
+
- @itwin/presentation-shared@1.2.4
|
|
311
|
+
|
|
312
|
+
## 1.7.4
|
|
313
|
+
|
|
314
|
+
### Patch Changes
|
|
315
|
+
|
|
316
|
+
- [#1088](https://github.com/iTwin/presentation/pull/1088): Fix restart tokens not being unique when they need to, causing queries to be cancelled.
|
|
317
|
+
|
|
318
|
+
## 1.7.3
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- [#1083](https://github.com/iTwin/presentation/pull/1083): Add unique guid to existing restart tokens, and add restart tokens to executed queries.
|
|
323
|
+
|
|
324
|
+
## 1.7.2
|
|
325
|
+
|
|
326
|
+
### Patch Changes
|
|
327
|
+
|
|
328
|
+
- [#1039](https://github.com/iTwin/presentation/pull/1039): Bump iTwin.js core dependencies to `^5.1.1`.
|
|
329
|
+
- Updated dependencies:
|
|
330
|
+
- @itwin/presentation-shared@1.2.3
|
|
331
|
+
|
|
332
|
+
## 1.7.1
|
|
333
|
+
|
|
334
|
+
### Patch Changes
|
|
335
|
+
|
|
336
|
+
- [#1024](https://github.com/iTwin/presentation/pull/1024): Update `depthInPath` documentation. Clarified that it does not set auto-expand for node that is at `depthInPath` position.
|
|
337
|
+
|
|
338
|
+
## 1.7.0
|
|
339
|
+
|
|
340
|
+
### Minor Changes
|
|
341
|
+
|
|
342
|
+
- 8f7d200926b93e862276e1f978f6c891691e0dae: Refactored specifying the depth / level to which filtering path should be auto-expanded.
|
|
343
|
+
- Deprecated `FilteringPathAutoExpandOption` and `FilterTargetGroupingNodeInfo`.
|
|
344
|
+
- Added `FilteringPathAutoExpandDepthInPath` and `FilteringPathAutoExpandDepthInHierarchy` which should be used instead.
|
|
345
|
+
|
|
346
|
+
Migration:
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
const pathExpandedToInstanceInPath: HierarchyFilteringPath = {
|
|
350
|
+
path: [instanceKey1, instanceKey2, instanceKey3],
|
|
351
|
+
options: {
|
|
352
|
+
// deprecated:
|
|
353
|
+
autoExpand: { depth: 1 },
|
|
354
|
+
// do this instead:
|
|
355
|
+
autoExpand: { depthInPath: 1 },
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
const pathExpandedToGroupingNode: HierarchyFilteringPath = {
|
|
360
|
+
path: [instanceKey1, instanceKey2, instanceKey3],
|
|
361
|
+
options: {
|
|
362
|
+
// deprecated:
|
|
363
|
+
autoExpand: { depth: 1, key: groupingNodeKey },
|
|
364
|
+
// also deprecated:
|
|
365
|
+
autoExpand: { depth: 1, includeGroupingNodes: true },
|
|
366
|
+
// do this instead:
|
|
367
|
+
autoExpand: { depthInHierarchy: 1 },
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## 1.6.1
|
|
373
|
+
|
|
374
|
+
### Patch Changes
|
|
375
|
+
|
|
376
|
+
- [#1010](https://github.com/iTwin/presentation/pull/1010): Fixed `HierarchyFilteringPathOptions.autoExpand` depth option not working properly with grouping nodes. Added `includeGroupingNodes` attribute to `FilteringPathAutoExpandOption`, which allows auto-expanding only desired gouping nodes, when set together with `depth` value.
|
|
377
|
+
|
|
378
|
+
## 1.6.0
|
|
379
|
+
|
|
380
|
+
### Minor Changes
|
|
381
|
+
|
|
382
|
+
- 69a2db67917f84e99d532e8e9aabbc02ec262d91: `HierarchyFilteringPathOptions.autoExpand` is now of type:
|
|
383
|
+
|
|
384
|
+
```ts
|
|
385
|
+
autoExpand?: { depth: number } | boolean;
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
When `depth` is set, only nodes up to specified `depth` in `HierarchyFilteringPath` will have `autoExpand` option set.
|
|
389
|
+
|
|
35
390
|
## 1.5.1
|
|
36
391
|
|
|
37
392
|
### Patch Changes
|
|
@@ -57,7 +412,6 @@
|
|
|
57
412
|
```
|
|
58
413
|
|
|
59
414
|
**After:**
|
|
60
|
-
|
|
61
415
|
- **Option A:** check if it's a Promise before awaiting:
|
|
62
416
|
|
|
63
417
|
Use this when you want to get slightly better performance by avoiding unnecessary `await`.
|
|
@@ -142,7 +496,6 @@
|
|
|
142
496
|
- [#783](https://github.com/iTwin/presentation/pull/783): Added hierarchy filtering helper to make hierarchy filtering easier to implement.
|
|
143
497
|
|
|
144
498
|
The helper can be created using the `createHierarchyFilteringHelper` function and supplying it the root level filtering paths and parent node. From there, filtering information for specific hierarchy level is determined and an object with the following attributes is returned:
|
|
145
|
-
|
|
146
499
|
- `hasFilter` tells if the hierarchy level has a filter applied.
|
|
147
500
|
- `hasFilterTargetAncestor` tells if there's a filter target ancestor node up in the hierarchy.
|
|
148
501
|
- `getChildNodeFilteringIdentifiers()` returns an array of hierarchy node identifiers that apply specifically for this hierarchy level.
|
|
@@ -151,7 +504,6 @@
|
|
|
151
504
|
See the [Implementing hierarchy filtering support](./learning/CustomHierarchyProviders.md#implementing-hierarchy-filtering-support) learning page for a usage example.
|
|
152
505
|
|
|
153
506
|
In addition, deprecated a few APIs that are replaced by filtering helper:
|
|
154
|
-
|
|
155
507
|
- `extractFilteringProps` function,
|
|
156
508
|
- `HierarchyNodeFilteringProps.create` function.
|
|
157
509
|
|
|
@@ -197,7 +549,6 @@
|
|
|
197
549
|
| 50k | not tested | 13.45 s |
|
|
198
550
|
|
|
199
551
|
In addition, changed `NodeParser` (return type of `HierarchyDefinition.parseNode`):
|
|
200
|
-
|
|
201
552
|
- It now can return a promise, so instead of just `SourceInstanceHierarchyNode` it can now also return `Promise<SourceInstanceHierarchyNode>`.
|
|
202
553
|
- Additionally, it now accepts an optional `parentNode` argument of `HierarchyDefinitionParentNode` type.
|
|
203
554
|
|
|
@@ -229,7 +580,6 @@
|
|
|
229
580
|
### Minor Changes
|
|
230
581
|
|
|
231
582
|
- [#708](https://github.com/iTwin/presentation/pull/708): **BREAKING:** Added support for creating hierarchies from multiple data sources.
|
|
232
|
-
|
|
233
583
|
- `InstancesNodeKey.instanceKeys` array items now have an optional `imodelKey` attribute to allow for the identification of the iModel that the instance belongs to. This is useful when working with sets of instance keys representing instances from different iModels. In addition, the same `imodelKey` attribute is also available on `HierarchyNodeIdentifier` to allow for filtering nodes based on the iModel they belong to.
|
|
234
584
|
- `HierarchyNode` terminology and related changes:
|
|
235
585
|
- "Standard" nodes were renamed to "IModel" nodes to signify the fact that they're based on iModel data:
|
|
@@ -257,7 +607,6 @@
|
|
|
257
607
|
- The returned provider now has a `dispose` method to clean up resources - make sure to call it when the provider is no longer needed.
|
|
258
608
|
- Added `mergeProviders` function, which, given a number of hierarchy providers, creates a new provider that merges the hierarchies of the input providers. The returned provider has a `dispose` method that needs to be called when the provider is no longer needed.
|
|
259
609
|
- Renamed `createClassBasedHierarchyDefinition` to `createPredicateBasedHierarchyDefinition` to signify its props changes:
|
|
260
|
-
|
|
261
610
|
- When specifying `childNodes` definition for instances parent node, the `parentNodeClassName` attribute was changed to `parentInstancesNodePredicate`. In addition to accepting a full class name, identifying the class of parent instances to return children for, it now also accepts an async function predicate.
|
|
262
611
|
- When specifying `childNodes` definition for generic parent node, the `customParentNodeKey` attribute was changed to `parentGenericNodePredicate`. The type changed from `string`, identifying the key of the parent node, to an async function predicate.
|
|
263
612
|
|
|
@@ -310,7 +659,6 @@
|
|
|
310
659
|
```
|
|
311
660
|
|
|
312
661
|
- [#708](https://github.com/iTwin/presentation/pull/708): Added utilities for custom hierarchy filtering handling:
|
|
313
|
-
|
|
314
662
|
- `extractFilteringProps` function, given root level hierarchy filtering paths and a parent node, returns props required to filter particular hierarchy level.
|
|
315
663
|
- `HierarchyFilteringPath` interface is now public and there's also a similarly-named namespace with the following utilities:
|
|
316
664
|
- `mergeOptions` merges filtering options of two paths. This is useful for cases when there are multiple paths targeting the same node, but with different options.
|
package/README.md
CHANGED
|
@@ -50,15 +50,15 @@ Below is a list of learning material related to building hierarchies:
|
|
|
50
50
|
- General topics:
|
|
51
51
|
- [Formatting](./learning/Formatting.md)
|
|
52
52
|
- [Logging](./learning/Logging.md)
|
|
53
|
-
- [Hierarchy
|
|
54
|
-
- [Hierarchy level filtering](./learning/
|
|
53
|
+
- [Hierarchy search](./learning/HierarchySearch.md)
|
|
54
|
+
- [Hierarchy level filtering](./learning/HierarchyLevelFiltering.md)
|
|
55
55
|
- [Merged hierarchies](./learning/MergedHierarchies.md)
|
|
56
56
|
- [Custom hierarchy providers](./learning/CustomHierarchyProviders.md)
|
|
57
57
|
- iModel-based hierarchies:
|
|
58
58
|
- [Hierarchy provider](./learning/imodel/HierarchyProvider.md)
|
|
59
59
|
- [Hierarchy definition](./learning/imodel/HierarchyDefinition.md)
|
|
60
60
|
- [Hierarchy node labels](./learning/imodel/HierarchyNodeLabels.md)
|
|
61
|
-
- [Hierarchy
|
|
61
|
+
- [Hierarchy search](./learning/imodel/HierarchySearch.md)
|
|
62
62
|
- [Hierarchy level filtering](./learning/imodel/HierarchyLevelFiltering.md)
|
|
63
63
|
- [Grouping](./learning/imodel/Grouping.md)
|
|
64
64
|
- [Localization](./learning/imodel/Localization.md)
|
|
@@ -75,8 +75,6 @@ Here's a simple example of how to create a hierarchy provider and build a hierar
|
|
|
75
75
|
|
|
76
76
|
```ts
|
|
77
77
|
import { IModelConnection } from "@itwin/core-frontend";
|
|
78
|
-
import { SchemaContext } from "@itwin/ecschema-metadata";
|
|
79
|
-
import { ECSchemaRpcLocater } from "@itwin/ecschema-rpcinterface-common";
|
|
80
78
|
import { createECSchemaProvider, createECSqlQueryExecutor, createIModelKey } from "@itwin/presentation-core-interop";
|
|
81
79
|
import { createLimitingECSqlQueryExecutor } from "@itwin/presentation-hierarchies";
|
|
82
80
|
import { createCachingECClassHierarchyInspector, Props } from "@itwin/presentation-shared";
|
|
@@ -91,24 +89,8 @@ import {
|
|
|
91
89
|
} from "@itwin/presentation-hierarchies";
|
|
92
90
|
import { createBisInstanceLabelSelectClauseFactory, ECSqlBinding } from "@itwin/presentation-shared";
|
|
93
91
|
|
|
94
|
-
// Not really part of the package, but we need SchemaContext to create a hierarchy provider. It's
|
|
95
|
-
// recommended to cache the schema context and reuse it across different application's components to
|
|
96
|
-
// avoid loading and storing same schemas multiple times.
|
|
97
|
-
const imodelSchemaContextsCache = new Map<string, SchemaContext>();
|
|
98
|
-
function getIModelSchemaContext(imodel: IModelConnection) {
|
|
99
|
-
const imodelKey = createIModelKey(imodel);
|
|
100
|
-
let context = imodelSchemaContextsCache.get(imodelKey);
|
|
101
|
-
if (!context) {
|
|
102
|
-
context = new SchemaContext();
|
|
103
|
-
context.addLocater(new ECSchemaRpcLocater(imodel.getRpcProps()));
|
|
104
|
-
imodelSchemaContextsCache.set(imodelKey, context);
|
|
105
|
-
imodel.onClose.addListener(() => imodelSchemaContextsCache.delete(imodelKey));
|
|
106
|
-
}
|
|
107
|
-
return context;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
92
|
function createIModelAccess(imodel: IModelConnection) {
|
|
111
|
-
const schemaProvider = createECSchemaProvider(
|
|
93
|
+
const schemaProvider = createECSchemaProvider(imodel.schemaContext);
|
|
112
94
|
return {
|
|
113
95
|
// The key of the iModel we're accessing
|
|
114
96
|
imodelKey: createIModelKey(imodel),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./internal/DisposePolyfill.js";
|
|
2
|
+
import type { HierarchyProvider } from "./HierarchyProvider.js";
|
|
3
|
+
/**
|
|
4
|
+
* Props for `mergeProviders` function.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
interface MergeHierarchyProvidersProps {
|
|
8
|
+
/** List of providers to merge. */
|
|
9
|
+
providers: HierarchyProvider[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates a single, merged, hierarchy provider from multiple given providers.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare function mergeProviders({ providers }: MergeHierarchyProvidersProps): HierarchyProvider & {
|
|
16
|
+
[Symbol.dispose]: () => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=HierarchyMerge.d.ts.map
|
|
@@ -0,0 +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,EAAE,SAAS,EAAE,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAC/F,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B,CAyCA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.mergeProviders = mergeProviders;
|
|
8
|
+
require("./internal/DisposePolyfill.js");
|
|
9
|
+
const rxjs_1 = require("rxjs");
|
|
10
|
+
const core_bentley_1 = require("@itwin/core-bentley");
|
|
11
|
+
const Common_js_1 = require("./internal/Common.js");
|
|
12
|
+
const EachValueFrom_js_1 = require("./internal/EachValueFrom.js");
|
|
13
|
+
const Sorting_js_1 = require("./internal/operators/Sorting.js");
|
|
14
|
+
/**
|
|
15
|
+
* Creates a single, merged, hierarchy provider from multiple given providers.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
function mergeProviders({ providers }) {
|
|
19
|
+
const hierarchyChanged = new core_bentley_1.BeEvent();
|
|
20
|
+
providers.forEach((p) => {
|
|
21
|
+
p.hierarchyChanged.addListener((args) => hierarchyChanged.raiseEvent(args));
|
|
22
|
+
});
|
|
23
|
+
const dispose = () => {
|
|
24
|
+
hierarchyChanged.clear();
|
|
25
|
+
providers.forEach((p) => (0, Common_js_1.safeDispose)(p));
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
hierarchyChanged,
|
|
29
|
+
getNodes: (props) => (0, EachValueFrom_js_1.eachValueFrom)((0, rxjs_1.from)(providers).pipe((0, rxjs_1.mergeMap)((provider) => (0, rxjs_1.from)(provider.getNodes(props)).pipe((0, rxjs_1.mergeMap)((node) => {
|
|
30
|
+
if (node.children) {
|
|
31
|
+
return (0, rxjs_1.of)(node);
|
|
32
|
+
}
|
|
33
|
+
// each provider only considers its own data when determining node's children - in case it says
|
|
34
|
+
// the node has no children, we have to check against the other providers too
|
|
35
|
+
return (0, rxjs_1.from)(providers).pipe((0, rxjs_1.filter)((p) => p !== provider), (0, rxjs_1.mergeMap)((p) => p.getNodes({ parentNode: node })), (0, rxjs_1.map)(() => true), (0, rxjs_1.first)(undefined, false), (0, rxjs_1.map)((hasChildren) => ({ ...node, children: hasChildren })));
|
|
36
|
+
}))), Sorting_js_1.sortNodesByLabelOperator)),
|
|
37
|
+
getNodeInstanceKeys: (props) => (0, EachValueFrom_js_1.eachValueFrom)((0, rxjs_1.from)(providers).pipe((0, rxjs_1.mergeMap)((p) => p.getNodeInstanceKeys(props)))),
|
|
38
|
+
setFormatter: (formatter) => providers.forEach((p) => p.setFormatter(formatter)),
|
|
39
|
+
setHierarchySearch: (props) => providers.forEach((p) => p.setHierarchySearch(props)),
|
|
40
|
+
[Symbol.dispose]: dispose,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=HierarchyMerge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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aAAM,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,EAC7B,IAAA,eAAQ,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EACjD,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EACf,IAAA,YAAK,EAAC,SAAS,EAAE,KAAK,CAAC,EACvB,IAAA,UAAG,EAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,CAC3D,CAAC;QACJ,CAAC,CAAC,CACH,CACF,EACD,qCAAwB,CACzB,CACF;QACH,mBAAmB,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({ providers }: MergeHierarchyProvidersProps): HierarchyProvider & {\n [Symbol.dispose]: () => void;\n} {\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,31 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey,
|
|
1
|
+
import { HierarchyNodeKey } from "./HierarchyNodeKey.js";
|
|
2
|
+
import type { OmitOverUnion } from "@itwin/presentation-shared";
|
|
3
|
+
import type { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey.js";
|
|
4
|
+
import type { HierarchySearchPath, HierarchySearchPathOptions } from "./HierarchySearch.js";
|
|
4
5
|
/** @public */
|
|
5
|
-
export type
|
|
6
|
-
/** If set to true, then one of the ancestor nodes in the hierarchy is the
|
|
7
|
-
|
|
8
|
-
/** Paths to node's children that are
|
|
9
|
-
|
|
6
|
+
export type HierarchyNodeSearchProps = {
|
|
7
|
+
/** If set to true, then one of the ancestor nodes in the hierarchy is the search target. */
|
|
8
|
+
hasSearchTargetAncestor?: boolean;
|
|
9
|
+
/** Paths to node's children that are search targets. */
|
|
10
|
+
childrenTargetPaths?: HierarchySearchPath[];
|
|
10
11
|
} & ({
|
|
11
|
-
/** Whether or not this node is a
|
|
12
|
-
|
|
12
|
+
/** Whether or not this node is a search target. */
|
|
13
|
+
isSearchTarget?: false;
|
|
13
14
|
} | {
|
|
14
|
-
/** Whether or not this node is a
|
|
15
|
-
|
|
16
|
-
/** Options that were used to
|
|
17
|
-
|
|
15
|
+
/** Whether or not this node is a search target. */
|
|
16
|
+
isSearchTarget: true;
|
|
17
|
+
/** Options that were used to search the node. */
|
|
18
|
+
searchTargetOptions?: HierarchySearchPathOptions;
|
|
18
19
|
});
|
|
19
|
-
/** @public */
|
|
20
|
-
export declare namespace HierarchyNodeFilteringProps {
|
|
21
|
-
/** @deprecated in 1.3. Use `createHierarchyFilteringHelper` and its `createChildNodeProps` function to create filtering props for nodes. */
|
|
22
|
-
function create(props: {
|
|
23
|
-
hasFilterTargetAncestor?: boolean;
|
|
24
|
-
filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];
|
|
25
|
-
isFilterTarget?: boolean;
|
|
26
|
-
filterTargetOptions?: HierarchyFilteringPathOptions;
|
|
27
|
-
}): HierarchyNodeFilteringProps | undefined;
|
|
28
|
-
}
|
|
29
20
|
/**
|
|
30
21
|
* A data structure that defines attributes that are common to all types of hierarchy nodes.
|
|
31
22
|
* @public
|
|
@@ -43,8 +34,6 @@ interface BaseHierarchyNode {
|
|
|
43
34
|
extendedData?: {
|
|
44
35
|
[key: string]: any;
|
|
45
36
|
};
|
|
46
|
-
/** Data that may be assigned to the node if filtering is enabled */
|
|
47
|
-
filtering?: HierarchyNodeFilteringProps;
|
|
48
37
|
}
|
|
49
38
|
/**
|
|
50
39
|
* A data structure that represents a single non-grouping hierarchy node.
|
|
@@ -58,6 +47,8 @@ export interface NonGroupingHierarchyNode extends BaseHierarchyNode {
|
|
|
58
47
|
* filter when requesting child hierarchy level will have no effect.
|
|
59
48
|
*/
|
|
60
49
|
supportsFiltering?: boolean;
|
|
50
|
+
/** Data that is assigned to the node if hierarchy search is enabled */
|
|
51
|
+
search?: HierarchyNodeSearchProps;
|
|
61
52
|
}
|
|
62
53
|
/**
|
|
63
54
|
* A data structure that represents a grouping node that groups other nodes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
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,KA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