@itwin/presentation-hierarchies 0.5.0 → 0.7.0
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 +122 -0
- package/README.md +46 -49
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +64 -0
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -0
- package/lib/cjs/hierarchies/HierarchyFiltering.js +80 -0
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -0
- package/lib/cjs/hierarchies/HierarchyNode.d.ts +29 -233
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +25 -8
- package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +7 -11
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +9 -8
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +31 -6
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js +26 -23
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts +24 -89
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +24 -382
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/FilteringHierarchyDefinition.d.ts +9 -9
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/FilteringHierarchyDefinition.js +35 -73
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +18 -0
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal/ChildNodeObservablesCache.js → imodel/HierarchyCache.js} +4 -4
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +121 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +21 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +234 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +29 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +77 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +428 -0
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{LimitingECSqlQueryExecutor.js → imodel/LimitingECSqlQueryExecutor.js} +3 -3
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
- package/lib/{esm/hierarchies → cjs/hierarchies/imodel}/NodeSelectQueryFactory.d.ts +4 -3
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{NodeSelectQueryFactory.js → imodel/NodeSelectQueryFactory.js} +37 -11
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +140 -0
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{HierarchyDefinition.js → imodel/PredicateBasedHierarchyDefinition.js} +26 -36
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/TreeNodesReader.d.ts +6 -6
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/TreeNodesReader.js +2 -2
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/Utils.d.ts +4 -0
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/Utils.js +59 -0
- package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/DetermineChildren.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/DetermineChildren.js +3 -3
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/Grouping.d.ts +2 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/Grouping.js +5 -5
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/HideIfNoChildren.js +5 -5
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/HideNodesInHierarchy.js +22 -9
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/BaseClassGrouping.d.ts +2 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/ClassGrouping.d.ts +2 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.js +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
- package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/PropertiesGrouping.d.ts +2 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/PropertiesGrouping.js +10 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
- package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/Shared.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
- package/lib/cjs/hierarchies/internal/Common.d.ts +7 -4
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +0 -66
- package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts +3 -2
- package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/cjs/presentation-hierarchies.d.ts +10 -6
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js +18 -10
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts +64 -0
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -0
- package/lib/esm/hierarchies/HierarchyFiltering.js +76 -0
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -0
- package/lib/esm/hierarchies/HierarchyNode.d.ts +29 -233
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.js +24 -7
- package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +7 -11
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js +9 -8
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts +31 -6
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js +26 -23
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts +24 -89
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js +25 -383
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/FilteringHierarchyDefinition.d.ts +9 -9
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/FilteringHierarchyDefinition.js +36 -74
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -0
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +18 -0
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal/ChildNodeObservablesCache.js → imodel/HierarchyCache.js} +2 -2
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +121 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js +18 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +234 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js +26 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +77 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +425 -0
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
- package/lib/esm/hierarchies/{LimitingECSqlQueryExecutor.js → imodel/LimitingECSqlQueryExecutor.js} +3 -3
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
- package/lib/{cjs/hierarchies → esm/hierarchies/imodel}/NodeSelectQueryFactory.d.ts +4 -3
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
- package/lib/esm/hierarchies/{NodeSelectQueryFactory.js → imodel/NodeSelectQueryFactory.js} +38 -12
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +140 -0
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
- package/lib/esm/hierarchies/{HierarchyDefinition.js → imodel/PredicateBasedHierarchyDefinition.js} +25 -34
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/TreeNodesReader.d.ts +6 -6
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/TreeNodesReader.js +2 -2
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -0
- package/lib/esm/hierarchies/imodel/Utils.d.ts +4 -0
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/Utils.js +56 -0
- package/lib/esm/hierarchies/imodel/Utils.js.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/DetermineChildren.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/DetermineChildren.js +3 -3
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/Grouping.d.ts +2 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/Grouping.js +6 -6
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/HideIfNoChildren.js +5 -5
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/HideNodesInHierarchy.js +22 -9
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/BaseClassGrouping.d.ts +2 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/ClassGrouping.d.ts +2 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.js +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
- package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/PropertiesGrouping.d.ts +2 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/PropertiesGrouping.js +12 -7
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
- package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/Shared.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
- package/lib/esm/hierarchies/internal/Common.d.ts +7 -4
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +0 -65
- package/lib/esm/hierarchies/internal/Common.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +3 -2
- package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/esm/presentation-hierarchies.d.ts +10 -6
- package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.js +8 -4
- package/lib/esm/presentation-hierarchies.js.map +1 -1
- package/package.json +8 -7
- package/lib/cjs/hierarchies/HierarchyDefinition.d.ts +0 -251
- package/lib/cjs/hierarchies/HierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/HierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +0 -1
- package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.js.map +0 -1
- package/lib/cjs/hierarchies/NodeSelectQueryFactory.d.ts.map +0 -1
- package/lib/cjs/hierarchies/NodeSelectQueryFactory.js.map +0 -1
- package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts +0 -40
- package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.js.map +0 -1
- package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.js.map +0 -1
- package/lib/cjs/hierarchies/internal/TreeNodesReader.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/TreeNodesReader.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/DetermineChildren.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/DetermineChildren.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Grouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/Grouping.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/Shared.d.ts.map +0 -1
- package/lib/cjs/hierarchies/internal/operators/grouping/Shared.js.map +0 -1
- package/lib/esm/hierarchies/HierarchyDefinition.d.ts +0 -251
- package/lib/esm/hierarchies/HierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/HierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +0 -1
- package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.js.map +0 -1
- package/lib/esm/hierarchies/NodeSelectQueryFactory.d.ts.map +0 -1
- package/lib/esm/hierarchies/NodeSelectQueryFactory.js.map +0 -1
- package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts +0 -40
- package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.js.map +0 -1
- package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.js.map +0 -1
- package/lib/esm/hierarchies/internal/TreeNodesReader.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/TreeNodesReader.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/DetermineChildren.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/DetermineChildren.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Grouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/Grouping.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/Shared.d.ts.map +0 -1
- package/lib/esm/hierarchies/internal/operators/grouping/Shared.js.map +0 -1
- /package/lib/cjs/hierarchies/{LimitingECSqlQueryExecutor.d.ts → imodel/LimitingECSqlQueryExecutor.d.ts} +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.d.ts +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.js +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/BaseClassGrouping.js +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/ClassGrouping.js +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.d.ts +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.js +0 -0
- /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/Shared.js +0 -0
- /package/lib/esm/hierarchies/{LimitingECSqlQueryExecutor.d.ts → imodel/LimitingECSqlQueryExecutor.d.ts} +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.d.ts +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.js +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/BaseClassGrouping.js +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/ClassGrouping.js +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.d.ts +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.js +0 -0
- /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/Shared.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertiesGrouping.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/PropertiesGrouping.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAmDhG,oDAqKC;AA+ED,oEAyDC;AAqCD,8DAaC;AAGD,sCAwBC;AAGD,4EAYC;AA1bD,sDAA6C;AAC7C,oEAUoC;AACpC,0DAA4E;AAC5E,gEAAsF;AAmCtF,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACxC,YAA8C,EAC9C,mBAA8D,EAC9D,qBAAwC,EACxC,cAAwC,EACxC,gBAAoD,EACpD,uBAAkD;IAElD,IAAI,mBAAgG,CAAC;IACrG,MAAM,0BAA0B,GAAG,GAAG,EAAE;QACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,mB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C,QAAQ,EAAE,EAAE,CACzB,OAAO,CAAC,IAAI,CACV,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAChJ,CACF;QACD,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CACzB,OAAO,CAAC,IAAI,CACV,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAChJ,CACF,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,gCAAgC,CACpD,YAA0D,EAC1D,UAA2C,EAC3C,KAAuC,EACvC,cAAwC,EACxC,gBAAoD;IAEpD,MAAM,mBAAmB,GAAG,MAAM,4BAA4B,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO,mBAAmB,CAAC,GAAG,CAC5B,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,EAAE,CAC5D,oBAAoB,CAAC,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,CAAC,CACxH,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 { assert } from \"@itwin/core-bentley\";\nimport {\n ArrayElement,\n createMainThreadReleaseOnTimePassedHandler,\n EC,\n ECClassHierarchyInspector,\n ECSchemaProvider,\n formatConcatenatedValue,\n getClass,\n IPrimitiveValueFormatter,\n TypedPrimitiveValue,\n} from \"@itwin/presentation-shared\";\nimport { HierarchyNode, ParentHierarchyNode } from \"../../../HierarchyNode\";\nimport { HierarchyNodeKey, PropertyGroupingNodeKey } from \"../../../HierarchyNodeKey\";\nimport {\n HierarchyNodePropertiesGroupingParams,\n HierarchyNodePropertyGroup,\n HierarchyNodePropertyValueRange,\n ProcessedInstanceHierarchyNode,\n} from \"../../IModelHierarchyNode\";\nimport { GroupingHandler, GroupingHandlerResult, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping\";\n\ninterface DisplayablePropertyGroupingInfo {\n label: string;\n propertyGroupingNodeKey: PropertyGroupingNodeKey;\n}\n\ninterface PropertyGroupingInformation {\n ungrouped: ProcessedInstanceHierarchyNode[];\n grouped: Map<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>;\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<{ propertiesClassName: string; propertyName: string; isRange?: boolean }>;\n\n/** @internal */\nexport async function createPropertyGroups(\n nodesToGroup: ProcessedInstanceHierarchyNode[],\n nodesAlreadyGrouped: ProcessedInstancesGroupingHierarchyNode[],\n handlerGroupingParams: PropertyGroupInfo,\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n classHierarchyInspector: ECClassHierarchyInspector,\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: {\n type: \"property-grouping:other\" as const,\n properties: [],\n },\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 (!(await shouldCreatePropertyGroup(handlerGroupingParams, byProperties, node.key.instanceKeys[0].className, classHierarchyInspector))) {\n groupings.ungrouped.push(node);\n continue;\n }\n const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n const propertyIdentifier = {\n propertyName: currentProperty.propertyName,\n propertyClassName: byProperties.propertiesClassName,\n };\n\n const propertyClass = handlerGroupingParams.ecClass;\n const property = await propertyClass.getProperty(currentProperty.propertyName);\n\n if (!property?.isNavigation() && (!property?.isPrimitive() || property.primitiveType === \"Binary\" || property.primitiveType === \"IGeometry\")) {\n groupings.ungrouped.push(node);\n continue;\n }\n\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 `${currentProperty.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 = (await property.kindOfQuantity)?.fullName;\n if (currentProperty.ranges) {\n if (typeof currentProperty.propertyValue === \"number\") {\n const propValue = currentProperty.propertyValue;\n const matchingRange = currentProperty.ranges.find((range) => propValue >= range.fromValue && propValue <= range.toValue);\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 = matchingRange.rangeLabel ?? `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.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) => 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(TypedPrimitiveValue.create(currentProperty.propertyValue, primitiveType, koqName, extendedTypeName));\n\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.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<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>,\n mapKey: string,\n propertyToAdd: DisplayablePropertyGroupingInfo,\n node: ProcessedInstanceHierarchyNode,\n): void {\n let groupingInfo = groupingMap.get(mapKey);\n if (!groupingInfo) {\n groupingInfo = {\n displayablePropertyGroupingInfo: propertyToAdd,\n groupedNodes: [node],\n };\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(node: ParentHierarchyNode): 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 if (HierarchyNodeKey.isPropertyOtherValuesGrouping(key)) {\n return (x) => key.properties.some((p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange);\n }\n if (HierarchyNodeKey.isPropertyValueRangeGrouping(key)) {\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n }\n // istanbul ignore else\n if (HierarchyNodeKey.isPropertyValueGrouping(key)) {\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n }\n // https://github.com/microsoft/TypeScript/issues/21985\n // istanbul ignore next\n return ((x: never) => x)(key);\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 for (const node of nodes) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n continue;\n }\n\n let propertyGroupIndex = 0;\n const previousPropertiesInfo = new Array<{ propertyGroup: HierarchyNodePropertyGroup; propertyGroupKey: string }>();\n for (const propertyGroup of byProperties.propertyGroups) {\n const mapKeyRanges = getRangesAsString(propertyGroup.ranges);\n const lastKey = previousPropertiesInfo.length > 0 ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey : \"\";\n const propertyGroupKey = `${lastKey}:${propertyGroup.propertyName}(${mapKeyRanges})`;\n const mapKey = `${byProperties.propertiesClassName}:${propertyGroupKey}`;\n\n let isAlreadyGrouped = false;\n if (!isAlreadyGrouped && parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {\n const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];\n isAlreadyGrouped = groupMatcher({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: propertyGroup.propertyName,\n isRange: !!propertyGroup.ranges,\n });\n }\n if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {\n uniqueProperties.set(mapKey, {\n ecClass: await getClass(schemaProvider, byProperties.propertiesClassName),\n propertyGroup: {\n propertyName: propertyGroup.propertyName,\n ranges: propertyGroup.ranges,\n },\n previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: groupingInfo.propertyGroup.propertyName,\n isRange: !!groupingInfo.propertyGroup.ranges,\n })),\n });\n }\n\n previousPropertiesInfo.push({\n propertyGroup,\n propertyGroupKey,\n });\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((lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length);\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: string,\n classHierarchyInspector: ECClassHierarchyInspector,\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 = 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(ranges1: HierarchyNodePropertyValueRange[] | undefined, ranges2: HierarchyNodePropertyValueRange[] | undefined): 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) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n ) &&\n ranges2.every((lhsRange) =>\n ranges1.some(\n (rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n )\n );\n}\n\n/** @internal */\nexport async function createPropertiesGroupingHandlers(\n imodelAccess: ECSchemaProvider & ECClassHierarchyInspector,\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(nodesToGroup, nodesAlreadyGrouped, propertyInfo, valueFormatter, localizedStrings, imodelAccess),\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HierarchyNodeGroupingParamsBase } from "
|
|
1
|
+
import { HierarchyNodeGroupingParamsBase } from "../../IModelHierarchyNode";
|
|
2
2
|
import { GroupingType, ProcessedInstancesGroupingHierarchyNode } from "../Grouping";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export declare function iterateChildNodeGroupingParams(parentNode: ProcessedInstancesGroupingHierarchyNode, groupingType: GroupingType, cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAyC,MAAM,2B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,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 { HierarchyNodeGroupingParamsBase, InstanceHierarchyNodeProcessingParams } from \"../../IModelHierarchyNode\";\nimport { GroupingType, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping\";\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\" ? params.grouping.byLabel : 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"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConcatenatedValue } from "@itwin/presentation-shared";
|
|
2
|
+
import { HierarchyNodeKey } from "../HierarchyNodeKey";
|
|
2
3
|
/**
|
|
3
4
|
* This is a logging namespace for public log messages that may be interesting to consumers.
|
|
4
5
|
* @internal
|
|
@@ -24,9 +25,11 @@ export declare const LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = "Presentation.Hier
|
|
|
24
25
|
/** @internal */
|
|
25
26
|
export declare function createOperatorLoggingNamespace(operatorName: string, baseCategory?: typeof LOGGING_NAMESPACE | typeof LOGGING_NAMESPACE_PERFORMANCE | typeof LOGGING_NAMESPACE_INTERNAL | typeof LOGGING_NAMESPACE_PERFORMANCE_INTERNAL): string;
|
|
26
27
|
/** @internal */
|
|
27
|
-
export declare function createNodeIdentifierForLogging(node:
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
export declare function createNodeIdentifierForLogging(node: {
|
|
29
|
+
label: string | ConcatenatedValue;
|
|
30
|
+
key: HierarchyNodeKey;
|
|
31
|
+
parentKeys?: HierarchyNodeKey[];
|
|
32
|
+
} | undefined): string;
|
|
30
33
|
/** @internal */
|
|
31
34
|
export declare function hasChildren<TNode extends {
|
|
32
35
|
children?: boolean | Array<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;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,GACR,OAAO,iBAAiB,GACxB,OAAO,6BAA6B,GACpC,OAAO,0BAA0B,GACjC,OAAO,sCAA0D,UAGtE;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,UAQhH;AAED,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,CAAA;CAAE,EAAE,QAAQ,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,GAAG,MAAM,CAEhJ"}
|
|
@@ -10,12 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = exports.LOGGING_NAMESPACE_INTERNAL = exports.LOGGING_NAMESPACE_PERFORMANCE = exports.LOGGING_NAMESPACE = void 0;
|
|
11
11
|
exports.createOperatorLoggingNamespace = createOperatorLoggingNamespace;
|
|
12
12
|
exports.createNodeIdentifierForLogging = createNodeIdentifierForLogging;
|
|
13
|
-
exports.mergeNodes = mergeNodes;
|
|
14
13
|
exports.hasChildren = hasChildren;
|
|
15
14
|
exports.compareNodesByLabel = compareNodesByLabel;
|
|
16
15
|
const natural_compare_lite_1 = __importDefault(require("natural-compare-lite"));
|
|
17
|
-
const core_bentley_1 = require("@itwin/core-bentley");
|
|
18
|
-
const HierarchyNodeKey_1 = require("../HierarchyNodeKey");
|
|
19
16
|
/**
|
|
20
17
|
* This is a logging namespace for public log messages that may be interesting to consumers.
|
|
21
18
|
* @internal
|
|
@@ -52,69 +49,6 @@ function createNodeIdentifierForLogging(node) {
|
|
|
52
49
|
const parentKeys = "parentKeys" in node ? node.parentKeys : "<unknown>";
|
|
53
50
|
return JSON.stringify({ label, key, parentKeys });
|
|
54
51
|
}
|
|
55
|
-
function mergeNodeHandlingParams(lhs, rhs) {
|
|
56
|
-
if (!lhs && !rhs) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
const params = {
|
|
60
|
-
...(lhs?.hideIfNoChildren || rhs?.hideIfNoChildren ? { hideIfNoChildren: true } : undefined),
|
|
61
|
-
...(lhs?.hideInHierarchy || rhs?.hideInHierarchy ? { hideInHierarchy: true } : undefined),
|
|
62
|
-
...mergeByLabelParams(lhs?.grouping?.byLabel, rhs?.grouping?.byLabel),
|
|
63
|
-
};
|
|
64
|
-
return Object.keys(params).length > 0 ? params : undefined;
|
|
65
|
-
}
|
|
66
|
-
function mergeByLabelParams(lhs, rhs) {
|
|
67
|
-
if (lhs && typeof lhs === "object" && lhs.action === "merge" && rhs && typeof rhs === "object" && rhs.action === "merge" && lhs.groupId === rhs.groupId) {
|
|
68
|
-
return {
|
|
69
|
-
grouping: { byLabel: lhs },
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return undefined;
|
|
73
|
-
}
|
|
74
|
-
function mergeNodeKeys(lhs, rhs) {
|
|
75
|
-
if (HierarchyNodeKey_1.HierarchyNodeKey.isCustom(lhs)) {
|
|
76
|
-
(0, core_bentley_1.assert)(HierarchyNodeKey_1.HierarchyNodeKey.isCustom(rhs));
|
|
77
|
-
return lhs === rhs ? lhs : `${lhs}+${rhs}`;
|
|
78
|
-
}
|
|
79
|
-
// istanbul ignore else
|
|
80
|
-
if (HierarchyNodeKey_1.HierarchyNodeKey.isInstances(lhs)) {
|
|
81
|
-
(0, core_bentley_1.assert)(HierarchyNodeKey_1.HierarchyNodeKey.isInstances(rhs));
|
|
82
|
-
return { type: "instances", instanceKeys: [...lhs.instanceKeys, ...rhs.instanceKeys] };
|
|
83
|
-
}
|
|
84
|
-
// https://github.com/microsoft/TypeScript/issues/21985
|
|
85
|
-
// istanbul ignore next
|
|
86
|
-
return ((x) => x)(lhs);
|
|
87
|
-
}
|
|
88
|
-
function mergeParentNodeKeys(lhsKeys, rhsKeys) {
|
|
89
|
-
const res = new Array();
|
|
90
|
-
for (let i = 0; i < lhsKeys.length && i < rhsKeys.length; ++i) {
|
|
91
|
-
if (!HierarchyNodeKey_1.HierarchyNodeKey.equals(lhsKeys[i], rhsKeys[i])) {
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
res.push(lhsKeys[i]);
|
|
95
|
-
}
|
|
96
|
-
return res;
|
|
97
|
-
}
|
|
98
|
-
/** @internal */
|
|
99
|
-
function mergeNodes(lhs, rhs) {
|
|
100
|
-
(0, core_bentley_1.assert)(typeof lhs.key === typeof rhs.key);
|
|
101
|
-
const mergedProcessingParams = mergeNodeHandlingParams(lhs.processingParams, rhs.processingParams);
|
|
102
|
-
const mergedChildren = lhs.children === true || rhs.children === true ? true : lhs.children === false && rhs.children === false ? false : undefined;
|
|
103
|
-
const mergedNode = {
|
|
104
|
-
...lhs,
|
|
105
|
-
...rhs,
|
|
106
|
-
label: lhs.label,
|
|
107
|
-
key: mergeNodeKeys(lhs.key, rhs.key),
|
|
108
|
-
parentKeys: mergeParentNodeKeys(lhs.parentKeys, rhs.parentKeys),
|
|
109
|
-
};
|
|
110
|
-
// Remove specific properties or change their values based on lhs and rhs nodes
|
|
111
|
-
mergedChildren !== undefined ? (mergedNode.children = mergedChildren) : delete mergedNode.children;
|
|
112
|
-
mergedProcessingParams ? (mergedNode.processingParams = mergedProcessingParams) : delete mergedNode.processingParams;
|
|
113
|
-
lhs.autoExpand || rhs.autoExpand ? (mergedNode.autoExpand = true) : delete mergedNode.autoExpand;
|
|
114
|
-
lhs.extendedData || rhs.extendedData ? (mergedNode.extendedData = { ...lhs.extendedData, ...rhs.extendedData }) : delete mergedNode.extendedData;
|
|
115
|
-
lhs.supportsFiltering && rhs.supportsFiltering ? (mergedNode.supportsFiltering = true) : delete mergedNode.supportsFiltering;
|
|
116
|
-
return mergedNode;
|
|
117
|
-
}
|
|
118
52
|
/** @internal */
|
|
119
53
|
function hasChildren(node) {
|
|
120
54
|
return node.children === true || (Array.isArray(node.children) && node.children.length > 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;AA0ChG,wEASC;AAID,wEAOC;AAwDD,gCAkBC;AAGD,kCAEC;AAGD,kDAEC;AAhJD,gFAAkD;AAClD,sDAA6C;AAU7C,0DAAyE;AAEzE;;;GAGG;AACU,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAE5D;;;GAGG;AACU,QAAA,6BAA6B,GAAG,GAAG,yBAAiB,cAAc,CAAC;AAEhF;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E;;;;GAIG;AACU,QAAA,sCAAsC,GAAG,GAAG,kCAA0B,cAAc,CAAC;AAElG,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,YAAoB,EACpB,eAIoD,yBAAiB;IAErE,OAAO,GAAG,YAAY,cAAc,YAAY,EAAE,CAAC;AACrD,CAAC;AAED,gBAAgB;AAChB,uBAAuB;AACvB,SAAgB,8BAA8B,CAAC,IAA2E;IACxH,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACxE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,uBAAuB,CAC9B,GAAsD,EACtD,GAAsD;IAEtD,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CA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G,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,UAAU,CAAC,iBAAiB,CAAC;IAC7H,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,gBAAgB;AAChB,SAAgB,WAAW,CAAwD,IAAW;IAC5F,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,gBAAgB;AAChB,SAAgB,mBAAmB,CAAyE,GAAa,EAAE,GAAa;IACtI,OAAO,IAAA,8BAAc,EAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACtF,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 naturalCompare from \"natural-compare-lite\";\nimport { assert } from \"@itwin/core-bentley\";\nimport {\n HierarchyNode,\n HierarchyNodeLabelGroupingParams,\n InstanceHierarchyNodeProcessingParams,\n ParentHierarchyNode,\n ParsedHierarchyNode,\n ProcessedCustomHierarchyNode,\n ProcessedInstanceHierarchyNode,\n} from \"../HierarchyNode\";\nimport { HierarchyNodeKey, InstancesNodeKey } from \"../HierarchyNodeKey\";\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 = LOGGING_NAMESPACE,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n// istanbul ignore next\nexport function createNodeIdentifierForLogging(node: ParentHierarchyNode | HierarchyNode | ParsedHierarchyNode | undefined) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n return JSON.stringify({ label, key, parentKeys });\n}\n\nfunction mergeNodeHandlingParams(\n lhs: InstanceHierarchyNodeProcessingParams | undefined,\n rhs: InstanceHierarchyNodeProcessingParams | undefined,\n): InstanceHierarchyNodeProcessingParams | undefined {\n if (!lhs && !rhs) {\n return undefined;\n }\n const params = {\n ...(lhs?.hideIfNoChildren || rhs?.hideIfNoChildren ? { hideIfNoChildren: true } : undefined),\n ...(lhs?.hideInHierarchy || rhs?.hideInHierarchy ? { hideInHierarchy: true } : undefined),\n ...mergeByLabelParams(lhs?.grouping?.byLabel, rhs?.grouping?.byLabel),\n };\n return Object.keys(params).length > 0 ? params : undefined;\n}\n\nfunction mergeByLabelParams(\n lhs: HierarchyNodeLabelGroupingParams | undefined,\n rhs: HierarchyNodeLabelGroupingParams | undefined,\n): InstanceHierarchyNodeProcessingParams | undefined {\n if (lhs && typeof lhs === \"object\" && lhs.action === \"merge\" && rhs && typeof rhs === \"object\" && rhs.action === \"merge\" && lhs.groupId === rhs.groupId) {\n return {\n grouping: { byLabel: lhs },\n };\n }\n return undefined;\n}\n\nfunction mergeNodeKeys<TKey extends string | InstancesNodeKey>(lhs: TKey, rhs: TKey): TKey {\n if (HierarchyNodeKey.isCustom(lhs)) {\n assert(HierarchyNodeKey.isCustom(rhs));\n return lhs === rhs ? lhs : (`${lhs}+${rhs}` as TKey);\n }\n // istanbul ignore else\n if (HierarchyNodeKey.isInstances(lhs)) {\n assert(HierarchyNodeKey.isInstances(rhs));\n return { type: \"instances\", instanceKeys: [...lhs.instanceKeys, ...rhs.instanceKeys] } as TKey;\n }\n // https://github.com/microsoft/TypeScript/issues/21985\n // istanbul ignore next\n return ((x: never) => x)(lhs);\n}\n\nfunction mergeParentNodeKeys(lhsKeys: HierarchyNodeKey[], rhsKeys: HierarchyNodeKey[]): HierarchyNodeKey[] {\n const res = new Array<HierarchyNodeKey>();\n for (let i = 0; i < lhsKeys.length && i < rhsKeys.length; ++i) {\n if (!HierarchyNodeKey.equals(lhsKeys[i], rhsKeys[i])) {\n break;\n }\n res.push(lhsKeys[i]);\n }\n return res;\n}\n\n/** @internal */\nexport function mergeNodes<TNode extends ProcessedCustomHierarchyNode | ProcessedInstanceHierarchyNode>(lhs: TNode, rhs: TNode): TNode {\n assert(typeof lhs.key === typeof rhs.key);\n const mergedProcessingParams = mergeNodeHandlingParams(lhs.processingParams, rhs.processingParams);\n const mergedChildren = lhs.children === true || rhs.children === true ? true : lhs.children === false && rhs.children === false ? false : undefined;\n const mergedNode = {\n ...lhs,\n ...rhs,\n label: lhs.label,\n key: mergeNodeKeys(lhs.key, rhs.key),\n parentKeys: mergeParentNodeKeys(lhs.parentKeys, rhs.parentKeys),\n } as TNode;\n // Remove specific properties or change their values based on lhs and rhs nodes\n mergedChildren !== undefined ? (mergedNode.children = mergedChildren) : delete mergedNode.children;\n mergedProcessingParams ? (mergedNode.processingParams = mergedProcessingParams) : delete mergedNode.processingParams;\n lhs.autoExpand || rhs.autoExpand ? (mergedNode.autoExpand = true) : delete mergedNode.autoExpand;\n lhs.extendedData || rhs.extendedData ? (mergedNode.extendedData = { ...lhs.extendedData, ...rhs.extendedData }) : delete mergedNode.extendedData;\n lhs.supportsFiltering && rhs.supportsFiltering ? (mergedNode.supportsFiltering = true) : delete mergedNode.supportsFiltering;\n return mergedNode;\n}\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 }>(lhs: TLhsNode, rhs: TRhsNode): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;AAiChG,wEASC;AAID,wEASC;AAGD,kCAEC;AAGD,kDAEC;AA/DD,gFAAkD;AAIlD;;;GAGG;AACU,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAE5D;;;GAGG;AACU,QAAA,6BAA6B,GAAG,GAAG,yBAAiB,cAAc,CAAC;AAEhF;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E;;;;GAIG;AACU,QAAA,sCAAsC,GAAG,GAAG,kCAA0B,cAAc,CAAC;AAElG,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,YAAoB,EACpB,eAIoD,yBAAiB;IAErE,OAAO,GAAG,YAAY,cAAc,YAAY,EAAE,CAAC;AACrD,CAAC;AAED,gBAAgB;AAChB,uBAAuB;AACvB,SAAgB,8BAA8B,CAC5C,IAA+G;IAE/G,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACxE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,gBAAgB;AAChB,SAAgB,WAAW,CAAwD,IAAW;IAC5F,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,gBAAgB;AAChB,SAAgB,mBAAmB,CAAyE,GAAa,EAAE,GAAa;IACtI,OAAO,IAAA,8BAAc,EAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACtF,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 naturalCompare from \"natural-compare-lite\";\nimport { ConcatenatedValue } from \"@itwin/presentation-shared\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey\";\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 = LOGGING_NAMESPACE,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n// istanbul ignore next\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 return JSON.stringify({ label, key, parentKeys });\n}\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 }>(lhs: TLhsNode, rhs: TRhsNode): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { ProcessedHierarchyNode } from "../../HierarchyNode";
|
|
3
2
|
/**
|
|
4
3
|
* This should accept sorting params in some form:
|
|
5
4
|
* - is sorting disabled?
|
|
@@ -8,5 +7,7 @@ import { ProcessedHierarchyNode } from "../../HierarchyNode";
|
|
|
8
7
|
* @note Nodes with same labels are returned in undefined order.
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
|
-
export declare function sortNodesByLabelOperator
|
|
10
|
+
export declare function sortNodesByLabelOperator<TNode extends {
|
|
11
|
+
label: string;
|
|
12
|
+
}>(nodes: Observable<TNode>): Observable<TNode>;
|
|
12
13
|
//# sourceMappingURL=Sorting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,UAAU,EAAU,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,UAAU,EAAU,MAAM,MAAM,CAAC;AAI1D;;;;;;;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;
|
|
1
|
+
{"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,4DAYC;AAxBD,+BAA0D;AAC1D,sDAAmE;AACnE,sCAAgD;AAEhD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAkC,KAAwB;IAChG,OAAO,KAAK,CAAC,IAAI,CACf,IAAA,aAAM,EACJ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,IAAI,0BAAW,CAAQ,4BAAmB,EAAE,8BAAe,CAAC,KAAK,CAAC,CACnE,EACD,IAAA,UAAG,EAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,EAChD,IAAA,gBAAS,GAAE,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, Observable, reduce } from \"rxjs\";\nimport { DuplicatePolicy, SortedArray } from \"@itwin/core-bentley\";\nimport { compareNodesByLabel } from \"../Common\";\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"]}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export { GenericInstanceFilter } from "@itwin/core-common";
|
|
2
|
-
export {
|
|
2
|
+
export { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, HierarchyNodesDefinition, NodeParser, NodePostProcessor, NodePreProcessor, } from "./hierarchies/imodel/IModelHierarchyDefinition";
|
|
3
|
+
export { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, createPredicateBasedHierarchyDefinition, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition";
|
|
4
|
+
export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor";
|
|
5
|
+
export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory";
|
|
6
|
+
export { createIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider";
|
|
7
|
+
export { SourceHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode";
|
|
3
8
|
export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors";
|
|
4
|
-
export { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode
|
|
9
|
+
export { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from "./hierarchies/HierarchyNode";
|
|
5
10
|
export { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from "./hierarchies/HierarchyNodeIdentifier";
|
|
6
|
-
export { GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey, ClassGroupingNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey,
|
|
7
|
-
export { GetHierarchyNodesProps, HierarchyProvider,
|
|
8
|
-
export {
|
|
11
|
+
export { GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey, ClassGroupingNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey, IModelHierarchyNodeKey, } from "./hierarchies/HierarchyNodeKey";
|
|
12
|
+
export { GetHierarchyNodesProps, HierarchyProvider, mergeProviders } from "./hierarchies/HierarchyProvider";
|
|
13
|
+
export { HierarchyFilteringPath, extractFilteringProps } from "./hierarchies/HierarchyFiltering";
|
|
9
14
|
export { getLogger, setLogger } from "./hierarchies/Logging";
|
|
10
|
-
export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/NodeSelectQueryFactory";
|
|
11
15
|
//# sourceMappingURL=presentation-hierarchies.d.ts.map
|
|
@@ -1 +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,OAAO,EACL,
|
|
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,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AAC/H,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAClJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAEvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.setLogger = exports.getLogger = exports.extractFilteringProps = exports.HierarchyFilteringPath = exports.mergeProviders = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.ProcessedHierarchyNode = exports.createIModelHierarchyProvider = exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.createLimitingECSqlQueryExecutor = exports.createPredicateBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
|
|
8
8
|
var core_common_1 = require("@itwin/core-common");
|
|
9
9
|
Object.defineProperty(exports, "GenericInstanceFilter", { enumerable: true, get: function () { return core_common_1.GenericInstanceFilter; } });
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "HierarchyNodesDefinition", { enumerable: true, get: function () { return
|
|
12
|
-
|
|
10
|
+
var IModelHierarchyDefinition_1 = require("./hierarchies/imodel/IModelHierarchyDefinition");
|
|
11
|
+
Object.defineProperty(exports, "HierarchyNodesDefinition", { enumerable: true, get: function () { return IModelHierarchyDefinition_1.HierarchyNodesDefinition; } });
|
|
12
|
+
var PredicateBasedHierarchyDefinition_1 = require("./hierarchies/imodel/PredicateBasedHierarchyDefinition");
|
|
13
|
+
Object.defineProperty(exports, "createPredicateBasedHierarchyDefinition", { enumerable: true, get: function () { return PredicateBasedHierarchyDefinition_1.createPredicateBasedHierarchyDefinition; } });
|
|
14
|
+
var LimitingECSqlQueryExecutor_1 = require("./hierarchies/imodel/LimitingECSqlQueryExecutor");
|
|
15
|
+
Object.defineProperty(exports, "createLimitingECSqlQueryExecutor", { enumerable: true, get: function () { return LimitingECSqlQueryExecutor_1.createLimitingECSqlQueryExecutor; } });
|
|
16
|
+
var NodeSelectQueryFactory_1 = require("./hierarchies/imodel/NodeSelectQueryFactory");
|
|
17
|
+
Object.defineProperty(exports, "NodeSelectClauseColumnNames", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.NodeSelectClauseColumnNames; } });
|
|
18
|
+
Object.defineProperty(exports, "createNodesQueryClauseFactory", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.createNodesQueryClauseFactory; } });
|
|
19
|
+
var IModelHierarchyProvider_1 = require("./hierarchies/imodel/IModelHierarchyProvider");
|
|
20
|
+
Object.defineProperty(exports, "createIModelHierarchyProvider", { enumerable: true, get: function () { return IModelHierarchyProvider_1.createIModelHierarchyProvider; } });
|
|
21
|
+
var IModelHierarchyNode_1 = require("./hierarchies/imodel/IModelHierarchyNode");
|
|
22
|
+
Object.defineProperty(exports, "ProcessedHierarchyNode", { enumerable: true, get: function () { return IModelHierarchyNode_1.ProcessedHierarchyNode; } });
|
|
13
23
|
var HierarchyErrors_1 = require("./hierarchies/HierarchyErrors");
|
|
14
24
|
Object.defineProperty(exports, "RowsLimitExceededError", { enumerable: true, get: function () { return HierarchyErrors_1.RowsLimitExceededError; } });
|
|
15
25
|
var HierarchyNode_1 = require("./hierarchies/HierarchyNode");
|
|
@@ -19,13 +29,11 @@ Object.defineProperty(exports, "HierarchyNodeIdentifier", { enumerable: true, ge
|
|
|
19
29
|
var HierarchyNodeKey_1 = require("./hierarchies/HierarchyNodeKey");
|
|
20
30
|
Object.defineProperty(exports, "HierarchyNodeKey", { enumerable: true, get: function () { return HierarchyNodeKey_1.HierarchyNodeKey; } });
|
|
21
31
|
var HierarchyProvider_1 = require("./hierarchies/HierarchyProvider");
|
|
22
|
-
Object.defineProperty(exports, "
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "mergeProviders", { enumerable: true, get: function () { return HierarchyProvider_1.mergeProviders; } });
|
|
33
|
+
var HierarchyFiltering_1 = require("./hierarchies/HierarchyFiltering");
|
|
34
|
+
Object.defineProperty(exports, "HierarchyFilteringPath", { enumerable: true, get: function () { return HierarchyFiltering_1.HierarchyFilteringPath; } });
|
|
35
|
+
Object.defineProperty(exports, "extractFilteringProps", { enumerable: true, get: function () { return HierarchyFiltering_1.extractFilteringProps; } });
|
|
25
36
|
var Logging_1 = require("./hierarchies/Logging");
|
|
26
37
|
Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return Logging_1.getLogger; } });
|
|
27
38
|
Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return Logging_1.setLogger; } });
|
|
28
|
-
var NodeSelectQueryFactory_1 = require("./hierarchies/NodeSelectQueryFactory");
|
|
29
|
-
Object.defineProperty(exports, "NodeSelectClauseColumnNames", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.NodeSelectClauseColumnNames; } });
|
|
30
|
-
Object.defineProperty(exports, "createNodesQueryClauseFactory", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.createNodesQueryClauseFactory; } });
|
|
31
39
|
//# sourceMappingURL=presentation-hierarchies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,
|
|
1
|
+
{"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,4FAQwD;AAJtD,qIAAA,wBAAwB,OAAA;AAK1B,4GAKgE;AAD9D,4JAAA,uCAAuC,OAAA;AAEzC,8FAA+H;AAA1F,8IAAA,gCAAgC,OAAA;AACrE,sFAAkJ;AAAzI,qIAAA,2BAA2B,OAAA;AAA2B,uIAAA,6BAA6B,OAAA;AAC5F,wFAA6F;AAApF,wIAAA,6BAA6B,OAAA;AACtC,gFAAuG;AAAzE,6HAAA,sBAAsB,OAAA;AAEpD,iEAAuE;AAA9D,yHAAA,sBAAsB,OAAA;AAC/B,6DAA6G;AAA7E,8GAAA,aAAa,OAAA;AAC7C,iFAA8G;AAArG,kIAAA,uBAAuB,OAAA;AAChC,mEAYwC;AATtC,oHAAA,gBAAgB,OAAA;AAUlB,qEAA4G;AAAxD,mHAAA,cAAc,OAAA;AAClE,uEAAiG;AAAxF,4HAAA,sBAAsB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AACtD,iDAA6D;AAApD,oGAAA,SAAS,OAAA;AAAE,oGAAA,SAAS,OAAA","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 {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n HierarchyNodesDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition\";\nexport {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n createPredicateBasedHierarchyDefinition,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition\";\nexport { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor\";\nexport { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory\";\nexport { createIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider\";\nexport { SourceHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier\";\nexport {\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey\";\nexport { GetHierarchyNodesProps, HierarchyProvider, mergeProviders } from \"./hierarchies/HierarchyProvider\";\nexport { HierarchyFilteringPath, extractFilteringProps } from \"./hierarchies/HierarchyFiltering\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging\";\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { NonGroupingHierarchyNode } from "./HierarchyNode";
|
|
2
|
+
import { HierarchyNodeIdentifiersPath } from "./HierarchyNodeIdentifier";
|
|
3
|
+
import { GroupingNodeKey } from "./HierarchyNodeKey";
|
|
4
|
+
/** @beta */
|
|
5
|
+
export interface FilterTargetGroupingNodeInfo {
|
|
6
|
+
/** Key of the grouping node. */
|
|
7
|
+
key: GroupingNodeKey;
|
|
8
|
+
/**
|
|
9
|
+
* Depth of the grouping node in the hierarchy.
|
|
10
|
+
* Generally, it can be retrieved from `parentKeys.length`.
|
|
11
|
+
*/
|
|
12
|
+
depth: number;
|
|
13
|
+
}
|
|
14
|
+
/** @beta */
|
|
15
|
+
export interface HierarchyFilteringPathOptions {
|
|
16
|
+
/**
|
|
17
|
+
* This option specifies the way `autoExpand` flag should be assigned to nodes in the filtered hierarchy.
|
|
18
|
+
* - If it's `false` or `undefined`, nodes have no 'autoExpand' flag.
|
|
19
|
+
* - If it's `true`, then all nodes up to the filter target will have `autoExpand` flag.
|
|
20
|
+
* - If it's an instance of `FilterTargetGroupingNodeInfo`, then all nodes up to the grouping node that matches this property,
|
|
21
|
+
* will have `autoExpand` flag.
|
|
22
|
+
*/
|
|
23
|
+
autoExpand?: boolean | FilterTargetGroupingNodeInfo;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A path of hierarchy node identifiers for filtering the hierarchy with additional options.
|
|
27
|
+
* @beta
|
|
28
|
+
*/
|
|
29
|
+
export type HierarchyFilteringPath = HierarchyNodeIdentifiersPath | {
|
|
30
|
+
path: HierarchyNodeIdentifiersPath;
|
|
31
|
+
options?: HierarchyFilteringPathOptions;
|
|
32
|
+
};
|
|
33
|
+
/** @beta */
|
|
34
|
+
export declare namespace HierarchyFilteringPath {
|
|
35
|
+
/**
|
|
36
|
+
* Normalizes the hierarchy filtering path to the object form.
|
|
37
|
+
* @beta
|
|
38
|
+
*/
|
|
39
|
+
function normalize(source: HierarchyFilteringPath): Exclude<HierarchyFilteringPath, HierarchyNodeIdentifiersPath>;
|
|
40
|
+
/**
|
|
41
|
+
* Merges two given `HierarchyFilteringPathOptions` objects.
|
|
42
|
+
* - if both inputs are `undefined`, `undefined` is returned,
|
|
43
|
+
* - else if one of the inputs is `undefined`, the other one is returned.
|
|
44
|
+
* - else, merge each option individually.
|
|
45
|
+
*
|
|
46
|
+
* For the `autoExpand` attribute, the merge chooses to auto-expand as deep as the deepest input:
|
|
47
|
+
* - if one of the inputs is `true`, return `true`,
|
|
48
|
+
* - else if both inputs are objects, return the one with the greater `depth` attribute.
|
|
49
|
+
* - else, return `false` or `undefined`.
|
|
50
|
+
*
|
|
51
|
+
* @beta
|
|
52
|
+
*/
|
|
53
|
+
function mergeOptions(lhs: HierarchyFilteringPathOptions | undefined, rhs: HierarchyFilteringPathOptions | undefined): HierarchyFilteringPathOptions | undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* An utility that extracts filtering properties from given root level filtering props or
|
|
57
|
+
* the parent node. Returns `undefined` if filtering props are not present.
|
|
58
|
+
* @beta
|
|
59
|
+
*/
|
|
60
|
+
export declare function extractFilteringProps(rootLevelFilteringProps: HierarchyFilteringPath[], parentNode: Pick<NonGroupingHierarchyNode, "filtering"> | undefined): {
|
|
61
|
+
filteredNodePaths: HierarchyFilteringPath[];
|
|
62
|
+
hasFilterTargetAncestor: boolean;
|
|
63
|
+
} | undefined;
|
|
64
|
+
//# sourceMappingURL=HierarchyFiltering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,YAAY;AACZ,MAAM,WAAW,4BAA4B;IAC3C,gCAAgC;IAChC,GAAG,EAAE,eAAe,CAAC;IAErB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,YAAY;AACZ,MAAM,WAAW,6BAA6B;IAC5C;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,4BAA4B,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG;IAAE,IAAI,EAAE,4BAA4B,CAAC;IAAC,OAAO,CAAC,EAAE,6BAA6B,CAAA;CAAE,CAAC;AACpJ,YAAY;AAEZ,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,SAAgB,SAAS,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAKvH;IAED;;;;;;;;;;;;OAYG;IACH,SAAgB,YAAY,CAC1B,GAAG,EAAE,6BAA6B,GAAG,SAAS,EAC9C,GAAG,EAAE,6BAA6B,GAAG,SAAS,GAC7C,6BAA6B,GAAG,SAAS,CAwB3C;CACF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,uBAAuB,EAAE,sBAAsB,EAAE,EACjD,UAAU,EAAE,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,GAAG,SAAS,GAEjE;IACE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,uBAAuB,EAAE,OAAO,CAAC;CAClC,GACD,SAAS,CAUZ"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @beta */
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
7
|
+
export var HierarchyFilteringPath;
|
|
8
|
+
(function (HierarchyFilteringPath) {
|
|
9
|
+
/**
|
|
10
|
+
* Normalizes the hierarchy filtering path to the object form.
|
|
11
|
+
* @beta
|
|
12
|
+
*/
|
|
13
|
+
function normalize(source) {
|
|
14
|
+
if (Array.isArray(source)) {
|
|
15
|
+
return { path: source, options: undefined };
|
|
16
|
+
}
|
|
17
|
+
return source;
|
|
18
|
+
}
|
|
19
|
+
HierarchyFilteringPath.normalize = normalize;
|
|
20
|
+
/**
|
|
21
|
+
* Merges two given `HierarchyFilteringPathOptions` objects.
|
|
22
|
+
* - if both inputs are `undefined`, `undefined` is returned,
|
|
23
|
+
* - else if one of the inputs is `undefined`, the other one is returned.
|
|
24
|
+
* - else, merge each option individually.
|
|
25
|
+
*
|
|
26
|
+
* For the `autoExpand` attribute, the merge chooses to auto-expand as deep as the deepest input:
|
|
27
|
+
* - if one of the inputs is `true`, return `true`,
|
|
28
|
+
* - else if both inputs are objects, return the one with the greater `depth` attribute.
|
|
29
|
+
* - else, return `false` or `undefined`.
|
|
30
|
+
*
|
|
31
|
+
* @beta
|
|
32
|
+
*/
|
|
33
|
+
function mergeOptions(lhs, rhs) {
|
|
34
|
+
// istanbul ignore next
|
|
35
|
+
if (!lhs && !rhs) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
// istanbul ignore next
|
|
39
|
+
if (!lhs) {
|
|
40
|
+
return rhs;
|
|
41
|
+
}
|
|
42
|
+
// istanbul ignore next
|
|
43
|
+
if (!rhs) {
|
|
44
|
+
return lhs;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
autoExpand: (() => {
|
|
48
|
+
if (rhs.autoExpand === true) {
|
|
49
|
+
return rhs.autoExpand;
|
|
50
|
+
}
|
|
51
|
+
if (typeof lhs.autoExpand === "object" && typeof rhs.autoExpand === "object" && rhs.autoExpand.depth > lhs.autoExpand.depth) {
|
|
52
|
+
return rhs.autoExpand;
|
|
53
|
+
}
|
|
54
|
+
return lhs.autoExpand;
|
|
55
|
+
})(),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
HierarchyFilteringPath.mergeOptions = mergeOptions;
|
|
59
|
+
})(HierarchyFilteringPath || (HierarchyFilteringPath = {}));
|
|
60
|
+
/**
|
|
61
|
+
* An utility that extracts filtering properties from given root level filtering props or
|
|
62
|
+
* the parent node. Returns `undefined` if filtering props are not present.
|
|
63
|
+
* @beta
|
|
64
|
+
*/
|
|
65
|
+
export function extractFilteringProps(rootLevelFilteringProps, parentNode) {
|
|
66
|
+
if (!parentNode) {
|
|
67
|
+
return { filteredNodePaths: rootLevelFilteringProps, hasFilterTargetAncestor: false };
|
|
68
|
+
}
|
|
69
|
+
return parentNode.filtering?.filteredChildrenIdentifierPaths
|
|
70
|
+
? {
|
|
71
|
+
filteredNodePaths: parentNode.filtering.filteredChildrenIdentifierPaths,
|
|
72
|
+
hasFilterTargetAncestor: !!parentNode.filtering.hasFilterTargetAncestor || !!parentNode.filtering.isFilterTarget,
|
|
73
|
+
}
|
|
74
|
+
: undefined;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=HierarchyFiltering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyFiltering.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAmChG,YAAY;AACZ,2DAA2D;AAC3D,MAAM,KAAW,sBAAsB,CAqDtC;AArDD,WAAiB,sBAAsB;IACrC;;;OAGG;IACH,SAAgB,SAAS,CAAC,MAA8B;QACtD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QAC9C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IALe,gCAAS,YAKxB,CAAA;IAED;;;;;;;;;;;;OAYG;IACH,SAAgB,YAAY,CAC1B,GAA8C,EAC9C,GAA8C;QAE9C,uBAAuB;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,uBAAuB;QACvB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,GAAG,CAAC;QACb,CAAC;QACD,uBAAuB;QACvB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO;YACL,UAAU,EAAE,CAAC,GAAgD,EAAE;gBAC7D,IAAI,GAAG,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;oBAC5B,OAAO,GAAG,CAAC,UAAU,CAAC;gBACxB,CAAC;gBACD,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;oBAC5H,OAAO,GAAG,CAAC,UAAU,CAAC;gBACxB,CAAC;gBACD,OAAO,GAAG,CAAC,UAAU,CAAC;YACxB,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IA3Be,mCAAY,eA2B3B,CAAA;AACH,CAAC,EArDgB,sBAAsB,KAAtB,sBAAsB,QAqDtC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,uBAAiD,EACjD,UAAmE;IAOnE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC;IACxF,CAAC;IACD,OAAO,UAAU,CAAC,SAAS,EAAE,+BAA+B;QAC1D,CAAC,CAAC;YACE,iBAAiB,EAAE,UAAU,CAAC,SAAS,CAAC,+BAA+B;YACvE,uBAAuB,EAAE,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,uBAAuB,IAAI,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,cAAc;SACjH;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,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 { NonGroupingHierarchyNode } from \"./HierarchyNode\";\nimport { HierarchyNodeIdentifiersPath } from \"./HierarchyNodeIdentifier\";\nimport { GroupingNodeKey } from \"./HierarchyNodeKey\";\n\n/** @beta */\nexport interface FilterTargetGroupingNodeInfo {\n /** Key of the grouping node. */\n key: GroupingNodeKey;\n\n /**\n * Depth of the grouping node in the hierarchy.\n * Generally, it can be retrieved from `parentKeys.length`.\n */\n depth: number;\n}\n\n/** @beta */\nexport interface HierarchyFilteringPathOptions {\n /**\n * This option specifies the way `autoExpand` flag should be assigned to nodes in the filtered hierarchy.\n * - If it's `false` or `undefined`, nodes have no 'autoExpand' flag.\n * - If it's `true`, then all nodes up to the filter target will have `autoExpand` flag.\n * - If it's an instance of `FilterTargetGroupingNodeInfo`, then all nodes up to the grouping node that matches this property,\n * will have `autoExpand` flag.\n */\n autoExpand?: boolean | FilterTargetGroupingNodeInfo;\n}\n\n/**\n * A path of hierarchy node identifiers for filtering the hierarchy with additional options.\n * @beta\n */\nexport type HierarchyFilteringPath = HierarchyNodeIdentifiersPath | { path: HierarchyNodeIdentifiersPath; options?: HierarchyFilteringPathOptions };\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyFilteringPath {\n /**\n * Normalizes the hierarchy filtering path to the object form.\n * @beta\n */\n export function normalize(source: HierarchyFilteringPath): Exclude<HierarchyFilteringPath, HierarchyNodeIdentifiersPath> {\n if (Array.isArray(source)) {\n return { path: source, options: undefined };\n }\n return source;\n }\n\n /**\n * Merges two given `HierarchyFilteringPathOptions` objects.\n * - if both inputs are `undefined`, `undefined` is returned,\n * - else if one of the inputs is `undefined`, the other one is returned.\n * - else, merge each option individually.\n *\n * For the `autoExpand` attribute, the merge chooses to auto-expand as deep as the deepest input:\n * - if one of the inputs is `true`, return `true`,\n * - else if both inputs are objects, return the one with the greater `depth` attribute.\n * - else, return `false` or `undefined`.\n *\n * @beta\n */\n export function mergeOptions(\n lhs: HierarchyFilteringPathOptions | undefined,\n rhs: HierarchyFilteringPathOptions | undefined,\n ): HierarchyFilteringPathOptions | undefined {\n // istanbul ignore next\n if (!lhs && !rhs) {\n return undefined;\n }\n // istanbul ignore next\n if (!lhs) {\n return rhs;\n }\n // istanbul ignore next\n if (!rhs) {\n return lhs;\n }\n return {\n autoExpand: ((): HierarchyFilteringPathOptions[\"autoExpand\"] => {\n if (rhs.autoExpand === true) {\n return rhs.autoExpand;\n }\n if (typeof lhs.autoExpand === \"object\" && typeof rhs.autoExpand === \"object\" && rhs.autoExpand.depth > lhs.autoExpand.depth) {\n return rhs.autoExpand;\n }\n return lhs.autoExpand;\n })(),\n };\n }\n}\n\n/**\n * An utility that extracts filtering properties from given root level filtering props or\n * the parent node. Returns `undefined` if filtering props are not present.\n * @beta\n */\nexport function extractFilteringProps(\n rootLevelFilteringProps: HierarchyFilteringPath[],\n parentNode: Pick<NonGroupingHierarchyNode, \"filtering\"> | undefined,\n):\n | {\n filteredNodePaths: HierarchyFilteringPath[];\n hasFilterTargetAncestor: boolean;\n }\n | undefined {\n if (!parentNode) {\n return { filteredNodePaths: rootLevelFilteringProps, hasFilterTargetAncestor: false };\n }\n return parentNode.filtering?.filteredChildrenIdentifierPaths\n ? {\n filteredNodePaths: parentNode.filtering.filteredChildrenIdentifierPaths,\n hasFilterTargetAncestor: !!parentNode.filtering.hasFilterTargetAncestor || !!parentNode.filtering.isFilterTarget,\n }\n : undefined;\n}\n"]}
|