@itwin/presentation-hierarchies 1.7.11 → 1.7.13
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 +73 -12
- package/README.md +13 -6
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.js +38 -15
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNode.js +2 -2
- package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/Logging.js +1 -1
- package/lib/cjs/hierarchies/Logging.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +18 -9
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js +1 -4
- package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +92 -62
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +8 -7
- package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +17 -44
- package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
- package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/Utils.js +19 -7
- package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +10 -4
- package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js +32 -18
- package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +31 -9
- package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +30 -14
- package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +2 -6
- package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -8
- package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -5
- package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
- package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +20 -22
- package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +3 -1
- package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +2 -2
- 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 +0 -2
- package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +1 -4
- package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/Partition.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
- package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- 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 +2 -2
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.js +38 -15
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNode.js +2 -2
- package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/Logging.js +1 -1
- package/lib/esm/hierarchies/Logging.js.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +19 -10
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/HierarchyCache.js +1 -4
- package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +93 -63
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +9 -8
- package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +17 -44
- package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
- package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/Utils.js +19 -7
- package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js +11 -5
- package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/Grouping.js +33 -19
- package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +33 -11
- package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js +32 -16
- package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +3 -7
- package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -8
- package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +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 -5
- package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
- package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +20 -22
- package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js +3 -1
- package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +2 -2
- 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 +0 -2
- package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js +1 -4
- package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/Partition.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
- package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
- 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 +2 -2
- package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
- package/lib/esm/presentation-hierarchies.js +2 -2
- package/lib/esm/presentation-hierarchies.js.map +1 -1
- package/package.json +17 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"AAKA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,yCAAqC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,iDAA8C,CAAC;AAElG,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,YAAY,EACR,OAAO,iBAAiB,GACxB,OAAO,6BAA6B,GACpC,OAAO,0BAA0B,GACjC,OAAO,sCAAsC,UAGlD;AAED,gBAAgB;AAEhB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAAC,GAAG,EAAE,gBAAgB,CAAC;IAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,SAAS,UAQhH;AAGD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,KAAK,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,IAAI,EAAE,KAAK,WAE7F;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names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A;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,QAMtG"}
|
|
@@ -42,7 +42,7 @@ function createOperatorLoggingNamespace(operatorName, baseCategory) {
|
|
|
42
42
|
return `${baseCategory}.Operators.${operatorName}`;
|
|
43
43
|
}
|
|
44
44
|
/** @internal */
|
|
45
|
-
/*
|
|
45
|
+
/* v8 ignore start */
|
|
46
46
|
function createNodeIdentifierForLogging(node) {
|
|
47
47
|
if (!node) {
|
|
48
48
|
return "<root>";
|
|
@@ -51,7 +51,7 @@ function createNodeIdentifierForLogging(node) {
|
|
|
51
51
|
const parentKeys = "parentKeys" in node ? node.parentKeys : "<unknown>";
|
|
52
52
|
return JSON.stringify({ label, key, parentKeys });
|
|
53
53
|
}
|
|
54
|
-
/*
|
|
54
|
+
/* v8 ignore stop */
|
|
55
55
|
/** @internal */
|
|
56
56
|
function hasChildren(node) {
|
|
57
57
|
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;;;;;;AAmChG,wEASC;AAID,wEASC;AAID,kCAEC;AAGD,
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;AAmChG,wEASC;AAID,wEASC;AAID,kCAEC;AAGD,kDAKC;AAWD,kCAMC;AAtFD,gCAA8B;AAE9B,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;A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;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 \"./DisposePolyfill.js\";\n\nimport naturalCompare from \"natural-compare-lite\";\nimport { ConcatenatedValue } from \"@itwin/presentation-shared\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * This is a logging namespace for public log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE = \"Presentation.Hierarchies\";\n\n/**\n * This is a logging namespace for public performance-related log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE = `${LOGGING_NAMESPACE}.Performance`;\n\n/**\n * This is a logging namespace for internal log messages that are only interesting to package contributors,\n * but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_INTERNAL = \"Presentation.HierarchiesInternal\";\n\n/**\n * This is a logging namespace for internal performance-related log messages that are only interesting\n * to package contributors, but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = `${LOGGING_NAMESPACE_INTERNAL}.Performance`;\n\n/** @internal */\nexport function createOperatorLoggingNamespace(\n operatorName: string,\n baseCategory:\n | typeof LOGGING_NAMESPACE\n | typeof LOGGING_NAMESPACE_PERFORMANCE\n | typeof LOGGING_NAMESPACE_INTERNAL\n | typeof LOGGING_NAMESPACE_PERFORMANCE_INTERNAL,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n/* v8 ignore start */\nexport function createNodeIdentifierForLogging(\n node: { label: string | ConcatenatedValue; key: HierarchyNodeKey; parentKeys?: HierarchyNodeKey[] } | undefined,\n) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n return JSON.stringify({ label, key, parentKeys });\n}\n/* v8 ignore stop */\n\n/** @internal */\nexport function hasChildren<TNode extends { children?: boolean | Array<unknown> }>(node: TNode) {\n return node.children === true || (Array.isArray(node.children) && node.children.length > 0);\n}\n\n/** @internal */\nexport function compareNodesByLabel<TLhsNode extends { label: string }, TRhsNode extends { label: string }>(\n lhs: TLhsNode,\n rhs: TRhsNode,\n): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n\n/**\n * A helper that disposes the given object, if it's disposable.\n *\n * The first option is to dispose using the deprecated `dispose` method if it exists on the object.\n * If not, we use the new `Symbol.dispose` method. If that doesn't exist either, the object is\n * considered as non-disposable and nothing is done with it.\n *\n * @internal\n */\nexport function safeDispose(disposable: {} | { [Symbol.dispose]: () => void } | { dispose: () => void }) {\n if (\"dispose\" in disposable) {\n disposable.dispose();\n } else if (Symbol.dispose in disposable) {\n disposable[Symbol.dispose]();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EachValueFrom.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/EachValueFrom.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlC;;;;;;;;GAQG;AACH,wBAAuB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"EachValueFrom.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/EachValueFrom.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlC;;;;;;;;GAQG;AACH,wBAAuB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAsDvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EachValueFrom.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/EachValueFrom.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAehG,
|
|
1
|
+
{"version":3,"file":"EachValueFrom.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/EachValueFrom.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAehG,sCAsDC;AAjED,yBAAyB;AAEzB;;;;;;;;GAQG;AACI,KAAK,SAAS,CAAC,CAAC,aAAa,CAAI,MAAqB;IAC3D,MAAM,SAAS,GAAG,IAAI,KAAK,EAAsF,CAAC;IAClH,MAAM,MAAM,GAAG,IAAI,KAAK,EAAK,CAAC;IAC9B,IAAI,KAAK,CAAC;IACV,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;YACd,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YACjC,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QACD,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE;YACb,KAAK,GAAG,GAAG,CAAC;YACZ,KAAK,IAAI,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,EAAE,QAAQ,KAAK,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC;gBACxF,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE;YACb,SAAS,GAAG,IAAI,CAAC;YACjB,KAAK,IAAI,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,EAAE,QAAQ,KAAK,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC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AAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;IACH,CAAC;IAEM,GAAG;QACR,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACzB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Observable } from \"rxjs\";\n\n// cspell:words deferreds\n\n/**\n * This is pretty much a combination of:\n * - https://github.com/benlesh/rxjs-for-await/blob/94f9cf9cb015ac3700dfd1850eb81d36962eb70f/src/index.ts#L33,\n * - https://github.com/ReactiveX/rxjs/blob/2587ee852eb43eeb0883a7787bac2944d823392b/packages/observable/src/observable.ts#L922.\n *\n * Our implementation uses a linked list rather than an array to store values, which is more efficient.\n *\n * @internal\n */\nexport async function* eachValueFrom<T>(source: Observable<T>): AsyncIterableIterator<T> {\n const deferreds = new Queue<{ resolve: (value: IteratorResult<T>) => void; reject: (reason: unknown) => void }>();\n const values = new Queue<T>();\n let error;\n let completed = false;\n const subs = source.subscribe({\n next: (value) => {\n const deferred = deferreds.pop();\n if (deferred) {\n deferred.resolve({ value, done: false });\n } else {\n values.push(value);\n }\n },\n error: (err) => {\n error = err;\n for (let deferred = deferreds.pop(); deferred !== undefined; deferred = deferreds.pop()) {\n deferred.reject(err);\n }\n },\n complete: () => {\n completed = true;\n for (let deferred = deferreds.pop(); deferred !== undefined; deferred = deferreds.pop()) {\n deferred.resolve({ value: undefined, done: true });\n }\n },\n });\n try {\n while (true) {\n const value = values.pop();\n if (value !== undefined) {\n yield value;\n continue;\n }\n if (completed) {\n return;\n }\n if (error) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw error;\n }\n const result = await new Promise<IteratorResult<T>>((resolve, reject) => {\n deferreds.push({ resolve, reject });\n });\n if (result.done) {\n return;\n }\n yield result.value;\n }\n } catch (err) {\n throw err;\n } finally {\n subs.unsubscribe();\n }\n}\n\nclass QueueEntry<T> {\n constructor(\n public readonly value: T,\n public next?: QueueEntry<T>,\n ) {}\n}\n\nclass Queue<T> {\n private _front?: QueueEntry<T>;\n private _back?: QueueEntry<T>;\n\n public push(item: T) {\n const entry = new QueueEntry<T>(item);\n if (this._back) {\n this._back.next = entry;\n }\n this._back = entry;\n if (!this._front) {\n this._front = entry;\n }\n }\n\n public pop(): T | undefined {\n if (!this._front) {\n return undefined;\n }\n const value = this._front.value;\n this._front = this._front.next;\n if (!this._front) {\n this._back = undefined;\n }\n return value;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAM,MAAM,MAAM,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAM,MAAM,MAAM,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAClC,UAAU,CAAC,EAAE,6BAA6B,KACvC,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,SAAS,6BAA6B,GAAG,8BAA8B,EAC9G,IAAI,EAAE,KAAK,KACR,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,sBAAsB,KAAK,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAEzG;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;CAC9F;AAED,gBAAgB;AAChB,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,uBAAuB,CAgB5G"}
|
|
@@ -18,7 +18,9 @@ function getRxjsHierarchyDefinition(hierarchyDefinition) {
|
|
|
18
18
|
preProcessNode: hierarchyDefinition.preProcessNode
|
|
19
19
|
? (node) => (0, rxjs_1.from)(hierarchyDefinition.preProcessNode(node)).pipe((0, rxjs_1.filter)((preprocessedNode) => !!preprocessedNode))
|
|
20
20
|
: undefined,
|
|
21
|
-
postProcessNode: hierarchyDefinition.postProcessNode
|
|
21
|
+
postProcessNode: hierarchyDefinition.postProcessNode
|
|
22
|
+
? (node) => (0, rxjs_1.from)(hierarchyDefinition.postProcessNode(node))
|
|
23
|
+
: undefined,
|
|
22
24
|
defineHierarchyLevel: (props) => (0, rxjs_1.from)(hierarchyDefinition.defineHierarchyLevel(props)),
|
|
23
25
|
};
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RxjsHierarchyDefinition.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;
|
|
1
|
+
{"version":3,"file":"RxjsHierarchyDefinition.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAqFhG,gEAgBC;AAnGD,+BAAoD;AAkFpD,gBAAgB;AAChB,SAAgB,0BAA0B,CAAC,mBAAwC;IACjF,OAAO;QACL,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACtC,CAAC,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;gBAClB,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;gBACnE,OAAO,UAAU,YAAY,OAAO,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAA,SAAE,EAAC,UAAU,CAAC,CAAC;YAC3E,CAAC;YACH,CAAC,CAAC,SAAS;QACb,cAAc,EAAE,mBAAmB,CAAC,cAAc;YAChD,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,cAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,aAAM,EAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAClH,CAAC,CAAC,SAAS;QACb,eAAe,EAAE,mBAAmB,CAAC,eAAe;YAClD,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,eAAgB,CAAC,IAAI,CAAC,CAAC;YAC5D,CAAC,CAAC,SAAS;QACb,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;KACvF,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { filter, from, Observable, of } from \"rxjs\";\nimport {\n DefineHierarchyLevelProps,\n HierarchyDefinition,\n HierarchyDefinitionParentNode,\n HierarchyLevelDefinition,\n} from \"../imodel/IModelHierarchyDefinition.js\";\nimport {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"../imodel/IModelHierarchyNode.js\";\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @internal\n */\nexport type RxjsNodeParser = (\n row: { [columnName: string]: any },\n parentNode?: HierarchyDefinitionParentNode,\n) => Observable<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @internal\n */\nexport type RxjsNodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(\n node: TNode,\n) => Observable<TNode>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @internal\n */\nexport type RxjsNodePostProcessor = (node: ProcessedHierarchyNode) => Observable<ProcessedHierarchyNode>;\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @internal\n */\nexport interface RxjsHierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: RxjsNodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: RxjsNodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: RxjsNodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Observable<HierarchyLevelDefinition>;\n}\n\n/** @internal */\nexport function getRxjsHierarchyDefinition(hierarchyDefinition: HierarchyDefinition): RxjsHierarchyDefinition {\n return {\n parseNode: hierarchyDefinition.parseNode\n ? (row, parentNode) => {\n const parsedNode = hierarchyDefinition.parseNode!(row, parentNode);\n return parsedNode instanceof Promise ? from(parsedNode) : of(parsedNode);\n }\n : undefined,\n preProcessNode: hierarchyDefinition.preProcessNode\n ? (node) => from(hierarchyDefinition.preProcessNode!(node)).pipe(filter((preprocessedNode) => !!preprocessedNode))\n : undefined,\n postProcessNode: hierarchyDefinition.postProcessNode\n ? (node) => from(hierarchyDefinition.postProcessNode!(node))\n : undefined,\n defineHierarchyLevel: (props) => from(hierarchyDefinition.defineHierarchyLevel(props)),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionScheduler.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,UAAU,EAOX,MAAM,MAAM,CAAC;AAEd,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAuC;gBAC7C,WAAW,EAAE,MAAM;IAwB/B;;;;;;;;OAQG;IACI,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SubscriptionScheduler.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,UAAU,EAOX,MAAM,MAAM,CAAC;AAEd,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAuC;gBAC7C,WAAW,EAAE,MAAM;IAwB/B;;;;;;;;OAQG;IACI,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;CAerE"}
|
|
@@ -42,10 +42,7 @@ class SubscriptionScheduler {
|
|
|
42
42
|
scheduleSubscription(source) {
|
|
43
43
|
return (0, rxjs_1.defer)(() => {
|
|
44
44
|
let unsubscribed = false;
|
|
45
|
-
const connectableObservable = (0, rxjs_1.connectable)((0, rxjs_1.iif)(() => unsubscribed, rxjs_1.EMPTY, source), {
|
|
46
|
-
connector: () => new rxjs_1.Subject(),
|
|
47
|
-
resetOnDisconnect: false,
|
|
48
|
-
});
|
|
45
|
+
const connectableObservable = (0, rxjs_1.connectable)((0, rxjs_1.iif)(() => unsubscribed, rxjs_1.EMPTY, source), { connector: () => new rxjs_1.Subject(), resetOnDisconnect: false });
|
|
49
46
|
this._scheduler.next(connectableObservable);
|
|
50
47
|
return connectableObservable.pipe((0, rxjs_1.finalize)(() => {
|
|
51
48
|
unsubscribed = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionScheduler.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+BAgBc;AAEd,gBAAgB;AAChB,MAAa,qBAAqB;IACxB,UAAU,GAAG,IAAI,cAAO,EAAwB,CAAC;IACzD,YAAY,WAAmB;QAC7B,IAAI,CAAC,UAAU;aACZ,IAAI,CACH,IAAA,eAAQ,EAAC,CAAC,gBAAgB,EAAE,EAAE;YAC5B,OAAO,gBAAgB,CAAC,IAAI;YAC1B,sDAAsD;YACtD,IAAA,UAAG,EAAC;gBACF,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,OAAO,EAAE,CAAC;gBAC7B,CAAC;aACF,CAAC;YACF,0GAA0G;YAC1G,4EAA4E;YAC5E,IAAA,gBAAS,EAAC,qBAAc,CAAC;YACzB,qDAAqD;YACrD,IAAA,kBAAW,EAAC,oBAAa,CAAC;YAC1B,gFAAgF;YAChF,IAAA,4BAAqB,GAAE,CACxB,CAAC;QACJ,CAAC,EAAE,WAAW,CAAC,CAChB;YACD,wCAAwC;aACvC,SAAS,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAI,MAAqB;QAClD,OAAO,IAAA,YAAK,EAAC,GAAG,EAAE;YAChB,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,MAAM,qBAAqB,GAAG,IAAA,kBAAW,EACvC,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,YAAY,EAAE,YAAK,EAAE,MAAM,CAAC,EACtC
|
|
1
|
+
{"version":3,"file":"SubscriptionScheduler.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+BAgBc;AAEd,gBAAgB;AAChB,MAAa,qBAAqB;IACxB,UAAU,GAAG,IAAI,cAAO,EAAwB,CAAC;IACzD,YAAY,WAAmB;QAC7B,IAAI,CAAC,UAAU;aACZ,IAAI,CACH,IAAA,eAAQ,EAAC,CAAC,gBAAgB,EAAE,EAAE;YAC5B,OAAO,gBAAgB,CAAC,IAAI;YAC1B,sDAAsD;YACtD,IAAA,UAAG,EAAC;gBACF,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,OAAO,EAAE,CAAC;gBAC7B,CAAC;aACF,CAAC;YACF,0GAA0G;YAC1G,4EAA4E;YAC5E,IAAA,gBAAS,EAAC,qBAAc,CAAC;YACzB,qDAAqD;YACrD,IAAA,kBAAW,EAAC,oBAAa,CAAC;YAC1B,gFAAgF;YAChF,IAAA,4BAAqB,GAAE,CACxB,CAAC;QACJ,CAAC,EAAE,WAAW,CAAC,CAChB;YACD,wCAAwC;aACvC,SAAS,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAI,MAAqB;QAClD,OAAO,IAAA,YAAK,EAAC,GAAG,EAAE;YAChB,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,MAAM,qBAAqB,GAAG,IAAA,kBAAW,EACvC,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,YAAY,EAAE,YAAK,EAAE,MAAM,CAAC,EACtC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,cAAO,EAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAChE,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAC5C,OAAO,qBAAqB,CAAC,IAAI,CAC/B,IAAA,eAAQ,EAAC,GAAG,EAAE;gBACZ,YAAY,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAlDD,sDAkDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport {\n asapScheduler,\n Connectable,\n connectable,\n defer,\n EMPTY,\n finalize,\n iif,\n mergeMap,\n Observable,\n observeOn,\n onErrorResumeNextWith,\n queueScheduler,\n Subject,\n subscribeOn,\n tap,\n} from \"rxjs\";\n\n/** @internal */\nexport class SubscriptionScheduler {\n private _scheduler = new Subject<Connectable<unknown>>();\n constructor(concurrency: number) {\n this._scheduler\n .pipe(\n mergeMap((sourceObservable) => {\n return sourceObservable.pipe(\n // connect source observable when scheduler subscribes\n tap({\n subscribe: () => {\n sourceObservable.connect();\n },\n }),\n // Guard against stack overflow when a lot of observables are scheduled. Without this operation `mergeMap`\n // will process each observable that is present in the pipeline recursively.\n observeOn(queueScheduler),\n // Delay the connection until another event loop task\n subscribeOn(asapScheduler),\n // Ignore errors in this pipeline without suppressing them for other subscribers\n onErrorResumeNextWith(),\n );\n }, concurrency),\n )\n // Start consuming scheduled observables\n .subscribe();\n }\n /**\n * Schedules `source` for subscription in the current scheduler.\n *\n * The actual scheduling is performed when the returned observable is subscribed to. To cancel, remove all subscribers\n * from the returned observable.\n *\n * @param source Input observable for which to schedule a subscription.\n * @returns Hot observable which starts emitting `source` values after subscription.\n */\n public scheduleSubscription<T>(source: Observable<T>): Observable<T> {\n return defer(() => {\n let unsubscribed = false;\n const connectableObservable = connectable(\n iif(() => unsubscribed, EMPTY, source),\n { connector: () => new Subject<T>(), resetOnDisconnect: false },\n );\n this._scheduler.next(connectableObservable);\n return connectableObservable.pipe(\n finalize(() => {\n unsubscribed = true;\n }),\n );\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Partition.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,UAAU,EAAE,eAAe,EAA+B,MAAM,MAAM,CAAC;AAGtF,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"Partition.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,UAAU,EAAE,eAAe,EAA+B,MAAM,MAAM,CAAC;AAGtF,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAClC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAC/B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;
|
|
1
|
+
{"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],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kBAAkB,GAAG,SAAS,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,GAAG,CAC9B,CAAC,OAAO,EAAE,EAAE,CACV,IAAI,iBAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAC5B,MAAM,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1D,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,qBAAqB,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAC6B,CAAC;AACtC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, Observable, ObservableInput, ReplaySubject, Subscription } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport function partition<T, U extends T>(\n source: ObservableInput<T>,\n predicate: (value: T) => value is U,\n): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,eAAe,EAAU,MAAM,MAAM,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,eAAe,EAAU,MAAM,MAAM,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,QAAQ,gGASvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,SAAS,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,QAAQ,IAEvE,QAAQ,eAAe,CAAC,WAAW,CAAC,sDAa7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAahG,
|
|
1
|
+
{"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAahG,oDAWC;AAWD,oDAiBC;AAlDD,+BAAqD;AAErD;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,KAAsC;IAEtC,OAAO,oBAAoB,CAA0B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,SAA+E;IAE/E,OAAO,CAAC,MAAoC,EAAE,EAAE,CAC9C,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,IAAI,CACf,IAAA,aAAM,EAAqC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;QAC7D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,6EAA6E;YAC7E,0BAA0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, ObservableInput, reduce } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n value: (item: TSourceItem) => TMapItem,\n) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[]>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<string, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,UAAU,EAAM,MAAM,MAAM,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,UAAU,EAAM,MAAM,MAAM,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,IAC3D,KAAK,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
|
|
@@ -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;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,
|
|
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,CASrH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,
|
|
1
|
+
{"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,4DASC;AArBD,+BAA0D;AAC1D,sDAAmE;AACnE,4CAAmD;AAEnD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAkC,KAAwB;IAChG,OAAO,KAAK,CAAC,IAAI,CACf,IAAA,aAAM,EAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,IAAI,0BAAW,CAAQ,+BAAmB,EAAE,8BAAe,CAAC,KAAK,CAAC,CAAC,EACtE,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.js\";\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((sorted, node) => {\n sorted.insert(node);\n return sorted;\n }, new SortedArray<TNode>(compareNodesByLabel, DuplicatePolicy.Allow)),\n map((sortedArray) => sortedArray.extractArray()),\n concatAll(),\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { GenericInstanceFilter } from "@itwin/core-common";
|
|
2
2
|
export { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, HierarchyNodesDefinition, NodeParser, NodePostProcessor, NodePreProcessor, } from "./hierarchies/imodel/IModelHierarchyDefinition.js";
|
|
3
3
|
export { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, createPredicateBasedHierarchyDefinition, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
|
|
4
|
-
export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
|
|
5
|
-
export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
|
|
4
|
+
export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor, } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
|
|
5
|
+
export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory, } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
|
|
6
6
|
export { createIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider.js";
|
|
7
7
|
export { SourceHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
|
|
8
8
|
export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors.js";
|
|
@@ -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,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,2DAA2D,CAAC;AACnE,OAAO,
|
|
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,mDAAmD,CAAC;AAC3D,OAAO,EACL,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACjH,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,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACL,8BAA8B,EAE9B,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -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,kGAQ2D;AAJzD,wIAAA,wBAAwB,OAAA;AAK1B,kHAKmE;AADjE,+JAAA,uCAAuC,OAAA;AAEzC,
|
|
1
|
+
{"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,kGAQ2D;AAJzD,wIAAA,wBAAwB,OAAA;AAK1B,kHAKmE;AADjE,+JAAA,uCAAuC,OAAA;AAEzC,oGAG4D;AAD1D,iJAAA,gCAAgC,OAAA;AAElC,4FAIwD;AAHtD,wIAAA,2BAA2B,OAAA;AAE3B,0IAAA,6BAA6B,OAAA;AAE/B,8FAAgG;AAAvF,2IAAA,6BAA6B,OAAA;AACtC,sFAA0G;AAA5E,gIAAA,sBAAsB,OAAA;AAEpD,uEAA0E;AAAjE,4HAAA,sBAAsB,OAAA;AAC/B,mEAAgH;AAAhF,iHAAA,aAAa,OAAA;AAC7C,uFAAiH;AAAxG,qIAAA,uBAAuB,OAAA;AAChC,yEAY2C;AATzC,uHAAA,gBAAgB,OAAA;AAUlB,2EAA+G;AAA3D,sHAAA,cAAc,OAAA;AAClE,6EAM6C;AAL3C,uIAAA,8BAA8B,OAAA;AAC9B,4DAA4D;AAC5D,8HAAA,qBAAqB,OAAA;AACrB,+HAAA,sBAAsB,OAAA;AAGxB,uDAAgE;AAAvD,uGAAA,SAAS,OAAA;AAAE,uGAAA,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.js\";\nexport {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n createPredicateBasedHierarchyDefinition,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport {\n LimitingECSqlQueryExecutor,\n createLimitingECSqlQueryExecutor,\n} from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport {\n NodeSelectClauseColumnNames,\n NodesQueryClauseFactory,\n createNodesQueryClauseFactory,\n} from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport { SourceHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\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.js\";\nexport { GetHierarchyNodesProps, HierarchyProvider, mergeProviders } from \"./hierarchies/HierarchyProvider.js\";\nexport {\n createHierarchyFilteringHelper,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extractFilteringProps,\n HierarchyFilteringPath,\n HierarchyFilteringPathOptions,\n} from \"./hierarchies/HierarchyFiltering.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,eAAe,EAAoB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE5G;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,GAAG,EAAE,eAAe,CAAC;IAErB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;OAiBG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,cAAc;AACd,MAAM,WAAW,kCAAkC;IACjD;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,cAAc;AACd,MAAM,WAAW,uCAAuC;IACtD;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,cAAc;AACd,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;OASG;IACH,UAAU,CAAC,EACP,OAAO,GAEP,4BAA4B,GAE5B,6BAA6B,GAC7B,uCAAuC,GACvC,kCAAkC,CAAC;CACxC;
|
|
1
|
+
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,eAAe,EAAoB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE5G;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,GAAG,EAAE,eAAe,CAAC;IAErB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;OAiBG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,cAAc;AACd,MAAM,WAAW,kCAAkC;IACjD;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,cAAc;AACd,MAAM,WAAW,uCAAuC;IACtD;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,cAAc;AACd,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;OASG;IACH,UAAU,CAAC,EACP,OAAO,GAEP,4BAA4B,GAE5B,6BAA6B,GAC7B,uCAAuC,GACvC,kCAAkC,CAAC;CACxC;AAqCD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B;IAAE,IAAI,EAAE,4BAA4B,CAAC;IAAC,OAAO,CAAC,EAAE,6BAA6B,CAAA;CAAE,CAAC;AACpF,cAAc;AAEd,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,SAAgB,SAAS,CACvB,MAAM,EAAE,sBAAsB,GAC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
|
17
17
|
const lhsDepth = "depth" in lhs ? lhs.depth : "depthInPath" in lhs ? lhs.depthInPath : lhs.depthInHierarchy;
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
19
19
|
const rhsDepth = "depth" in rhs ? rhs.depth : "depthInPath" in rhs ? rhs.depthInPath : rhs.depthInHierarchy;
|
|
20
|
+
const isLhsDepthBasedOnPath =
|
|
20
21
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
21
|
-
|
|
22
|
+
"depthInPath" in lhs ? true : !("key" in lhs) && !("depthInHierarchy" in lhs) && !lhs.includeGroupingNodes;
|
|
23
|
+
const isRhsDepthBasedOnPath =
|
|
22
24
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
23
|
-
|
|
25
|
+
"depthInPath" in rhs ? true : !("key" in rhs) && !("depthInHierarchy" in rhs) && !rhs.includeGroupingNodes;
|
|
24
26
|
if (isLhsDepthBasedOnPath) {
|
|
25
27
|
if (isRhsDepthBasedOnPath) {
|
|
26
28
|
return lhsDepth > rhsDepth ? lhs : rhs;
|
|
@@ -69,9 +71,7 @@ export var HierarchyFilteringPath;
|
|
|
69
71
|
if (!lhs || !rhs) {
|
|
70
72
|
return lhs ?? rhs;
|
|
71
73
|
}
|
|
72
|
-
return {
|
|
73
|
-
autoExpand: HierarchyFilteringPathOptions.mergeAutoExpandOptions(lhs.autoExpand, rhs.autoExpand),
|
|
74
|
-
};
|
|
74
|
+
return { autoExpand: HierarchyFilteringPathOptions.mergeAutoExpandOptions(lhs.autoExpand, rhs.autoExpand) };
|
|
75
75
|
}
|
|
76
76
|
HierarchyFilteringPath.mergeOptions = mergeOptions;
|
|
77
77
|
})(HierarchyFilteringPath || (HierarchyFilteringPath = {}));
|
|
@@ -81,14 +81,16 @@ export var HierarchyFilteringPath;
|
|
|
81
81
|
* @public
|
|
82
82
|
* @deprecated in 1.3. Use `createHierarchyFilteringHelper` instead.
|
|
83
83
|
*/
|
|
84
|
-
/*
|
|
84
|
+
/* v8 ignore start */
|
|
85
85
|
export function extractFilteringProps(rootLevelFilteringProps, parentNode) {
|
|
86
86
|
return extractFilteringPropsInternal(rootLevelFilteringProps, parentNode);
|
|
87
87
|
}
|
|
88
|
-
/*
|
|
88
|
+
/* v8 ignore stop */
|
|
89
89
|
function extractFilteringPropsInternal(rootLevelFilteringProps, parentNode) {
|
|
90
90
|
if (!parentNode) {
|
|
91
|
-
return rootLevelFilteringProps
|
|
91
|
+
return rootLevelFilteringProps
|
|
92
|
+
? { filteredNodePaths: rootLevelFilteringProps, hasFilterTargetAncestor: false }
|
|
93
|
+
: /** v8 ignore next */ undefined;
|
|
92
94
|
}
|
|
93
95
|
return parentNode.filtering?.filteredChildrenIdentifierPaths
|
|
94
96
|
? {
|
|
@@ -141,16 +143,23 @@ export function createHierarchyFilteringHelper(rootLevelFilteringProps, parentNo
|
|
|
141
143
|
* `nodeKey` prop can be used to check the whole identifier.
|
|
142
144
|
*/
|
|
143
145
|
createChildNodeProps: (props) => {
|
|
146
|
+
// TODO: MISSING_COVERAGE
|
|
147
|
+
/* v8 ignore if -- @preserve */
|
|
144
148
|
if (!hasFilter) {
|
|
145
149
|
return undefined;
|
|
146
150
|
}
|
|
147
151
|
const reducer = new MatchingFilteringPathsReducer(filteringProps?.hasFilterTargetAncestor);
|
|
148
152
|
filteringProps.filteredNodePaths.forEach((filteredPath) => {
|
|
149
153
|
const normalizedPath = HierarchyFilteringPath.normalize(filteredPath);
|
|
154
|
+
// TODO: MISSING_COVERAGE
|
|
155
|
+
/* v8 ignore start */
|
|
150
156
|
if ("nodeKey" in props &&
|
|
151
|
-
((HierarchyNodeKey.isGeneric(props.nodeKey) &&
|
|
152
|
-
|
|
157
|
+
((HierarchyNodeKey.isGeneric(props.nodeKey) &&
|
|
158
|
+
HierarchyNodeIdentifier.equal(normalizedPath.path[0], props.nodeKey)) ||
|
|
159
|
+
(HierarchyNodeKey.isInstances(props.nodeKey) &&
|
|
160
|
+
props.nodeKey.instanceKeys.some((ik) => HierarchyNodeIdentifier.equal(normalizedPath.path[0], ik))))) {
|
|
153
161
|
reducer.accept(normalizedPath);
|
|
162
|
+
/* v8 ignore stop */
|
|
154
163
|
}
|
|
155
164
|
else if ("pathMatcher" in props && props.pathMatcher(normalizedPath.path[0])) {
|
|
156
165
|
reducer.accept(normalizedPath);
|
|
@@ -162,6 +171,8 @@ export function createHierarchyFilteringHelper(rootLevelFilteringProps, parentNo
|
|
|
162
171
|
* Similar to `createChildNodeProps`, but takes an async `pathMatcher` prop.
|
|
163
172
|
*/
|
|
164
173
|
createChildNodePropsAsync: (props) => {
|
|
174
|
+
// TODO: MISSING_COVERAGE
|
|
175
|
+
/* v8 ignore if -- @preserve */
|
|
165
176
|
if (!hasFilter) {
|
|
166
177
|
return undefined;
|
|
167
178
|
}
|
|
@@ -169,7 +180,8 @@ export function createHierarchyFilteringHelper(rootLevelFilteringProps, parentNo
|
|
|
169
180
|
const matchedPathPromises = new Array();
|
|
170
181
|
for (const filteredChildrenNodeIdentifierPath of filteringProps.filteredNodePaths) {
|
|
171
182
|
const normalizedPath = HierarchyFilteringPath.normalize(filteredChildrenNodeIdentifierPath);
|
|
172
|
-
|
|
183
|
+
// TODO: MISSING_COVERAGE
|
|
184
|
+
/* v8 ignore if -- @preserve */
|
|
173
185
|
if (normalizedPath.path.length === 0) {
|
|
174
186
|
continue;
|
|
175
187
|
}
|
|
@@ -203,6 +215,8 @@ class MatchingFilteringPathsReducer {
|
|
|
203
215
|
}
|
|
204
216
|
accept(normalizedPath) {
|
|
205
217
|
const { path, options } = normalizedPath;
|
|
218
|
+
// TODO: MISSING_COVERAGE
|
|
219
|
+
/* v8 ignore else -- @preserve */
|
|
206
220
|
if (path.length === 1) {
|
|
207
221
|
this._isFilterTarget = true;
|
|
208
222
|
this._filterTargetOptions = HierarchyFilteringPath.mergeOptions(this._filterTargetOptions, options);
|
|
@@ -221,9 +235,13 @@ class MatchingFilteringPathsReducer {
|
|
|
221
235
|
? 0
|
|
222
236
|
: "key" in this._autoExpandOption ||
|
|
223
237
|
"depthInHierarchy" in this._autoExpandOption ||
|
|
238
|
+
// TODO: MISSING_COVERAGE
|
|
239
|
+
/* v8 ignore start */
|
|
224
240
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
225
241
|
("includeGroupingNodes" in this._autoExpandOption && this._autoExpandOption.includeGroupingNodes)
|
|
226
|
-
?
|
|
242
|
+
? // TODO: MISSING_COVERAGE
|
|
243
|
+
/* v8 ignore stop */
|
|
244
|
+
1 + parentNode.parentKeys.length
|
|
227
245
|
: 1 + parentNode.parentKeys.filter((key) => !HierarchyNodeKey.isGrouping(key)).length;
|
|
228
246
|
const depth = "depthInHierarchy" in this._autoExpandOption
|
|
229
247
|
? this._autoExpandOption.depthInHierarchy
|
|
@@ -231,7 +249,8 @@ class MatchingFilteringPathsReducer {
|
|
|
231
249
|
? // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
232
250
|
this._autoExpandOption.depth
|
|
233
251
|
: // With `depthInPath` option we don't want to expand node that is at the `depthInPath` position
|
|
234
|
-
|
|
252
|
+
// TODO: MISSING_COVERAGE
|
|
253
|
+
/* v8 ignore next */ this._autoExpandOption.depthInPath - 1;
|
|
235
254
|
return parentLength < depth;
|
|
236
255
|
}
|
|
237
256
|
return false;
|
|
@@ -242,8 +261,12 @@ class MatchingFilteringPathsReducer {
|
|
|
242
261
|
? {
|
|
243
262
|
filtering: {
|
|
244
263
|
...(this._hasFilterTargetAncestor ? { hasFilterTargetAncestor: true } : undefined),
|
|
245
|
-
...(this._isFilterTarget
|
|
246
|
-
|
|
264
|
+
...(this._isFilterTarget
|
|
265
|
+
? { isFilterTarget: true, filterTargetOptions: this._filterTargetOptions }
|
|
266
|
+
: undefined),
|
|
267
|
+
...(this._filteredChildrenIdentifierPaths.length > 0
|
|
268
|
+
? { filteredChildrenIdentifierPaths: this._filteredChildrenIdentifierPaths }
|
|
269
|
+
: undefined),
|
|
247
270
|
},
|
|
248
271
|
}
|
|
249
272
|
: undefined),
|