@itwin/presentation-hierarchies 2.0.0-alpha.16 → 2.0.0-alpha.18
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 +134 -0
- package/README.md +4 -6
- package/lib/hierarchies/HierarchyErrors.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyErrors.js.map +1 -0
- package/lib/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyMerge.js +1 -1
- package/lib/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/hierarchies/HierarchyNode.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyNode.js.map +1 -0
- package/lib/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.d.ts +4 -4
- package/lib/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.js +8 -8
- package/lib/hierarchies/HierarchyNodeKey.js.map +1 -0
- package/lib/hierarchies/HierarchyProvider.d.ts.map +1 -0
- package/lib/hierarchies/HierarchyProvider.js.map +1 -0
- package/lib/hierarchies/HierarchySearch.d.ts.map +1 -0
- package/lib/hierarchies/HierarchySearch.js.map +1 -0
- package/lib/hierarchies/Logging.d.ts.map +1 -0
- package/lib/hierarchies/Logging.js.map +1 -0
- package/lib/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
- package/lib/hierarchies/imodel/HierarchyCache.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.d.ts +3 -3
- package/lib/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.d.ts +2 -2
- package/lib/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
- package/lib/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.d.ts +2 -4
- package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.js +15 -12
- package/lib/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
- package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
- package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.d.ts +10 -6
- package/lib/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.js +80 -43
- package/lib/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.d.ts +4 -4
- package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.js +1 -1
- package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.d.ts +2 -2
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.js +3 -4
- package/lib/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.d.ts +1 -1
- package/lib/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.js +2 -5
- package/lib/hierarchies/imodel/TreeNodesReader.js.map +1 -0
- package/lib/hierarchies/imodel/Utils.d.ts.map +1 -0
- package/lib/hierarchies/imodel/Utils.js.map +1 -0
- package/lib/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.d.ts +2 -2
- package/lib/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/Grouping.js.map +1 -0
- package/lib/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
- package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
- 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/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.d.ts +3 -3
- package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.js +9 -10
- package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.js +4 -6
- package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
- package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.d.ts +4 -4
- package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
- package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.js +38 -30
- package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
- package/lib/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
- package/lib/hierarchies/internal/Common.d.ts.map +1 -0
- 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/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
- package/lib/hierarchies/internal/LoggingUtils.js.map +1 -0
- package/lib/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -0
- package/lib/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -0
- package/lib/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
- package/lib/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
- package/lib/hierarchies/internal/operators/Partition.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/Partition.js.map +1 -0
- package/lib/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
- package/lib/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
- package/lib/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
- package/lib/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
- package/lib/hierarchies/internal/operators/Sorting.js.map +1 -0
- 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.map +1 -0
- package/lib/{cjs/presentation-hierarchies.js.map → presentation-hierarchies.js.map} +1 -1
- package/package.json +19 -21
- 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/HierarchyMerge.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyMerge.js +0 -43
- package/lib/cjs/hierarchies/HierarchyMerge.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +0 -82
- 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 -52
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +0 -162
- 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.map +0 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +0 -64
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +0 -1
- package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchySearch.js +0 -468
- package/lib/cjs/hierarchies/HierarchySearch.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/HierarchyCache.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +0 -81
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +0 -144
- 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 +0 -234
- 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.map +0 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +0 -657
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +0 -126
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +0 -231
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +0 -629
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +0 -140
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +0 -94
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +0 -268
- package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +0 -35
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +0 -51
- 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 -73
- 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 -40
- 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 -176
- 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 -75
- 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 -84
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
- 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.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +0 -113
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +0 -54
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +0 -49
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +0 -52
- 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 -310
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +0 -31
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/Common.js +0 -91
- 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 -111
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +0 -1
- 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.map +0 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +0 -28
- 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 -54
- 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.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.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.map +0 -1
- package/lib/cjs/presentation-hierarchies.js +0 -40
- 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/HierarchyMerge.d.ts +0 -19
- package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyMerge.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyNode.d.ts +0 -149
- 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 -31
- 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 +0 -134
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyProvider.js.map +0 -1
- package/lib/esm/hierarchies/HierarchySearch.d.ts +0 -297
- package/lib/esm/hierarchies/HierarchySearch.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchySearch.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/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.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -138
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +0 -21
- 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.map +0 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts +0 -35
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.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 -5
- 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.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 +0 -4
- 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 +0 -4
- 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 +0 -5
- 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 +0 -61
- 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 -108
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +0 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +0 -12
- 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 +0 -75
- 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 -7
- 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 +0 -22
- 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 +0 -4
- 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 -24
- 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/{cjs/hierarchies → hierarchies}/HierarchyMerge.d.ts +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNode.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNodeIdentifier.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeIdentifier.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/HierarchyProvider.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/HierarchyProvider.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/HierarchySearch.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/HierarchySearch.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/Logging.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/Logging.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/HierarchyCache.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/HierarchyCache.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/{cjs/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/Utils.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/Utils.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/DetermineChildren.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/DetermineChildren.js +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.d.ts +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/Shared.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/Common.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/Common.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/{cjs/hierarchies → hierarchies}/internal/LoggingUtils.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/SubscriptionScheduler.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/SubscriptionScheduler.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Partition.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Partition.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Sorting.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Sorting.js +0 -0
- /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/TapOnce.d.ts +0 -0
- /package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.js +0 -0
- /package/lib/{cjs/presentation-hierarchies.d.ts → presentation-hierarchies.d.ts} +0 -0
- /package/lib/{esm/presentation-hierarchies.js → presentation-hierarchies.js} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { assert } from "@itwin/core-bentley";
|
|
6
|
-
import {
|
|
6
|
+
import { createMainThreadReleaseOnTimePassedHandler, formatConcatenatedValue, getClass, TypedPrimitiveValue, } from "@itwin/presentation-shared";
|
|
7
7
|
import { HierarchyNode } from "../../../HierarchyNode.js";
|
|
8
8
|
import { HierarchyNodeKey } from "../../../HierarchyNodeKey.js";
|
|
9
9
|
/** @internal */
|
|
@@ -43,7 +43,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
43
43
|
}
|
|
44
44
|
const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];
|
|
45
45
|
const propertyClass = handlerGroupingParams.ecClass;
|
|
46
|
-
const property =
|
|
46
|
+
const property = propertyClass.getProperty(currentProperty.propertyName);
|
|
47
47
|
if (!property?.isNavigation() &&
|
|
48
48
|
(!property?.isPrimitive() || property.primitiveType === "Binary" || property.primitiveType === "IGeometry")) {
|
|
49
49
|
groupings.ungrouped.push(node);
|
|
@@ -55,7 +55,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
55
55
|
assert(primitiveType !== "Binary" && primitiveType !== "IGeometry");
|
|
56
56
|
if (!currentProperty.propertyValue) {
|
|
57
57
|
if (byProperties.createGroupForUnspecifiedValues) {
|
|
58
|
-
addGroupingToMap(groupings.grouped, `${
|
|
58
|
+
addGroupingToMap(groupings.grouped, `${propertyIdentifier.propertyName}:Unspecified`, {
|
|
59
59
|
label: localizedStrings.unspecified,
|
|
60
60
|
propertyGroupingNodeKey: {
|
|
61
61
|
type: "property-grouping:value",
|
|
@@ -68,7 +68,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
68
68
|
groupings.ungrouped.push(node);
|
|
69
69
|
continue;
|
|
70
70
|
}
|
|
71
|
-
const koqName =
|
|
71
|
+
const koqName = property.kindOfQuantity?.fullName;
|
|
72
72
|
if (currentProperty.ranges) {
|
|
73
73
|
if (typeof currentProperty.propertyValue === "number") {
|
|
74
74
|
const propValue = currentProperty.propertyValue;
|
|
@@ -88,7 +88,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
88
88
|
};
|
|
89
89
|
const rangeLabel = matchingRange.rangeLabel ??
|
|
90
90
|
`${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;
|
|
91
|
-
addGroupingToMap(groupings.grouped, `${
|
|
91
|
+
addGroupingToMap(groupings.grouped, `${propertyIdentifier.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : ""}`, {
|
|
92
92
|
label: rangeLabel,
|
|
93
93
|
propertyGroupingNodeKey: {
|
|
94
94
|
...propertyIdentifier,
|
|
@@ -107,8 +107,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
107
107
|
className: propertyIdentifier.propertyClassName,
|
|
108
108
|
propertyName: propertyIdentifier.propertyName,
|
|
109
109
|
};
|
|
110
|
-
const hasPropertyIdentifier = groupingNode.key.properties.find((x) =>
|
|
111
|
-
x.propertyName.toLocaleLowerCase() === thisPropertyIdentifier.propertyName.toLocaleLowerCase());
|
|
110
|
+
const hasPropertyIdentifier = groupingNode.key.properties.find((x) => x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName);
|
|
112
111
|
if (!hasPropertyIdentifier) {
|
|
113
112
|
groupingNode.key.properties.push(thisPropertyIdentifier);
|
|
114
113
|
}
|
|
@@ -123,7 +122,7 @@ export async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, ha
|
|
|
123
122
|
const formattedValue = currentProperty.propertyValue instanceof Array
|
|
124
123
|
? await formatConcatenatedValue({ value: currentProperty.propertyValue, valueFormatter })
|
|
125
124
|
: await valueFormatter(TypedPrimitiveValue.create(currentProperty.propertyValue, primitiveType, koqName, extendedTypeName));
|
|
126
|
-
addGroupingToMap(groupings.grouped, `${
|
|
125
|
+
addGroupingToMap(groupings.grouped, `${propertyIdentifier.propertyName}:${formattedValue}`, {
|
|
127
126
|
label: formattedValue,
|
|
128
127
|
propertyGroupingNodeKey: {
|
|
129
128
|
...propertyIdentifier,
|
|
@@ -182,15 +181,11 @@ function createNodePropertyGroupPathMatchers(node) {
|
|
|
182
181
|
return propertyGroupingNodeKeys.map((key) => {
|
|
183
182
|
switch (key.type) {
|
|
184
183
|
case "property-grouping:other":
|
|
185
|
-
return (x) => key.properties.some((p) =>
|
|
186
|
-
p.propertyName.toLocaleLowerCase() === x.propertyName.toLocaleLowerCase() &&
|
|
187
|
-
!!x.isRange);
|
|
184
|
+
return (x) => key.properties.some((p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange);
|
|
188
185
|
case "property-grouping:range":
|
|
189
|
-
return (x) =>
|
|
190
|
-
key.propertyName.toLocaleLowerCase() === x.propertyName.toLocaleLowerCase();
|
|
186
|
+
return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;
|
|
191
187
|
case "property-grouping:value":
|
|
192
|
-
return (x) =>
|
|
193
|
-
key.propertyName.toLocaleLowerCase() === x.propertyName.toLocaleLowerCase();
|
|
188
|
+
return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;
|
|
194
189
|
}
|
|
195
190
|
});
|
|
196
191
|
}
|
|
@@ -199,42 +194,58 @@ export async function getUniquePropertiesGroupInfo(schemaProvider, parentNode, n
|
|
|
199
194
|
const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();
|
|
200
195
|
const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];
|
|
201
196
|
const uniqueProperties = new Map();
|
|
197
|
+
// `getClass` resolves the same class for every node sharing a `propertiesClassName`, so resolve each class once and
|
|
198
|
+
// reuse it across nodes instead of calling `getClass` (schema lookup + class lookup) on every node.
|
|
199
|
+
const propertiesClassCache = new Map();
|
|
200
|
+
const getPropertiesClass = async (fullClassName) => {
|
|
201
|
+
let ecClass = propertiesClassCache.get(fullClassName);
|
|
202
|
+
if (!ecClass) {
|
|
203
|
+
ecClass = await getClass(schemaProvider, fullClassName);
|
|
204
|
+
propertiesClassCache.set(fullClassName, ecClass);
|
|
205
|
+
}
|
|
206
|
+
return ecClass;
|
|
207
|
+
};
|
|
202
208
|
for (const node of nodes) {
|
|
203
209
|
await releaseMainThread();
|
|
204
210
|
const byProperties = node.processingParams?.grouping?.byProperties;
|
|
205
211
|
if (!byProperties) {
|
|
206
212
|
continue;
|
|
207
213
|
}
|
|
214
|
+
const propertiesClass = await getPropertiesClass(byProperties.propertiesClassName);
|
|
208
215
|
let propertyGroupIndex = 0;
|
|
209
216
|
const previousPropertiesInfo = new Array();
|
|
210
217
|
for (const propertyGroup of byProperties.propertyGroups) {
|
|
218
|
+
const property = propertiesClass.getProperty(propertyGroup.propertyName);
|
|
219
|
+
const propertyName = property?.name ?? propertyGroup.propertyName;
|
|
220
|
+
const propertyClassName = property?.class.fullName ?? propertiesClass.fullName;
|
|
211
221
|
const mapKeyRanges = getRangesAsString(propertyGroup.ranges);
|
|
212
222
|
const lastKey = previousPropertiesInfo.length > 0
|
|
213
223
|
? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey
|
|
214
224
|
: "";
|
|
215
|
-
const propertyGroupKey = `${lastKey}:${
|
|
216
|
-
const mapKey = `${
|
|
225
|
+
const propertyGroupKey = `${lastKey}:${propertyName}(${mapKeyRanges})`;
|
|
226
|
+
const mapKey = `${propertiesClass.fullName}:${propertyGroupKey}`;
|
|
217
227
|
let isAlreadyGrouped = false;
|
|
218
228
|
if (parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {
|
|
219
229
|
const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];
|
|
220
230
|
isAlreadyGrouped = groupMatcher({
|
|
221
|
-
propertiesClassName:
|
|
222
|
-
propertyName
|
|
231
|
+
propertiesClassName: propertyClassName,
|
|
232
|
+
propertyName,
|
|
223
233
|
isRange: !!propertyGroup.ranges,
|
|
224
234
|
});
|
|
225
235
|
}
|
|
226
236
|
if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {
|
|
227
237
|
uniqueProperties.set(mapKey, {
|
|
228
|
-
ecClass:
|
|
229
|
-
propertyGroup: { propertyName
|
|
238
|
+
ecClass: propertiesClass,
|
|
239
|
+
propertyGroup: { propertyName, ranges: propertyGroup.ranges },
|
|
230
240
|
previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({
|
|
231
|
-
propertiesClassName:
|
|
241
|
+
propertiesClassName: propertiesClass.getProperty(groupingInfo.propertyGroup.propertyName)?.class.fullName ??
|
|
242
|
+
propertiesClass.fullName,
|
|
232
243
|
propertyName: groupingInfo.propertyGroup.propertyName,
|
|
233
244
|
isRange: !!groupingInfo.propertyGroup.ranges,
|
|
234
245
|
})),
|
|
235
246
|
});
|
|
236
247
|
}
|
|
237
|
-
previousPropertiesInfo.push({ propertyGroup, propertyGroupKey });
|
|
248
|
+
previousPropertiesInfo.push({ propertyGroup: { ...propertyGroup, propertyName }, propertyGroupKey });
|
|
238
249
|
++propertyGroupIndex;
|
|
239
250
|
}
|
|
240
251
|
}
|
|
@@ -250,14 +261,12 @@ function getRangesAsString(ranges) {
|
|
|
250
261
|
: "";
|
|
251
262
|
}
|
|
252
263
|
async function shouldCreatePropertyGroup(handlerGroupingParams, nodePropertyGroupingParams, nodeFullClassName, classHierarchyInspector) {
|
|
253
|
-
if (
|
|
254
|
-
0 ||
|
|
264
|
+
if (nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||
|
|
255
265
|
nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1) {
|
|
256
266
|
return false;
|
|
257
267
|
}
|
|
258
268
|
const currentProperty = nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];
|
|
259
|
-
if (currentProperty.propertyName.
|
|
260
|
-
handlerGroupingParams.propertyGroup.propertyName.toLocaleLowerCase() ||
|
|
269
|
+
if (currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||
|
|
261
270
|
!doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)) {
|
|
262
271
|
return false;
|
|
263
272
|
}
|
|
@@ -269,9 +278,8 @@ async function shouldCreatePropertyGroup(handlerGroupingParams, nodePropertyGrou
|
|
|
269
278
|
/** @internal */
|
|
270
279
|
export function doPreviousPropertiesMatch(previousPropertiesGroupingInfo, nodesProperties) {
|
|
271
280
|
return (previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&
|
|
272
|
-
previousPropertiesGroupingInfo.every((groupingInfo, index) =>
|
|
273
|
-
groupingInfo.propertyName.
|
|
274
|
-
nodesProperties.propertyGroups[index].propertyName.toLocaleLowerCase() &&
|
|
281
|
+
previousPropertiesGroupingInfo.every((groupingInfo, index) => groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&
|
|
282
|
+
groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&
|
|
275
283
|
!!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges));
|
|
276
284
|
}
|
|
277
285
|
/** @internal */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertiesGrouping.js","sourceRoot":"","sources":["../../../../../src/hierarchies/imodel/operators/grouping/PropertiesGrouping.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,0CAA0C,EAC1C,uBAAuB,EACvB,QAAQ,EACR,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AA8ChE,gBAAgB;AAChB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,YAA8C,EAC9C,mBAA8D,EAC9D,qBAAwC,EACxC,cAAwC,EACxC,gBAAoD,EACpD,uBAAmE;IAEnE,IAAI,mBAAgG,CAAC;IACrG,MAAM,0BAA0B,GAAG,GAAG,EAAE;QACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACpG,IAAI,IAAI,EAAE,CAAC;gBACT,mBAAmB,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;YAC7C,CAAC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------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { assert } from \"@itwin/core-bentley\";\nimport {\n createMainThreadReleaseOnTimePassedHandler,\n formatConcatenatedValue,\n getClass,\n TypedPrimitiveValue,\n} from \"@itwin/presentation-shared\";\nimport { HierarchyNode } from \"../../../HierarchyNode.js\";\nimport { HierarchyNodeKey } from \"../../../HierarchyNodeKey.js\";\n\nimport type { ArrayElement, EC, ECSchemaProvider, IPrimitiveValueFormatter } from \"@itwin/presentation-shared\";\nimport type { ParentHierarchyNode } from \"../../../HierarchyNode.js\";\nimport type { PropertyGroupingNodeKey } from \"../../../HierarchyNodeKey.js\";\nimport type {\n HierarchyNodePropertiesGroupingParams,\n HierarchyNodePropertyGroup,\n HierarchyNodePropertyValueRange,\n ProcessedInstanceHierarchyNode,\n} from \"../../IModelHierarchyNode.js\";\nimport type { GroupingHandler, GroupingHandlerResult, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\ninterface DisplayablePropertyGroupingInfo {\n label: string;\n propertyGroupingNodeKey: PropertyGroupingNodeKey;\n}\n\ninterface PropertyGroupingInformation {\n ungrouped: ProcessedInstanceHierarchyNode[];\n grouped: Map<\n string,\n { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }\n >;\n}\n\n/** @internal */\nexport interface PropertiesGroupingLocalizedStrings {\n other: string;\n unspecified: string;\n}\n\n/** @internal */\nexport interface PropertyGroupInfo {\n ecClass: EC.Class;\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo;\n propertyGroup: Omit<HierarchyNodePropertyGroup, \"propertyValue\">;\n}\n\n/** @internal */\nexport type PreviousPropertiesGroupingInfo = Array<{\n propertiesClassName: EC.FullClassNameDotNotation;\n propertyName: string;\n isRange?: boolean;\n}>;\n\n/** @internal */\nexport async function createPropertyGroups(\n nodesToGroup: ProcessedInstanceHierarchyNode[],\n nodesAlreadyGrouped: ProcessedInstancesGroupingHierarchyNode[],\n handlerGroupingParams: PropertyGroupInfo,\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n classHierarchyInspector: Pick<ECSchemaProvider, \"classDerivesFrom\">,\n): Promise<GroupingHandlerResult> {\n let otherValuesGrouping: { node: ProcessedInstancesGroupingHierarchyNode; new: boolean } | undefined;\n const getOtherValuesGroupingNode = () => {\n if (!otherValuesGrouping) {\n const node = nodesAlreadyGrouped.find((n) => HierarchyNodeKey.isPropertyOtherValuesGrouping(n.key));\n if (node) {\n otherValuesGrouping = { node, new: false };\n }\n }\n otherValuesGrouping ??= {\n node: {\n key: { type: \"property-grouping:other\" as const, properties: [] },\n parentKeys: [],\n groupedInstanceKeys: [],\n label: localizedStrings.other,\n children: [],\n },\n new: true,\n };\n return otherValuesGrouping.node;\n };\n\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const groupings: PropertyGroupingInformation = { ungrouped: [], grouped: new Map() };\n for (const node of nodesToGroup) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n groupings.ungrouped.push(node);\n continue;\n }\n if (\n !(await shouldCreatePropertyGroup(\n handlerGroupingParams,\n byProperties,\n node.key.instanceKeys[0].className,\n classHierarchyInspector,\n ))\n ) {\n groupings.ungrouped.push(node);\n continue;\n }\n const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n const propertyClass = handlerGroupingParams.ecClass;\n const property = propertyClass.getProperty(currentProperty.propertyName);\n\n if (\n !property?.isNavigation() &&\n (!property?.isPrimitive() || property.primitiveType === \"Binary\" || property.primitiveType === \"IGeometry\")\n ) {\n groupings.ungrouped.push(node);\n continue;\n }\n\n const propertyIdentifier = { propertyName: property.name, propertyClassName: property.class.fullName };\n const extendedTypeName = \"extendedTypeName\" in property ? property.extendedTypeName : undefined;\n const primitiveType = \"primitiveType\" in property ? property.primitiveType : \"String\";\n assert(primitiveType !== \"Binary\" && primitiveType !== \"IGeometry\");\n\n if (!currentProperty.propertyValue) {\n if (byProperties.createGroupForUnspecifiedValues) {\n addGroupingToMap(\n groupings.grouped,\n `${propertyIdentifier.propertyName}:Unspecified`,\n {\n label: localizedStrings.unspecified,\n propertyGroupingNodeKey: {\n type: \"property-grouping:value\",\n ...propertyIdentifier,\n formattedPropertyValue: \"\",\n },\n },\n node,\n );\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const koqName = property.kindOfQuantity?.fullName;\n if (currentProperty.ranges) {\n if (typeof currentProperty.propertyValue === \"number\") {\n const propValue = currentProperty.propertyValue;\n const matchingRange = currentProperty.ranges.find(\n (range) => propValue >= range.fromValue && propValue <= range.toValue,\n );\n\n if (matchingRange) {\n const fromValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.fromValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.fromValue,\n };\n const toValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.toValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.toValue,\n };\n\n const rangeLabel =\n matchingRange.rangeLabel ??\n `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;\n addGroupingToMap(\n groupings.grouped,\n `${propertyIdentifier.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : \"\"}`,\n {\n label: rangeLabel,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:range\",\n fromValue: matchingRange.fromValue,\n toValue: matchingRange.toValue,\n },\n },\n node,\n );\n continue;\n }\n }\n if (byProperties.createGroupForOutOfRangeValues) {\n const groupingNode = getOtherValuesGroupingNode();\n assert(HierarchyNodeKey.isPropertyOtherValuesGrouping(groupingNode.key));\n const thisPropertyIdentifier = {\n className: propertyIdentifier.propertyClassName,\n propertyName: propertyIdentifier.propertyName,\n };\n const hasPropertyIdentifier = groupingNode.key.properties.find(\n (x) =>\n x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName,\n );\n if (!hasPropertyIdentifier) {\n groupingNode.key.properties.push(thisPropertyIdentifier);\n }\n node.key.instanceKeys.forEach((k) => groupingNode.groupedInstanceKeys.push(k));\n groupingNode.parentKeys = node.parentKeys;\n groupingNode.children.push(Object.assign(node, { parentKeys: [...node.parentKeys, groupingNode.key] }));\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const formattedValue =\n currentProperty.propertyValue instanceof Array\n ? await formatConcatenatedValue({ value: currentProperty.propertyValue, valueFormatter })\n : await valueFormatter(\n TypedPrimitiveValue.create(currentProperty.propertyValue, primitiveType, koqName, extendedTypeName),\n );\n\n addGroupingToMap(\n groupings.grouped,\n `${propertyIdentifier.propertyName}:${formattedValue}`,\n {\n label: formattedValue,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:value\",\n formattedPropertyValue: formattedValue,\n },\n },\n node,\n );\n }\n return createGroupingNodes(groupings, otherValuesGrouping?.new ? otherValuesGrouping.node : undefined);\n}\n\nfunction addGroupingToMap(\n groupingMap: Map<\n string,\n { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }\n >,\n mapKey: string,\n propertyToAdd: DisplayablePropertyGroupingInfo,\n node: ProcessedInstanceHierarchyNode,\n): void {\n let groupingInfo = groupingMap.get(mapKey);\n if (!groupingInfo) {\n groupingInfo = { displayablePropertyGroupingInfo: propertyToAdd, groupedNodes: [node] };\n groupingMap.set(mapKey, groupingInfo);\n return;\n }\n groupingInfo.groupedNodes.push(node);\n}\n\nfunction createGroupingNodes(\n groupings: PropertyGroupingInformation,\n otherValuesGroupingNode: ProcessedInstancesGroupingHierarchyNode | undefined,\n): GroupingHandlerResult {\n const groupedNodes = new Array<ProcessedInstancesGroupingHierarchyNode>();\n groupings.grouped.forEach((entry) => {\n const groupedNodeParentKeys = entry.groupedNodes[0].parentKeys;\n groupedNodes.push({\n label: entry.displayablePropertyGroupingInfo.label,\n key: entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey,\n parentKeys: groupedNodeParentKeys,\n groupedInstanceKeys: entry.groupedNodes.flatMap((groupedInstanceNode) => groupedInstanceNode.key.instanceKeys),\n children: entry.groupedNodes.map((gn) => ({\n ...gn,\n parentKeys: [...groupedNodeParentKeys, entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey],\n })),\n });\n });\n if (otherValuesGroupingNode) {\n groupedNodes.push(otherValuesGroupingNode);\n }\n return { grouped: groupedNodes, ungrouped: groupings.ungrouped, groupingType: \"property\" };\n}\n\nfunction createNodePropertyGroupPathMatchers(\n node: ParentHierarchyNode,\n): Array<(x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean> {\n if (!HierarchyNode.isPropertyGroupingNode(node)) {\n return [];\n }\n\n const keys = [...node.parentKeys, node.key];\n const propertyGroupingNodeKeys: PropertyGroupingNodeKey[] = [];\n for (let i = keys.length - 1; i >= 0; --i) {\n const key = keys[i];\n if (HierarchyNodeKey.isPropertyGrouping(key)) {\n propertyGroupingNodeKeys.push(key);\n } else {\n break;\n }\n }\n propertyGroupingNodeKeys.reverse();\n\n return propertyGroupingNodeKeys.map((key): ((x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean) => {\n switch (key.type) {\n case \"property-grouping:other\":\n return (x) =>\n key.properties.some(\n (p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange,\n );\n case \"property-grouping:range\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n case \"property-grouping:value\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n }\n });\n}\n\n/** @internal */\nexport async function getUniquePropertiesGroupInfo(\n schemaProvider: ECSchemaProvider,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n): Promise<Array<PropertyGroupInfo>> {\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];\n const uniqueProperties = new Map<string, PropertyGroupInfo>();\n // `getClass` resolves the same class for every node sharing a `propertiesClassName`, so resolve each class once and\n // reuse it across nodes instead of calling `getClass` (schema lookup + class lookup) on every node.\n const propertiesClassCache = new Map<EC.FullClassNameDotNotation, EC.Class>();\n const getPropertiesClass = async (fullClassName: EC.FullClassNameDotNotation): Promise<EC.Class> => {\n let ecClass = propertiesClassCache.get(fullClassName);\n if (!ecClass) {\n ecClass = await getClass(schemaProvider, fullClassName);\n propertiesClassCache.set(fullClassName, ecClass);\n }\n return ecClass;\n };\n for (const node of nodes) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n continue;\n }\n\n const propertiesClass = await getPropertiesClass(byProperties.propertiesClassName);\n let propertyGroupIndex = 0;\n const previousPropertiesInfo = new Array<{ propertyGroup: HierarchyNodePropertyGroup; propertyGroupKey: string }>();\n for (const propertyGroup of byProperties.propertyGroups) {\n const property = propertiesClass.getProperty(propertyGroup.propertyName);\n const propertyName = property?.name ?? propertyGroup.propertyName;\n const propertyClassName = property?.class.fullName ?? propertiesClass.fullName;\n const mapKeyRanges = getRangesAsString(propertyGroup.ranges);\n const lastKey =\n previousPropertiesInfo.length > 0\n ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey\n : \"\";\n const propertyGroupKey = `${lastKey}:${propertyName}(${mapKeyRanges})`;\n const mapKey = `${propertiesClass.fullName}:${propertyGroupKey}`;\n\n let isAlreadyGrouped = false;\n if (parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {\n const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];\n isAlreadyGrouped = groupMatcher({\n propertiesClassName: propertyClassName,\n propertyName,\n isRange: !!propertyGroup.ranges,\n });\n }\n if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {\n uniqueProperties.set(mapKey, {\n ecClass: propertiesClass,\n propertyGroup: { propertyName, ranges: propertyGroup.ranges },\n previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({\n propertiesClassName:\n propertiesClass.getProperty(groupingInfo.propertyGroup.propertyName)?.class.fullName ??\n propertiesClass.fullName,\n propertyName: groupingInfo.propertyGroup.propertyName,\n isRange: !!groupingInfo.propertyGroup.ranges,\n })),\n });\n }\n\n previousPropertiesInfo.push({ propertyGroup: { ...propertyGroup, propertyName }, propertyGroupKey });\n ++propertyGroupIndex;\n }\n }\n // Order might change in uniqueProperties, resorting to make sure that properties with fewer previous properties are returned first.\n return [...uniqueProperties.values()].sort(\n (lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length,\n );\n}\n\nfunction getRangesAsString(ranges?: HierarchyNodePropertyValueRange[]): string {\n return ranges\n ? ranges\n .map((range) => `${range.fromValue}-${range.toValue}(${range.rangeLabel ?? \"\"})`)\n .sort()\n .join(\";\")\n : \"\";\n}\n\nasync function shouldCreatePropertyGroup(\n handlerGroupingParams: PropertyGroupInfo,\n nodePropertyGroupingParams: HierarchyNodePropertiesGroupingParams,\n nodeFullClassName: EC.FullClassNameDotNotation,\n classHierarchyInspector: Pick<ECSchemaProvider, \"classDerivesFrom\">,\n): Promise<boolean> {\n if (\n nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||\n nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1\n ) {\n return false;\n }\n const currentProperty =\n nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n if (\n currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||\n !doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)\n ) {\n return false;\n }\n if (!doPreviousPropertiesMatch(handlerGroupingParams.previousPropertiesGroupingInfo, nodePropertyGroupingParams)) {\n return false;\n }\n return classHierarchyInspector.classDerivesFrom(nodeFullClassName, handlerGroupingParams.ecClass.fullName);\n}\n\n/** @internal */\nexport function doPreviousPropertiesMatch(\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo,\n nodesProperties: HierarchyNodePropertiesGroupingParams,\n): boolean {\n return (\n previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&\n previousPropertiesGroupingInfo.every(\n (groupingInfo, index) =>\n groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&\n groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&\n !!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges,\n )\n );\n}\n\n/** @internal */\nexport function doRangesMatch(\n ranges1: HierarchyNodePropertyValueRange[] | undefined,\n ranges2: HierarchyNodePropertyValueRange[] | undefined,\n): boolean {\n if (typeof ranges1 !== typeof ranges2) {\n return false;\n }\n if (!ranges1) {\n return true;\n }\n assert(Array.isArray(ranges2));\n if (ranges1.length !== ranges2.length) {\n return false;\n }\n return (\n // Check twice, to validate if both ranges have the same elements (elements can be in a different order)\n ranges1.every((lhsRange) =>\n ranges2.some(\n (rhsRange) =>\n lhsRange.fromValue === rhsRange.fromValue &&\n lhsRange.toValue === rhsRange.toValue &&\n lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n ) &&\n ranges2.every((lhsRange) =>\n ranges1.some(\n (rhsRange) =>\n lhsRange.fromValue === rhsRange.fromValue &&\n lhsRange.toValue === rhsRange.toValue &&\n lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n )\n );\n}\n\n/** @internal */\nexport async function createPropertiesGroupingHandlers(\n imodelAccess: ECSchemaProvider,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n): Promise<GroupingHandler[]> {\n const propertiesGroupInfo = await getUniquePropertiesGroupInfo(imodelAccess, parentNode, nodes);\n return propertiesGroupInfo.map(\n (propertyInfo) => async (nodesToGroup, nodesAlreadyGrouped) =>\n createPropertyGroups(\n nodesToGroup,\n nodesAlreadyGrouped,\n propertyInfo,\n valueFormatter,\n localizedStrings,\n imodelAccess,\n ),\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,+BAA+B,EAEhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,uCAAuC,EAAE,MAAM,gBAAgB,CAAC;AAE5F,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,uCAAuC,EACnD,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,CAAC,cAAc,EAAE,+BAA+B,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,GACvF,IAAI,CAqBN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shared.js","sourceRoot":"","sources":["../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAQhG,gBAAgB;AAChB,MAAM,UAAU,8BAA8B,CAC5C,UAAmD,EACnD,YAA0B,EAC1B,EAAwF;IAExF,SAAS,iBAAiB,CAAC,MAAyD;QAClF,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,YAAY;gBACf,OAAO,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC;YACzC,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7F,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO;oBAChG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO;oBACzB,CAAC,CAAC,SAAS,CAAC;YAChB,KAAK,UAAU;gBACb,OAAO,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;IACH,CAAC;AACH,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 type {\n HierarchyNodeGroupingParamsBase,\n InstanceHierarchyNodeProcessingParams,\n} from \"../../IModelHierarchyNode.js\";\nimport type { GroupingType, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\n/** @internal */\nexport function iterateChildNodeGroupingParams(\n parentNode: ProcessedInstancesGroupingHierarchyNode,\n groupingType: GroupingType,\n cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined,\n): void {\n function getGroupingParams(params: InstanceHierarchyNodeProcessingParams | undefined) {\n switch (groupingType) {\n case \"base-class\":\n return params?.grouping?.byBaseClasses;\n case \"class\":\n return typeof params?.grouping?.byClass === \"object\" ? params.grouping.byClass : undefined;\n case \"label\":\n return typeof params?.grouping?.byLabel === \"object\" && params.grouping.byLabel.action !== \"merge\"\n ? params.grouping.byLabel\n : undefined;\n case \"property\":\n return params?.grouping?.byProperties;\n }\n }\n for (const childNode of parentNode.children) {\n const groupingParams = getGroupingParams(childNode.processingParams);\n if (cb(groupingParams)) {\n return;\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"AAKA,OAAO,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,yCAAqC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,iDAA8C,CAAC;AAElG,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,YAAY,EACR,OAAO,iBAAiB,GACxB,OAAO,6BAA6B,GACpC,OAAO,0BAA0B,GACjC,OAAO,sCAAsC,UAGlD;AAED,gBAAgB;AAEhB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAAC,GAAG,EAAE,gBAAgB,CAAC;IAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,SAAS,UAchH;AAGD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,KAAK,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,IAAI,EAAE,KAAK,WAE7F;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS;IAAE,KAAK,EAAE,MAAM,C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AAI,MAAM,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;QACxC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,mBAAmB,CAAI,eAA+B;IACpE,OAAO,eAAe,YAAY,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1F,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 \"./DisposePolyfill.js\";\n\nimport naturalCompare from \"natural-compare-lite\";\nimport { from, of } from \"rxjs\";\n\nimport type { Observable } from \"rxjs\";\nimport type { ConcatenatedValue } from \"@itwin/presentation-shared\";\nimport type { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * This is a logging namespace for public log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE = \"Presentation.Hierarchies\";\n\n/**\n * This is a logging namespace for public performance-related log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE = `${LOGGING_NAMESPACE}.Performance`;\n\n/**\n * This is a logging namespace for internal log messages that are only interesting to package contributors,\n * but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_INTERNAL = \"Presentation.HierarchiesInternal\";\n\n/**\n * This is a logging namespace for internal performance-related log messages that are only interesting\n * to package contributors, but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = `${LOGGING_NAMESPACE_INTERNAL}.Performance`;\n\n/** @internal */\nexport function createOperatorLoggingNamespace(\n operatorName: string,\n baseCategory:\n | typeof LOGGING_NAMESPACE\n | typeof LOGGING_NAMESPACE_PERFORMANCE\n | typeof LOGGING_NAMESPACE_INTERNAL\n | typeof LOGGING_NAMESPACE_PERFORMANCE_INTERNAL,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n/* v8 ignore start */\nexport function createNodeIdentifierForLogging(\n node: { label: string | ConcatenatedValue; key: HierarchyNodeKey; parentKeys?: HierarchyNodeKey[] } | undefined,\n) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n const groupedInstanceKeys =\n \"groupedInstanceKeys\" in node && Array.isArray(node.groupedInstanceKeys)\n ? node.groupedInstanceKeys.length <= 3\n ? node.groupedInstanceKeys\n : `<${node.groupedInstanceKeys.length} keys>`\n : undefined;\n return JSON.stringify({ label, key, parentKeys, groupedInstanceKeys });\n}\n/* v8 ignore stop */\n\n/** @internal */\nexport function hasChildren<TNode extends { children?: boolean | Array<unknown> }>(node: TNode) {\n return node.children === true || (Array.isArray(node.children) && node.children.length > 0);\n}\n\n/** @internal */\nexport function compareNodesByLabel<TLhsNode extends { label: string }, TRhsNode extends { label: string }>(\n lhs: TLhsNode,\n rhs: TRhsNode,\n): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n\n/**\n * A helper that disposes the given object, if it's disposable.\n *\n * The first option is to dispose using the deprecated `dispose` method if it exists on the object.\n * If not, we use the new `Symbol.dispose` method. If that doesn't exist either, the object is\n * considered as non-disposable and nothing is done with it.\n *\n * @internal\n */\nexport function safeDispose(disposable: {} | { [Symbol.dispose]: () => void } | { dispose: () => void }) {\n if (\"dispose\" in disposable) {\n disposable.dispose();\n } else if (Symbol.dispose in disposable) {\n disposable[Symbol.dispose]();\n }\n}\n\n/** @internal */\nexport function fromPossiblyPromise<T>(possiblyPromise: T | Promise<T>): Observable<T> {\n return possiblyPromise instanceof Promise ? from(possiblyPromise) : of(possiblyPromise);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisposePolyfill.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/internal/DisposePolyfill.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisposePolyfill.js","sourceRoot":"","sources":["../../../src/hierarchies/internal/DisposePolyfill.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACF,MAAc,CAAC,OAAO,KAAK,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACpD,MAAc,CAAC,YAAY,KAAK,MAAM,CAAC,qBAAqB,CAAC,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\n/**\n * Polyfill for upcoming resource management feature: https://github.com/tc39/proposal-explicit-resource-management\n */\n(Symbol as any).dispose ??= Symbol(\"Symbol.dispose\");\n(Symbol as any).asyncDispose ??= Symbol(\"Symbol.asyncDispose\");\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggingUtils.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/internal/LoggingUtils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEpE,gBAAgB;AAChB,MAAM,WAAW,eAAe,CAAC,WAAW,GAAG,IAAI;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,MAAM,CAAC;CACvC;AAED,gBAAgB;AAChB,wBAAgB,KAAK,CAAC,KAAK,EAAE,eAAe,QAQ3C;AAeD,gBAAgB;AAChB,wBAAgB,GAAG,CAAC,WAAW,EAAE,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC,wDAEnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logging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AC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvF,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 { tap } from \"rxjs\";\nimport { getLogger } from \"../Logging.js\";\n\nimport type { ILogger, LogLevel } from \"@itwin/presentation-shared\";\n\n/** @internal */\nexport interface LogMessageProps<TMessageArg = void> {\n category: string;\n severity?: LogLevel;\n message: (arg: TMessageArg) => string;\n}\n\n/** @internal */\nexport function doLog(props: LogMessageProps) {\n const logger = getLogger();\n const severity = props.severity ?? \"trace\";\n if (!logger.isEnabled(props.category, severity)) {\n return;\n }\n const logFunc = getLogFunc(logger, severity);\n logFunc(props.category, props.message());\n}\n\nfunction getLogFunc(logger: ILogger, severity: LogLevel) {\n switch (severity) {\n case \"error\":\n return logger.logError.bind(logger);\n case \"warning\":\n return logger.logWarning.bind(logger);\n case \"info\":\n return logger.logInfo.bind(logger);\n case \"trace\":\n return logger.logTrace.bind(logger);\n }\n}\n\n/** @internal */\nexport function log<TMessageArg>(props: LogMessageProps<TMessageArg>) {\n return tap<TMessageArg>((n) => doLog({ ...props, message: () => props.message(n) }));\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B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":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA4FlD,gBAAgB;AAChB,MAAM,UAAU,0BAA0B,CAAC,mBAAwC;IACjF,OAAO;QACL,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACtC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;gBACR,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAU,CAAC,KAAK,CAAC,CAAC;gBACzD,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;YACzC,CAAC;YACH,CAAC,CAAC,SAAS;QACb,cAAc,EAAE,mBAAmB,CAAC,cAAc;YAChD,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CACR,IAAI,CAAC,mBAAmB,CAAC,cAAe,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAC3G,CAAC,CAAC,SAAS;QACb,eAAe,EAAE,mBAAmB,CAAC,eAAe;YAClD,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,eAAgB,CAAC,KAAK,CAAC,CAAC;YAC9D,CAAC,CAAC,SAAS;QACb,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;KACvF,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { filter, from } from \"rxjs\";\nimport { fromPossiblyPromise } from \"./Common.js\";\n\nimport type { Observable } from \"rxjs\";\nimport type { ParentHierarchyNode } from \"../HierarchyNode.js\";\nimport type {\n DefineHierarchyLevelProps,\n HierarchyDefinition,\n HierarchyDefinitionParentNode,\n HierarchyLevelDefinition,\n} from \"../imodel/IModelHierarchyDefinition.js\";\nimport type {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"../imodel/IModelHierarchyNode.js\";\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @internal\n */\nexport type RxjsNodeParser = (props: {\n row: { [columnName: string]: any };\n parentNode?: HierarchyDefinitionParentNode;\n imodelKey: string;\n}) => Observable<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 * @internal\n */\nexport type RxjsNodePreProcessor = <\n TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode,\n>(props: {\n node: TNode;\n parentNode?: ParentHierarchyNode;\n}) => Observable<TNode>;\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 * @internal\n */\nexport type RxjsNodePostProcessor = (props: {\n node: ProcessedHierarchyNode;\n parentNode?: ParentHierarchyNode;\n}) => Observable<ProcessedHierarchyNode>;\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @internal\n */\nexport interface RxjsHierarchyDefinition {\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?: RxjsNodeParser;\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?: RxjsNodePreProcessor;\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?: RxjsNodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Observable<HierarchyLevelDefinition>;\n}\n\n/** @internal */\nexport function getRxjsHierarchyDefinition(hierarchyDefinition: HierarchyDefinition): RxjsHierarchyDefinition {\n return {\n parseNode: hierarchyDefinition.parseNode\n ? (props) => {\n const parsedNode = hierarchyDefinition.parseNode!(props);\n return fromPossiblyPromise(parsedNode);\n }\n : undefined,\n preProcessNode: hierarchyDefinition.preProcessNode\n ? (props) =>\n from(hierarchyDefinition.preProcessNode!(props)).pipe(filter((preprocessedNode) => !!preprocessedNode))\n : undefined,\n postProcessNode: hierarchyDefinition.postProcessNode\n ? (props) => from(hierarchyDefinition.postProcessNode!(props))\n : undefined,\n defineHierarchyLevel: (props) => from(hierarchyDefinition.defineHierarchyLevel(props)),\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionScheduler.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,MAAM,CAAC;AAEpD,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAuC;IACzD,YAAY,WAAW,EAAE,MAAM,EAuB9B;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAcnE;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionScheduler.js","sourceRoot":"","sources":["../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,OAAO,EACP,WAAW,EACX,GAAG,GACJ,MAAM,MAAM,CAAC;AAId,gBAAgB;AAChB,MAAM,OAAO,qBAAqB;IACxB,UAAU,GAAG,IAAI,OAAO,EAAwB,CAAC;IACzD,YAAY,WAAmB;QAC7B,IAAI,CAAC,UAAU;aACZ,IAAI,CACH,QAAQ,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAC5B,OAAO,gBAAgB,CAAC,IAAI;YAC1B,sDAAsD;YACtD,GAAG,CAAC;gBACF,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,OAAO,EAAE,CAAC;gBAC7B,CAAC;aACF,CAAC;YACF,0GAA0G;YAC1G,4EAA4E;YAC5E,SAAS,CAAC,cAAc,CAAC;YACzB,qDAAqD;YACrD,WAAW,CAAC,aAAa,CAAC;YAC1B,gFAAgF;YAChF,qBAAqB,EAAE,CACxB,CAAC;QACJ,CAAC,EAAE,WAAW,CAAC,CAChB;YACD,wCAAwC;aACvC,SAAS,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAI,MAAqB;QAClD,OAAO,KAAK,CAAC,GAAG,EAAE;YAChB,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,MAAM,qBAAqB,GAAG,WAAW,CACvC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,EACtC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAChE,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAC5C,OAAO,qBAAqB,CAAC,IAAI,CAC/B,QAAQ,CAAC,GAAG,EAAE;gBACZ,YAAY,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF","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 {\n asapScheduler,\n connectable,\n defer,\n EMPTY,\n finalize,\n iif,\n mergeMap,\n observeOn,\n onErrorResumeNextWith,\n queueScheduler,\n Subject,\n subscribeOn,\n tap,\n} from \"rxjs\";\n\nimport type { Connectable, Observable } from \"rxjs\";\n\n/** @internal */\nexport class SubscriptionScheduler {\n private _scheduler = new Subject<Connectable<unknown>>();\n constructor(concurrency: number) {\n this._scheduler\n .pipe(\n mergeMap((sourceObservable) => {\n return sourceObservable.pipe(\n // connect source observable when scheduler subscribes\n tap({\n subscribe: () => {\n sourceObservable.connect();\n },\n }),\n // Guard against stack overflow when a lot of observables are scheduled. Without this operation `mergeMap`\n // will process each observable that is present in the pipeline recursively.\n observeOn(queueScheduler),\n // Delay the connection until another event loop task\n subscribeOn(asapScheduler),\n // Ignore errors in this pipeline without suppressing them for other subscribers\n onErrorResumeNextWith(),\n );\n }, concurrency),\n )\n // Start consuming scheduled observables\n .subscribe();\n }\n /**\n * Schedules `source` for subscription in the current scheduler.\n *\n * The actual scheduling is performed when the returned observable is subscribed to. To cancel, remove all subscribers\n * from the returned observable.\n *\n * @param source Input observable for which to schedule a subscription.\n * @returns Hot observable which starts emitting `source` values after subscription.\n */\n public scheduleSubscription<T>(source: Observable<T>): Observable<T> {\n return defer(() => {\n let unsubscribed = false;\n const connectableObservable = connectable(\n iif(() => unsubscribed, EMPTY, source),\n { connector: () => new Subject<T>(), resetOnDisconnect: false },\n );\n this._scheduler.next(connectableObservable);\n return connectableObservable.pipe(\n finalize(() => {\n unsubscribed = true;\n }),\n );\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Partition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AAGvD,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,MAAM,CAAC;AAE1D,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAClC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAC/B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAe7C;;;GAGG;AACH,MAAM,UAAU,SAAS,CACvB,MAA0B,EAC1B,SAAgC;IAEhC,MAAM,OAAO,GAAG,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,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1D,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,qBAAqB,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAC6B,CAAC;AACtC,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 { from, Observable, ReplaySubject } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\nimport type { ObservableInput, Subscription } from \"rxjs\";\n\n/** @internal */\nexport function partition<T, U extends T>(\n source: ObservableInput<T>,\n predicate: (value: T) => value is U,\n): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5C;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,SAAS,MAAM,EAChF,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,EACnC,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,QAAQ,iGASvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,SAAS,MAAM,EAChF,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,EACnC,SAAS,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,QAAQ,YAE/D,eAAe,CAAC,WAAW,CAAC,uDAa7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAmC,EACnC,KAAsC;IAEtC,OAAO,oBAAoB,CAAmC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QAChF,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAmC,EACnC,SAA+E;IAE/E,OAAO,CAAC,MAAoC,EAAE,EAAE,CAC9C,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CACf,MAAM,CAAsC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;QAC9D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,6EAA6E;YAC7E,0BAA0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,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 { from, reduce } from \"rxjs\";\n\nimport type { ObservableInput } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem, TMapKey extends string>(\n key: (item: TSourceItem) => TMapKey,\n value: (item: TSourceItem) => TMapItem,\n) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[], TMapKey>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem, TMapKey extends string>(\n key: (item: TSourceItem) => TMapKey,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<TMapKey, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,SACtD,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReleaseMainThread.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAIpE;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAI,YAAoB;IACnE,OAAO,CAAC,GAAkB,EAAiB,EAAE;QAC3C,OAAO,GAAG,CAAC,IAAI,CACb,WAAW,CAAC,YAAY,CAAC,EACzB,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,YAAY,EAAE,CAAC;gBAC1C,OAAO,GAAG,CAAC;YACb,CAAC;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,EACF,SAAS,EAAE,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { bufferCount, concatAll, concatMap, delay, of } from \"rxjs\";\n\nimport type { Observable } from \"rxjs\";\n\n/**\n * Emits a certain amount of values, then releases the main thread for other timers to use.\n * @internal\n */\nexport function releaseMainThreadOnItemsCount<T>(elementCount: number) {\n return (obs: Observable<T>): Observable<T> => {\n return obs.pipe(\n bufferCount(elementCount),\n concatMap((buff, i) => {\n const out = of(buff);\n if (i === 0 && buff.length < elementCount) {\n return out;\n }\n return out.pipe(delay(0));\n }),\n concatAll(),\n );\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareReplayWithErrors.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAErD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAOtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareReplayWithErrors.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAI5C;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,aAAa,EAAE;QACpC,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;KAC3B,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { ReplaySubject, share } from \"rxjs\";\n\nimport type { MonoTypeOperatorFunction } from \"rxjs\";\n\n/**\n * This is doing exactly the same as the standard `shareReplay` from `rxjs`, except that\n * source is not retried on error.\n *\n * @internal\n */\nexport function shareReplayWithErrors<T>(): MonoTypeOperatorFunction<T> {\n return share<T>({\n connector: () => new ReplaySubject(),\n resetOnError: false,\n resetOnComplete: false,\n resetOnRefCountZero: false,\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAYrH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAkC,KAAwB;IAChG,OAAO,KAAK,CAAC,IAAI,CACf,MAAM,CACJ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,IAAI,WAAW,CAAQ,mBAAmB,EAAE,eAAe,CAAC,KAAK,CAAC,CACnE,EACD,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,EAChD,SAAS,EAAE,CACZ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { concatAll, map, reduce } from \"rxjs\";\nimport { DuplicatePolicy, SortedArray } from \"@itwin/core-bentley\";\nimport { compareNodesByLabel } from \"../Common.js\";\n\nimport type { Observable } from \"rxjs\";\n\n/**\n * This should accept sorting params in some form:\n * - is sorting disabled?\n * - are we sorting by label or some property value, in case of the latter - how do we get the value?\n *\n * @note Nodes with same labels are returned in undefined order.\n * @internal\n */\nexport function sortNodesByLabelOperator<TNode extends { label: string }>(nodes: Observable<TNode>): Observable<TNode> {\n return nodes.pipe(\n reduce(\n (sorted, node) => {\n sorted.insert(node);\n return sorted;\n },\n new SortedArray<TNode>(compareNodesByLabel, DuplicatePolicy.Allow),\n ),\n map((sortedArray) => sortedArray.extractArray()),\n concatAll(),\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TapOnce.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAErD,gBAAgB;AAChB,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TapOnce.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAI3B,gBAAgB;AAChB,MAAM,UAAU,OAAO,CAAI,QAAoB;IAC7C,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,EAAE,CAChB,MAAM,CAAC,IAAI,CACT,GAAG,CAAC,GAAG,EAAE;QACP,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,GAAG,KAAK,CAAC;YACd,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACN,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 { tap } from \"rxjs\";\n\nimport type { MonoTypeOperatorFunction } from \"rxjs\";\n\n/** @internal */\nexport function tapOnce<T>(observer: () => void): MonoTypeOperatorFunction<T> {\n let first = true;\n return (source) =>\n source.pipe(\n tap(() => {\n if (first) {\n first = false;\n observer();\n }\n }),\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-hierarchies.d.ts","sourceRoot":"","sources":["../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,YAAY,EACV,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,GAC9B,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,uCAAuC,EAAE,MAAM,2DAA2D,CAAC;AACpH,YAAY,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,GACpC,MAAM,iDAAiD,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,YAAY,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,YAAY,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAU3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAM7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,2DAA2D,CAAC;AAEpH,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,GACpC,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAcnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,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\nexport { GenericInstanceFilter } from \"@itwin/core-common\";\n\nexport type {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport { HierarchyNodesDefinition } from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport type {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport { createPredicateBasedHierarchyDefinition } from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport type { LimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport { createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport {\n createIModelHierarchyProvider,\n createMergedIModelHierarchyProvider,\n} from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport type { SourceHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\nexport { ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport type { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport type { HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport { HierarchyNodeIdentifier } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport type {\n GenericNodeKey,\n GroupingNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey.js\";\nexport { HierarchyNodeKey } from \"./hierarchies/HierarchyNodeKey.js\";\nexport type { GetHierarchyNodesProps, HierarchyProvider } from \"./hierarchies/HierarchyProvider.js\";\nexport { createHierarchyProvider } from \"./hierarchies/HierarchyProvider.js\";\nexport { mergeProviders } from \"./hierarchies/HierarchyMerge.js\";\nexport type { HierarchySearchPathOptions } from \"./hierarchies/HierarchySearch.js\";\nexport {\n createHierarchySearchHelper,\n HierarchySearchPath,\n HierarchySearchTree,\n} from \"./hierarchies/HierarchySearch.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/presentation-hierarchies",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.18",
|
|
4
4
|
"description": "A package for creating hierarchies based on data in iTwin.js iModels.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -22,48 +22,46 @@
|
|
|
22
22
|
"Presentation"
|
|
23
23
|
],
|
|
24
24
|
"type": "module",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"module": "lib/esm/presentation-hierarchies.js",
|
|
25
|
+
"types": "lib/presentation-hierarchies",
|
|
26
|
+
"module": "lib/presentation-hierarchies.js",
|
|
28
27
|
"exports": {
|
|
29
28
|
".": {
|
|
30
|
-
"import": "./lib/
|
|
31
|
-
"require": "./lib/cjs/presentation-hierarchies.js"
|
|
29
|
+
"import": "./lib/presentation-hierarchies.js"
|
|
32
30
|
},
|
|
33
31
|
"./package.json": "./package.json"
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {
|
|
36
|
-
"@itwin/core-bentley": "^5.
|
|
37
|
-
"@itwin/core-common": "^5.
|
|
38
|
-
"@itwin/core-geometry": "^5.
|
|
39
|
-
"natural-compare-lite": "^1.4.
|
|
34
|
+
"@itwin/core-bentley": "^5.13.1",
|
|
35
|
+
"@itwin/core-common": "^5.13.1",
|
|
36
|
+
"@itwin/core-geometry": "^5.13.1",
|
|
37
|
+
"natural-compare-lite": "^1.4.1",
|
|
40
38
|
"rxjs": "^7.8.2",
|
|
41
|
-
"@itwin/presentation-shared": "2.0.0-alpha.
|
|
39
|
+
"@itwin/presentation-shared": "2.0.0-alpha.13"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
|
-
"@itwin/build-tools": "^5.
|
|
42
|
+
"@itwin/build-tools": "^5.13.1",
|
|
45
43
|
"@itwin/eslint-plugin": "^6.1.0",
|
|
46
44
|
"@types/natural-compare-lite": "^1.4.2",
|
|
47
|
-
"@types/node": "^24.13.
|
|
48
|
-
"@
|
|
45
|
+
"@types/node": "^24.13.4",
|
|
46
|
+
"@typescript/native": "npm:typescript@~7.0.2",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
49
48
|
"cpx2": "^7.0.2",
|
|
50
|
-
"eslint": "^9.39.
|
|
49
|
+
"eslint": "^9.39.5",
|
|
51
50
|
"rimraf": "^6.1.3",
|
|
52
|
-
"typescript": "
|
|
53
|
-
"vitest": "^4.1.
|
|
51
|
+
"typescript": "npm:@typescript/typescript6@~6.0.2",
|
|
52
|
+
"vitest": "^4.1.11",
|
|
54
53
|
"presentation-test-utilities": "0.0.1"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
|
-
"build": "npm run -s typecheck && npm run -s build:
|
|
58
|
-
"build:
|
|
59
|
-
"build:esm": "tsc -p tsconfig.esm.json",
|
|
56
|
+
"build": "npm run -s typecheck && npm run -s build:lib",
|
|
57
|
+
"build:lib": "tsc -p tsconfig.lib.json",
|
|
60
58
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
61
59
|
"clean": "rimraf lib",
|
|
62
60
|
"cover": "vitest run --coverage",
|
|
63
61
|
"lint": "eslint \"./src/**/*.ts\"",
|
|
64
62
|
"test": "vitest run",
|
|
65
63
|
"test:watch": "vitest",
|
|
66
|
-
"extract-api": "betools extract-api --entry=lib/
|
|
64
|
+
"extract-api": "betools extract-api --entry=lib/presentation-hierarchies --apiReportFolder=./api --apiReportTempFolder=./api/temp --apiSummaryFolder=./api --includeUnexportedApis",
|
|
67
65
|
"check-internal": "node ../../scripts/checkInternal.js --apiSummary ./api/presentation-hierarchies.api.md",
|
|
68
66
|
"update-extractions": "node ../../scripts/updateExtractions.js --targets=./README.md,./learning",
|
|
69
67
|
"check-extractions": "node ../../scripts/updateExtractions.js --targets=./README.md,./learning --check",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyErrors.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;aACZ,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAGjD"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.RowsLimitExceededError = void 0;
|
|
8
|
-
/**
|
|
9
|
-
* Error that is thrown when rows amount exceed hierarchy level limit.
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
class RowsLimitExceededError extends Error {
|
|
13
|
-
limit;
|
|
14
|
-
constructor(limit) {
|
|
15
|
-
super(`Query rows limit of ${limit} exceeded`);
|
|
16
|
-
this.limit = limit;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.RowsLimitExceededError = RowsLimitExceededError;
|
|
20
|
-
//# sourceMappingURL=HierarchyErrors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyErrors.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IACZ;IAAnC,YAAmC,KAAa;QAC9C,KAAK,CAAC,uBAAuB,KAAK,WAAW,CAAC,CAAC;QADd,UAAK,GAAL,KAAK,CAAQ;IAEhD,CAAC;CACF;AAJD,wDAIC","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\n/**\n * Error that is thrown when rows amount exceed hierarchy level limit.\n * @public\n */\nexport class RowsLimitExceededError extends Error {\n public constructor(public readonly limit: number) {\n super(`Query rows limit of ${limit} exceeded`);\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyMerge.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAC;AASvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,UAAU,4BAA4B;IACpC,kCAAkC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,GACV,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAyCrF"}
|