@itwin/presentation-hierarchies 1.1.0 → 1.2.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 +17 -0
- package/lib/cjs/hierarchies/HierarchyErrors.d.ts +1 -1
- package/lib/cjs/hierarchies/HierarchyErrors.js +1 -1
- package/lib/cjs/hierarchies/HierarchyErrors.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +12 -11
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.js +16 -21
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.d.ts +10 -10
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +13 -13
- package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +4 -4
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +13 -13
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts +6 -6
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +6 -6
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/Logging.d.ts +2 -2
- package/lib/cjs/hierarchies/Logging.js +3 -3
- package/lib/cjs/hierarchies/Logging.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +5 -17
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +66 -54
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +2 -2
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +13 -13
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +23 -23
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +5 -5
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +8 -8
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +88 -87
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +17 -14
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +16 -16
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +2 -2
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +10 -10
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +5 -10
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +4 -4
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +1 -2
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.js +2 -2
- package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +8 -8
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +3 -3
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js +42 -42
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +16 -16
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +25 -25
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +3 -3
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +3 -3
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +3 -3
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +3 -3
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +13 -18
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +2 -1
- package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/EachValueFrom.js +3 -0
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/cjs/hierarchies/internal/LoggingUtils.js +2 -2
- package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Sorting.js +2 -2
- package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/cjs/presentation-hierarchies.d.ts +13 -13
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js +29 -29
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyErrors.d.ts +1 -1
- package/lib/esm/hierarchies/HierarchyErrors.js +1 -1
- package/lib/esm/hierarchies/HierarchyErrors.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts +12 -11
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.js +16 -21
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.d.ts +10 -10
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.js +3 -3
- package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +4 -4
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js +1 -1
- package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts +13 -13
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts +6 -6
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js +3 -3
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/Logging.d.ts +2 -2
- package/lib/esm/hierarchies/Logging.js +3 -3
- package/lib/esm/hierarchies/Logging.js.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +5 -17
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +52 -40
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +13 -13
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +23 -23
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js +2 -2
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +8 -8
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +41 -40
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +11 -8
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts +16 -16
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +2 -2
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +10 -10
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +5 -10
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts +4 -4
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js +1 -2
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.js +1 -1
- package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js +6 -6
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +3 -3
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.js +22 -22
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +10 -10
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js +14 -14
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +3 -3
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +3 -3
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +3 -3
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +9 -14
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +2 -1
- package/lib/esm/hierarchies/internal/Common.js.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/EachValueFrom.js +3 -0
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.js +1 -1
- package/lib/esm/hierarchies/internal/LoggingUtils.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.js +1 -1
- package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
- package/lib/esm/presentation-hierarchies.d.ts +13 -13
- package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.js +13 -13
- package/lib/esm/presentation-hierarchies.js.map +1 -1
- package/package.json +21 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @itwin/presentation-hierarchies
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#740](https://github.com/iTwin/presentation/pull/740): Define `type` and `exports` attributes in `package.json`.
|
|
8
|
+
|
|
9
|
+
The change moves this package a step closer towards dropping CommonJS support - it's now transpiled from ESM to CommonJS instead of the opposite.
|
|
10
|
+
|
|
11
|
+
In addition, the `exports` attribute has been added to `package.json` to prohibit access to APIs that are not intended to be used by external consumers.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#743](https://github.com/iTwin/presentation/pull/743): Fixed hierarchy filtering having a limit of 500 filtered nodes under a single parent.
|
|
16
|
+
- [#758](https://github.com/iTwin/presentation/pull/758): Promote `@beta` APIs to `@public`.
|
|
17
|
+
- Updated dependencies:
|
|
18
|
+
- @itwin/presentation-shared@1.1.0
|
|
19
|
+
|
|
3
20
|
## 1.1.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.RowsLimitExceededError = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Error that is thrown when rows amount exceed hierarchy level limit.
|
|
10
|
-
* @
|
|
10
|
+
* @public
|
|
11
11
|
*/
|
|
12
12
|
class RowsLimitExceededError extends Error {
|
|
13
13
|
limit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyErrors.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IACZ;IAAnC,YAAmC,KAAa;QAC9C,KAAK,CAAC,uBAAuB,KAAK,WAAW,CAAC,CAAC;QADd,UAAK,GAAL,KAAK,CAAQ;IAEhD,CAAC;CACF;AAJD,wDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Error that is thrown when rows amount exceed hierarchy level limit.\n * @
|
|
1
|
+
{"version":3,"file":"HierarchyErrors.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IACZ;IAAnC,YAAmC,KAAa;QAC9C,KAAK,CAAC,uBAAuB,KAAK,WAAW,CAAC,CAAC;QADd,UAAK,GAAL,KAAK,CAAQ;IAEhD,CAAC;CACF;AAJD,wDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Error that is thrown when rows amount exceed hierarchy level limit.\n * @public\n */\nexport class RowsLimitExceededError extends Error {\n public constructor(public readonly limit: number) {\n super(`Query rows limit of ${limit} exceeded`);\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NonGroupingHierarchyNode } from "./HierarchyNode";
|
|
2
|
-
import { HierarchyNodeIdentifiersPath } from "./HierarchyNodeIdentifier";
|
|
3
|
-
import { GroupingNodeKey } from "./HierarchyNodeKey";
|
|
4
|
-
/** @
|
|
1
|
+
import { NonGroupingHierarchyNode } from "./HierarchyNode.js";
|
|
2
|
+
import { HierarchyNodeIdentifiersPath } from "./HierarchyNodeIdentifier.js";
|
|
3
|
+
import { GroupingNodeKey } from "./HierarchyNodeKey.js";
|
|
4
|
+
/** @public */
|
|
5
5
|
export interface FilterTargetGroupingNodeInfo {
|
|
6
6
|
/** Key of the grouping node. */
|
|
7
7
|
key: GroupingNodeKey;
|
|
@@ -11,7 +11,7 @@ export interface FilterTargetGroupingNodeInfo {
|
|
|
11
11
|
*/
|
|
12
12
|
depth: number;
|
|
13
13
|
}
|
|
14
|
-
/** @
|
|
14
|
+
/** @public */
|
|
15
15
|
export interface HierarchyFilteringPathOptions {
|
|
16
16
|
/**
|
|
17
17
|
* This option specifies the way `autoExpand` flag should be assigned to nodes in the filtered hierarchy.
|
|
@@ -24,17 +24,17 @@ export interface HierarchyFilteringPathOptions {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* A path of hierarchy node identifiers for filtering the hierarchy with additional options.
|
|
27
|
-
* @
|
|
27
|
+
* @public
|
|
28
28
|
*/
|
|
29
29
|
export type HierarchyFilteringPath = HierarchyNodeIdentifiersPath | {
|
|
30
30
|
path: HierarchyNodeIdentifiersPath;
|
|
31
31
|
options?: HierarchyFilteringPathOptions;
|
|
32
32
|
};
|
|
33
|
-
/** @
|
|
33
|
+
/** @public */
|
|
34
34
|
export declare namespace HierarchyFilteringPath {
|
|
35
35
|
/**
|
|
36
36
|
* Normalizes the hierarchy filtering path to the object form.
|
|
37
|
-
* @
|
|
37
|
+
* @public
|
|
38
38
|
*/
|
|
39
39
|
function normalize(source: HierarchyFilteringPath): Exclude<HierarchyFilteringPath, HierarchyNodeIdentifiersPath>;
|
|
40
40
|
/**
|
|
@@ -44,18 +44,19 @@ export declare namespace HierarchyFilteringPath {
|
|
|
44
44
|
* - else, merge each option individually.
|
|
45
45
|
*
|
|
46
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`,
|
|
47
|
+
* - if any one of the inputs is `true`, return `true`,
|
|
48
48
|
* - else if both inputs are objects, return the one with the greater `depth` attribute.
|
|
49
|
+
* - else if one input is an object, return it.
|
|
49
50
|
* - else, return `false` or `undefined`.
|
|
50
51
|
*
|
|
51
|
-
* @
|
|
52
|
+
* @public
|
|
52
53
|
*/
|
|
53
54
|
function mergeOptions(lhs: HierarchyFilteringPathOptions | undefined, rhs: HierarchyFilteringPathOptions | undefined): HierarchyFilteringPathOptions | undefined;
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* An utility that extracts filtering properties from given root level filtering props or
|
|
57
58
|
* the parent node. Returns `undefined` if filtering props are not present.
|
|
58
|
-
* @
|
|
59
|
+
* @public
|
|
59
60
|
*/
|
|
60
61
|
export declare function extractFilteringProps(rootLevelFilteringProps: HierarchyFilteringPath[], parentNode: Pick<NonGroupingHierarchyNode, "filtering"> | undefined): {
|
|
61
62
|
filteredNodePaths: HierarchyFilteringPath[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,cAAc;AACd,MAAM,WAAW,4BAA4B;IAC3C,gCAAgC;IAChC,GAAG,EAAE,eAAe,CAAC;IAErB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,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,cAAc;AAEd,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,SAAgB,SAAS,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAKvH;IAED;;;;;;;;;;;;;OAaG;IACH,SAAgB,YAAY,CAC1B,GAAG,EAAE,6BAA6B,GAAG,SAAS,EAC9C,GAAG,EAAE,6BAA6B,GAAG,SAAS,GAC7C,6BAA6B,GAAG,SAAS,CAmB3C;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"}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.HierarchyFilteringPath = void 0;
|
|
8
8
|
exports.extractFilteringProps = extractFilteringProps;
|
|
9
|
-
/** @
|
|
9
|
+
/** @public */
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
11
11
|
var HierarchyFilteringPath;
|
|
12
12
|
(function (HierarchyFilteringPath) {
|
|
13
13
|
/**
|
|
14
14
|
* Normalizes the hierarchy filtering path to the object form.
|
|
15
|
-
* @
|
|
15
|
+
* @public
|
|
16
16
|
*/
|
|
17
17
|
function normalize(source) {
|
|
18
18
|
if (Array.isArray(source)) {
|
|
@@ -28,34 +28,29 @@ var HierarchyFilteringPath;
|
|
|
28
28
|
* - else, merge each option individually.
|
|
29
29
|
*
|
|
30
30
|
* For the `autoExpand` attribute, the merge chooses to auto-expand as deep as the deepest input:
|
|
31
|
-
* - if one of the inputs is `true`, return `true`,
|
|
31
|
+
* - if any one of the inputs is `true`, return `true`,
|
|
32
32
|
* - else if both inputs are objects, return the one with the greater `depth` attribute.
|
|
33
|
+
* - else if one input is an object, return it.
|
|
33
34
|
* - else, return `false` or `undefined`.
|
|
34
35
|
*
|
|
35
|
-
* @
|
|
36
|
+
* @public
|
|
36
37
|
*/
|
|
37
38
|
function mergeOptions(lhs, rhs) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
// istanbul ignore next
|
|
43
|
-
if (!lhs) {
|
|
44
|
-
return rhs;
|
|
45
|
-
}
|
|
46
|
-
// istanbul ignore next
|
|
47
|
-
if (!rhs) {
|
|
48
|
-
return lhs;
|
|
39
|
+
if (!lhs || !rhs) {
|
|
40
|
+
return lhs ?? rhs;
|
|
49
41
|
}
|
|
50
42
|
return {
|
|
51
43
|
autoExpand: (() => {
|
|
52
|
-
if (rhs.autoExpand === true) {
|
|
53
|
-
return
|
|
44
|
+
if (rhs.autoExpand === true || lhs.autoExpand === true) {
|
|
45
|
+
return true;
|
|
54
46
|
}
|
|
55
|
-
if (typeof lhs.autoExpand === "object"
|
|
56
|
-
|
|
47
|
+
if (typeof lhs.autoExpand === "object") {
|
|
48
|
+
if (typeof rhs.autoExpand === "object" && rhs.autoExpand.depth > lhs.autoExpand.depth) {
|
|
49
|
+
return rhs.autoExpand;
|
|
50
|
+
}
|
|
51
|
+
return lhs.autoExpand;
|
|
57
52
|
}
|
|
58
|
-
return
|
|
53
|
+
return rhs.autoExpand;
|
|
59
54
|
})(),
|
|
60
55
|
};
|
|
61
56
|
}
|
|
@@ -64,7 +59,7 @@ var HierarchyFilteringPath;
|
|
|
64
59
|
/**
|
|
65
60
|
* An utility that extracts filtering properties from given root level filtering props or
|
|
66
61
|
* the parent node. Returns `undefined` if filtering props are not present.
|
|
67
|
-
* @
|
|
62
|
+
* @public
|
|
68
63
|
*/
|
|
69
64
|
function extractFilteringProps(rootLevelFilteringProps, parentNode) {
|
|
70
65
|
if (!parentNode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyFiltering.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;
|
|
1
|
+
{"version":3,"file":"HierarchyFiltering.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AA6FhG,sDAkBC;AA5ED,cAAc;AACd,2DAA2D;AAC3D,IAAiB,sBAAsB,CAiDtC;AAjDD,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;;;;;;;;;;;;;OAaG;IACH,SAAgB,YAAY,CAC1B,GAA8C,EAC9C,GAA8C;QAE9C,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,GAAG,IAAI,GAAG,CAAC;QACpB,CAAC;QAED,OAAO;YACL,UAAU,EAAE,CAAC,GAAgD,EAAE;gBAC7D,IAAI,GAAG,CAAC,UAAU,KAAK,IAAI,IAAI,GAAG,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;oBACvD,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;oBACvC,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;wBACtF,OAAO,GAAG,CAAC,UAAU,CAAC;oBACxB,CAAC;oBACD,OAAO,GAAG,CAAC,UAAU,CAAC;gBACxB,CAAC;gBACD,OAAO,GAAG,CAAC,UAAU,CAAC;YACxB,CAAC,CAAC,EAAE;SACL,CAAC;IACJ,CAAC;IAtBe,mCAAY,eAsB3B,CAAA;AACH,CAAC,EAjDgB,sBAAsB,sCAAtB,sBAAsB,QAiDtC;AAED;;;;GAIG;AACH,SAAgB,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.js\";\nimport { HierarchyNodeIdentifiersPath } from \"./HierarchyNodeIdentifier.js\";\nimport { GroupingNodeKey } from \"./HierarchyNodeKey.js\";\n\n/** @public */\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/** @public */\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 * @public\n */\nexport type HierarchyFilteringPath = HierarchyNodeIdentifiersPath | { path: HierarchyNodeIdentifiersPath; options?: HierarchyFilteringPathOptions };\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyFilteringPath {\n /**\n * Normalizes the hierarchy filtering path to the object form.\n * @public\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 any 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 if one input is an object, return it.\n * - else, return `false` or `undefined`.\n *\n * @public\n */\n export function mergeOptions(\n lhs: HierarchyFilteringPathOptions | undefined,\n rhs: HierarchyFilteringPathOptions | undefined,\n ): HierarchyFilteringPathOptions | undefined {\n if (!lhs || !rhs) {\n return lhs ?? rhs;\n }\n\n return {\n autoExpand: ((): HierarchyFilteringPathOptions[\"autoExpand\"] => {\n if (rhs.autoExpand === true || lhs.autoExpand === true) {\n return true;\n }\n if (typeof lhs.autoExpand === \"object\") {\n if (typeof rhs.autoExpand === \"object\" && rhs.autoExpand.depth > lhs.autoExpand.depth) {\n return rhs.autoExpand;\n }\n return lhs.autoExpand;\n }\n return rhs.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 * @public\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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OmitOverUnion } from "@itwin/presentation-shared";
|
|
2
|
-
import { HierarchyFilteringPath, HierarchyFilteringPathOptions } from "./HierarchyFiltering";
|
|
3
|
-
import { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey";
|
|
4
|
-
/** @
|
|
2
|
+
import { HierarchyFilteringPath, HierarchyFilteringPathOptions } from "./HierarchyFiltering.js";
|
|
3
|
+
import { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey.js";
|
|
4
|
+
/** @public */
|
|
5
5
|
export type HierarchyNodeFilteringProps = {
|
|
6
6
|
/** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */
|
|
7
7
|
hasFilterTargetAncestor?: boolean;
|
|
@@ -16,7 +16,7 @@ export type HierarchyNodeFilteringProps = {
|
|
|
16
16
|
/** Options that were used to filter the node. */
|
|
17
17
|
filterTargetOptions?: HierarchyFilteringPathOptions;
|
|
18
18
|
});
|
|
19
|
-
/** @
|
|
19
|
+
/** @public */
|
|
20
20
|
export declare namespace HierarchyNodeFilteringProps {
|
|
21
21
|
function create(props: {
|
|
22
22
|
hasFilterTargetAncestor?: boolean;
|
|
@@ -27,7 +27,7 @@ export declare namespace HierarchyNodeFilteringProps {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* A data structure that defines attributes that are common to all types of hierarchy nodes.
|
|
30
|
-
* @
|
|
30
|
+
* @public
|
|
31
31
|
*/
|
|
32
32
|
interface BaseHierarchyNode {
|
|
33
33
|
/** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */
|
|
@@ -47,7 +47,7 @@ interface BaseHierarchyNode {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* A data structure that represents a single non-grouping hierarchy node.
|
|
50
|
-
* @
|
|
50
|
+
* @public
|
|
51
51
|
*/
|
|
52
52
|
export interface NonGroupingHierarchyNode extends BaseHierarchyNode {
|
|
53
53
|
/** An identifier to identify the node in its hierarchy level. */
|
|
@@ -60,7 +60,7 @@ export interface NonGroupingHierarchyNode extends BaseHierarchyNode {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* A data structure that represents a grouping node that groups other nodes.
|
|
63
|
-
* @
|
|
63
|
+
* @public
|
|
64
64
|
*/
|
|
65
65
|
export interface GroupingHierarchyNode extends BaseHierarchyNode {
|
|
66
66
|
/** An identifier to identify this grouping node in its hierarchy level. */
|
|
@@ -75,10 +75,10 @@ export interface GroupingHierarchyNode extends BaseHierarchyNode {
|
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* A data structure that represents a single hierarchy node.
|
|
78
|
-
* @
|
|
78
|
+
* @public
|
|
79
79
|
*/
|
|
80
80
|
export type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;
|
|
81
|
-
/** @
|
|
81
|
+
/** @public */
|
|
82
82
|
export declare namespace HierarchyNode {
|
|
83
83
|
/** Checks whether the given node is a generic node */
|
|
84
84
|
function isGeneric<TNode extends {
|
|
@@ -148,7 +148,7 @@ export declare namespace HierarchyNode {
|
|
|
148
148
|
/**
|
|
149
149
|
* A type of `HierarchyNode` that doesn't know about its children and is an input when requesting
|
|
150
150
|
* them using `HierarchyProvider.getNodes`.
|
|
151
|
-
* @
|
|
151
|
+
* @public
|
|
152
152
|
*/
|
|
153
153
|
export type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, "children">;
|
|
154
154
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HierarchyNode.d.ts","sourceRo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C,KAAK,SAAS;QAAE,GAAG,EAAE,gBAAgB,CAAA;KAAE,EACtF,IAAI,EAAE,KAAK,GACV,IAAI,IAAI,KAAK,GAAG;QAAE,GAAG,EAAE,iCAAiC,CAAC;QAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,qBAAqB,CAEnH;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CAAC,KAAK,SAAS;QAAE,GAAG,EAAE,gBAAgB,CAAA;KAAE,EAC5E,IAAI,EAAE,KAAK,GACV,IAAI,IAAI,KAAK,GAAG;QAAE,GAAG,EAAE,uBAAuB,CAAC;QAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,qBAAqB,CAEzG;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.HierarchyNode = exports.HierarchyNodeFilteringProps = void 0;
|
|
8
|
-
const
|
|
9
|
-
/** @
|
|
8
|
+
const HierarchyNodeKey_js_1 = require("./HierarchyNodeKey.js");
|
|
9
|
+
/** @public */
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
11
11
|
var HierarchyNodeFilteringProps;
|
|
12
12
|
(function (HierarchyNodeFilteringProps) {
|
|
@@ -23,58 +23,58 @@ var HierarchyNodeFilteringProps;
|
|
|
23
23
|
}
|
|
24
24
|
HierarchyNodeFilteringProps.create = create;
|
|
25
25
|
})(HierarchyNodeFilteringProps || (exports.HierarchyNodeFilteringProps = HierarchyNodeFilteringProps = {}));
|
|
26
|
-
/** @
|
|
26
|
+
/** @public */
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
28
28
|
var HierarchyNode;
|
|
29
29
|
(function (HierarchyNode) {
|
|
30
30
|
/** Checks whether the given node is a generic node */
|
|
31
31
|
function isGeneric(node) {
|
|
32
|
-
return
|
|
32
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isGeneric(node.key);
|
|
33
33
|
}
|
|
34
34
|
HierarchyNode.isGeneric = isGeneric;
|
|
35
35
|
/** Checks whether the given node is a standard (iModel content based) node */
|
|
36
36
|
function isIModelNode(node) {
|
|
37
|
-
return
|
|
37
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isIModelNodeKey(node.key);
|
|
38
38
|
}
|
|
39
39
|
HierarchyNode.isIModelNode = isIModelNode;
|
|
40
40
|
/** Checks whether the given node is an ECInstances-based node */
|
|
41
41
|
function isInstancesNode(node) {
|
|
42
|
-
return
|
|
42
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isInstances(node.key);
|
|
43
43
|
}
|
|
44
44
|
HierarchyNode.isInstancesNode = isInstancesNode;
|
|
45
45
|
/** Checks whether the given node is a grouping node */
|
|
46
46
|
function isGroupingNode(node) {
|
|
47
|
-
return
|
|
47
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isGrouping(node.key);
|
|
48
48
|
}
|
|
49
49
|
HierarchyNode.isGroupingNode = isGroupingNode;
|
|
50
50
|
/** Checks whether the given node is a class grouping node */
|
|
51
51
|
function isClassGroupingNode(node) {
|
|
52
|
-
return
|
|
52
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isClassGrouping(node.key);
|
|
53
53
|
}
|
|
54
54
|
HierarchyNode.isClassGroupingNode = isClassGroupingNode;
|
|
55
55
|
/** Checks whether the given node is a label grouping node */
|
|
56
56
|
function isLabelGroupingNode(node) {
|
|
57
|
-
return
|
|
57
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isLabelGrouping(node.key);
|
|
58
58
|
}
|
|
59
59
|
HierarchyNode.isLabelGroupingNode = isLabelGroupingNode;
|
|
60
60
|
/** Checks whether the given node is property grouping node for other values */
|
|
61
61
|
function isPropertyOtherValuesGroupingNode(node) {
|
|
62
|
-
return
|
|
62
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);
|
|
63
63
|
}
|
|
64
64
|
HierarchyNode.isPropertyOtherValuesGroupingNode = isPropertyOtherValuesGroupingNode;
|
|
65
65
|
/** Checks whether the given node is a property value grouping node */
|
|
66
66
|
function isPropertyValueGroupingNode(node) {
|
|
67
|
-
return
|
|
67
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isPropertyValueGrouping(node.key);
|
|
68
68
|
}
|
|
69
69
|
HierarchyNode.isPropertyValueGroupingNode = isPropertyValueGroupingNode;
|
|
70
70
|
/** Checks whether the given node is a property value range grouping node */
|
|
71
71
|
function isPropertyValueRangeGroupingNode(node) {
|
|
72
|
-
return
|
|
72
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);
|
|
73
73
|
}
|
|
74
74
|
HierarchyNode.isPropertyValueRangeGroupingNode = isPropertyValueRangeGroupingNode;
|
|
75
75
|
/** Checks whether the given node is a property grouping node */
|
|
76
76
|
function isPropertyGroupingNode(node) {
|
|
77
|
-
return
|
|
77
|
+
return HierarchyNodeKey_js_1.HierarchyNodeKey.isPropertyGrouping(node.key);
|
|
78
78
|
}
|
|
79
79
|
HierarchyNode.isPropertyGroupingNode = isPropertyGroupingNode;
|
|
80
80
|
})(HierarchyNode || (exports.HierarchyNode = HierarchyNode = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG,yDAa4B;AAoB5B,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,2BAA2B,CAiB3C;AAjBD,WAAiB,2BAA2B;IAC1C,SAAgB,MAAM,CAAC,KAKtB;QACC,MAAM,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,c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C,CAAC;IAC/C,CAAC;IAFe,4BAAc,iBAE7B,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAEX,OAAO,mCAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAJe,iCAAmB,sBAIlC,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAEX,OAAO,mCAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAJe,iCAAmB,sBAIlC,CAAA;IACD,gFAAgF;IAChF,SAAgB,iCAAiC,CAC/C,IAAW;QAEX,OAAO,mCAAgB,CAAC,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IAJe,+CAAiC,oCAIhD,CAAA;IACD,sEAAsE;IACtE,SAAgB,2BAA2B,CACzC,IAAW;QAEX,OAAO,mCAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAJe,yCAA2B,8BAI1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAEX,OAAO,mCAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAJe,8CAAgC,mCAI/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAEX,OAAO,mCAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAJe,oCAAsB,yBAIrC,CAAA;AACH,CAAC,EArDgB,aAAa,6BAAb,aAAa,QAqD7B","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 { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport { HierarchyFilteringPath, HierarchyFilteringPathOptions } from \"./HierarchyFiltering\";\nimport {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey\";\n\n/** @beta */\nexport type HierarchyNodeFilteringProps = {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */\n hasFilterTargetAncestor?: boolean;\n /** Paths to node's children that are filter targets. */\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n} & (\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget?: false;\n }\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget: true;\n /** Options that were used to filter the node. */\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }\n);\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeFilteringProps {\n export function create(props: {\n hasFilterTargetAncestor?: boolean;\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n isFilterTarget?: boolean;\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }): HierarchyNodeFilteringProps | undefined {\n const { hasFilterTargetAncestor, filteredChildrenIdentifierPaths, isFilterTarget, filterTargetOptions } = props;\n if (isFilterTarget || hasFilterTargetAncestor || filteredChildrenIdentifierPaths?.length) {\n return {\n ...(isFilterTarget ? { isFilterTarget, filterTargetOptions } : undefined),\n ...(hasFilterTargetAncestor ? { hasFilterTargetAncestor } : undefined),\n ...(!!filteredChildrenIdentifierPaths?.length ? { filteredChildrenIdentifierPaths } : undefined),\n };\n }\n return undefined;\n }\n}\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @beta\n */\ninterface BaseHierarchyNode {\n /** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */\n parentKeys: HierarchyNodeKey[];\n /** Node's display label. */\n label: string;\n /** A flag indicating whether the node has children or not. */\n children: boolean;\n /** A flag indicating whether this node should be auto-expanded in the UI. */\n autoExpand?: boolean;\n /** Additional data that may be assigned to this node. */\n extendedData?: { [key: string]: any };\n /** Data that may be assigned to the node if filtering is enabled */\n filtering?: HierarchyNodeFilteringProps;\n}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @beta\n */\nexport interface NonGroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify the node in its hierarchy level. */\n key: GenericNodeKey | InstancesNodeKey;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance\n * filter when requesting child hierarchy level will have no effect.\n */\n supportsFiltering?: boolean;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @beta\n */\nexport interface GroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify this grouping node in its hierarchy level. */\n key: GroupingNodeKey;\n\n /**\n * Keys of all instances grouped by this node, including deeply nested under\n * other grouping nodes.\n */\n groupedInstanceKeys: IModelInstanceKey[];\n\n /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */\n nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;\n}\n\n/**\n * A data structure that represents a single hierarchy node.\n * @beta\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @beta\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
|
|
1
|
+
{"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG,+DAa+B;AAoB/B,cAAc;AACd,2DAA2D;AAC3D,IAAiB,2BAA2B,CAiB3C;AAjBD,WAAiB,2BAA2B;IAC1C,SAAgB,MAAM,CAAC,KAKtB;QACC,MAAM,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;QAChH,IAAI,cAAc,IAAI,uBAAuB,IAAI,+BAA+B,EAAE,MAAM,EAAE,CAAC;YACzF,OAAO;gBACL,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACzE,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACtE,GAAG,CAAC,CAAC,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,+BAA+B,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;aACjG,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAfe,kCAAM,SAerB,CAAA;AACH,CAAC,EAjBgB,2BAA2B,2CAA3B,2BAA2B,QAiB3C;AA2DD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,aAAa,CAqD7B;AArDD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5D,CAAC;IAJe,yCAA2B,8BAI1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAEX,OAAO,sCAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAJe,8CAAgC,mCAI/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAEX,OAAO,sCAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAJe,oCAAsB,yBAIrC,CAAA;AACH,CAAC,EArDgB,aAAa,6BAAb,aAAa,QAqD7B","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 { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport { HierarchyFilteringPath, HierarchyFilteringPathOptions } from \"./HierarchyFiltering.js\";\nimport {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey.js\";\n\n/** @public */\nexport type HierarchyNodeFilteringProps = {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */\n hasFilterTargetAncestor?: boolean;\n /** Paths to node's children that are filter targets. */\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n} & (\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget?: false;\n }\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget: true;\n /** Options that were used to filter the node. */\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }\n);\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeFilteringProps {\n export function create(props: {\n hasFilterTargetAncestor?: boolean;\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n isFilterTarget?: boolean;\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }): HierarchyNodeFilteringProps | undefined {\n const { hasFilterTargetAncestor, filteredChildrenIdentifierPaths, isFilterTarget, filterTargetOptions } = props;\n if (isFilterTarget || hasFilterTargetAncestor || filteredChildrenIdentifierPaths?.length) {\n return {\n ...(isFilterTarget ? { isFilterTarget, filterTargetOptions } : undefined),\n ...(hasFilterTargetAncestor ? { hasFilterTargetAncestor } : undefined),\n ...(!!filteredChildrenIdentifierPaths?.length ? { filteredChildrenIdentifierPaths } : undefined),\n };\n }\n return undefined;\n }\n}\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @public\n */\ninterface BaseHierarchyNode {\n /** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */\n parentKeys: HierarchyNodeKey[];\n /** Node's display label. */\n label: string;\n /** A flag indicating whether the node has children or not. */\n children: boolean;\n /** A flag indicating whether this node should be auto-expanded in the UI. */\n autoExpand?: boolean;\n /** Additional data that may be assigned to this node. */\n extendedData?: { [key: string]: any };\n /** Data that may be assigned to the node if filtering is enabled */\n filtering?: HierarchyNodeFilteringProps;\n}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @public\n */\nexport interface NonGroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify the node in its hierarchy level. */\n key: GenericNodeKey | InstancesNodeKey;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance\n * filter when requesting child hierarchy level will have no effect.\n */\n supportsFiltering?: boolean;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @public\n */\nexport interface GroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify this grouping node in its hierarchy level. */\n key: GroupingNodeKey;\n\n /**\n * Keys of all instances grouped by this node, including deeply nested under\n * other grouping nodes.\n */\n groupedInstanceKeys: IModelInstanceKey[];\n\n /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */\n nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;\n}\n\n/**\n * A data structure that represents a single hierarchy node.\n * @public\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @public\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey";
|
|
1
|
+
import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey.js";
|
|
2
2
|
/**
|
|
3
3
|
* An identifier that can be used to identify either an ECInstance or a generic node.
|
|
4
4
|
*
|
|
@@ -7,10 +7,10 @@ import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey";
|
|
|
7
7
|
* `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs
|
|
8
8
|
* to contain information about a single instance.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @public
|
|
11
11
|
*/
|
|
12
12
|
export type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey;
|
|
13
|
-
/** @
|
|
13
|
+
/** @public */
|
|
14
14
|
export declare namespace HierarchyNodeIdentifier {
|
|
15
15
|
/** Checks whether the given identifier is an instance node identifier */
|
|
16
16
|
function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is IModelInstanceKey;
|
|
@@ -23,7 +23,7 @@ export declare namespace HierarchyNodeIdentifier {
|
|
|
23
23
|
* A path of hierarchy node identifiers, typically used to describe a path from root down
|
|
24
24
|
* to specific node deep in the hierarchy.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @public
|
|
27
27
|
*/
|
|
28
28
|
export type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];
|
|
29
29
|
//# sourceMappingURL=HierarchyNodeIdentifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAEzE,cAAc;AAEd,yBAAiB,uBAAuB,CAAC;IACvC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI,iBAAiB,CAE7F;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI,cAAc,CAEzF;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,uBAAuB,WAQ/E;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,EAAE,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.HierarchyNodeIdentifier = void 0;
|
|
8
8
|
const presentation_shared_1 = require("@itwin/presentation-shared");
|
|
9
|
-
/** @
|
|
9
|
+
/** @public */
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
11
11
|
var HierarchyNodeIdentifier;
|
|
12
12
|
(function (HierarchyNodeIdentifier) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,oEAAyD;AAezD,
|
|
1
|
+
{"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,oEAAyD;AAezD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACtC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAA2B;QAClE,OAAO,WAAW,IAAI,EAAE,CAAC;IAC3B,CAAC;IAFe,gDAAwB,2BAEvC,CAAA;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAA2B;QACjE,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAFe,+CAAuB,0BAEtC,CAAA;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAA4B,EAAE,GAA4B;QAC9E,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,iCAAW,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzE,CAAC;QACD,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;YACjE,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;QACxD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IARe,6BAAK,QAQpB,CAAA;AACH,CAAC,EArBgB,uBAAuB,uCAAvB,uBAAuB,QAqBvC","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 { InstanceKey } from \"@itwin/presentation-shared\";\nimport { GenericNodeKey, IModelInstanceKey } from \"./HierarchyNodeKey.js\";\n\n/**\n * An identifier that can be used to identify either an ECInstance or a generic node.\n *\n * This is different from `HierarchyNodeKey` - the key can represent more types of nodes and,\n * in case of `InstancesNodeKey`, contains information about all instances the node represents.\n * `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs\n * to contain information about a single instance.\n *\n * @public\n */\nexport type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeIdentifier {\n /** Checks whether the given identifier is an instance node identifier */\n export function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is IModelInstanceKey {\n return \"className\" in id;\n }\n\n /** Checks whether the given identifier is a generic node identifier */\n export function isGenericNodeIdentifier(id: HierarchyNodeIdentifier): id is GenericNodeKey {\n return !isInstanceNodeIdentifier(id);\n }\n\n /** Checks two identifiers for equality */\n export function equal(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier) {\n if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {\n return InstanceKey.equals(lhs, rhs) && lhs.imodelKey === rhs.imodelKey;\n }\n if (isGenericNodeIdentifier(lhs) && isGenericNodeIdentifier(rhs)) {\n return lhs.source === rhs.source && lhs.id === rhs.id;\n }\n return false;\n }\n}\n\n/**\n * A path of hierarchy node identifiers, typically used to describe a path from root down\n * to specific node deep in the hierarchy.\n *\n * @public\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { InstanceKey } from "@itwin/presentation-shared";
|
|
2
2
|
/**
|
|
3
3
|
* An instance key that may be associated with specific iModel.
|
|
4
|
-
* @
|
|
4
|
+
* @public
|
|
5
5
|
*/
|
|
6
6
|
export interface IModelInstanceKey extends InstanceKey {
|
|
7
7
|
imodelKey?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* A key for a generic node.
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
export interface GenericNodeKey {
|
|
14
14
|
/** Type of the node */
|
|
@@ -26,7 +26,7 @@ export interface GenericNodeKey {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* A key for a node that represents one or more ECInstances.
|
|
29
|
-
* @
|
|
29
|
+
* @public
|
|
30
30
|
*/
|
|
31
31
|
export interface InstancesNodeKey {
|
|
32
32
|
/** Type of the node */
|
|
@@ -39,7 +39,7 @@ export interface InstancesNodeKey {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* A key for a class-grouping node.
|
|
42
|
-
* @
|
|
42
|
+
* @public
|
|
43
43
|
*/
|
|
44
44
|
export interface ClassGroupingNodeKey {
|
|
45
45
|
/** Type of the node */
|
|
@@ -49,7 +49,7 @@ export interface ClassGroupingNodeKey {
|
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* A key for a label-grouping node.
|
|
52
|
-
* @
|
|
52
|
+
* @public
|
|
53
53
|
*/
|
|
54
54
|
export interface LabelGroupingNodeKey {
|
|
55
55
|
/** Type of the node */
|
|
@@ -65,7 +65,7 @@ export interface LabelGroupingNodeKey {
|
|
|
65
65
|
/**
|
|
66
66
|
* A key property grouping node that groups nodes whose values don't fall into any other
|
|
67
67
|
* property group in the hierarchy level.
|
|
68
|
-
* @
|
|
68
|
+
* @public
|
|
69
69
|
*/
|
|
70
70
|
export interface PropertyOtherValuesGroupingNodeKey {
|
|
71
71
|
/** Type of the node */
|
|
@@ -78,7 +78,7 @@ export interface PropertyOtherValuesGroupingNodeKey {
|
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* A key for a property grouping node that groups nodes by formatted property value.
|
|
81
|
-
* @
|
|
81
|
+
* @public
|
|
82
82
|
*/
|
|
83
83
|
export interface PropertyValueGroupingNodeKey {
|
|
84
84
|
/** Type of the node */
|
|
@@ -92,7 +92,7 @@ export interface PropertyValueGroupingNodeKey {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* A key for a property grouping node that groups nodes by a range of property values.
|
|
95
|
-
* @
|
|
95
|
+
* @public
|
|
96
96
|
*/
|
|
97
97
|
export interface PropertyValueRangeGroupingNodeKey {
|
|
98
98
|
/** Type of the node */
|
|
@@ -108,25 +108,25 @@ export interface PropertyValueRangeGroupingNodeKey {
|
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* A key for a property grouping node.
|
|
111
|
-
* @
|
|
111
|
+
* @public
|
|
112
112
|
*/
|
|
113
113
|
export type PropertyGroupingNodeKey = PropertyValueRangeGroupingNodeKey | PropertyValueGroupingNodeKey | PropertyOtherValuesGroupingNodeKey;
|
|
114
114
|
/**
|
|
115
115
|
* A key for one of the instance grouping nodes.
|
|
116
|
-
* @
|
|
116
|
+
* @public
|
|
117
117
|
*/
|
|
118
118
|
export type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;
|
|
119
119
|
/**
|
|
120
120
|
* A key for either an instance node or one of the instance grouping nodes.
|
|
121
|
-
* @
|
|
121
|
+
* @public
|
|
122
122
|
*/
|
|
123
123
|
export type IModelHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;
|
|
124
124
|
/**
|
|
125
125
|
* A key that uniquely identifies a node in a hierarchy level.
|
|
126
|
-
* @
|
|
126
|
+
* @public
|
|
127
127
|
*/
|
|
128
128
|
export type HierarchyNodeKey = IModelHierarchyNodeKey | GenericNodeKey;
|
|
129
|
-
/** @
|
|
129
|
+
/** @public */
|
|
130
130
|
export declare namespace HierarchyNodeKey {
|
|
131
131
|
/** Checks whether the given node key is a generic node key. */
|
|
132
132
|
function isGeneric(key: HierarchyNodeKey): key is GenericNodeKey;
|