@itwin/presentation-hierarchies 2.0.0-alpha.2 → 2.0.0-alpha.20
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 +929 -12
- package/README.md +20 -50
- package/lib/hierarchies/HierarchyErrors.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyErrors.js.map +1 -0
- package/lib/hierarchies/HierarchyMerge.d.ts +19 -0
- package/lib/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/{esm/hierarchies/HierarchyProvider.js → hierarchies/HierarchyMerge.js} +5 -6
- package/lib/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.d.ts +21 -28
- package/lib/hierarchies/HierarchyNode.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.js +19 -21
- package/lib/hierarchies/HierarchyNode.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/HierarchyNodeIdentifier.d.ts +3 -1
- package/lib/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeIdentifier.js +23 -6
- package/lib/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.d.ts +5 -4
- package/lib/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.js +1 -1
- package/lib/hierarchies/HierarchyNodeKey.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyProvider.d.ts +59 -34
- package/lib/hierarchies/HierarchyProvider.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyProvider.js +61 -0
- package/lib/hierarchies/HierarchyProvider.js.map +1 -0
- package/lib/hierarchies/HierarchySearch.d.ts +297 -0
- package/lib/hierarchies/HierarchySearch.d.ts.map +1 -0
- package/lib/hierarchies/HierarchySearch.js +464 -0
- package/lib/hierarchies/HierarchySearch.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/Logging.d.ts +1 -1
- package/lib/hierarchies/Logging.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/Logging.js +1 -1
- package/lib/hierarchies/Logging.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/HierarchyCache.d.ts +1 -1
- package/lib/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/HierarchyCache.js +4 -7
- package/lib/hierarchies/imodel/HierarchyCache.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.d.ts +34 -11
- package/lib/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/IModelHierarchyNode.d.ts +5 -5
- package/lib/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts +136 -0
- package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyProvider.js +656 -0
- package/lib/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
- package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.js +14 -11
- package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.d.ts +17 -12
- package/lib/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.js +214 -139
- package/lib/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.d.ts +7 -7
- package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.js +3 -2
- package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts +35 -0
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.js +261 -0
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.d.ts +10 -12
- package/lib/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.js +12 -9
- package/lib/hierarchies/imodel/TreeNodesReader.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/Utils.d.ts +2 -1
- package/lib/hierarchies/imodel/Utils.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/Utils.js +20 -7
- package/lib/hierarchies/imodel/Utils.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/DetermineChildren.d.ts +2 -2
- package/lib/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/DetermineChildren.js +11 -5
- package/lib/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
- package/lib/hierarchies/imodel/operators/Grouping.d.ts +26 -0
- package/lib/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.js +33 -19
- package/lib/hierarchies/imodel/operators/Grouping.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.js +33 -10
- package/lib/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.js +31 -15
- package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.d.ts +1 -1
- package/lib/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +11 -0
- package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.js +10 -12
- package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +7 -0
- package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.js +8 -11
- package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.d.ts +1 -1
- package/lib/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.js +1 -5
- package/lib/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +5 -0
- package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.js +2 -10
- package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.d.ts +7 -7
- package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.js +46 -37
- package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.d.ts +2 -2
- package/lib/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.js +3 -1
- package/lib/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/Common.d.ts +5 -2
- package/lib/hierarchies/internal/Common.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/Common.js +13 -3
- package/lib/hierarchies/internal/Common.js.map +1 -0
- package/lib/hierarchies/internal/DisposePolyfill.d.ts.map +1 -0
- package/lib/hierarchies/internal/DisposePolyfill.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.d.ts +1 -1
- package/lib/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
- package/lib/hierarchies/internal/LoggingUtils.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.d.ts +19 -8
- package/lib/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.js +9 -6
- package/lib/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/internal/SubscriptionScheduler.d.ts +1 -1
- package/lib/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/SubscriptionScheduler.js +1 -4
- package/lib/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Partition.d.ts +2 -1
- package/lib/hierarchies/internal/operators/Partition.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/Partition.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.d.ts +3 -3
- package/lib/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.d.ts +1 -1
- package/lib/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.d.ts +1 -1
- package/lib/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Sorting.d.ts +1 -1
- package/lib/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/Sorting.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.d.ts +1 -1
- package/lib/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/TapOnce.js.map +1 -0
- package/lib/presentation-hierarchies.d.ts +24 -0
- package/lib/presentation-hierarchies.d.ts.map +1 -0
- package/lib/{esm/presentation-hierarchies.js → presentation-hierarchies.js} +7 -7
- package/lib/presentation-hierarchies.js.map +1 -0
- package/package.json +29 -39
- package/lib/cjs/hierarchies/HierarchyErrors.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyErrors.js +0 -20
- package/lib/cjs/hierarchies/HierarchyErrors.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +0 -133
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.js +0 -232
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNode.d.ts +0 -156
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +0 -84
- package/lib/cjs/hierarchies/HierarchyNode.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +0 -35
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +0 -161
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js +0 -166
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts +0 -109
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +0 -44
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +0 -1
- package/lib/cjs/hierarchies/Logging.d.ts.map +0 -1
- package/lib/cjs/hierarchies/Logging.js +0 -27
- package/lib/cjs/hierarchies/Logging.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 -283
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +0 -84
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +0 -121
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +0 -21
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +0 -29
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -80
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +0 -449
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +0 -21
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +0 -123
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +0 -230
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +0 -591
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +0 -93
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +0 -37
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +0 -44
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/Utils.js +0 -59
- package/lib/cjs/hierarchies/imodel/Utils.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +0 -34
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +0 -26
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js +0 -162
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +0 -52
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +0 -68
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +0 -4
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +0 -26
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +0 -114
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +0 -55
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +0 -4
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +0 -53
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +0 -60
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +0 -309
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +0 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +0 -29
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts +0 -58
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/Common.js +0 -80
- package/lib/cjs/hierarchies/internal/Common.js.map +0 -1
- package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts +0 -1
- package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/DisposePolyfill.js +0 -11
- package/lib/cjs/hierarchies/internal/DisposePolyfill.js.map +0 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts +0 -12
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.js +0 -110
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +0 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts +0 -12
- package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.js +0 -37
- package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +0 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts +0 -64
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +0 -25
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +0 -57
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.js +0 -60
- package/lib/cjs/hierarchies/internal/operators/Partition.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts +0 -22
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js +0 -50
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js +0 -24
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js +0 -23
- package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.js +0 -25
- package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts +0 -4
- package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/TapOnce.js +0 -19
- package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +0 -1
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/presentation-hierarchies.d.ts +0 -15
- package/lib/cjs/presentation-hierarchies.d.ts.map +0 -1
- package/lib/cjs/presentation-hierarchies.js +0 -40
- package/lib/cjs/presentation-hierarchies.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyErrors.d.ts +0 -9
- package/lib/esm/hierarchies/HierarchyErrors.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyErrors.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts +0 -133
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyFiltering.js +0 -227
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyNode.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +0 -29
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyProvider.js.map +0 -1
- package/lib/esm/hierarchies/Logging.d.ts +0 -13
- package/lib/esm/hierarchies/Logging.d.ts.map +0 -1
- package/lib/esm/hierarchies/Logging.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 -277
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +0 -18
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +0 -234
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -80
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +0 -446
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +0 -140
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +0 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts +0 -4
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/Utils.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +0 -11
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +0 -26
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +0 -11
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +0 -11
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +0 -32
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
- package/lib/esm/hierarchies/internal/Common.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/Common.js.map +0 -1
- package/lib/esm/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/DisposePolyfill.js.map +0 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +0 -12
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.js +0 -107
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +0 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.js.map +0 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +0 -17
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Partition.d.ts +0 -6
- package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Partition.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +0 -7
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +0 -9
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +0 -13
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +0 -1
- package/lib/esm/presentation-hierarchies.d.ts +0 -15
- package/lib/esm/presentation-hierarchies.d.ts.map +0 -1
- package/lib/esm/presentation-hierarchies.js.map +0 -1
- /package/lib/{cjs/hierarchies → hierarchies}/HierarchyErrors.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/HierarchyErrors.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Partition.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Sorting.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyCache.js","sourceRoot":"","sources":["../../../src/hierarchies/imodel/HierarchyCache.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAkB1D,gBAAgB;AAChB,MAAM,OAAO,cAAc;IACjB,IAAI,CAA4D;IAChE,MAAM,CAAiC;IAE/C,YAAmB,KAAqC;QACtD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,aAAa,CAA6C,KAAK,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAClH,CAAC;IA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CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,iBAAiB,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,iBAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,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 { LRUDictionary, LRUMap } from \"@itwin/core-bentley\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\nimport type { LRUCache } from \"@itwin/core-bentley\";\nimport type { InstanceKey } from \"@itwin/presentation-shared\";\nimport type { GetHierarchyNodesProps } from \"../HierarchyProvider.js\";\n\ninterface HierarchyCacheEntry<T> {\n /** Stores observables for the default case - no instance filter or custom limit for the hierarchy level. */\n primary: T | undefined;\n /** Stores a limited number of variations with custom instance filter and/or custom limit for the hierarchy level. */\n variations: LRUCache<string, T>;\n}\n\ninterface ChildNodeObservablesCacheProps {\n size: number;\n variationsCount?: number;\n}\n\n/** @internal */\nexport class HierarchyCache<T> {\n private _map: LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>;\n private _props: ChildNodeObservablesCacheProps;\n\n public constructor(props: ChildNodeObservablesCacheProps) {\n this._props = props;\n this._map = new LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>(props.size, compareHierarchyNodeKeys);\n }\n\n private createCacheKeys(\n props: Omit<GetHierarchyNodesProps, \"parentNode\"> & {\n parentNode: { key: HierarchyNodeKey; parentKeys: HierarchyNodeKey[] } | undefined;\n targetInstanceKeys?: InstanceKey[];\n },\n ) {\n function createVariationKey() {\n const { instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys } = props;\n if (instanceFilter === undefined && hierarchyLevelSizeLimit === undefined && targetInstanceKeys === undefined) {\n return undefined;\n }\n return JSON.stringify({ instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys });\n }\n\n if (!props.parentNode) {\n return { primaryKey: [], variationKey: createVariationKey() };\n }\n\n const parentKeys = props.parentNode.parentKeys;\n\n return { primaryKey: [...parentKeys, props.parentNode.key], variationKey: createVariationKey() };\n }\n\n private getCacheAccessors(primaryKey: HierarchyNodeKey[], variationKey?: string) {\n const getMapEntry = (create: boolean) => {\n let entry = this._map.get(primaryKey);\n if (!entry && create) {\n entry = { primary: undefined, variations: new LRUMap(this._props.variationsCount ?? 1) };\n this._map.set(primaryKey, entry);\n }\n return entry;\n };\n if (variationKey) {\n return {\n get: () => getMapEntry(false)?.variations.get(variationKey),\n set: (value: T) => {\n getMapEntry(true)!.variations.set(variationKey, value);\n },\n };\n }\n return {\n get: () => getMapEntry(false)?.primary,\n set: (value: T) => {\n getMapEntry(true)!.primary = value;\n },\n };\n }\n\n public set(requestProps: GetHierarchyNodesProps, value: T) {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n this.getCacheAccessors(primaryKey, variationKey).set(value);\n }\n\n public get(requestProps: GetHierarchyNodesProps): T | undefined {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n return this.getCacheAccessors(primaryKey, variationKey).get();\n }\n\n public clear() {\n this._map.clear();\n }\n}\n\nfunction compareHierarchyNodeKeys(lhs: HierarchyNodeKey[], rhs: HierarchyNodeKey[]) {\n if (lhs.length !== rhs.length) {\n return lhs.length - rhs.length;\n }\n for (let i = 0; i < lhs.length; ++i) {\n const keysCompareResult = HierarchyNodeKey.compare(lhs[i], rhs[i]);\n if (keysCompareResult !== 0) {\n return keysCompareResult;\n }\n }\n return 0;\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { GenericInstanceFilter } from "@itwin/core-common";
|
|
2
|
-
import { ECSqlQueryDef } from "@itwin/presentation-shared";
|
|
3
|
-
import { NonGroupingHierarchyNode } from "../HierarchyNode.js";
|
|
4
|
-
import { ProcessedGenericHierarchyNode, ProcessedHierarchyNode, ProcessedInstanceHierarchyNode, SourceGenericHierarchyNode, SourceInstanceHierarchyNode } from "./IModelHierarchyNode.js";
|
|
1
|
+
import type { GenericInstanceFilter } from "@itwin/core-common";
|
|
2
|
+
import type { EC, ECSchemaProvider, ECSqlQueryDef } from "@itwin/presentation-shared";
|
|
3
|
+
import type { NonGroupingHierarchyNode, ParentHierarchyNode } from "../HierarchyNode.js";
|
|
4
|
+
import type { ProcessedGenericHierarchyNode, ProcessedHierarchyNode, ProcessedInstanceHierarchyNode, SourceGenericHierarchyNode, SourceInstanceHierarchyNode } from "./IModelHierarchyNode.js";
|
|
5
|
+
import type { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor.js";
|
|
6
|
+
import type { NodesQueryClauseFactory } from "./NodeSelectQueryFactory.js";
|
|
5
7
|
/**
|
|
6
8
|
* A nodes definition that returns a single generic node.
|
|
7
9
|
* @public
|
|
@@ -20,7 +22,7 @@ export interface InstanceNodesQueryDefinition {
|
|
|
20
22
|
* points to a base class of multiple different classes of instances returned by the query, however
|
|
21
23
|
* the more specific this class is, the more efficient hierarchy building process is.
|
|
22
24
|
*/
|
|
23
|
-
fullClassName:
|
|
25
|
+
fullClassName: EC.FullClassNameDotNotation;
|
|
24
26
|
/**
|
|
25
27
|
* An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected
|
|
26
28
|
* to be built using `NodeSelectQueryFactory.createSelectClause`.
|
|
@@ -46,9 +48,16 @@ export type HierarchyLevelDefinition = HierarchyNodesDefinition[];
|
|
|
46
48
|
* A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.
|
|
47
49
|
* @public
|
|
48
50
|
*/
|
|
49
|
-
export type NodeParser = (
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
export type NodeParser = (props: {
|
|
52
|
+
/** The ECSQL row object to parse. Keys & value types depend on the executed query. */
|
|
53
|
+
row: {
|
|
54
|
+
[columnName: string]: any;
|
|
55
|
+
};
|
|
56
|
+
/** The parent node whose child node is being parsed. */
|
|
57
|
+
parentNode?: HierarchyDefinitionParentNode;
|
|
58
|
+
/** The key of iModel which is used to run the query. */
|
|
59
|
+
imodelKey: string;
|
|
60
|
+
}) => SourceInstanceHierarchyNode | Promise<SourceInstanceHierarchyNode>;
|
|
52
61
|
/**
|
|
53
62
|
* A type for a function that pre-processes given node. Unless the function decides not to make any modifications,
|
|
54
63
|
* it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node
|
|
@@ -56,14 +65,24 @@ export type NodeParser = (row: {
|
|
|
56
65
|
*
|
|
57
66
|
* @public
|
|
58
67
|
*/
|
|
59
|
-
export type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(
|
|
68
|
+
export type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(props: {
|
|
69
|
+
/** Node to be pre-processed. */
|
|
70
|
+
node: TNode;
|
|
71
|
+
/** The parent node whose child node is being pre-processed. */
|
|
72
|
+
parentNode?: ParentHierarchyNode;
|
|
73
|
+
}) => Promise<TNode | undefined>;
|
|
60
74
|
/**
|
|
61
75
|
* A type for a function that post-processes given node. Unless the function decides not to make any modifications,
|
|
62
76
|
* it should return a new - modified - node, rather than modifying the given one.
|
|
63
77
|
*
|
|
64
78
|
* @public
|
|
65
79
|
*/
|
|
66
|
-
export type NodePostProcessor = (
|
|
80
|
+
export type NodePostProcessor = (props: {
|
|
81
|
+
/** Node to be post-processed. */
|
|
82
|
+
node: ProcessedHierarchyNode;
|
|
83
|
+
/** The parent node whose child node is being post-processed. */
|
|
84
|
+
parentNode?: ParentHierarchyNode;
|
|
85
|
+
}) => Promise<ProcessedHierarchyNode>;
|
|
67
86
|
/**
|
|
68
87
|
* A type of node that can be passed to `HierarchyDefinition.defineHierarchyLevel`. This basically means
|
|
69
88
|
* a `HierarchyNode` that:
|
|
@@ -76,7 +95,11 @@ export type HierarchyDefinitionParentNode = Omit<NonGroupingHierarchyNode, "chil
|
|
|
76
95
|
* Props for `HierarchyDefinition.defineHierarchyLevel`.
|
|
77
96
|
* @public
|
|
78
97
|
*/
|
|
79
|
-
export interface DefineHierarchyLevelProps {
|
|
98
|
+
export interface DefineHierarchyLevelProps extends Pick<NodesQueryClauseFactory, "createSelectClause" | "createFilterClauses"> {
|
|
99
|
+
/** The iModel for which the hierarchy definition is being requested for. */
|
|
100
|
+
imodelAccess: LimitingECSqlQueryExecutor & ECSchemaProvider & {
|
|
101
|
+
imodelKey: string;
|
|
102
|
+
};
|
|
80
103
|
/** Parent node to get children for. Pass `undefined` to get root nodes. */
|
|
81
104
|
parentNode: HierarchyDefinitionParentNode | undefined;
|
|
82
105
|
/** Optional hierarchy level filter. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IModelHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;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AAgE;IAChE,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,uBAAuB,EACvB,oBAAoB,GAAG,qBAAqB,CAC7C;IACC,4EAA4E;IAC5E,YAAY,EAAE,0BAA0B,GAAG,gBAAgB,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAEpF,2EAA2E;IAC3E,UAAU,EAAE,6BAA6B,GAAG,SAAS,CAAC;IAEtD,uCAAuC;IACvC,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAC;IAEpC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IModelHierarchyDefinition.js","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+ChG,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,wBAAwB,CAOxC;AAPD,WAAiB,wBAAwB;IACvC,SAAgB,aAAa,CAAC,GAA6B;QACzD,OAAO,CAAC,CAAE,GAAsC,CAAC,IAAI,CAAC;IACxD,CAAC;IAFe,yBAAA,aAAa,gBAE5B,CAAA;IACD,SAAgB,oBAAoB,CAAC,GAA6B;QAChE,OAAO,CAAC,CAAE,GAAoC,CAAC,KAAK,CAAC;IACvD,CAAC;IAFe,yBAAA,oBAAoB,uBAEnC,CAAA;AACH,CAAC,EAPgB,wBAAwB,KAAxB,wBAAwB,QAOxC","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 type { GenericInstanceFilter } from \"@itwin/core-common\";\nimport type { EC, ECSchemaProvider, ECSqlQueryDef } from \"@itwin/presentation-shared\";\nimport type { NonGroupingHierarchyNode, ParentHierarchyNode } from \"../HierarchyNode.js\";\nimport type {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceGenericHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"./IModelHierarchyNode.js\";\nimport type { LimitingECSqlQueryExecutor } from \"./LimitingECSqlQueryExecutor.js\";\nimport type { NodesQueryClauseFactory } from \"./NodeSelectQueryFactory.js\";\n\n/**\n * A nodes definition that returns a single generic node.\n * @public\n */\nexport interface GenericHierarchyNodeDefinition {\n /** The node to be created in the hierarchy level */\n node: SourceGenericHierarchyNode;\n}\n\n/**\n * A nodes definition that returns an ECSQL query for selecting nodes from an iModel.\n * @public\n */\nexport interface InstanceNodesQueryDefinition {\n /**\n * Full name of the class whose instances are going to be returned. It's okay if the attribute\n * points to a base class of multiple different classes of instances returned by the query, however\n * the more specific this class is, the more efficient hierarchy building process is.\n */\n fullClassName: EC.FullClassNameDotNotation;\n /**\n * An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected\n * to be built using `NodeSelectQueryFactory.createSelectClause`.\n */\n query: ECSqlQueryDef;\n}\n\n/**\n * A definition of nodes included in a hierarchy level.\n * @public\n */\nexport type HierarchyNodesDefinition = GenericHierarchyNodeDefinition | InstanceNodesQueryDefinition;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodesDefinition {\n export function isGenericNode(def: HierarchyNodesDefinition): def is GenericHierarchyNodeDefinition {\n return !!(def as GenericHierarchyNodeDefinition).node;\n }\n export function isInstanceNodesQuery(def: HierarchyNodesDefinition): def is InstanceNodesQueryDefinition {\n return !!(def as InstanceNodesQueryDefinition).query;\n }\n}\n\n/**\n * A definition of a hierarchy level, which may consist of multiple node definitions.\n * @public\n */\nexport type HierarchyLevelDefinition = HierarchyNodesDefinition[];\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @public\n */\nexport type NodeParser = (props: {\n /** The ECSQL row object to parse. Keys & value types depend on the executed query. */\n row: { [columnName: string]: any };\n\n /** The parent node whose child node is being parsed. */\n parentNode?: HierarchyDefinitionParentNode;\n\n /** The key of iModel which is used to run the query. */\n imodelKey: string;\n}) => SourceInstanceHierarchyNode | Promise<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @public\n */\nexport type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(props: {\n /** Node to be pre-processed. */\n node: TNode;\n\n /** The parent node whose child node is being pre-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<TNode | undefined>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @public\n */\nexport type NodePostProcessor = (props: {\n /** Node to be post-processed. */\n node: ProcessedHierarchyNode;\n\n /** The parent node whose child node is being post-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<ProcessedHierarchyNode>;\n\n/**\n * A type of node that can be passed to `HierarchyDefinition.defineHierarchyLevel`. This basically means\n * a `HierarchyNode` that:\n * - knows nothing about its children,\n * - is either an instances node (key is of `InstancesNodeKey` type) or a generic node (key is of `GenericNodeKey` type).\n * @public\n */\nexport type HierarchyDefinitionParentNode = Omit<NonGroupingHierarchyNode, \"children\">;\n\n/**\n * Props for `HierarchyDefinition.defineHierarchyLevel`.\n * @public\n */\nexport interface DefineHierarchyLevelProps extends Pick<\n NodesQueryClauseFactory,\n \"createSelectClause\" | \"createFilterClauses\"\n> {\n /** The iModel for which the hierarchy definition is being requested for. */\n imodelAccess: LimitingECSqlQueryExecutor & ECSchemaProvider & { imodelKey: string };\n\n /** Parent node to get children for. Pass `undefined` to get root nodes. */\n parentNode: HierarchyDefinitionParentNode | undefined;\n\n /** Optional hierarchy level filter. */\n instanceFilter?: GenericInstanceFilter;\n}\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @public\n */\nexport interface HierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: NodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: NodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: NodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Promise<HierarchyLevelDefinition>;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConcatenatedValue, InstanceKey, OmitOverUnion, PrimitiveValue } from "@itwin/presentation-shared";
|
|
2
|
-
import { GroupingHierarchyNode, NonGroupingHierarchyNode } from "../HierarchyNode.js";
|
|
3
|
-
import { GenericNodeKey, InstancesNodeKey } from "../HierarchyNodeKey.js";
|
|
1
|
+
import type { ConcatenatedValue, EC, InstanceKey, OmitOverUnion, PrimitiveValue } from "@itwin/presentation-shared";
|
|
2
|
+
import type { GroupingHierarchyNode, NonGroupingHierarchyNode } from "../HierarchyNode.js";
|
|
3
|
+
import type { GenericNodeKey, InstancesNodeKey } from "../HierarchyNodeKey.js";
|
|
4
4
|
/**
|
|
5
5
|
* Base processing parameters that apply to every node.
|
|
6
6
|
* @public
|
|
@@ -80,7 +80,7 @@ interface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingPara
|
|
|
80
80
|
*
|
|
81
81
|
* Full class name format: `SchemaName.ClassName`.
|
|
82
82
|
*/
|
|
83
|
-
fullClassNames:
|
|
83
|
+
fullClassNames: EC.FullClassNameDotNotation[];
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* A data structure that represents properties grouping.
|
|
@@ -93,7 +93,7 @@ export interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGrou
|
|
|
93
93
|
*
|
|
94
94
|
* Full class name format: `SchemaName.ClassName`.
|
|
95
95
|
*/
|
|
96
|
-
propertiesClassName:
|
|
96
|
+
propertiesClassName: EC.FullClassNameDotNotation;
|
|
97
97
|
/**
|
|
98
98
|
* Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.
|
|
99
99
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IModelHierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACpH,OAAO,KAAK,EAAE,qBAAq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AAE,WAAW,EAAE,CAAA;KAAE,CAAC;CAC/E,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IModelHierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAkO1D,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,sBAAsB,CAatC;AAbD,WAAiB,sBAAsB;IACrC,sDAAsD;IACtD,SAAgB,SAAS,CAAC,IAA4B;QACpD,OAAO,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAFe,uBAAA,SAAS,YAExB,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAAC,IAA4B;QAC1D,OAAO,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAFe,uBAAA,eAAe,kBAE9B,CAAA;IACD,uDAAuD;IACvD,SAAgB,cAAc,CAAC,IAA4B;QACzD,OAAO,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,uBAAA,cAAc,iBAE7B,CAAA;AACH,CAAC,EAbgB,sBAAsB,KAAtB,sBAAsB,QAatC","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 { ConcatenatedValue, EC, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport type { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"../HierarchyNode.js\";\nimport type { GenericNodeKey, InstancesNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * Base processing parameters that apply to every node.\n * @public\n */\ninterface HierarchyNodeProcessingParamsBase {\n /** Indicates if this node should be hidden if it has no child nodes. */\n hideIfNoChildren?: boolean;\n /** Indicates that this node should always be hidden and its children should be loaded in its place. */\n hideInHierarchy?: boolean;\n}\n\n/**\n * A data structure for defining nodes' grouping requirements.\n * @public\n */\ninterface HierarchyNodeGroupingParams {\n byLabel?: HierarchyNodeLabelGroupingParams;\n byClass?: boolean | HierarchyNodeGroupingParamsBase;\n byBaseClasses?: HierarchyNodeBaseClassGroupingParams;\n byProperties?: HierarchyNodePropertiesGroupingParams;\n}\n\n/**\n * A data structure for defining params specifically used for label grouping.\n * @public\n */\ninterface HierarchyNodeLabelGroupingBaseParams {\n /** Label grouping option that determines whether to group nodes or to merge them. Defaults to \"group\".*/\n action?: \"group\" | \"merge\";\n /** Value that needs to match in order for nodes to be grouped or merged.*/\n groupId?: string;\n}\n\n/**\n * A data structure for defining label merging.\n * @public\n */\ninterface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {\n action: \"merge\";\n}\n\n/**\n * A data structure for defining label grouping with additional parameters.\n * @public\n */\ninterface HierarchyNodeLabelGroupingGroupParams\n extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {\n action?: \"group\";\n}\n\n/**\n * A data structure for defining possible label grouping types.\n * @public\n */\nexport type HierarchyNodeLabelGroupingParams =\n | boolean\n | HierarchyNodeLabelGroupingMergeParams\n | HierarchyNodeLabelGroupingGroupParams;\n\n/**\n * Grouping parameters that are shared across all types of groupings.\n * @public\n */\nexport interface HierarchyNodeGroupingParamsBase {\n /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */\n hideIfNoSiblings?: boolean;\n /** Hiding option that determines whether to hide group nodes which have only one node as its children. */\n hideIfOneGroupedNode?: boolean;\n /** Option which auto expands grouping nodes' children when it has single child or always. */\n autoExpand?: HierarchyNodeAutoExpandProp;\n}\n\n/**\n * Defines possible values for `BaseGroupingParams.autoExpand` attribute:\n * - `single-child` - set the grouping node to auto-expand if it groups a single node.\n * - `always` - always set the grouping node to auto-expand.\n * @public\n */\nexport type HierarchyNodeAutoExpandProp = \"single-child\" | \"always\";\n\n/**\n * A data structure that represents base class grouping.\n * @public\n */\ninterface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full names of classes, which should be used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n fullClassNames: EC.FullClassNameDotNotation[];\n}\n\n/**\n * A data structure that represents properties grouping.\n * @public\n */\nexport interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full name of a class whose properties are used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n propertiesClassName: EC.FullClassNameDotNotation;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.\n *\n * Label of the created grouping node will be `Not Specified`.\n */\n createGroupForUnspecifiedValues?: boolean;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided\n * ranges, or is not a numeric value.\n *\n * Label of the created grouping node will be `Other`.\n */\n createGroupForOutOfRangeValues?: boolean;\n /**\n * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a\n * grouping hierarchy level.\n *\n * Example usage:\n * ```ts\n * propertyGroups: [\n * {\n * propertyName: \"type\",\n * propertyValue: \"Wall\"\n * },\n * {\n * propertyName: \"length\",\n * propertyValue: 15,\n * ranges: [\n * { fromValue: 1, toValue: 10, rangeLabel: \"Small\" },\n * { fromValue: 11, toValue: 20, rangeLabel: \"Medium\" }\n * ]\n * },\n * ]\n * ```\n */\n propertyGroups: HierarchyNodePropertyGroup[];\n}\n\n/**\n * A data structure that represents specific properties' grouping params.\n * @public\n */\nexport interface HierarchyNodePropertyGroup {\n /** A string indicating the name of the property to group by. */\n propertyName: string;\n /** Value of the property, which will be used to group the node. */\n propertyValue?: PrimitiveValue | ConcatenatedValue;\n /** Ranges are used to group nodes by numeric properties which are within specified bounds. */\n ranges?: HierarchyNodePropertyValueRange[];\n}\n\n/**\n * A data structure that represents boundaries for a value.\n * @public\n */\nexport interface HierarchyNodePropertyValueRange {\n /** Defines the lower bound of the range. */\n fromValue: number;\n /** Defines the upper bound of the range. */\n toValue: number;\n /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */\n rangeLabel?: string;\n}\n\n/**\n * Processing parameters that apply to instance nodes.\n * @public\n */\nexport interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {\n grouping?: HierarchyNodeGroupingParams;\n}\n\n/**\n * A generic (not based on data in an iModel) node that has processing parameters.\n * @public\n */\nexport type ProcessedGenericHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: GenericNodeKey;\n children?: boolean;\n processingParams?: HierarchyNodeProcessingParamsBase;\n};\n\n/**\n * An instances' (based on data in an iModel) node that has processing parameters.\n * @public\n */\nexport type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: InstancesNodeKey;\n children?: boolean;\n processingParams?: InstanceHierarchyNodeProcessingParams;\n};\n\n/**\n * A grouping node that groups either instance nodes or other grouping nodes.\n * @public\n */\nexport type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, \"children\"> & {\n children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;\n};\n\n/**\n * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,\n * how it should be grouped, sorted, etc.\n *\n * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of\n * `ProcessedHierarchyNode`.\n *\n * @public\n */\nexport type ProcessedHierarchyNode =\n | ProcessedGenericHierarchyNode\n | ProcessedInstanceHierarchyNode\n | ProcessedGroupingHierarchyNode;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace ProcessedHierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric(node: ProcessedHierarchyNode): node is ProcessedGenericHierarchyNode {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode(node: ProcessedHierarchyNode): node is ProcessedInstanceHierarchyNode {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode(node: ProcessedHierarchyNode): node is ProcessedGroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n}\n\n/**\n * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is\n * returned by hierarchy definitions as a generic node or when the node is just parsed from query results.\n * @public\n */\nexport type SourceHierarchyNode<TBase = SourceGenericHierarchyNode | SourceInstanceHierarchyNode> = OmitOverUnion<\n TBase,\n \"label\" | \"parentKeys\"\n> & { label: string | ConcatenatedValue };\n\n/**\n * A kind of `ProcessedGenericHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceGenericHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedGenericHierarchyNode, \"key\"> & { key: string }\n>;\n\n/**\n * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceInstanceHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedInstanceHierarchyNode, \"key\"> & {\n key: Omit<InstancesNodeKey, \"instanceKeys\"> & { instanceKeys: InstanceKey[] };\n }\n>;\n"]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import "../internal/DisposePolyfill.js";
|
|
2
|
+
import { HierarchySearchTree } from "../HierarchySearch.js";
|
|
3
|
+
import type { ECSchemaProvider, Event, IInstanceLabelSelectClauseFactory, IPrimitiveValueFormatter } from "@itwin/presentation-shared";
|
|
4
|
+
import type { HierarchyProvider } from "../HierarchyProvider.js";
|
|
5
|
+
import type { HierarchyDefinition } from "./IModelHierarchyDefinition.js";
|
|
6
|
+
import type { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor.js";
|
|
7
|
+
/**
|
|
8
|
+
* Defines the strings used by hierarchy provider.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
interface IModelHierarchyProviderLocalizedStrings {
|
|
12
|
+
/**
|
|
13
|
+
* A string for "Unspecified". Used for labels of property grouping nodes
|
|
14
|
+
* that group by an empty value.
|
|
15
|
+
*/
|
|
16
|
+
unspecified: string;
|
|
17
|
+
/**
|
|
18
|
+
* A string for "Other". Used for label of a range property grouping node that
|
|
19
|
+
* groups values which don't fit into any other range.
|
|
20
|
+
*/
|
|
21
|
+
other: string;
|
|
22
|
+
}
|
|
23
|
+
/** @public */
|
|
24
|
+
type IModelAccess = ECSchemaProvider & LimitingECSqlQueryExecutor & {
|
|
25
|
+
imodelKey: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Props for `createIModelHierarchyProvider`.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
interface IModelHierarchyProviderProps {
|
|
32
|
+
/**
|
|
33
|
+
* An object that provides access to iModel's data and metadata.
|
|
34
|
+
*
|
|
35
|
+
* @see `ECSchemaProvider`
|
|
36
|
+
* @see `LimitingECSqlQueryExecutor`
|
|
37
|
+
*/
|
|
38
|
+
imodelAccess: IModelAccess;
|
|
39
|
+
/**
|
|
40
|
+
* An event that is raised when iModel data, that may affect the hierarchy, changes. The created provider
|
|
41
|
+
* subscribes to the event to know that it needs to reload the data, and unsubscribes on disposal.
|
|
42
|
+
*/
|
|
43
|
+
imodelChanged?: Event<() => void>;
|
|
44
|
+
/**
|
|
45
|
+
* A function that returns a hierarchy definition, describing how the hierarchy that the provider should be create. The
|
|
46
|
+
* function is called once during the provider's construction.
|
|
47
|
+
*/
|
|
48
|
+
hierarchyDefinition: HierarchyDefinition;
|
|
49
|
+
/** Maximum number of queries that the provider attempts to execute in parallel. Defaults to `10`. */
|
|
50
|
+
queryConcurrency?: number;
|
|
51
|
+
/**
|
|
52
|
+
* The amount of queries whose results are stored in-memory for quick retrieval. Defaults to `1`,
|
|
53
|
+
* which means only results of the last run query are cached.
|
|
54
|
+
*/
|
|
55
|
+
queryCacheSize?: number;
|
|
56
|
+
/** A set of localized strings to use. Defaults to English strings. */
|
|
57
|
+
localizedStrings?: Partial<IModelHierarchyProviderLocalizedStrings>;
|
|
58
|
+
/**
|
|
59
|
+
* A values formatter for formatting node labels. Defaults to the
|
|
60
|
+
* result of `createDefaultValueFormatter` called with default parameters. May be overridden
|
|
61
|
+
* by calling `setFormatter` on the provider instance.
|
|
62
|
+
*/
|
|
63
|
+
formatter?: IPrimitiveValueFormatter;
|
|
64
|
+
/**
|
|
65
|
+
* Props for searching the hierarchy.
|
|
66
|
+
*
|
|
67
|
+
* Note: this just provides a quick way to set the search when creating a new hierarchy provider, but the
|
|
68
|
+
* search can be changed at any time by calling `setHierarchySearch` on the provider instance.
|
|
69
|
+
*/
|
|
70
|
+
search?: {
|
|
71
|
+
/** A list of search trees that define paths from root to search target nodes. */
|
|
72
|
+
paths: HierarchySearchTree[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* A factory for creating ECSQL select clauses for instance labels. The clause is injected into
|
|
76
|
+
* hierarchy node queries to select labels for instance-based nodes.
|
|
77
|
+
*
|
|
78
|
+
* Defaults to the result of `createIModelInstanceLabelSelectClauseFactory` called with the provided `imodelAccess`.
|
|
79
|
+
*
|
|
80
|
+
* @see `IInstanceLabelSelectClauseFactory`
|
|
81
|
+
*/
|
|
82
|
+
instanceLabelSelectClauseFactory?: IInstanceLabelSelectClauseFactory;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Creates an instance of `HierarchyProvider` that creates a hierarchy based on given the iModel and
|
|
86
|
+
* a hierarchy definition, which defines each hierarchy level through ECSQL queries.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare function createIModelHierarchyProvider(props: IModelHierarchyProviderProps): HierarchyProvider & Disposable;
|
|
91
|
+
/**
|
|
92
|
+
* Props for `createMergedIModelHierarchyProvider`.
|
|
93
|
+
* @alpha
|
|
94
|
+
*/
|
|
95
|
+
interface MergedIModelHierarchyProviderProps extends Omit<IModelHierarchyProviderProps, "imodelAccess" | "imodelChanged" | "instanceLabelSelectClauseFactory"> {
|
|
96
|
+
/**
|
|
97
|
+
* A list of iModels to create merged hierarchy for.
|
|
98
|
+
*
|
|
99
|
+
* **Warning:** These **must** all be different versions of the same iModel, ordered from the earliest to the
|
|
100
|
+
* latest version. Not obeying this rule may result in undefined behavior.
|
|
101
|
+
*/
|
|
102
|
+
imodels: Array<{
|
|
103
|
+
/**
|
|
104
|
+
* An object that provides access to iModel's data and metadata.
|
|
105
|
+
*
|
|
106
|
+
* @see `ECSchemaProvider`
|
|
107
|
+
* @see `LimitingECSqlQueryExecutor`
|
|
108
|
+
*/
|
|
109
|
+
imodelAccess: IModelAccess;
|
|
110
|
+
/**
|
|
111
|
+
* An event that is raised when iModel data, that may affect the hierarchy, changes. The created provider
|
|
112
|
+
* subscribes to the event to know that it needs to reload the data, and unsubscribes on disposal.
|
|
113
|
+
*/
|
|
114
|
+
imodelChanged?: Event<() => void>;
|
|
115
|
+
/**
|
|
116
|
+
* A factory for creating ECSQL select clauses for instance labels. The clause is injected into
|
|
117
|
+
* hierarchy node queries to select labels for instance-based nodes.
|
|
118
|
+
*
|
|
119
|
+
* Defaults to the result of `createIModelInstanceLabelSelectClauseFactory` called with the provided `imodelAccess`.
|
|
120
|
+
*
|
|
121
|
+
* @see `IInstanceLabelSelectClauseFactory`
|
|
122
|
+
*/
|
|
123
|
+
instanceLabelSelectClauseFactory?: IInstanceLabelSelectClauseFactory;
|
|
124
|
+
}>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Creates an instance of `HierarchyProvider` that creates a hierarchy based on multiple version of **the same** iModel
|
|
128
|
+
* and a hierarchy definition, which defines each hierarchy level through ECSQL queries.
|
|
129
|
+
*
|
|
130
|
+
* **Warning:** This is an experimental API that **should not be used in production**.
|
|
131
|
+
*
|
|
132
|
+
* @alpha
|
|
133
|
+
*/
|
|
134
|
+
export declare function createMergedIModelHierarchyProvider(props: MergedIModelHierarchyProviderProps): HierarchyProvider & Disposable;
|
|
135
|
+
export {};
|
|
136
|
+
//# sourceMappingURL=IModelHierarchyProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IModelHierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":"AAKA,OAAO,gCAAgC,CAAC;AAmCxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA4B5D,OAAO,KAAK,EAEV,gBAAgB,EAEhB,KAAK,EAEL,iCAAiC,EACjC,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,OAAO,KAAK,EAGV,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAUlF;;;GAGG;AACH,UAAU,uCAAuC;IAC/C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,KAAK,YAAY,GAAG,gBAAgB,GAAG,0BAA0B,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F;;;GAGG;AACH,UAAU,4BAA4B;IACpC;;;;;OAKG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IAElC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC,qGAAqG;IACrG,gBAAgB,CAAC,EAAE,MA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