@itwin/presentation-hierarchies 2.0.0-alpha.5 → 2.0.0-alpha.6
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 +36 -0
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +77 -36
- package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyFiltering.js +126 -98
- package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts +19 -0
- package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/cjs/hierarchies/HierarchyMerge.js +43 -0
- package/lib/cjs/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/cjs/hierarchies/HierarchyNode.d.ts +2 -2
- package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
- 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 +8 -8
- package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts +0 -18
- package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/HierarchyProvider.js +0 -37
- package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +2 -0
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +45 -30
- package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +42 -7
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +136 -45
- package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +8 -1
- package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.d.ts +3 -0
- package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/Common.js +12 -1
- package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +2 -1
- package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/cjs/presentation-hierarchies.d.ts +3 -2
- package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
- package/lib/cjs/presentation-hierarchies.js +4 -3
- package/lib/cjs/presentation-hierarchies.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts +77 -36
- package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyFiltering.js +125 -98
- package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyMerge.d.ts +19 -0
- package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +1 -0
- package/lib/esm/hierarchies/HierarchyMerge.js +40 -0
- package/lib/esm/hierarchies/HierarchyMerge.js.map +1 -0
- package/lib/esm/hierarchies/HierarchyNode.d.ts +2 -2
- package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
- 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 +9 -9
- package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.d.ts +0 -18
- package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/HierarchyProvider.js +1 -36
- package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +2 -0
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +47 -32
- package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +42 -7
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +138 -48
- package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js +8 -1
- package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
- package/lib/esm/hierarchies/internal/Common.d.ts +3 -0
- package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/Common.js +11 -1
- package/lib/esm/hierarchies/internal/Common.js.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +3 -2
- package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
- package/lib/esm/presentation-hierarchies.d.ts +3 -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 +7 -7
|
@@ -9,7 +9,10 @@ exports.defaultNodesParser = defaultNodesParser;
|
|
|
9
9
|
const rxjs_1 = require("rxjs");
|
|
10
10
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
11
11
|
const presentation_shared_1 = require("@itwin/presentation-shared");
|
|
12
|
+
const Common_js_1 = require("../internal/Common.js");
|
|
13
|
+
const LoggingUtils_js_1 = require("../internal/LoggingUtils.js");
|
|
12
14
|
const NodeSelectQueryFactory_js_1 = require("./NodeSelectQueryFactory.js");
|
|
15
|
+
const LOGGING_NAMESPACE = `${Common_js_1.LOGGING_NAMESPACE_INTERNAL}.QueryRows`;
|
|
13
16
|
/** @internal */
|
|
14
17
|
function readNodes(props) {
|
|
15
18
|
const { queryExecutor, query, limit } = props;
|
|
@@ -19,7 +22,11 @@ function readNodes(props) {
|
|
|
19
22
|
restartToken: `readNodes/${core_bentley_1.Guid.createValue()}`,
|
|
20
23
|
...(limit !== undefined ? { limit } : undefined),
|
|
21
24
|
};
|
|
22
|
-
return (0, rxjs_1.from)(queryExecutor.createQueryReader(query, config)).pipe((0,
|
|
25
|
+
return (0, rxjs_1.from)(queryExecutor.createQueryReader(query, config)).pipe((0, LoggingUtils_js_1.log)({
|
|
26
|
+
category: LOGGING_NAMESPACE,
|
|
27
|
+
severity: "trace",
|
|
28
|
+
message: /* c8 ignore next */ (row) => JSON.stringify(row),
|
|
29
|
+
}), (0, rxjs_1.mergeMap)((row) => parser(row)));
|
|
23
30
|
}
|
|
24
31
|
/** @internal */
|
|
25
32
|
function defaultNodesParser(row) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodesReader.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/TreeNodesReader.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;
|
|
1
|
+
{"version":3,"file":"TreeNodesReader.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/TreeNodesReader.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAsBhG,8BAiBC;AAoBD,gDAoBC;AA7ED,+BAAsD;AACtD,sDAAuD;AACvD,oEAA+E;AAC/E,qD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AgB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACjF,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 { from, mergeMap, Observable, of } from \"rxjs\";\nimport { Guid, Id64String } from \"@itwin/core-bentley\";\nimport { ECSqlQueryDef, parseInstanceLabel } from \"@itwin/presentation-shared\";\nimport { LOGGING_NAMESPACE_INTERNAL as BASE_LOGGING_NAMESPACE } from \"../internal/Common.js\";\nimport { log } from \"../internal/LoggingUtils.js\";\nimport { RxjsNodeParser } from \"../internal/RxjsHierarchyDefinition.js\";\nimport { InstanceHierarchyNodeProcessingParams, SourceInstanceHierarchyNode } from \"./IModelHierarchyNode.js\";\nimport { LimitingECSqlQueryExecutor } from \"./LimitingECSqlQueryExecutor.js\";\nimport { NodeSelectClauseColumnNames } from \"./NodeSelectQueryFactory.js\";\n\nconst LOGGING_NAMESPACE = `${BASE_LOGGING_NAMESPACE}.QueryRows`;\n\ninterface ReadNodesProps {\n queryExecutor: LimitingECSqlQueryExecutor;\n query: ECSqlQueryDef;\n limit?: number | \"unbounded\";\n parser?: RxjsNodeParser;\n}\n\n/** @internal */\nexport function readNodes(props: ReadNodesProps): Observable<SourceInstanceHierarchyNode> {\n const { queryExecutor, query, limit } = props;\n const parser: RxjsNodeParser = props?.parser ?? ((row) => of(defaultNodesParser(row)));\n const config: Parameters<LimitingECSqlQueryExecutor[\"createQueryReader\"]>[1] = {\n rowFormat: \"ECSqlPropertyNames\",\n restartToken: `readNodes/${Guid.createValue()}`,\n ...(limit !== undefined ? { limit } : undefined),\n };\n\n return from(queryExecutor.createQueryReader(query, config)).pipe(\n log({\n category: LOGGING_NAMESPACE,\n severity: \"trace\",\n message: /* c8 ignore next */ (row) => JSON.stringify(row),\n }),\n mergeMap((row) => parser(row)),\n );\n}\n\n/**\n * The interface should contain a member for each `NodeSelectClauseColumnNames` value.\n * @internal\n */\nexport interface RowDef {\n [NodeSelectClauseColumnNames.FullClassName]: string;\n [NodeSelectClauseColumnNames.ECInstanceId]: Id64String;\n [NodeSelectClauseColumnNames.DisplayLabel]: string;\n [NodeSelectClauseColumnNames.HasChildren]?: boolean;\n [NodeSelectClauseColumnNames.HideIfNoChildren]?: boolean;\n [NodeSelectClauseColumnNames.HideNodeInHierarchy]?: boolean;\n [NodeSelectClauseColumnNames.Grouping]?: string;\n [NodeSelectClauseColumnNames.ExtendedData]?: string;\n [NodeSelectClauseColumnNames.AutoExpand]?: boolean;\n [NodeSelectClauseColumnNames.SupportsFiltering]?: boolean;\n}\n\n/** @internal */\nexport function defaultNodesParser(row: { [columnName: string]: any }): SourceInstanceHierarchyNode {\n const typedRow = row as RowDef;\n const processingParams: InstanceHierarchyNodeProcessingParams = {\n ...(typedRow.HideIfNoChildren ? { hideIfNoChildren: true } : undefined),\n ...(typedRow.HideNodeInHierarchy ? { hideInHierarchy: true } : undefined),\n ...(typedRow.Grouping ? { grouping: JSON.parse(typedRow.Grouping) } : undefined),\n };\n return {\n // don't format the label here - we're going to do that at node pre-processing step to handle both - instance and generic nodes\n label: parseInstanceLabel(typedRow.DisplayLabel),\n key: {\n type: \"instances\",\n instanceKeys: [{ className: typedRow.FullClassName.replace(\":\", \".\"), id: typedRow.ECInstanceId }],\n },\n ...(typedRow.HasChildren !== undefined ? { children: !!typedRow.HasChildren } : undefined),\n ...(typedRow.AutoExpand ? { autoExpand: true } : undefined),\n ...(typedRow.SupportsFiltering ? { supportsFiltering: true } : undefined),\n ...(typedRow.ExtendedData ? { extendedData: JSON.parse(typedRow.ExtendedData) } : undefined),\n ...(Object.keys(processingParams).length > 0 ? { processingParams } : undefined),\n };\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./DisposePolyfill.js";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
2
3
|
import { ConcatenatedValue } from "@itwin/presentation-shared";
|
|
3
4
|
import { HierarchyNodeKey } from "../HierarchyNodeKey.js";
|
|
4
5
|
/**
|
|
@@ -55,4 +56,6 @@ export declare function safeDispose(disposable: {} | {
|
|
|
55
56
|
} | {
|
|
56
57
|
dispose: () => void;
|
|
57
58
|
}): void;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export declare function fromPossiblyPromise<T>(possiblyPromise: T | Promise<T>): Observable<T>;
|
|
58
61
|
//# sourceMappingURL=Common.d.ts.map
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"AAKA,OAAO,sBA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CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,QAMtG;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAErF"}
|
|
@@ -13,8 +13,10 @@ exports.createNodeIdentifierForLogging = createNodeIdentifierForLogging;
|
|
|
13
13
|
exports.hasChildren = hasChildren;
|
|
14
14
|
exports.compareNodesByLabel = compareNodesByLabel;
|
|
15
15
|
exports.safeDispose = safeDispose;
|
|
16
|
+
exports.fromPossiblyPromise = fromPossiblyPromise;
|
|
16
17
|
require("./DisposePolyfill.js");
|
|
17
18
|
const natural_compare_lite_1 = __importDefault(require("natural-compare-lite"));
|
|
19
|
+
const rxjs_1 = require("rxjs");
|
|
18
20
|
/**
|
|
19
21
|
* This is a logging namespace for public log messages that may be interesting to consumers.
|
|
20
22
|
* @internal
|
|
@@ -49,7 +51,12 @@ function createNodeIdentifierForLogging(node) {
|
|
|
49
51
|
}
|
|
50
52
|
const { label, key } = node;
|
|
51
53
|
const parentKeys = "parentKeys" in node ? node.parentKeys : "<unknown>";
|
|
52
|
-
|
|
54
|
+
const groupedInstanceKeys = "groupedInstanceKeys" in node && Array.isArray(node.groupedInstanceKeys)
|
|
55
|
+
? node.groupedInstanceKeys.length <= 3
|
|
56
|
+
? node.groupedInstanceKeys
|
|
57
|
+
: `<${node.groupedInstanceKeys.length} keys>`
|
|
58
|
+
: undefined;
|
|
59
|
+
return JSON.stringify({ label, key, parentKeys, groupedInstanceKeys });
|
|
53
60
|
}
|
|
54
61
|
/* c8 ignore end */
|
|
55
62
|
/** @internal */
|
|
@@ -77,4 +84,8 @@ function safeDispose(disposable) {
|
|
|
77
84
|
disposable[Symbol.dispose]();
|
|
78
85
|
}
|
|
79
86
|
}
|
|
87
|
+
/** @internal */
|
|
88
|
+
function fromPossiblyPromise(possiblyPromise) {
|
|
89
|
+
return possiblyPromise instanceof Promise ? (0, rxjs_1.from)(possiblyPromise) : (0, rxjs_1.of)(possiblyPromise);
|
|
90
|
+
}
|
|
80
91
|
//# sourceMappingURL=Common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;AAoChG,wEASC;AAID,wEAeC;AAID,kCAEC;AAGD,kDAEC;AAWD,kCAMC;AAGD,kDAEC;AA/FD,gCAA8B;AAE9B,gFAAkD;AAClD,+BAA4C;AAI5C;;;GAGG;AACU,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAE5D;;;GAGG;AACU,QAAA,6BAA6B,GAAG,GAAG,yBAAiB,cAAc,CAAC;AAEhF;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E;;;;GAIG;AACU,QAAA,sCAAsC,GAAG,GAAG,kCAA0B,cAAc,CAAC;AAElG,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,YAAoB,EACpB,YAIiD;IAEjD,OAAO,GAAG,YAAY,cAAc,YAAY,EAAE,CAAC;AACrD,CAAC;AAED,gBAAgB;AAChB,qBAAqB;AACrB,SAAgB,8BAA8B,CAC5C,IAA+G;IAE/G,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACxE,MAAM,mBAAmB,GACvB,qBAAqB,IA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,CAAC,IAAA,SAAE,EAAC,eAAe,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport \"./DisposePolyfill.js\";\n\nimport naturalCompare from \"natural-compare-lite\";\nimport { from, Observable, of } from \"rxjs\";\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/* c8 ignore start */\nexport function createNodeIdentifierForLogging(\n node: { label: string | ConcatenatedValue; key: HierarchyNodeKey; parentKeys?: HierarchyNodeKey[] } | undefined,\n) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n const groupedInstanceKeys =\n \"groupedInstanceKeys\" in node && Array.isArray(node.groupedInstanceKeys)\n ? node.groupedInstanceKeys.length <= 3\n ? node.groupedInstanceKeys\n : `<${node.groupedInstanceKeys.length} keys>`\n : undefined;\n return JSON.stringify({ label, key, parentKeys, groupedInstanceKeys });\n}\n/* c8 ignore end */\n\n/** @internal */\nexport function hasChildren<TNode extends { children?: boolean | Array<unknown> }>(node: TNode) {\n return node.children === true || (Array.isArray(node.children) && node.children.length > 0);\n}\n\n/** @internal */\nexport function compareNodesByLabel<TLhsNode extends { label: string }, TRhsNode extends { label: string }>(lhs: TLhsNode, rhs: TRhsNode): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n\n/**\n * A helper that disposes the given object, if it's disposable.\n *\n * The first option is to dispose using the deprecated `dispose` method if it exists on the object.\n * If not, we use the new `Symbol.dispose` method. If that doesn't exist either, the object is\n * considered as non-disposable and nothing is done with it.\n *\n * @internal\n */\nexport function safeDispose(disposable: {} | { [Symbol.dispose]: () => void } | { dispose: () => void }) {\n if (\"dispose\" in disposable) {\n disposable.dispose();\n } else if (Symbol.dispose in disposable) {\n disposable[Symbol.dispose]();\n }\n}\n\n/** @internal */\nexport function fromPossiblyPromise<T>(possiblyPromise: T | Promise<T>): Observable<T> {\n return possiblyPromise instanceof Promise ? from(possiblyPromise) : of(possiblyPromise);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAE,MAAM,MAAM,CAAC;AAChD,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;AAG1C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,UAAU,CAAC,EAAE,6BAA6B,KAAK,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAEzJ;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,SAAS,6BAA6B,GAAG,8BAA8B,EAAE,IAAI,EAAE,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAAC;AAEpJ;;;;;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,CAc5G"}
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.getRxjsHierarchyDefinition = getRxjsHierarchyDefinition;
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
9
|
+
const Common_js_1 = require("./Common.js");
|
|
9
10
|
/** @internal */
|
|
10
11
|
function getRxjsHierarchyDefinition(hierarchyDefinition) {
|
|
11
12
|
return {
|
|
12
13
|
parseNode: hierarchyDefinition.parseNode
|
|
13
14
|
? (row, parentNode) => {
|
|
14
15
|
const parsedNode = hierarchyDefinition.parseNode(row, parentNode);
|
|
15
|
-
return
|
|
16
|
+
return (0, Common_js_1.fromPossiblyPromise)(parsedNode);
|
|
16
17
|
}
|
|
17
18
|
: undefined,
|
|
18
19
|
preProcessNode: hierarchyDefinition.preProcessNode
|
|
@@ -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;;AAiFhG,gEAcC;AA7FD,+BAAgD;AAahD,2CAAkD;AAiElD,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,IAAA,+BAAmB,EAAC,UAAU,CAAC,CAAC;YACzC,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,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,eAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QAC7H,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 } 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\";\nimport { fromPossiblyPromise } from \"./Common.js\";\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @internal\n */\nexport type RxjsNodeParser = (row: { [columnName: string]: any }, parentNode?: HierarchyDefinitionParentNode) => 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>(node: TNode) => 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 fromPossiblyPromise(parsedNode);\n }\n : undefined,\n preProcessNode: hierarchyDefinition.preProcessNode\n ? (node) => from(hierarchyDefinition.preProcessNode!(node)).pipe(filter((preprocessedNode) => !!preprocessedNode))\n : undefined,\n postProcessNode: hierarchyDefinition.postProcessNode ? (node) => from(hierarchyDefinition.postProcessNode!(node)) : undefined,\n defineHierarchyLevel: (props) => from(hierarchyDefinition.defineHierarchyLevel(props)),\n };\n}\n"]}
|
|
@@ -3,13 +3,14 @@ export { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinitio
|
|
|
3
3
|
export { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, createPredicateBasedHierarchyDefinition, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
|
|
4
4
|
export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
|
|
5
5
|
export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
|
|
6
|
-
export { createIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider.js";
|
|
6
|
+
export { createIModelHierarchyProvider, createMergedIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider.js";
|
|
7
7
|
export { SourceHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
|
|
8
8
|
export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors.js";
|
|
9
9
|
export { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from "./hierarchies/HierarchyNode.js";
|
|
10
10
|
export { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from "./hierarchies/HierarchyNodeIdentifier.js";
|
|
11
11
|
export { GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey, ClassGroupingNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey, IModelHierarchyNodeKey, } from "./hierarchies/HierarchyNodeKey.js";
|
|
12
|
-
export { GetHierarchyNodesProps, HierarchyProvider
|
|
12
|
+
export { GetHierarchyNodesProps, HierarchyProvider } from "./hierarchies/HierarchyProvider.js";
|
|
13
|
+
export { mergeProviders } from "./hierarchies/HierarchyMerge.js";
|
|
13
14
|
export { createHierarchyFilteringHelper, extractFilteringProps, HierarchyFilteringPath, HierarchyFilteringPathOptions, } from "./hierarchies/HierarchyFiltering.js";
|
|
14
15
|
export { getLogger, setLogger } from "./hierarchies/Logging.js";
|
|
15
16
|
//# sourceMappingURL=presentation-hierarchies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-hierarchies.d.ts","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EACL,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,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AAClI,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;
|
|
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,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AAClI,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,mCAAmC,EAAE,MAAM,iDAAiD,CAAC;AACrI,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,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.setLogger = exports.getLogger = exports.HierarchyFilteringPath = exports.extractFilteringProps = exports.createHierarchyFilteringHelper = exports.mergeProviders = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.ProcessedHierarchyNode = exports.createIModelHierarchyProvider = exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.createLimitingECSqlQueryExecutor = exports.createPredicateBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
|
|
7
|
+
exports.setLogger = exports.getLogger = exports.HierarchyFilteringPath = exports.extractFilteringProps = exports.createHierarchyFilteringHelper = exports.mergeProviders = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.ProcessedHierarchyNode = exports.createMergedIModelHierarchyProvider = exports.createIModelHierarchyProvider = exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.createLimitingECSqlQueryExecutor = exports.createPredicateBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
|
|
8
8
|
var core_common_1 = require("@itwin/core-common");
|
|
9
9
|
Object.defineProperty(exports, "GenericInstanceFilter", { enumerable: true, get: function () { return core_common_1.GenericInstanceFilter; } });
|
|
10
10
|
var IModelHierarchyDefinition_js_1 = require("./hierarchies/imodel/IModelHierarchyDefinition.js");
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "NodeSelectClauseColumnNames", { enumerable: true
|
|
|
18
18
|
Object.defineProperty(exports, "createNodesQueryClauseFactory", { enumerable: true, get: function () { return NodeSelectQueryFactory_js_1.createNodesQueryClauseFactory; } });
|
|
19
19
|
var IModelHierarchyProvider_js_1 = require("./hierarchies/imodel/IModelHierarchyProvider.js");
|
|
20
20
|
Object.defineProperty(exports, "createIModelHierarchyProvider", { enumerable: true, get: function () { return IModelHierarchyProvider_js_1.createIModelHierarchyProvider; } });
|
|
21
|
+
Object.defineProperty(exports, "createMergedIModelHierarchyProvider", { enumerable: true, get: function () { return IModelHierarchyProvider_js_1.createMergedIModelHierarchyProvider; } });
|
|
21
22
|
var IModelHierarchyNode_js_1 = require("./hierarchies/imodel/IModelHierarchyNode.js");
|
|
22
23
|
Object.defineProperty(exports, "ProcessedHierarchyNode", { enumerable: true, get: function () { return IModelHierarchyNode_js_1.ProcessedHierarchyNode; } });
|
|
23
24
|
var HierarchyErrors_js_1 = require("./hierarchies/HierarchyErrors.js");
|
|
@@ -28,8 +29,8 @@ var HierarchyNodeIdentifier_js_1 = require("./hierarchies/HierarchyNodeIdentifie
|
|
|
28
29
|
Object.defineProperty(exports, "HierarchyNodeIdentifier", { enumerable: true, get: function () { return HierarchyNodeIdentifier_js_1.HierarchyNodeIdentifier; } });
|
|
29
30
|
var HierarchyNodeKey_js_1 = require("./hierarchies/HierarchyNodeKey.js");
|
|
30
31
|
Object.defineProperty(exports, "HierarchyNodeKey", { enumerable: true, get: function () { return HierarchyNodeKey_js_1.HierarchyNodeKey; } });
|
|
31
|
-
var
|
|
32
|
-
Object.defineProperty(exports, "mergeProviders", { enumerable: true, get: function () { return
|
|
32
|
+
var HierarchyMerge_js_1 = require("./hierarchies/HierarchyMerge.js");
|
|
33
|
+
Object.defineProperty(exports, "mergeProviders", { enumerable: true, get: function () { return HierarchyMerge_js_1.mergeProviders; } });
|
|
33
34
|
var HierarchyFiltering_js_1 = require("./hierarchies/HierarchyFiltering.js");
|
|
34
35
|
Object.defineProperty(exports, "createHierarchyFilteringHelper", { enumerable: true, get: function () { return HierarchyFiltering_js_1.createHierarchyFilteringHelper; } });
|
|
35
36
|
Object.defineProperty(exports, "extractFilteringProps", { enumerable: true, get: function () { return HierarchyFiltering_js_1.extractFilteringProps; } });
|
|
@@ -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,oGAAkI;AAA7F,iJAAA,gCAAgC,OAAA;AACrE,4FAAqJ;AAA5I,wIAAA,2BAA2B,OAAA;AAA2B,0IAAA,6BAA6B,OAAA;AAC5F,
|
|
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,oGAAkI;AAA7F,iJAAA,gCAAgC,OAAA;AACrE,4FAAqJ;AAA5I,wIAAA,2BAA2B,OAAA;AAA2B,0IAAA,6BAA6B,OAAA;AAC5F,8FAAqI;AAA5H,2IAAA,6BAA6B,OAAA;AAAE,iJAAA,mCAAmC,OAAA;AAC3E,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;AAWlB,qEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,6EAK6C;AAJ3C,uIAAA,8BAA8B,OAAA;AAC9B,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 { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider, createMergedIModelHierarchyProvider } 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 } from \"./hierarchies/HierarchyProvider.js\";\nexport { mergeProviders } from \"./hierarchies/HierarchyMerge.js\";\nexport {\n createHierarchyFilteringHelper,\n extractFilteringProps,\n HierarchyFilteringPath,\n HierarchyFilteringPathOptions,\n} from \"./hierarchies/HierarchyFiltering.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
|
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonGroupingHierarchyNode } from "./HierarchyNode.js";
|
|
2
2
|
import { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from "./HierarchyNodeIdentifier.js";
|
|
3
|
-
import { GenericNodeKey, InstancesNodeKey } from "./HierarchyNodeKey.js";
|
|
3
|
+
import { GenericNodeKey, HierarchyNodeKey, InstancesNodeKey } from "./HierarchyNodeKey.js";
|
|
4
4
|
/** @public */
|
|
5
|
-
export interface
|
|
5
|
+
export interface FilteringPathRevealDepthInPath {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Index of the node in filtering path should be revealed in hierarchy by auto-expanding its ancestors.
|
|
8
8
|
*
|
|
9
9
|
* Use when you want to expand up to specific instance node and don't care about grouping nodes.
|
|
10
10
|
*
|
|
11
|
-
* **
|
|
11
|
+
* **Use case example:**
|
|
12
|
+
*
|
|
13
|
+
* All nodes up to `Element1` should be expanded in the following hierarchy:
|
|
14
|
+
* - Node1
|
|
15
|
+
* - GroupingNode1
|
|
16
|
+
* - GroupingNode2
|
|
17
|
+
* - Element1
|
|
18
|
+
* - Element2
|
|
19
|
+
*
|
|
20
|
+
* Provide `{ path: [Node1, Element1], reveal: { depthInPath: 1 } }`
|
|
21
|
+
*
|
|
22
|
+
* **NOTE**: All nodes that are up to `depthInPath` will be expanded **except** filter targets.
|
|
12
23
|
*/
|
|
13
24
|
depthInPath: number;
|
|
14
25
|
}
|
|
15
26
|
/** @public */
|
|
16
|
-
export interface
|
|
27
|
+
export interface FilteringPathRevealDepthInHierarchy {
|
|
17
28
|
/**
|
|
18
|
-
*
|
|
29
|
+
* Considering the list of nodes from root to the target node, this is an index in that list, identifying the node that should be revealed in hierarchy by auto-expanding its ancestors.
|
|
19
30
|
*
|
|
20
31
|
* This should take into account the number of grouping nodes in hierarchy.
|
|
21
32
|
*
|
|
22
|
-
*
|
|
33
|
+
* **Use case example:**
|
|
23
34
|
*
|
|
24
|
-
*
|
|
35
|
+
* Only `Node1` and `GroupingNode1` should have `autoExpand` flag in the following hierarchy:
|
|
25
36
|
* - Node1
|
|
26
37
|
* - GroupingNode1
|
|
27
38
|
* - GroupingNode2
|
|
28
39
|
* - Element1
|
|
29
40
|
* - Element2
|
|
30
|
-
*
|
|
41
|
+
*
|
|
42
|
+
* Provide `{ path: [Node1, Element1], reveal: { depthInHierarchy: 2 } }`
|
|
31
43
|
*
|
|
32
44
|
* To get the correct depth use `HierarchyNode.parentKeys.length`.
|
|
33
45
|
*
|
|
34
|
-
* **NOTE**: All nodes that are up to
|
|
46
|
+
* **NOTE**: All nodes that are up to `depthInHierarchy` will be expanded **except** filter targets.
|
|
35
47
|
*/
|
|
36
48
|
depthInHierarchy: number;
|
|
37
49
|
}
|
|
@@ -41,10 +53,18 @@ export interface HierarchyFilteringPathOptions {
|
|
|
41
53
|
* This option specifies the way `autoExpand` flag should be assigned to nodes in the filtered hierarchy.
|
|
42
54
|
* - If it's `false` or `undefined`, nodes have no 'autoExpand' flag.
|
|
43
55
|
* - If it's `true`, then all nodes up to the filter target will have `autoExpand` flag.
|
|
44
|
-
* - If it's an instance of `
|
|
45
|
-
* - If it's an instance of `
|
|
56
|
+
* - If it's an instance of `FilteringPathRevealDepthInPath`, then all nodes up to `depthInPath` will have `autoExpand` flag.
|
|
57
|
+
* - If it's an instance of `FilteringPathRevealDepthInHierarchy`, then all nodes up to `depthInHierarchy` will have `autoExpand` flag.
|
|
46
58
|
*/
|
|
47
|
-
|
|
59
|
+
reveal?: boolean | FilteringPathRevealDepthInHierarchy | FilteringPathRevealDepthInPath;
|
|
60
|
+
/**
|
|
61
|
+
* This option specifies whether or not filter target should be expanded.
|
|
62
|
+
* - If it's `false` or `undefined`, filter target won't have 'autoExpand' flag.
|
|
63
|
+
* - If it's `true`, filter target will have `autoExpand` flag.
|
|
64
|
+
*
|
|
65
|
+
* **NOTE**: this attribute does not set `autoExpand` flag on nodes up to the filter target. For that use `reveal`.
|
|
66
|
+
*/
|
|
67
|
+
autoExpand?: boolean;
|
|
48
68
|
}
|
|
49
69
|
/**
|
|
50
70
|
* A path of hierarchy node identifiers for filtering the hierarchy with additional options.
|
|
@@ -63,17 +83,14 @@ export declare namespace HierarchyFilteringPath {
|
|
|
63
83
|
function normalize(source: HierarchyFilteringPath): Exclude<HierarchyFilteringPath, HierarchyNodeIdentifiersPath>;
|
|
64
84
|
/**
|
|
65
85
|
* Merges two given `HierarchyFilteringPathOptions` objects.
|
|
66
|
-
* - if both inputs are `undefined`, `undefined` is returned,
|
|
67
|
-
* - else if one of the inputs is `undefined`, the other one is returned.
|
|
68
|
-
* - else, merge each option individually.
|
|
69
86
|
*
|
|
70
|
-
* For the `
|
|
87
|
+
* For the `reveal` attribute, the merge chooses to `reveal` as deep as the deepest input:
|
|
71
88
|
* - if any one of the inputs is `true`, return `true`,
|
|
72
89
|
* - else if only one of the inputs is an object, return it,
|
|
73
90
|
* - else if both inputs are falsy, return `false` or `undefined`,
|
|
74
91
|
* - else:
|
|
75
|
-
* - if only one of the inputs has `
|
|
76
|
-
* - else return the one with greater `
|
|
92
|
+
* - if only one of the inputs has `depthInHierarchy` set, return the other one,
|
|
93
|
+
* - else return the one with greater `depthInPath` or `depthInHierarchy`.
|
|
77
94
|
*
|
|
78
95
|
* @public
|
|
79
96
|
*/
|
|
@@ -95,10 +112,8 @@ export declare function extractFilteringProps(rootLevelFilteringProps: Hierarchy
|
|
|
95
112
|
*
|
|
96
113
|
* @public
|
|
97
114
|
*/
|
|
98
|
-
export declare function createHierarchyFilteringHelper(rootLevelFilteringProps: HierarchyFilteringPath[] | undefined, parentNode: Pick<NonGroupingHierarchyNode, "filtering"
|
|
99
|
-
/**
|
|
100
|
-
* Returns a flag indicating if the hierarchy level is filtered.
|
|
101
|
-
*/
|
|
115
|
+
export declare function createHierarchyFilteringHelper(rootLevelFilteringProps: HierarchyFilteringPath[] | undefined, parentNode: Pick<NonGroupingHierarchyNode, "filtering"> | undefined): {
|
|
116
|
+
/** Returns a flag indicating if the hierarchy level is filtered. */
|
|
102
117
|
hasFilter: boolean;
|
|
103
118
|
/**
|
|
104
119
|
* Returns a flag indicating whether this hierarchy level has an ancestor node
|
|
@@ -117,20 +132,46 @@ export declare function createHierarchyFilteringHelper(rootLevelFilteringProps:
|
|
|
117
132
|
* and `autoExpand`) to be set based on the filter paths and filtering options. This function calculates
|
|
118
133
|
* these props for a child node based on its key or path matcher.
|
|
119
134
|
*
|
|
120
|
-
* When using `pathMatcher` prop, callers have more flexibility to decide whether the given `HierarchyNodeIdentifier` applies
|
|
135
|
+
* When using `pathMatcher` or `asyncPathMatcher` prop, callers have more flexibility to decide whether the given `HierarchyNodeIdentifier` applies
|
|
121
136
|
* to their node. For example, only some parts of the identifier can be checked for improved performance. Otherwise, the
|
|
122
137
|
* `nodeKey` prop can be used to check the whole identifier.
|
|
138
|
+
*
|
|
139
|
+
* There are multiple overloads of `createChildNodeProps`: depending on props type it returns different values:
|
|
140
|
+
* - `parentKeys` is defined and `pathMatcher` or `nodeKey` is provided - returns undefined **or** `filtering` and `autoExpand` prop from `HierarchyNode`;
|
|
141
|
+
* - `parentKeys` is undefined - does not return `HierarchyNode.autoExpand` option;
|
|
142
|
+
* - props have `asyncPathMatcher` - returns either Promise or the regular return value based on whether or not `asyncPathMatcher` returns a promise.
|
|
123
143
|
*/
|
|
124
|
-
createChildNodeProps:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
144
|
+
createChildNodeProps: {
|
|
145
|
+
(props: {
|
|
146
|
+
parentKeys?: undefined;
|
|
147
|
+
nodeKey: InstancesNodeKey | GenericNodeKey;
|
|
148
|
+
}): Pick<NonGroupingHierarchyNode, "filtering"> | undefined;
|
|
149
|
+
(props: {
|
|
150
|
+
parentKeys?: undefined;
|
|
151
|
+
pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean;
|
|
152
|
+
}): Pick<NonGroupingHierarchyNode, "filtering"> | undefined;
|
|
153
|
+
(props: {
|
|
154
|
+
parentKeys?: undefined;
|
|
155
|
+
asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean>;
|
|
156
|
+
}): Promise<Pick<NonGroupingHierarchyNode, "filtering"> | undefined> | Pick<NonGroupingHierarchyNode, "filtering"> | undefined;
|
|
157
|
+
(props: {
|
|
158
|
+
parentKeys: HierarchyNodeKey[];
|
|
159
|
+
nodeKey: InstancesNodeKey | GenericNodeKey;
|
|
160
|
+
}): Pick<NonGroupingHierarchyNode, "filtering" | "autoExpand"> | undefined;
|
|
161
|
+
(props: {
|
|
162
|
+
parentKeys: HierarchyNodeKey[];
|
|
163
|
+
pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean;
|
|
164
|
+
}): Pick<NonGroupingHierarchyNode, "filtering" | "autoExpand"> | undefined;
|
|
165
|
+
(props: {
|
|
166
|
+
parentKeys: HierarchyNodeKey[];
|
|
167
|
+
asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean>;
|
|
168
|
+
}): Promise<Pick<NonGroupingHierarchyNode, "filtering" | "autoExpand"> | undefined> | Pick<NonGroupingHierarchyNode, "filtering" | "autoExpand"> | undefined;
|
|
169
|
+
};
|
|
135
170
|
};
|
|
171
|
+
/** @internal */
|
|
172
|
+
export declare function shouldAutoExpandBasedOnReveal({ reveal, nodePositionInPath, nodePositionInHierarchy, }: {
|
|
173
|
+
reveal: HierarchyFilteringPathOptions["reveal"];
|
|
174
|
+
nodePositionInPath: number;
|
|
175
|
+
nodePositionInHierarchy: number;
|
|
176
|
+
}): boolean;
|
|
136
177
|
//# sourceMappingURL=HierarchyFiltering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
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