@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,685 @@
|
|
|
1
1
|
# @itwin/presentation-hierarchies
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- @itwin/presentation-shared@2.0.0-alpha.15
|
|
9
|
+
|
|
10
|
+
## 2.0.0-alpha.19
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies:
|
|
15
|
+
- @itwin/presentation-shared@2.0.0-alpha.14
|
|
16
|
+
|
|
17
|
+
## 2.0.0-alpha.18
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- [#1503](https://github.com/iTwin/presentation/pull/1503): Full class and property names are now compared case-sensitively. Provide names using the casing defined by their EC schemas.
|
|
22
|
+
- [#1491](https://github.com/iTwin/presentation/pull/1491): `ECSchemaProvider`: Added a `classDerivesFrom` method for checking whether one ECClass is the same as, or derives from, another. `createECSchemaProvider` (in `@itwin/presentation-core-interop`) implements it using the class hierarchy information it already loads, so the answer is returned synchronously once the hierarchy has been loaded and no additional round-trips to the iModel are needed.
|
|
23
|
+
|
|
24
|
+
Also, `ECClassHierarchyInspector` and `createCachingECClassHierarchyInspector` have been deprecated. Because `ECSchemaProvider` now exposes `classDerivesFrom` directly, a separate class hierarchy inspector is no longer needed when setting up iModel access:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
// Before:
|
|
28
|
+
import { createCachingECClassHierarchyInspector } from "@itwin/presentation-shared";
|
|
29
|
+
import {
|
|
30
|
+
createECSchemaProvider,
|
|
31
|
+
createECSqlQueryExecutor,
|
|
32
|
+
} from "@itwin/presentation-core-interop";
|
|
33
|
+
|
|
34
|
+
const schemaProvider = createECSchemaProvider(imodel);
|
|
35
|
+
const imodelAccess = {
|
|
36
|
+
...schemaProvider,
|
|
37
|
+
...createCachingECClassHierarchyInspector({ schemaProvider }),
|
|
38
|
+
...createECSqlQueryExecutor(imodel),
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// After:
|
|
42
|
+
import {
|
|
43
|
+
createECSchemaProvider,
|
|
44
|
+
createECSqlQueryExecutor,
|
|
45
|
+
} from "@itwin/presentation-core-interop";
|
|
46
|
+
|
|
47
|
+
const imodelAccess = {
|
|
48
|
+
...createECSchemaProvider(imodel), // now also provides `classDerivesFrom`
|
|
49
|
+
...createECSqlQueryExecutor(imodel),
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Breaking changes:**
|
|
54
|
+
|
|
55
|
+
- `ECSchemaProvider` now requires a `classDerivesFrom` method. Objects created via `createECSchemaProvider` get it automatically, so most consumers don't need to change anything. Only custom, hand-written `ECSchemaProvider` implementations need to add the method.
|
|
56
|
+
|
|
57
|
+
- Renamed the `classHierarchyInspector` prop to `imodelAccess` on `createClassBasedInstanceLabelSelectClauseFactory`, `createBisInstanceLabelSelectClauseFactory` (both in `@itwin/presentation-shared`) and `createPredicateBasedHierarchyDefinition` (in `@itwin/presentation-hierarchies`). The prop's type is unchanged, so the value passed to it doesn't need to change - only the prop name:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
// Before:
|
|
61
|
+
const classHierarchyInspector = createCachingECClassHierarchyInspector({
|
|
62
|
+
schemaProvider: createECSchemaProvider(imodel),
|
|
63
|
+
});
|
|
64
|
+
createPredicateBasedHierarchyDefinition({
|
|
65
|
+
classHierarchyInspector,
|
|
66
|
+
hierarchy,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// After:
|
|
70
|
+
const imodelAccess = createECSchemaProvider(imodel);
|
|
71
|
+
createPredicateBasedHierarchyDefinition({ imodelAccess, hierarchy });
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- [#1394](https://github.com/iTwin/presentation/pull/1394): `EC` namespace interfaces in `@itwin/presentation-shared` no longer use `Promise` wrappers — once a schema is loaded via the still-async `ECSchemaProvider.getSchema`, all further navigation (`baseClass`, `is()`, `getProperty()`, `getProperties()`, `kindOfQuantity`, `relationshipClass`, `enumeration`, `abstractConstraint`) is synchronous.
|
|
75
|
+
|
|
76
|
+
Additional changes:
|
|
77
|
+
|
|
78
|
+
- The `EC.Class.getDerivedClasses()` method was replaced with `getDerivedClassNames(props?: { onlyDirect?: boolean })`. `ECSchemaProvider` can be used to load the derived classes by name, if needed.
|
|
79
|
+
- The `getCustomAttributes()` method has been removed from `EC.Schema`, `EC.Class`, and `EC.Property` and replaced with an `isHidden: boolean` property. `EC.CustomAttributeSet` and `EC.CustomAttribute` types have been removed.
|
|
80
|
+
- Added an `EC.Class.getOwnProperties()` method that returns only the properties defined on the class itself, without inherited properties.
|
|
81
|
+
- Added an `EC.EntityClass.getMixins()` method that returns all mixins applied to the entity class.
|
|
82
|
+
- Added an optional `EC.Property.category` attribute.
|
|
83
|
+
- Added a required `EC.RelationshipConstraint.constraintClasses` attribute.
|
|
84
|
+
- Added missing optional `description` attributes to `EC.Schema` and `EC.Property`.
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- [#1495](https://github.com/iTwin/presentation/pull/1495): Fix nested property grouping for inherited properties by consistently using their declaring class.
|
|
89
|
+
- [#1518](https://github.com/iTwin/presentation/pull/1518): Improved hierarchy load performance by memoizing the hidden-classes tree per selected class, avoiding repeated traversal of large derived-class hierarchies (notably improving the models tree).
|
|
90
|
+
|
|
91
|
+
The memoization persists for the lifetime of the hierarchy provider's query factories. When iModel schemas may have changed, `createIModelHierarchyProvider` now re-creates its per-iModel factories in response to the `imodelChanged` event.
|
|
92
|
+
|
|
93
|
+
- [#1511](https://github.com/iTwin/presentation/pull/1511): Fixed a performance regression that made property grouping of large hierarchies dramatically slower.
|
|
94
|
+
|
|
95
|
+
`createECSchemaProvider` now caches resolved schemas and the `EC.Class` objects built from them, so repeated `getSchema`/`getClass` calls and `EC.Property.class` accesses no longer trigger a new native schema view request or rebuild the class each time. Cached schemas are reused until the underlying schema view becomes outdated, at which point they are refreshed on next access. In addition, property grouping now resolves each properties class once instead of once per grouped node.
|
|
96
|
+
|
|
97
|
+
- Updated dependencies:
|
|
98
|
+
- @itwin/presentation-shared@2.0.0-alpha.13
|
|
99
|
+
|
|
100
|
+
## 2.0.0-alpha.17
|
|
101
|
+
|
|
102
|
+
### Major Changes
|
|
103
|
+
|
|
104
|
+
- [#1454](https://github.com/iTwin/presentation/pull/1454): Dropped CommonJS support. These packages are now published as ES modules (ESM) only.
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- Updated dependencies:
|
|
109
|
+
- @itwin/presentation-shared@2.0.0-alpha.12
|
|
110
|
+
|
|
111
|
+
## 2.0.0-alpha.16
|
|
112
|
+
|
|
113
|
+
### Major Changes
|
|
114
|
+
|
|
115
|
+
- [#1350](https://github.com/iTwin/presentation/pull/1350): **Breaking:** `createInstanceKeysFilteredQuery` now correctly appends `IdSet` bindings in both positional and named binding formats, using the `IdSet` virtual table instead of `InVirtualSet`.
|
|
116
|
+
|
|
117
|
+
Consumers that provide their own `LimitingECSqlQueryExecutor` or `imodelAccess` may now receive named bindings (`Record<string, ECSqlBinding>`) through the public `createQueryReader` path.
|
|
118
|
+
|
|
119
|
+
To migrate, update custom query reader / executor implementations to handle both positional bindings (`ECSqlBinding[]`) and named bindings (`Record<string, ECSqlBinding>`), or use the default implementation provided by the `@itwin/presentation-core-interop` package, `createECSqlQueryExecutor` function.
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- Updated dependencies:
|
|
124
|
+
- @itwin/presentation-shared@2.0.0-alpha.11
|
|
125
|
+
|
|
126
|
+
## 2.0.0-alpha.15
|
|
127
|
+
|
|
128
|
+
### Major Changes
|
|
129
|
+
|
|
130
|
+
- [#1307](https://github.com/iTwin/presentation/pull/1307): `HierarchyDefinition.defineHierarchyLevel` props (`DefineHierarchyLevelProps`) now includes two new properties: `instanceLabelSelectClauseFactory` and `nodeSelectClauseFactory`.
|
|
131
|
+
|
|
132
|
+
These factories are automatically created and cached per-iModel by `createIModelHierarchyProvider` and passed to `HierarchyDefinition.defineHierarchyLevel` calls. Consumers may use these factories from props instead of creating their own, unless some custom behavior is required - consumers who need custom behavior can ignore the provided factories and create their own inside `defineHierarchyLevel`.
|
|
133
|
+
|
|
134
|
+
While this change can be considered **breaking** as it adds two new required parameters to `defineHierarchyLevel`, it would only affect anyone calling `defineHierarchyLevel` directly, which is not a common scenario as this method is usually called by the presentation hierarchies framework. For typical consumers who are implementing `HierarchyDefinition` and defining `defineHierarchyLevel`, it should not cause any compile-time errors, as the new parameters are passed as a single object and can be easily ignored by using rest/spread operator.
|
|
135
|
+
|
|
136
|
+
Before:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
const labelSelectClauseFactory = createIModelInstanceLabelSelectClauseFactory(
|
|
140
|
+
{ imodelAccess }
|
|
141
|
+
);
|
|
142
|
+
const nodeSelectClauseFactory = createNodesQueryClauseFactory({
|
|
143
|
+
imodelAccess,
|
|
144
|
+
instanceLabelSelectClauseFactory: labelSelectClauseFactory,
|
|
145
|
+
});
|
|
146
|
+
const hierarchyDefinition: HierarchyDefinition = {
|
|
147
|
+
async defineHierarchyLevel() {
|
|
148
|
+
return [
|
|
149
|
+
{
|
|
150
|
+
fullClassName: "SomeClass",
|
|
151
|
+
query: {
|
|
152
|
+
// use `labelSelectClauseFactory` and `nodeSelectClauseFactory` from the outer scope
|
|
153
|
+
ecsql: `
|
|
154
|
+
SELECT ${await nodeSelectClauseFactory.createSelectClause({
|
|
155
|
+
ecClassId: { selector: "this.ECClassId" },
|
|
156
|
+
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
157
|
+
nodeLabel: {
|
|
158
|
+
selector: await labelSelectClauseFactory.createSelectClause({
|
|
159
|
+
classAlias: "this",
|
|
160
|
+
className: "SomeClass",
|
|
161
|
+
}),
|
|
162
|
+
},
|
|
163
|
+
})}
|
|
164
|
+
FROM SomeClass this
|
|
165
|
+
`,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
];
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
After:
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
const hierarchyDefinition: HierarchyDefinition = {
|
|
177
|
+
async defineHierarchyLevel({
|
|
178
|
+
instanceLabelSelectClauseFactory,
|
|
179
|
+
nodeSelectClauseFactory,
|
|
180
|
+
}) {
|
|
181
|
+
return [
|
|
182
|
+
{
|
|
183
|
+
fullClassName: "SomeClass",
|
|
184
|
+
query: {
|
|
185
|
+
// use `instanceLabelSelectClauseFactory` and `nodeSelectClauseFactory` from props
|
|
186
|
+
ecsql: `
|
|
187
|
+
SELECT ${await nodeSelectClauseFactory.createSelectClause({
|
|
188
|
+
ecClassId: { selector: "this.ECClassId" },
|
|
189
|
+
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
190
|
+
nodeLabel: {
|
|
191
|
+
selector:
|
|
192
|
+
await instanceLabelSelectClauseFactory.createSelectClause({
|
|
193
|
+
classAlias: "this",
|
|
194
|
+
className: "SomeClass",
|
|
195
|
+
}),
|
|
196
|
+
},
|
|
197
|
+
})}
|
|
198
|
+
FROM SomeClass this
|
|
199
|
+
`,
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
];
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- [#1308](https://github.com/iTwin/presentation/pull/1308): Adjust provider created by `createMergedIModelHierarchyProvider` to be more performant when dealing with a single iModel.
|
|
210
|
+
- Updated dependencies:
|
|
211
|
+
- @itwin/presentation-shared@2.0.0-alpha.10
|
|
212
|
+
|
|
213
|
+
## 2.0.0-alpha.14
|
|
214
|
+
|
|
215
|
+
### Minor Changes
|
|
216
|
+
|
|
217
|
+
- [#1264](https://github.com/iTwin/presentation/pull/1264): Enhance `HierarchySearchTree.createBuilder()` by allowing it to process resulting hierarchy.
|
|
218
|
+
|
|
219
|
+
Example:
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
const builder = HierarchySearchTree.createBuilder<{ heat?: number }>();
|
|
223
|
+
builder.accept({
|
|
224
|
+
tree: subTree,
|
|
225
|
+
handler: {
|
|
226
|
+
onEntryHandled: ({ treeEntry, parentEntries }) => {
|
|
227
|
+
// Assign some extra information to the entry and its ancestors. This will allow us to test
|
|
228
|
+
// that we can use that information in `getTree` method to filter out entries.
|
|
229
|
+
[...parentEntries, treeEntry].forEach((entry) => {
|
|
230
|
+
entry.extras.heat ? entry.extras.heat++ : (entry.extras.heat = 1);
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
const tree = builder.getTree({
|
|
236
|
+
// Only include branches with heat > 5
|
|
237
|
+
processEntry: ({ treeEntry }) =>
|
|
238
|
+
(treeEntry.extras.heat ?? 0) > 5 ? treeEntry : undefined,
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Patch Changes
|
|
243
|
+
|
|
244
|
+
- [#1256](https://github.com/iTwin/presentation/pull/1256): Fix `alpha` dependencies being specified with a range (`^`), allowing package manager to use higher versions, possibly with breaking changes.
|
|
245
|
+
|
|
246
|
+
## 2.0.0-alpha.13
|
|
247
|
+
|
|
248
|
+
### Major Changes
|
|
249
|
+
|
|
250
|
+
- [#1250](https://github.com/iTwin/presentation/pull/1250): Use type-safe full class names.
|
|
251
|
+
|
|
252
|
+
The full class names used in this package were defined as `string`, although we always expect them to be in specific format - either `Schema:Class` or `Schema.Class`. In many cases we rely on this format when parsing the name for compare or other purposes, so type safety for the format is highly beneficial. This change makes full class names type-safe(ier) through [TypeScript's template literal types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html), so that we can be sure that they are always in correct format.
|
|
253
|
+
|
|
254
|
+
## Breaking changes
|
|
255
|
+
|
|
256
|
+
- `ClassGroupingNodeKey.className` is now of type `EC.FullClassName` instead of `string`.
|
|
257
|
+
- `NodesQueryClauseFactory.createSelectClause` prop `grouping.byBaseClasses.fullClassNames` is now of type `EC.FullClassName[]` instead of `string[]`.
|
|
258
|
+
- `NodesQueryClauseFactory.createSelectClause` prop `grouping.byProperties.propertiesClassName` is now of type `EC.FullClassName` instead of `string`.
|
|
259
|
+
- `HierarchyNodesDefinition.fullClassName` is now of type `EC.FullClassName` instead of `string`.
|
|
260
|
+
- `createPredicateBasedHierarchyDefinition` prop `hierarchies.childNodes[number].parentInstancesNodePredicate` now accepts `EC.FullClassName` instead of `string`.
|
|
261
|
+
- `NodesQueryClauseFactory.createFilterClauses` prop `contentClass.fullName` is now of type `EC.FullClassName` instead of `string`.
|
|
262
|
+
- `PropertyOtherValuesGroupingNodeKey.properties[number].className` is now of type `EC.FullClassName` instead of `string`.
|
|
263
|
+
- `PropertyValueGroupingNodeKey.propertyClassName` is now of type `EC.FullClassName` instead of `string`.
|
|
264
|
+
- `PropertyValueRangeGroupingNodeKey.propertyClassName` is now of type `EC.FullClassName` instead of `string`.
|
|
265
|
+
|
|
266
|
+
In many cases migration will be seamless, as long as the input string matches the expected format. In some cases (e.g. when assigning a string variable to one of the affected properties), you may need to use `normalizeFullClassName` from `@itwin/presentation-shared` to ensure the value is of the correct type:
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
const myClassName: string = "MySchema.MyClass";
|
|
270
|
+
|
|
271
|
+
// before
|
|
272
|
+
const myClassGroupingNodeKey: ClassGroupingNodeKey = {
|
|
273
|
+
type: "class-grouping",
|
|
274
|
+
className: myClassName,
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// after
|
|
278
|
+
const myClassGroupingNodeKey: ClassGroupingNodeKey = {
|
|
279
|
+
type: "class-grouping",
|
|
280
|
+
// assigning `MySchema.MyClass` directly wouldn't require using `normalizeFullClassName` as the type would be correctly inferred, but if the class name is stored in a variable of type `string`, you need to use `normalizeFullClassName` to ensure it's of the correct type
|
|
281
|
+
className: normalizeFullClassName(myClassName),
|
|
282
|
+
};
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
- [#1236](https://github.com/iTwin/presentation/pull/1236): Start using tree structure for defining hierarchy search paths.
|
|
286
|
+
|
|
287
|
+
**Additions:**
|
|
288
|
+
|
|
289
|
+
- `HierarchySearchTree` type that represents a tree structure of hierarchy search paths and is now used for hierarchy search implementation in `HierarchyProvider`.
|
|
290
|
+
|
|
291
|
+
In addition to the type, there's also a namespace with the same name, providing utility functions for working with the tree structure:
|
|
292
|
+
|
|
293
|
+
- `HierarchySearchTree.createBuilder` function to create a builder for hierarchy search trees, which can be used to create a tree from individual paths or to merge multiple trees together:
|
|
294
|
+
|
|
295
|
+
```ts
|
|
296
|
+
const builder = HierarchySearchTree.createBuilder();
|
|
297
|
+
builder.accept({ path: searchPath1 });
|
|
298
|
+
builder.accept({ path: searchPath2 });
|
|
299
|
+
builder.accept({ tree: partialSearchTree });
|
|
300
|
+
const tree: HierarchySearchTree[] = builder.getTree();
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
This is the preferred way to create a `HierarchySearchTree`, as it allows to create a tree without having to create an array first, as opposed to `HierarchySearchTree.createFromPathsList` function described below.
|
|
304
|
+
|
|
305
|
+
- `HierarchySearchTree.createFromPathsList` function to create a hierarchy search tree from a list of hierarchy search paths. This is a quick & easy way to migrate from the old `HierarchySearchPath[]` structure to `HierarchySearchTree[]`, but it's' less efficient than using the builder if you need to create a tree from a large number of paths, as it needs to create an intermediate array.
|
|
306
|
+
|
|
307
|
+
The recommended way to handle multiple search paths is to use the builder and call `accept` for each path, as it allows to create a tree without having to create an array first:
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
// Instead of doing this:
|
|
311
|
+
const searchPaths: HierarchySearchPath[] = [];
|
|
312
|
+
for (const item of items) {
|
|
313
|
+
searchPaths.push(createSearchPathForItem(item));
|
|
314
|
+
}
|
|
315
|
+
const tree: HierarchySearchTree[] =
|
|
316
|
+
await HierarchySearchTree.createFromPathsList(searchPaths);
|
|
317
|
+
|
|
318
|
+
// Do this:
|
|
319
|
+
const builder = HierarchySearchTree.createBuilder();
|
|
320
|
+
for (const item of items) {
|
|
321
|
+
builder.accept({ path: createSearchPathForItem(item) });
|
|
322
|
+
}
|
|
323
|
+
const tree: HierarchySearchTree[] = builder.getTree();
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
- `HierarchySearchTree.mergeOptions` function to merge options of two hierarchy search trees. Used internally to merge options of the same nodes when creating a tree from a list of paths.
|
|
327
|
+
|
|
328
|
+
- `HierarchyNode.getGroupingNodeLevel` utility function to get the level of a grouping node in the hierarchy. Convenient for specifying the `groupingLevel` prop in `HierarchySearchPath.options.reveal` and `HierarchySearchTree.options.autoExpand`.
|
|
329
|
+
|
|
330
|
+
- `HierarchyNodeIdentifier.compare` static function to compare two `HierarchyNodeIdentifier` objects. Useful when using `HierarchyNodeIdentifier` as a key in a dictionary sorted set.
|
|
331
|
+
|
|
332
|
+
**Breaking changes:**
|
|
333
|
+
|
|
334
|
+
- `HierarchySearchPathOptions.reveal` type `{ depthInHierarchy: number }` was replaced with `{ groupingLevel: number }`.
|
|
335
|
+
|
|
336
|
+
The `depthInHierarchy` option was only useful when revealing grouping nodes, the rename makes the intent more explicit. In addition, the `groupingLevel` option is only handled in the scope of one specific `InstancesNode` node that the options are supplied for, so handling this option is more efficient - we only need to handle it for grouping nodes, and look only as deep as the next grouped `InstancesNode` node.
|
|
337
|
+
|
|
338
|
+
Migration:
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
const groupingNode = getMyGroupingNode();
|
|
342
|
+
const searchPath: HierarchySearchPath = {
|
|
343
|
+
// ...
|
|
344
|
+
options: {
|
|
345
|
+
// before
|
|
346
|
+
reveal: { depthInHierarchy: groupingNode.parentKeys.length },
|
|
347
|
+
|
|
348
|
+
// after
|
|
349
|
+
reveal: {
|
|
350
|
+
groupingLevel: HierarchyNode.getGroupingNodeLevel(groupingNode),
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
- `HierarchyProvider.setHierarchySearch` now takes `{ paths: HierarchySearchTree[] }` instead of `{ paths: HierarchySearchPath[] }`.
|
|
357
|
+
|
|
358
|
+
Migration:
|
|
359
|
+
|
|
360
|
+
```ts
|
|
361
|
+
const provider: HierarchyProvider = getMyHierarchyProvider();
|
|
362
|
+
const searchPaths: HierarchySearchPath[] = getMySearchPaths();
|
|
363
|
+
provider.setHierarchySearch({
|
|
364
|
+
// before
|
|
365
|
+
paths: searchPaths,
|
|
366
|
+
|
|
367
|
+
// after
|
|
368
|
+
// - see `HierarchySearchTree.createFromPathsList` description above for more efficient way to do this
|
|
369
|
+
// - quick migration:
|
|
370
|
+
paths: await HierarchySearchTree.createFromPathsList(searchPaths),
|
|
371
|
+
});
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
- `createIModelHierarchyProvider` and `createMergedIModelHierarchyProvider` functions' `search` prop now takes `{ paths: HierarchySearchTree[] }` instead of `{ paths: HierarchySearchPath[] }`. Use `HierarchySearchTree.createFromPathsList` to do the conversion.
|
|
375
|
+
|
|
376
|
+
Migration:
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
const searchPaths: HierarchySearchPath[] = getMySearchPaths();
|
|
380
|
+
const provider = createIModelHierarchyProvider({
|
|
381
|
+
// ...
|
|
382
|
+
search: {
|
|
383
|
+
// before
|
|
384
|
+
paths: searchPaths,
|
|
385
|
+
|
|
386
|
+
// after
|
|
387
|
+
// - see `HierarchySearchTree.createFromPathsList` description above for more efficient way to do this
|
|
388
|
+
// - quick migration:
|
|
389
|
+
paths: await HierarchySearchTree.createFromPathsList(searchPaths),
|
|
390
|
+
},
|
|
391
|
+
});
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
- `HierarchyNode.search` changes:
|
|
395
|
+
|
|
396
|
+
- Type of `childrenTargetPaths` has been changed from `HierarchySearchPath[]` to `HierarchySearchTree[]`.
|
|
397
|
+
- `searchTargetOptions` was replaced with `options`, which is available not only for nodes with `isSearchTarget: true`, but all of them.
|
|
398
|
+
|
|
399
|
+
The changes of this attribute are taken care of by the `createHierarchySearchHelper` changes described below.
|
|
400
|
+
|
|
401
|
+
- `createHierarchySearchHelper` changes:
|
|
402
|
+
|
|
403
|
+
- The first argument is now `HierarchySearchTree[]` instead of `HierarchySearchPath[]`.
|
|
404
|
+
- The `createChildNodeProps` function of returned result no longer requires the `parentKeys` prop, but instead always requires the `nodeKey` prop.
|
|
405
|
+
|
|
406
|
+
Migration:
|
|
407
|
+
|
|
408
|
+
```ts
|
|
409
|
+
// Somewhere in `HierarchyProvider.getNodes` implementation...
|
|
410
|
+
|
|
411
|
+
// Type of the first argument has changed, but it also changed on `HierarchyProvider`, so likely no changes are needed here. If the
|
|
412
|
+
// type of `rootSearch.paths` is still `HierarchySearchPath[]` - use `HierarchySearchTree.createFromPathsList` to do the conversion.
|
|
413
|
+
const helper = createHierarchySearchHelper(rootSearch?.paths, parentNode);
|
|
414
|
+
for (const book of books) {
|
|
415
|
+
const nodeKey: GenericNodeKey = { type: "generic", id: `book:${book.key}` };
|
|
416
|
+
yield {
|
|
417
|
+
key: nodeKey,
|
|
418
|
+
label: book.title,
|
|
419
|
+
children: false,
|
|
420
|
+
parentKeys: [...parentNode.parentKeys, parentNode.key],
|
|
421
|
+
// before
|
|
422
|
+
...searchHelper?.createChildNodeProps({ nodeKey, parentKeys }),
|
|
423
|
+
// after
|
|
424
|
+
...searchHelper?.createChildNodeProps({ nodeKey }),
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Patch Changes
|
|
430
|
+
|
|
431
|
+
- Updated dependencies:
|
|
432
|
+
- @itwin/presentation-shared@2.0.0-alpha.9
|
|
433
|
+
|
|
434
|
+
## 2.0.0-alpha.12
|
|
435
|
+
|
|
436
|
+
### Patch Changes
|
|
437
|
+
|
|
438
|
+
- [#1229](https://github.com/iTwin/presentation/pull/1229): Version bump
|
|
439
|
+
- Updated dependencies:
|
|
440
|
+
- @itwin/presentation-shared@2.0.0-alpha.8
|
|
441
|
+
|
|
442
|
+
## 2.0.0-alpha.11
|
|
443
|
+
|
|
444
|
+
### Major Changes
|
|
445
|
+
|
|
446
|
+
- [#1198](https://github.com/iTwin/presentation/pull/1198): Change `HierarchyProvider.hierarchyChanged` argument to be required.
|
|
447
|
+
|
|
448
|
+
This simplifies the API for users of `HierarchyProvider`, as they no longer need to check for `undefined` when handling hierarchy changes.
|
|
449
|
+
|
|
450
|
+
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({})`.
|
|
451
|
+
|
|
452
|
+
- [#1202](https://github.com/iTwin/presentation/pull/1202): Change `NodePreProcessor` and `NodePostProcessor` function types to take a props object instead of a node.
|
|
453
|
+
|
|
454
|
+
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.
|
|
455
|
+
|
|
456
|
+
The change breaks consumers that have `HierarchyDefinition` implementations with `preProcessNode` or `postProcessNode` functions defined. Reacting to the change is straightforward:
|
|
457
|
+
|
|
458
|
+
```ts
|
|
459
|
+
const myHierarchyDefinition: HierarchyDefinition = {
|
|
460
|
+
// Before:
|
|
461
|
+
preProcessNode: async (node) => {
|
|
462
|
+
// process node
|
|
463
|
+
},
|
|
464
|
+
postProcessNode: async (node) => {
|
|
465
|
+
// process node
|
|
466
|
+
},
|
|
467
|
+
|
|
468
|
+
// After:
|
|
469
|
+
preProcessNode: async ({ node, parentNode }) => {
|
|
470
|
+
// process node with access to parentNode
|
|
471
|
+
},
|
|
472
|
+
postProcessNode: async ({ node, parentNode }) => {
|
|
473
|
+
// process node with access to parentNode
|
|
474
|
+
},
|
|
475
|
+
|
|
476
|
+
// ... the rest of implementation
|
|
477
|
+
};
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
### Minor Changes
|
|
481
|
+
|
|
482
|
+
- [#1204](https://github.com/iTwin/presentation/pull/1204): Add `createHierarchyProvider` utility function.
|
|
483
|
+
|
|
484
|
+
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.
|
|
485
|
+
|
|
486
|
+
**Before:**
|
|
487
|
+
|
|
488
|
+
```ts
|
|
489
|
+
const beforeAsPlainObject: HierarchyProvider = {
|
|
490
|
+
hierarchyChanged: new BeEvent(),
|
|
491
|
+
async *getNodes({ parentNode }) {
|
|
492
|
+
// yield nodes...
|
|
493
|
+
},
|
|
494
|
+
async *getNodeInstanceKeys() {},
|
|
495
|
+
setFormatter() {},
|
|
496
|
+
setHierarchySearch() {},
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
const beforeAsClassObject = new (class implements HierarchyProvider {
|
|
500
|
+
public hierarchyChanged: new BeEvent(),
|
|
501
|
+
public async *getNodes({ parentNode }) {
|
|
502
|
+
// yield nodes...
|
|
503
|
+
},
|
|
504
|
+
public async *getNodeInstanceKeys() {},
|
|
505
|
+
public setFormatter(formatter: IPrimitiveValueFormatter | undefined) {
|
|
506
|
+
// set formatter...
|
|
507
|
+
hierarchyChanged.raiseEvent({ formatterChange: { newFormatter: formatter } });
|
|
508
|
+
},
|
|
509
|
+
public setHierarchySearch() {},
|
|
510
|
+
})();
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**After:**
|
|
514
|
+
|
|
515
|
+
```ts
|
|
516
|
+
const afterAsPlainObject = createHierarchyProvider(() => ({
|
|
517
|
+
async *getNodes({ parentNode }) {
|
|
518
|
+
// yield nodes...
|
|
519
|
+
},
|
|
520
|
+
}));
|
|
521
|
+
|
|
522
|
+
// or, provide implementation as a class instance:
|
|
523
|
+
const afterAsClassObject = createHierarchyProvider(
|
|
524
|
+
({ hierarchyChanged }) =>
|
|
525
|
+
new (class
|
|
526
|
+
implements Pick<HierarchyProvider, "getNodes" | "setFormatter">
|
|
527
|
+
{
|
|
528
|
+
public async *getNodes({
|
|
529
|
+
parentNode,
|
|
530
|
+
}): ReturnType<HierarchyProvider["getNodes"]> {
|
|
531
|
+
// yield nodes...
|
|
532
|
+
}
|
|
533
|
+
public setFormatter(formatter: IPrimitiveValueFormatter | undefined) {
|
|
534
|
+
// set formatter...
|
|
535
|
+
hierarchyChanged.raiseEvent({
|
|
536
|
+
formatterChange: { newFormatter: formatter },
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
})()
|
|
540
|
+
);
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Patch Changes
|
|
544
|
+
|
|
545
|
+
- Updated dependencies:
|
|
546
|
+
- @itwin/presentation-shared@2.0.0-alpha.7
|
|
547
|
+
|
|
548
|
+
## 2.0.0-alpha.10
|
|
549
|
+
|
|
550
|
+
### Patch Changes
|
|
551
|
+
|
|
552
|
+
- [#1180](https://github.com/iTwin/presentation/pull/1180): Version bump
|
|
553
|
+
- Updated dependencies:
|
|
554
|
+
- @itwin/presentation-shared@2.0.0-alpha.6
|
|
555
|
+
|
|
556
|
+
## 2.0.0-alpha.9
|
|
557
|
+
|
|
558
|
+
### Major Changes
|
|
559
|
+
|
|
560
|
+
- [#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.
|
|
561
|
+
|
|
562
|
+
To support that, the `NodesQueryClauseFactory` created by `createNodesQueryClauseFactory` returns a query-disabling result when it encounters such schema items. To ensure that's possible,
|
|
563
|
+
the `createNodesQueryClauseFactory` function should be called with `imodelAccess` that is passed to `HierarchyDefinition.defineHierarchyLevel`.
|
|
564
|
+
|
|
565
|
+
**Breaking changes:**
|
|
566
|
+
|
|
567
|
+
- `DefineHierarchyLevelProps.imodelKey` was replaced with `imodelAccess`. If needed, the key can be accessed using `imodelAccess.imodelKey`. This affects the following APIs:
|
|
568
|
+
- `HierarchyDefinition.defineHierarchyLevel` (function that uses these props),
|
|
569
|
+
- `DefineRootHierarchyLevelProps` (extends the props type),
|
|
570
|
+
- `DefineInstanceNodeChildHierarchyLevelProps` (extends the props type).
|
|
571
|
+
|
|
572
|
+
## 2.0.0-alpha.8
|
|
573
|
+
|
|
574
|
+
### Minor Changes
|
|
575
|
+
|
|
576
|
+
- [#1137](https://github.com/iTwin/presentation/pull/1137): Fix hierarchy search only handling a single (latest) iModel results when searching multi-iModel hierarchies.
|
|
577
|
+
|
|
578
|
+
Notable API changes:
|
|
579
|
+
|
|
580
|
+
- **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.
|
|
581
|
+
|
|
582
|
+
```ts
|
|
583
|
+
// old:
|
|
584
|
+
function myParser(row: [columnName: string]: any, parentNode?: HierarchyDefinitionParentNode) {
|
|
585
|
+
// implementation...
|
|
586
|
+
}
|
|
587
|
+
// new:
|
|
588
|
+
function myParser(props: { row: [columnName: string]: any; parentNode?: HierarchyDefinitionParentNode; imodelKey: string; }) {
|
|
589
|
+
// implementation...
|
|
590
|
+
}
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
- 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.
|
|
594
|
+
- 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.
|
|
595
|
+
|
|
596
|
+
### Patch Changes
|
|
597
|
+
|
|
598
|
+
- [#1137](https://github.com/iTwin/presentation/pull/1137): Add and use a more robust way to check full class names for equality - `compareFullClassNames` function.
|
|
599
|
+
|
|
600
|
+
The function compares full class names in case-insensitive way, ignoring different supported schema-class name separators (`:` or `.`).
|
|
601
|
+
|
|
602
|
+
- Updated dependencies:
|
|
603
|
+
- @itwin/presentation-shared@2.0.0-alpha.5
|
|
604
|
+
|
|
605
|
+
## 2.0.0-alpha.7
|
|
606
|
+
|
|
607
|
+
### Minor Changes
|
|
608
|
+
|
|
609
|
+
- [#1011](https://github.com/iTwin/presentation/pull/1011): Rename full‑hierarchy "filtering" to "search" across the package.
|
|
610
|
+
|
|
611
|
+
Properties and APIs were renamed accordingly to clarify the distinction and avoid confusion between hierarchy‑wide search and per-hierarchy‑level filtering.
|
|
612
|
+
|
|
613
|
+
**Breaking changes:**
|
|
614
|
+
|
|
615
|
+
- Removed deprecated `extractFilteringProps`.
|
|
616
|
+
- Removed deprecated `HierarchyNodeFilteringProps.create`.
|
|
617
|
+
- Renamed `createHierarchyFilteringHelper` to `createHierarchySearchHelper`. It's return type was also adjusted for the rename:
|
|
618
|
+
- `hasFilter` renamed to `hasSearch`,
|
|
619
|
+
- `hasFilterTargetAncestor` renamed to `hasSearchTargetAncestor`,
|
|
620
|
+
- `getChildNodeFilteringIdentifiers` renamed to `getChildNodeSearchIdentifiers`.
|
|
621
|
+
- Renamed `HierarchyChangedEventArgs.filterChange` to `searchChange`.
|
|
622
|
+
- Renamed `HierarchyProvider.setHierarchyFilter` to `setHierarchySearch`.
|
|
623
|
+
- Renamed `createMergedIModelHierarchyProvider` prop `filtering` to `search.
|
|
624
|
+
- Renamed `HierarchyFilteringPath` to `HierarchySearchPath`.
|
|
625
|
+
- Renamed `HierarchyFilteringPathOptions` to `HierarchySearchPathOptions`.
|
|
626
|
+
- Renamed `NonGroupingHierarchyNode.filtering` to `search`. It's type was also adjusted for the rename:
|
|
627
|
+
- `hasFilterTargetAncestor` renamed to `hasSearchTargetAncestor`,
|
|
628
|
+
- `filteredChildrenIdentifierPaths` renamed to `childrenTargetPaths`,
|
|
629
|
+
- `isFilterTarget` renamed to `isSearchTarget`,
|
|
630
|
+
- `filterTargetOptions` renamed to `searchTargetOptions`.
|
|
631
|
+
|
|
632
|
+
## 2.0.0-alpha.6
|
|
633
|
+
|
|
634
|
+
### Major Changes
|
|
635
|
+
|
|
636
|
+
- 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.
|
|
637
|
+
|
|
638
|
+
**Breaking changes:**
|
|
639
|
+
|
|
640
|
+
- `GroupingHierarchyNode` no longer contains `filtering` attribute. This was always the case, but now the types have been updated to match it.
|
|
641
|
+
- Changed return type of `createHierarchyFilteringHelper`:
|
|
642
|
+
- Removed `createChildNodePropsAsync` - it became an overload of `createChildNodeProps`, whose path matching is done through `asyncPathMatcher` callback.
|
|
643
|
+
- `createChildNodeProps` now has multiple overloads and returns different types based on provided props. `autoExpand` flag is only returned when `parentKeys` are provided.
|
|
644
|
+
- Renamed `HierarchyFilteringPathOptions.autoExpand` -> `HierarchyFilteringPathOptions.reveal` to match intent.
|
|
645
|
+
- Changed `HierarchyFilteringPathOptions.reveal.depthInHierarchy` and `depthInPath` to use 0-based indexing instead of 1-based indexing.
|
|
646
|
+
- Changed `HierarchyFilteringPathOptions.reveal.depthInHierarchy` to not set `autoExpand` flag on the node that is at the `depthInHierarchy` position.
|
|
647
|
+
|
|
648
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: The hierarchy provider returned by `mergeProviders` doesn't have the deprecated `dispose` method anymore. Use `[Symbol.dispose]` instead.
|
|
649
|
+
|
|
650
|
+
### Minor Changes
|
|
651
|
+
|
|
652
|
+
- e9e42c3a513cb7d594351ee2244c7efe67cc4385: Added `HierarchyFilteringPathOptions.autoExpand` option to enable auto-expanding of filter target nodes.
|
|
653
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: Add an experimental (`@alpha`) function `createMergedIModelHierarchyProvider` for creating a hierarchy from multiple versions of the same iModel.
|
|
654
|
+
|
|
655
|
+
### Patch Changes
|
|
656
|
+
|
|
657
|
+
- e9ef80880c776522ce3b2632c8c3c461e62d6444: Fix `HierarchyNodeKey` methods `equals` and `compare` not handling different schema-class separators and casing.
|
|
658
|
+
- Updated dependencies:
|
|
659
|
+
- @itwin/presentation-shared@2.0.0-alpha.4
|
|
660
|
+
|
|
661
|
+
## 2.0.0-alpha.5
|
|
662
|
+
|
|
663
|
+
### Patch Changes
|
|
664
|
+
|
|
665
|
+
- [#1112](https://github.com/iTwin/presentation/pull/1112): Version bump
|
|
666
|
+
- Updated dependencies:
|
|
667
|
+
- @itwin/presentation-shared@2.0.0-alpha.3
|
|
668
|
+
|
|
669
|
+
## 2.0.0-alpha.4
|
|
670
|
+
|
|
671
|
+
### Patch Changes
|
|
672
|
+
|
|
673
|
+
- [#1042](https://github.com/iTwin/presentation/pull/1042): Version bump
|
|
674
|
+
- Updated dependencies:
|
|
675
|
+
- @itwin/presentation-shared@2.0.0-alpha.2
|
|
676
|
+
|
|
677
|
+
## 2.0.0-alpha.3
|
|
678
|
+
|
|
679
|
+
### Patch Changes
|
|
680
|
+
|
|
681
|
+
- [#1031](https://github.com/iTwin/presentation/pull/1031): Version bump
|
|
682
|
+
|
|
3
683
|
## 2.0.0-alpha.2
|
|
4
684
|
|
|
5
685
|
### Patch Changes
|
|
@@ -38,6 +718,204 @@
|
|
|
38
718
|
- Updated dependencies:
|
|
39
719
|
- @itwin/presentation-shared@2.0.0-alpha.0
|
|
40
720
|
|
|
721
|
+
## 1.7.21
|
|
722
|
+
|
|
723
|
+
### Patch Changes
|
|
724
|
+
|
|
725
|
+
- [#1543](https://github.com/iTwin/presentation/pull/1543): Update iTwin.js core dependencies to `^5.13.1` and refresh related tooling/test dependencies.
|
|
726
|
+
- Updated dependencies:
|
|
727
|
+
- @itwin/presentation-shared@1.2.22
|
|
728
|
+
|
|
729
|
+
## 1.7.20
|
|
730
|
+
|
|
731
|
+
### Patch Changes
|
|
732
|
+
|
|
733
|
+
- [#1500](https://github.com/iTwin/presentation/pull/1500): Update iTwin.js core dependencies to ^5.12.4 and refresh related tooling/test dependencies.
|
|
734
|
+
- Updated dependencies:
|
|
735
|
+
- @itwin/presentation-shared@1.2.20
|
|
736
|
+
|
|
737
|
+
## 1.7.19
|
|
738
|
+
|
|
739
|
+
### Patch Changes
|
|
740
|
+
|
|
741
|
+
- [#1473](https://github.com/iTwin/presentation/pull/1473): Bump dependencies.
|
|
742
|
+
- Updated dependencies:
|
|
743
|
+
- @itwin/presentation-shared@1.2.19
|
|
744
|
+
|
|
745
|
+
## 1.7.18
|
|
746
|
+
|
|
747
|
+
### Patch Changes
|
|
748
|
+
|
|
749
|
+
- [#1430](https://github.com/iTwin/presentation/pull/1430): Bump dependencies.
|
|
750
|
+
- Updated dependencies:
|
|
751
|
+
- @itwin/presentation-shared@1.2.18
|
|
752
|
+
|
|
753
|
+
## 1.7.17
|
|
754
|
+
|
|
755
|
+
### Patch Changes
|
|
756
|
+
|
|
757
|
+
- [#1400](https://github.com/iTwin/presentation/pull/1400): Bump dependencies.
|
|
758
|
+
- Updated dependencies:
|
|
759
|
+
- @itwin/presentation-shared@1.2.17
|
|
760
|
+
|
|
761
|
+
## 1.7.16
|
|
762
|
+
|
|
763
|
+
### Patch Changes
|
|
764
|
+
|
|
765
|
+
- [#1390](https://github.com/iTwin/presentation/pull/1390): Update `@itwin/core-*` dependencies to `^5.10.0`.
|
|
766
|
+
- Updated dependencies:
|
|
767
|
+
- @itwin/presentation-shared@1.2.16
|
|
768
|
+
|
|
769
|
+
## 1.7.15
|
|
770
|
+
|
|
771
|
+
### Patch Changes
|
|
772
|
+
|
|
773
|
+
- [#1358](https://github.com/iTwin/presentation/pull/1358): Bump dependencies.
|
|
774
|
+
- Updated dependencies:
|
|
775
|
+
- @itwin/presentation-shared@1.2.14
|
|
776
|
+
|
|
777
|
+
## 1.7.14
|
|
778
|
+
|
|
779
|
+
### Patch Changes
|
|
780
|
+
|
|
781
|
+
- [#1338](https://github.com/iTwin/presentation/pull/1338): Bump iTwin.js core dependencies to `^5.9.1`.
|
|
782
|
+
- Updated dependencies:
|
|
783
|
+
- @itwin/presentation-shared@1.2.13
|
|
784
|
+
|
|
785
|
+
## 1.7.13
|
|
786
|
+
|
|
787
|
+
### Patch Changes
|
|
788
|
+
|
|
789
|
+
- [#1313](https://github.com/iTwin/presentation/pull/1313): Bump dependencies.
|
|
790
|
+
- Updated dependencies:
|
|
791
|
+
- @itwin/presentation-shared@1.2.12
|
|
792
|
+
|
|
793
|
+
## 1.7.12
|
|
794
|
+
|
|
795
|
+
### Patch Changes
|
|
796
|
+
|
|
797
|
+
- [#1286](https://github.com/iTwin/presentation/pull/1286): Bump dependencies.
|
|
798
|
+
- Updated dependencies:
|
|
799
|
+
- @itwin/presentation-shared@1.2.11
|
|
800
|
+
|
|
801
|
+
## 1.7.11
|
|
802
|
+
|
|
803
|
+
### Patch Changes
|
|
804
|
+
|
|
805
|
+
- [#1242](https://github.com/iTwin/presentation/pull/1242): Bump dependencies.
|
|
806
|
+
- Updated dependencies:
|
|
807
|
+
- @itwin/presentation-shared@1.2.10
|
|
808
|
+
|
|
809
|
+
## 1.7.10
|
|
810
|
+
|
|
811
|
+
### Patch Changes
|
|
812
|
+
|
|
813
|
+
- [#1215](https://github.com/iTwin/presentation/pull/1215): Update dependencies.
|
|
814
|
+
- Updated dependencies:
|
|
815
|
+
- @itwin/presentation-shared@1.2.9
|
|
816
|
+
|
|
817
|
+
## 1.7.9
|
|
818
|
+
|
|
819
|
+
### Patch Changes
|
|
820
|
+
|
|
821
|
+
- [#1208](https://github.com/iTwin/presentation/pull/1208): Bump dependencies.
|
|
822
|
+
- Updated dependencies:
|
|
823
|
+
- @itwin/presentation-shared@1.2.8
|
|
824
|
+
|
|
825
|
+
## 1.7.8
|
|
826
|
+
|
|
827
|
+
### Patch Changes
|
|
828
|
+
|
|
829
|
+
- [#1168](https://github.com/iTwin/presentation/pull/1168): Bump dependencies.
|
|
830
|
+
- [#1161](https://github.com/iTwin/presentation/pull/1161): Bump iTwin.js dependencies to `^5.5.0`.
|
|
831
|
+
- Updated dependencies:
|
|
832
|
+
- @itwin/presentation-shared@1.2.7
|
|
833
|
+
|
|
834
|
+
## 1.7.7
|
|
835
|
+
|
|
836
|
+
### Patch Changes
|
|
837
|
+
|
|
838
|
+
- [#1152](https://github.com/iTwin/presentation/pull/1152): Bump dependencies.
|
|
839
|
+
- Updated dependencies:
|
|
840
|
+
- @itwin/presentation-shared@1.2.6
|
|
841
|
+
|
|
842
|
+
## 1.7.6
|
|
843
|
+
|
|
844
|
+
### Patch Changes
|
|
845
|
+
|
|
846
|
+
- [#1139](https://github.com/iTwin/presentation/pull/1139): Bump dependencies.
|
|
847
|
+
- Updated dependencies:
|
|
848
|
+
- @itwin/presentation-shared@1.2.5
|
|
849
|
+
|
|
850
|
+
## 1.7.5
|
|
851
|
+
|
|
852
|
+
### Patch Changes
|
|
853
|
+
|
|
854
|
+
- [#1124](https://github.com/iTwin/presentation/pull/1124): Bump dependencies.
|
|
855
|
+
- Updated dependencies:
|
|
856
|
+
- @itwin/presentation-shared@1.2.4
|
|
857
|
+
|
|
858
|
+
## 1.7.4
|
|
859
|
+
|
|
860
|
+
### Patch Changes
|
|
861
|
+
|
|
862
|
+
- [#1088](https://github.com/iTwin/presentation/pull/1088): Fix restart tokens not being unique when they need to, causing queries to be cancelled.
|
|
863
|
+
|
|
864
|
+
## 1.7.3
|
|
865
|
+
|
|
866
|
+
### Patch Changes
|
|
867
|
+
|
|
868
|
+
- [#1083](https://github.com/iTwin/presentation/pull/1083): Add unique guid to existing restart tokens, and add restart tokens to executed queries.
|
|
869
|
+
|
|
870
|
+
## 1.7.2
|
|
871
|
+
|
|
872
|
+
### Patch Changes
|
|
873
|
+
|
|
874
|
+
- [#1039](https://github.com/iTwin/presentation/pull/1039): Bump iTwin.js core dependencies to `^5.1.1`.
|
|
875
|
+
- Updated dependencies:
|
|
876
|
+
- @itwin/presentation-shared@1.2.3
|
|
877
|
+
|
|
878
|
+
## 1.7.1
|
|
879
|
+
|
|
880
|
+
### Patch Changes
|
|
881
|
+
|
|
882
|
+
- [#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.
|
|
883
|
+
|
|
884
|
+
## 1.7.0
|
|
885
|
+
|
|
886
|
+
### Minor Changes
|
|
887
|
+
|
|
888
|
+
- 8f7d200926b93e862276e1f978f6c891691e0dae: Refactored specifying the depth / level to which filtering path should be auto-expanded.
|
|
889
|
+
|
|
890
|
+
- Deprecated `FilteringPathAutoExpandOption` and `FilterTargetGroupingNodeInfo`.
|
|
891
|
+
- Added `FilteringPathAutoExpandDepthInPath` and `FilteringPathAutoExpandDepthInHierarchy` which should be used instead.
|
|
892
|
+
|
|
893
|
+
Migration:
|
|
894
|
+
|
|
895
|
+
```ts
|
|
896
|
+
const pathExpandedToInstanceInPath: HierarchyFilteringPath = {
|
|
897
|
+
path: [instanceKey1, instanceKey2, instanceKey3],
|
|
898
|
+
options: {
|
|
899
|
+
// deprecated:
|
|
900
|
+
autoExpand: { depth: 1 },
|
|
901
|
+
// do this instead:
|
|
902
|
+
autoExpand: { depthInPath: 1 },
|
|
903
|
+
},
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
const pathExpandedToGroupingNode: HierarchyFilteringPath = {
|
|
907
|
+
path: [instanceKey1, instanceKey2, instanceKey3],
|
|
908
|
+
options: {
|
|
909
|
+
// deprecated:
|
|
910
|
+
autoExpand: { depth: 1, key: groupingNodeKey },
|
|
911
|
+
// also deprecated:
|
|
912
|
+
autoExpand: { depth: 1, includeGroupingNodes: true },
|
|
913
|
+
// do this instead:
|
|
914
|
+
autoExpand: { depthInHierarchy: 1 },
|
|
915
|
+
},
|
|
916
|
+
};
|
|
917
|
+
```
|
|
918
|
+
|
|
41
919
|
## 1.6.1
|
|
42
920
|
|
|
43
921
|
### Patch Changes
|
|
@@ -49,9 +927,11 @@
|
|
|
49
927
|
### Minor Changes
|
|
50
928
|
|
|
51
929
|
- 69a2db67917f84e99d532e8e9aabbc02ec262d91: `HierarchyFilteringPathOptions.autoExpand` is now of type:
|
|
930
|
+
|
|
52
931
|
```ts
|
|
53
932
|
autoExpand?: { depth: number } | boolean;
|
|
54
933
|
```
|
|
934
|
+
|
|
55
935
|
When `depth` is set, only nodes up to specified `depth` in `HierarchyFilteringPath` will have `autoExpand` option set.
|
|
56
936
|
|
|
57
937
|
## 1.5.1
|
|
@@ -71,7 +951,10 @@
|
|
|
71
951
|
**Before:**
|
|
72
952
|
|
|
73
953
|
```ts
|
|
74
|
-
const childNodeProps = await createHierarchyFilteringHelper(
|
|
954
|
+
const childNodeProps = await createHierarchyFilteringHelper(
|
|
955
|
+
undefined,
|
|
956
|
+
undefined
|
|
957
|
+
).createChildNodePropsAsync({
|
|
75
958
|
pathMatcher: (identifier): boolean | Promise<boolean> => {
|
|
76
959
|
return false;
|
|
77
960
|
},
|
|
@@ -98,7 +981,10 @@
|
|
|
98
981
|
Use this if pathMatcher always returns a Promise or you prefer a simpler pattern.
|
|
99
982
|
|
|
100
983
|
```ts
|
|
101
|
-
const childNodeProps = await createHierarchyFilteringHelper(
|
|
984
|
+
const childNodeProps = await createHierarchyFilteringHelper(
|
|
985
|
+
undefined,
|
|
986
|
+
undefined
|
|
987
|
+
).createChildNodePropsAsync({
|
|
102
988
|
pathMatcher: async (identifier): Promise<boolean> => {
|
|
103
989
|
return false;
|
|
104
990
|
},
|
|
@@ -361,7 +1247,9 @@
|
|
|
361
1247
|
```ts
|
|
362
1248
|
const selectQueryFactory = createNodesQueryClauseFactory({
|
|
363
1249
|
imodelAccess,
|
|
364
|
-
instanceLabelSelectClauseFactory: createBisInstanceLabelSelectClauseFactory(
|
|
1250
|
+
instanceLabelSelectClauseFactory: createBisInstanceLabelSelectClauseFactory(
|
|
1251
|
+
{ classHierarchyInspector: imodelAccess }
|
|
1252
|
+
),
|
|
365
1253
|
});
|
|
366
1254
|
```
|
|
367
1255
|
|
|
@@ -384,7 +1272,12 @@
|
|
|
384
1272
|
// Path to the element "C"
|
|
385
1273
|
path: [elementKeys.a, elementKeys.b, elementKeys.c],
|
|
386
1274
|
// Supply grouping node attributes with the path to the "C" element.
|
|
387
|
-
options: {
|
|
1275
|
+
options: {
|
|
1276
|
+
autoExpand: {
|
|
1277
|
+
key: groupingNode.key,
|
|
1278
|
+
depth: groupingNode.parentKeys.length,
|
|
1279
|
+
},
|
|
1280
|
+
},
|
|
388
1281
|
},
|
|
389
1282
|
],
|
|
390
1283
|
},
|
|
@@ -423,7 +1316,12 @@
|
|
|
423
1316
|
const hierarchyProvider = createHierarchyProvider({
|
|
424
1317
|
imodelAccess,
|
|
425
1318
|
hierarchyDefinition: createHierarchyDefinition(imodelAccess),
|
|
426
|
-
filtering: {
|
|
1319
|
+
filtering: {
|
|
1320
|
+
paths: filterPaths.map((path) => ({
|
|
1321
|
+
path,
|
|
1322
|
+
options: { autoExpand: true },
|
|
1323
|
+
})),
|
|
1324
|
+
},
|
|
427
1325
|
});
|
|
428
1326
|
```
|
|
429
1327
|
|
|
@@ -465,12 +1363,18 @@
|
|
|
465
1363
|
childNodes: [
|
|
466
1364
|
{
|
|
467
1365
|
parentNodeClassName: "BisCore.PhysicalElement",
|
|
468
|
-
definitions: async ({ parentNode }) =>
|
|
1366
|
+
definitions: async ({ parentNode }) =>
|
|
1367
|
+
getPhysicalElementChildren(parentNode),
|
|
469
1368
|
},
|
|
470
1369
|
{
|
|
471
1370
|
parentNodeClassName: "BisCore.SpatialElement",
|
|
472
1371
|
definitions: async ({ parentNode, parentNodeClassName }) => {
|
|
473
|
-
if (
|
|
1372
|
+
if (
|
|
1373
|
+
await inspector.classDerivesFrom(
|
|
1374
|
+
parentNodeClassName,
|
|
1375
|
+
"BisCore.PhysicalElement"
|
|
1376
|
+
)
|
|
1377
|
+
) {
|
|
474
1378
|
return [];
|
|
475
1379
|
}
|
|
476
1380
|
|
|
@@ -480,11 +1384,21 @@
|
|
|
480
1384
|
{
|
|
481
1385
|
parentNodeClassName: "BisCore.GeometricElement3d",
|
|
482
1386
|
definitions: async ({ parentNode, parentNodeClassName }) => {
|
|
483
|
-
if (
|
|
1387
|
+
if (
|
|
1388
|
+
await inspector.classDerivesFrom(
|
|
1389
|
+
parentNodeClassName,
|
|
1390
|
+
"BisCore.PhysicalElement"
|
|
1391
|
+
)
|
|
1392
|
+
) {
|
|
484
1393
|
return [];
|
|
485
1394
|
}
|
|
486
1395
|
|
|
487
|
-
if (
|
|
1396
|
+
if (
|
|
1397
|
+
await inspector.classDerivesFrom(
|
|
1398
|
+
parentNodeClassName,
|
|
1399
|
+
"BisCore.SpatialElement"
|
|
1400
|
+
)
|
|
1401
|
+
) {
|
|
488
1402
|
return [];
|
|
489
1403
|
}
|
|
490
1404
|
|
|
@@ -505,17 +1419,20 @@
|
|
|
505
1419
|
childNodes: [
|
|
506
1420
|
{
|
|
507
1421
|
parentNodeClassName: "BisCore.PhysicalElement",
|
|
508
|
-
definitions: async ({ parentNode }) =>
|
|
1422
|
+
definitions: async ({ parentNode }) =>
|
|
1423
|
+
getPhysicalElementChildren(parentNode),
|
|
509
1424
|
},
|
|
510
1425
|
{
|
|
511
1426
|
parentNodeClassName: "BisCore.SpatialElement",
|
|
512
1427
|
onlyIfNotHandled: true,
|
|
513
|
-
definitions: async ({ parentNode }) =>
|
|
1428
|
+
definitions: async ({ parentNode }) =>
|
|
1429
|
+
getSpatialElementChildren(parentNode),
|
|
514
1430
|
},
|
|
515
1431
|
{
|
|
516
1432
|
parentNodeClassName: "BisCore.GeometricElement3d",
|
|
517
1433
|
onlyIfNotHandled: true,
|
|
518
|
-
definitions: async ({ parentNode }) =>
|
|
1434
|
+
definitions: async ({ parentNode }) =>
|
|
1435
|
+
getGeometricElement3dChildren(parentNode),
|
|
519
1436
|
},
|
|
520
1437
|
],
|
|
521
1438
|
},
|