@itwin/tree-widget-react 4.0.0-alpha.25 → 4.0.0-alpha.26
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 +35 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.js +2 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/WidgetHeader.js +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/WidgetHeader.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.d.ts +4 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.js +4 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.js +36 -47
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.d.ts +2 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.js +4 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.d.ts +2 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.js +75 -38
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeNode.d.ts +3 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeNode.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.d.ts +4 -2
- package/lib/esm/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.js +38 -23
- package/lib/esm/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.d.ts +11 -21
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js +16 -168
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeNodeInternal.d.ts +65 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeNodeInternal.js +22 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeNodeInternal.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/UseSearchPaths.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/UseSearchPaths.js +4 -4
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/UseSearchPaths.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHandler.d.ts +6 -10
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHandler.js +180 -88
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHelper.d.ts +14 -5
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHelper.js +43 -24
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHelper.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/SearchResultsTree.d.ts +3 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/SearchResultsTree.js +78 -17
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/visibility/SearchResultsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeComponent.d.ts +2 -0
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeComponent.js +4 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeComponent.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeDefinition.js +91 -114
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeIcon.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeIcon.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeNode.d.ts +1 -3
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeNode.js +2 -4
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/ClassificationsTreeNode.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTree.d.ts +13 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTree.js +62 -32
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTreeDefinition.d.ts +12 -9
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTreeDefinition.js +42 -38
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/UseClassificationsTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeIdsCache.d.ts +15 -38
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeIdsCache.js +59 -242
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeIdsCache.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeNodeInternal.d.ts +29 -0
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeNodeInternal.js +19 -0
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/ClassificationsTreeNodeInternal.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/ClassificationsTreeVisibilityHandler.d.ts +4 -8
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/ClassificationsTreeVisibilityHandler.js +154 -78
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/ClassificationsTreeVisibilityHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/ClassificationsTreeVisibilityHelper.js +20 -6
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/ClassificationsTreeVisibilityHelper.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/SearchResultsTree.d.ts +6 -10
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/SearchResultsTree.js +104 -63
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/visibility/SearchResultsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/SharedTreeContextProvider.d.ts +7 -0
- package/lib/esm/tree-widget-react/components/trees/common/SharedTreeContextProvider.js +14 -0
- package/lib/esm/tree-widget-react/components/trees/common/SharedTreeContextProvider.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/TreeWidgetViewport.js +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/TreeWidgetViewport.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.js +2 -2
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/Utils.js +2 -2
- package/lib/esm/tree-widget-react/components/trees/common/Utils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.d.ts +4 -4
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.js +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/TreeNodeVisibilityButton.d.ts +4 -4
- package/lib/esm/tree-widget-react/components/trees/common/components/TreeNodeVisibilityButton.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/TreeRenderer.js +7 -5
- package/lib/esm/tree-widget-react/components/trees/common/components/TreeRenderer.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/UseVisibilityButtonHandler.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/common/components/UseVisibilityButtonHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/VisibilityTreeRenderer.js +5 -5
- package/lib/esm/tree-widget-react/components/trees/common/components/VisibilityTreeRenderer.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/SharedTreeContextProviderInternal.d.ts +20 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/SharedTreeContextProviderInternal.js +44 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/SharedTreeContextProviderInternal.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Types.d.ts +4 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Types.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseIModelAccess.d.ts +12 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseIModelAccess.js +2 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseIModelAccess.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.d.ts +17 -6
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.js +58 -29
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.d.ts +8 -14
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.js +22 -26
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/{AlwaysAndNeverDrawnElementInfo.d.ts → caches/AlwaysAndNeverDrawnElementInfoCache.d.ts} +15 -21
- package/lib/esm/tree-widget-react/components/trees/common/internal/{AlwaysAndNeverDrawnElementInfo.js → caches/AlwaysAndNeverDrawnElementInfoCache.js} +40 -38
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/AlwaysAndNeverDrawnElementInfoCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/BaseIdsCache.d.ts +68 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/BaseIdsCache.js +148 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/BaseIdsCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementChildrenCache.d.ts +30 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementChildrenCache.js +151 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementChildrenCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementModelCategoriesCache.d.ts +32 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementModelCategoriesCache.js +106 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ElementModelCategoriesCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/{ModelCategoryElementsCountCache.d.ts → caches/ModelCategoryElementsCountCache.d.ts} +9 -2
- package/lib/esm/tree-widget-react/components/trees/common/internal/{ModelCategoryElementsCountCache.js → caches/ModelCategoryElementsCountCache.js} +17 -21
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ModelCategoryElementsCountCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ModeledElementsCache.d.ts +27 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ModeledElementsCache.js +106 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/ModeledElementsCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/SubCategoriesCache.d.ts +23 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/SubCategoriesCache.js +56 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/caches/SubCategoriesCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseCachedVisibility.d.ts +6 -6
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseCachedVisibility.js +27 -17
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseCachedVisibility.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseIdsCache.d.ts +7 -13
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseIdsCache.js +36 -35
- package/lib/esm/tree-widget-react/components/trees/common/internal/useTreeHooks/UseIdsCache.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseSearchResultsTree.d.ts +18 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseSearchResultsTree.js +14 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseSearchResultsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseVisibilityHelper.d.ts +46 -70
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseVisibilityHelper.js +229 -361
- package/lib/esm/tree-widget-react/components/trees/common/internal/visibility/BaseVisibilityHelper.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeComponent.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.js +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.js +32 -19
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/index.d.ts +2 -1
- package/lib/esm/tree-widget-react/components/trees/index.js +2 -1
- package/lib/esm/tree-widget-react/components/trees/index.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTree.d.ts +4 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTree.js +4 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.d.ts +7 -3
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.js +36 -35
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.js +3 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.js +56 -26
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/UseModelsTree.d.ts +5 -3
- package/lib/esm/tree-widget-react/components/trees/models-tree/UseModelsTree.js +25 -12
- package/lib/esm/tree-widget-react/components/trees/models-tree/UseModelsTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.d.ts +11 -23
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.js +56 -189
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeNodeInternal.d.ts +52 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeNodeInternal.js +22 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeNodeInternal.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/UseSearchPaths.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/UseSearchPaths.js +8 -8
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/UseSearchPaths.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHandler.d.ts +6 -10
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHandler.js +179 -72
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHelper.d.ts +6 -0
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHelper.js +20 -8
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/ModelsTreeVisibilityHelper.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/SearchResultsTree.d.ts +4 -2
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/SearchResultsTree.js +73 -13
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/visibility/SearchResultsTree.js.map +1 -1
- package/lib/esm/tree-widget-react-internal.d.ts +1 -0
- package/lib/esm/tree-widget-react-internal.js +1 -0
- package/lib/esm/tree-widget-react-internal.js.map +1 -1
- package/package.json +77 -82
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/UseSearchPaths.d.ts +0 -20
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/UseSearchPaths.js +0 -53
- package/lib/esm/tree-widget-react/components/trees/classifications-tree/internal/UseSearchPaths.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/AlwaysAndNeverDrawnElementInfo.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/ModelCategoryElementsCountCache.js.map +0 -1
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { concat, defer, from, map, merge, mergeMap, of } from "rxjs";
|
|
6
|
-
import { assert, Guid
|
|
5
|
+
import { concat, defer, EMPTY, from, map, merge, mergeAll, mergeMap, of } from "rxjs";
|
|
6
|
+
import { assert, Guid } from "@itwin/core-bentley";
|
|
7
|
+
import { HierarchyNodeKey } from "@itwin/presentation-hierarchies";
|
|
8
|
+
import { createVisibilityStatus } from "../../../common/internal/Tooltip.js";
|
|
7
9
|
import { HierarchyVisibilityHandlerImpl } from "../../../common/internal/useTreeHooks/UseCachedVisibility.js";
|
|
8
|
-
import { fromWithRelease, getClassesByView } from "../../../common/internal/Utils.js";
|
|
10
|
+
import { fromWithRelease, getClassesByView, getIdsFromChildrenTree, getParentElementsIdsPath, setDifference, setIntersection, } from "../../../common/internal/Utils.js";
|
|
9
11
|
import { mergeVisibilityStatuses } from "../../../common/internal/VisibilityUtils.js";
|
|
10
|
-
import {
|
|
12
|
+
import { CategoriesTreeNodeInternal } from "../../internal/CategoriesTreeNodeInternal.js";
|
|
11
13
|
import { CategoriesTreeVisibilityHelper } from "./CategoriesTreeVisibilityHelper.js";
|
|
12
14
|
import { createCategoriesSearchResultsTree } from "./SearchResultsTree.js";
|
|
13
15
|
/**
|
|
@@ -19,38 +21,24 @@ import { createCategoriesSearchResultsTree } from "./SearchResultsTree.js";
|
|
|
19
21
|
export class CategoriesTreeVisibilityHandler {
|
|
20
22
|
#props;
|
|
21
23
|
#visibilityHelper;
|
|
22
|
-
#elementType;
|
|
23
|
-
#categoryType;
|
|
24
|
-
#modelType;
|
|
25
24
|
constructor(constructorProps) {
|
|
26
25
|
this.#props = constructorProps;
|
|
27
|
-
// Remove after https://github.com/iTwin/viewer-components-react/issues/1421.
|
|
28
|
-
// We won't need to create a custom base ids cache.
|
|
29
|
-
const baseIdsCache = {
|
|
30
|
-
getCategories: (props) => this.getCategories(props),
|
|
31
|
-
getAllCategories: () => this.getAllCategories(),
|
|
32
|
-
getElementsCount: (props) => this.getElementsCount(props),
|
|
33
|
-
getModels: (props) => this.getModels(props),
|
|
34
|
-
getSubCategories: (props) => this.getSubCategories(props),
|
|
35
|
-
getSubModels: (props) => this.getSubModels(props),
|
|
36
|
-
hasSubModel: (props) => this.#props.idsCache.hasSubModel(props),
|
|
37
|
-
};
|
|
38
26
|
this.#visibilityHelper = new CategoriesTreeVisibilityHelper({
|
|
39
27
|
viewport: this.#props.viewport,
|
|
40
28
|
idsCache: this.#props.idsCache,
|
|
41
29
|
alwaysAndNeverDrawnElementInfo: this.#props.alwaysAndNeverDrawnElementInfo,
|
|
42
|
-
baseIdsCache,
|
|
30
|
+
baseIdsCache: constructorProps.idsCache,
|
|
43
31
|
hierarchyConfig: constructorProps.hierarchyConfig,
|
|
44
32
|
});
|
|
45
|
-
this.#elementType = this.#props.viewport.viewType === "2d" ? "GeometricElement2d" : "GeometricElement3d";
|
|
46
|
-
this.#categoryType = this.#props.viewport.viewType === "2d" ? "DrawingCategory" : "SpatialCategory";
|
|
47
|
-
this.#modelType = this.#props.viewport.viewType === "2d" ? "GeometricModel2d" : "GeometricModel3d";
|
|
48
33
|
}
|
|
49
34
|
[Symbol.dispose]() {
|
|
50
35
|
this.#visibilityHelper[Symbol.dispose]();
|
|
51
36
|
}
|
|
52
37
|
changeSearchTargetsVisibilityStatus(targets, on) {
|
|
53
38
|
return defer(() => {
|
|
39
|
+
if (this.#props.viewport.viewType === "other") {
|
|
40
|
+
return EMPTY;
|
|
41
|
+
}
|
|
54
42
|
const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;
|
|
55
43
|
const observables = new Array();
|
|
56
44
|
if (definitionContainerIds?.size) {
|
|
@@ -66,100 +54,174 @@ export class CategoriesTreeVisibilityHandler {
|
|
|
66
54
|
observables.push(from(subCategories).pipe(mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.changeSubCategoriesVisibilityStatus({ subCategoryIds, categoryId, on }))));
|
|
67
55
|
}
|
|
68
56
|
if (elements?.length) {
|
|
69
|
-
|
|
57
|
+
const searchTargetElements = new Array();
|
|
58
|
+
const elementIdsSet = new Set();
|
|
59
|
+
const modelCategoryElementMap = new Map();
|
|
60
|
+
// elements is an array that stores elements grouped by:
|
|
61
|
+
// 1. Their path
|
|
62
|
+
// 2. Their modelId and categoryId
|
|
63
|
+
// When changing visibility of elements, visibility handler does not care about the path.
|
|
64
|
+
// So we can first get all elements and group them only by modelId and categoryId.
|
|
65
|
+
for (const { elements: elementsMap, categoryId, modelId } of elements) {
|
|
66
|
+
const key = `${modelId}-${categoryId}`;
|
|
67
|
+
let mapEntry = modelCategoryElementMap.get(key);
|
|
68
|
+
if (!mapEntry) {
|
|
69
|
+
mapEntry = [];
|
|
70
|
+
modelCategoryElementMap.set(key, mapEntry);
|
|
71
|
+
}
|
|
72
|
+
for (const [elementId, { isSearchTarget }] of elementsMap) {
|
|
73
|
+
mapEntry.push(elementId);
|
|
74
|
+
elementIdsSet.add(elementId);
|
|
75
|
+
if (isSearchTarget) {
|
|
76
|
+
searchTargetElements.push(elementId);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
observables.push(
|
|
81
|
+
// Get children for search targets, since non search targets don't have all the children present in the hierarchy.
|
|
82
|
+
this.#props.idsCache.getChildElementsTree({ elementIds: searchTargetElements }).pipe(
|
|
83
|
+
// Need to filter out and keep only those children ids that are not part of elements that are present in search paths.
|
|
84
|
+
// Elements in search paths will have their visibility changed directly: they will be provided as elementIds to changeElementsVisibilityStatus.
|
|
85
|
+
map((childrenTree) => ({
|
|
86
|
+
childrenNotInSearchPaths: setDifference(getIdsFromChildrenTree({ tree: childrenTree, predicate: ({ depth }) => depth > 0 }), elementIdsSet),
|
|
87
|
+
childrenTree,
|
|
88
|
+
})), mergeMap(({ childrenNotInSearchPaths, childrenTree }) => fromWithRelease({ source: modelCategoryElementMap.entries(), size: modelCategoryElementMap.size, releaseOnCount: 50 }).pipe(mergeMap(([key, elementsInSearchPathsGroupedByModelAndCategory]) => {
|
|
89
|
+
const [modelId, categoryId] = key.split("-");
|
|
90
|
+
const childrenIds = new Set();
|
|
91
|
+
// A shared children tree was created, need to get the children for each element in the group.
|
|
92
|
+
for (const elementId of elementsInSearchPathsGroupedByModelAndCategory) {
|
|
93
|
+
const elementChildrenTree = childrenTree.get(elementId)?.children;
|
|
94
|
+
if (!elementChildrenTree) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (const childId of getIdsFromChildrenTree({ tree: elementChildrenTree })) {
|
|
98
|
+
childrenIds.add(childId);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return this.#visibilityHelper.changeElementsVisibilityStatus({
|
|
102
|
+
modelId,
|
|
103
|
+
categoryId,
|
|
104
|
+
elementIds: elementsInSearchPathsGroupedByModelAndCategory,
|
|
105
|
+
// Pass only those children that are not part of search paths.
|
|
106
|
+
children: setIntersection(childrenIds, childrenNotInSearchPaths),
|
|
107
|
+
on,
|
|
108
|
+
});
|
|
109
|
+
})))));
|
|
70
110
|
}
|
|
71
111
|
return merge(...observables);
|
|
72
112
|
});
|
|
73
113
|
}
|
|
74
114
|
getVisibilityStatus(node) {
|
|
75
|
-
if (
|
|
115
|
+
if (this.#props.viewport.viewType === "other") {
|
|
116
|
+
return of(createVisibilityStatus("disabled"));
|
|
117
|
+
}
|
|
118
|
+
if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {
|
|
76
119
|
return this.#visibilityHelper.getGroupedElementsVisibilityStatus({
|
|
77
120
|
categoryId: node.extendedData.categoryId,
|
|
78
121
|
modelElementsMap: node.extendedData.modelElementsMap,
|
|
122
|
+
parentKeys: node.parentKeys,
|
|
123
|
+
childrenCount: node.extendedData.childrenCount,
|
|
124
|
+
topMostParentElementId: node.extendedData.topMostParentElementId,
|
|
79
125
|
});
|
|
80
126
|
}
|
|
81
|
-
if (
|
|
127
|
+
if (CategoriesTreeNodeInternal.isDefinitionContainerNode(node)) {
|
|
82
128
|
return this.#visibilityHelper.getDefinitionContainersVisibilityStatus({
|
|
83
129
|
definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
84
130
|
});
|
|
85
131
|
}
|
|
86
|
-
if (
|
|
132
|
+
if (CategoriesTreeNodeInternal.isModelNode(node)) {
|
|
87
133
|
return this.#visibilityHelper.getModelsVisibilityStatus({
|
|
88
134
|
modelIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
89
|
-
type: this.#modelType,
|
|
90
135
|
});
|
|
91
136
|
}
|
|
92
|
-
if (
|
|
137
|
+
if (CategoriesTreeNodeInternal.isCategoryNode(node)) {
|
|
93
138
|
return this.#visibilityHelper.getCategoriesVisibilityStatus({
|
|
94
139
|
categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
95
140
|
modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,
|
|
96
|
-
type: this.#categoryType,
|
|
97
141
|
});
|
|
98
142
|
}
|
|
99
|
-
if (
|
|
143
|
+
if (CategoriesTreeNodeInternal.isSubCategoryNode(node)) {
|
|
100
144
|
return this.#visibilityHelper.getSubCategoriesVisibilityStatus({
|
|
101
145
|
categoryId: node.extendedData.categoryId,
|
|
102
146
|
subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
103
147
|
});
|
|
104
148
|
}
|
|
105
|
-
assert(
|
|
149
|
+
assert(CategoriesTreeNodeInternal.isElementNode(node));
|
|
150
|
+
const parentElementsIdsPath = getParentElementsIdsPath({
|
|
151
|
+
parentInstanceKeys: node.parentKeys.filter((parentKey) => HierarchyNodeKey.isInstances(parentKey)).map((key) => key.instanceKeys),
|
|
152
|
+
topMostParentElementId: node.extendedData.topMostParentElementId,
|
|
153
|
+
});
|
|
106
154
|
return this.#visibilityHelper.getElementsVisibilityStatus({
|
|
107
155
|
elementIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
108
156
|
modelId: node.extendedData.modelId,
|
|
109
157
|
categoryId: node.extendedData.categoryId,
|
|
110
|
-
|
|
158
|
+
parentElementsIdsPath,
|
|
159
|
+
childrenCount: node.extendedData.childrenCount,
|
|
160
|
+
categoryOfTopMostParentElement: node.extendedData.categoryOfTopMostParentElement,
|
|
111
161
|
});
|
|
112
162
|
}
|
|
113
163
|
/** Changes visibility of the items represented by the tree node. */
|
|
114
164
|
changeVisibilityStatus(node, on) {
|
|
115
165
|
const changeObs = defer(() => {
|
|
116
|
-
if (
|
|
166
|
+
if (this.#props.viewport.viewType === "other") {
|
|
167
|
+
return EMPTY;
|
|
168
|
+
}
|
|
169
|
+
if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {
|
|
117
170
|
return this.#visibilityHelper.changeGroupedElementsVisibilityStatus({
|
|
118
171
|
categoryId: node.extendedData.categoryId,
|
|
119
172
|
modelElementsMap: node.extendedData.modelElementsMap,
|
|
120
173
|
on,
|
|
121
174
|
});
|
|
122
175
|
}
|
|
123
|
-
if (
|
|
176
|
+
if (CategoriesTreeNodeInternal.isDefinitionContainerNode(node)) {
|
|
124
177
|
return this.#visibilityHelper.changeDefinitionContainersVisibilityStatus({
|
|
125
178
|
definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
126
179
|
on,
|
|
127
180
|
});
|
|
128
181
|
}
|
|
129
|
-
if (
|
|
182
|
+
if (CategoriesTreeNodeInternal.isModelNode(node)) {
|
|
130
183
|
return this.#visibilityHelper.changeModelsVisibilityStatus({
|
|
131
184
|
modelIds: node.key.instanceKeys.map(({ id }) => id),
|
|
132
185
|
on,
|
|
133
186
|
});
|
|
134
187
|
}
|
|
135
|
-
if (
|
|
188
|
+
if (CategoriesTreeNodeInternal.isCategoryNode(node)) {
|
|
136
189
|
return this.#visibilityHelper.changeCategoriesVisibilityStatus({
|
|
137
190
|
categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
138
191
|
modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,
|
|
139
192
|
on,
|
|
140
193
|
});
|
|
141
194
|
}
|
|
142
|
-
if (
|
|
195
|
+
if (CategoriesTreeNodeInternal.isSubCategoryNode(node)) {
|
|
143
196
|
return this.#visibilityHelper.changeSubCategoriesVisibilityStatus({
|
|
144
197
|
categoryId: node.extendedData.categoryId,
|
|
145
198
|
subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),
|
|
146
199
|
on,
|
|
147
200
|
});
|
|
148
201
|
}
|
|
149
|
-
assert(
|
|
150
|
-
|
|
151
|
-
|
|
202
|
+
assert(CategoriesTreeNodeInternal.isElementNode(node));
|
|
203
|
+
const elementIds = node.key.instanceKeys.map(({ id }) => id);
|
|
204
|
+
return this.#props.idsCache.getChildElementsTree({ elementIds }).pipe(map((childrenTree) => {
|
|
205
|
+
// Children tree contains provided elementIds, they are at the root of this tree.
|
|
206
|
+
// We want to skip them and only get ids of children.
|
|
207
|
+
return getIdsFromChildrenTree({ tree: childrenTree, predicate: ({ depth }) => depth > 0 });
|
|
208
|
+
}), mergeMap((children) => this.#visibilityHelper.changeElementsVisibilityStatus({
|
|
209
|
+
elementIds,
|
|
152
210
|
modelId: node.extendedData.modelId,
|
|
211
|
+
children: children.size > 0 ? children : undefined,
|
|
153
212
|
categoryId: node.extendedData.categoryId,
|
|
154
213
|
on,
|
|
155
|
-
});
|
|
214
|
+
})));
|
|
156
215
|
});
|
|
157
216
|
if (this.#props.viewport.isAlwaysDrawnExclusive) {
|
|
158
217
|
return concat(this.#visibilityHelper.removeAlwaysDrawnExclusive(), changeObs);
|
|
159
218
|
}
|
|
160
219
|
return changeObs;
|
|
161
220
|
}
|
|
162
|
-
getSearchTargetsVisibilityStatus(targets) {
|
|
221
|
+
getSearchTargetsVisibilityStatus(targets, node) {
|
|
222
|
+
if (this.#props.viewport.viewType === "other") {
|
|
223
|
+
return of(createVisibilityStatus("disabled"));
|
|
224
|
+
}
|
|
163
225
|
return defer(() => {
|
|
164
226
|
const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;
|
|
165
227
|
const observables = new Array();
|
|
@@ -167,65 +229,95 @@ export class CategoriesTreeVisibilityHandler {
|
|
|
167
229
|
observables.push(this.#visibilityHelper.getDefinitionContainersVisibilityStatus({ definitionContainerIds }));
|
|
168
230
|
}
|
|
169
231
|
if (modelIds?.size) {
|
|
170
|
-
observables.push(this.#visibilityHelper.getModelsVisibilityStatus({ modelIds
|
|
232
|
+
observables.push(this.#visibilityHelper.getModelsVisibilityStatus({ modelIds }));
|
|
171
233
|
}
|
|
172
234
|
if (categories?.length) {
|
|
173
235
|
observables.push(from(categories).pipe(mergeMap(({ modelId, categoryIds }) => this.#visibilityHelper.getCategoriesVisibilityStatus({
|
|
174
236
|
categoryIds,
|
|
175
237
|
modelId,
|
|
176
|
-
type: this.#categoryType,
|
|
177
238
|
}))));
|
|
178
239
|
}
|
|
179
240
|
if (subCategories?.length) {
|
|
180
241
|
observables.push(from(subCategories).pipe(mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.getSubCategoriesVisibilityStatus({ subCategoryIds, categoryId }))));
|
|
181
242
|
}
|
|
182
243
|
if (elements?.length) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
id: modelId,
|
|
191
|
-
...(this.#props.viewport.viewType === "2d" ? { drawingCategories: categories } : { spatialCategories: categories }),
|
|
192
|
-
})))));
|
|
193
|
-
}
|
|
194
|
-
getAllCategories() {
|
|
195
|
-
return this.#props.idsCache.getAllCategories().pipe(map((categories) => {
|
|
196
|
-
if (this.#props.viewport.viewType === "2d") {
|
|
197
|
-
return { drawingCategories: categories };
|
|
198
|
-
}
|
|
199
|
-
return { spatialCategories: categories };
|
|
200
|
-
}));
|
|
201
|
-
}
|
|
202
|
-
getElementsCount(props) {
|
|
203
|
-
return this.#props.idsCache.getCategoryElementsCount(props.modelId, props.categoryId);
|
|
204
|
-
}
|
|
205
|
-
getModels(props) {
|
|
206
|
-
return this.#props.idsCache.getCategoriesElementModels(props.categoryIds, true);
|
|
207
|
-
}
|
|
208
|
-
getSubCategories(props) {
|
|
209
|
-
return this.#props.idsCache.getSubCategories(props.categoryId);
|
|
210
|
-
}
|
|
211
|
-
getSubModels(props) {
|
|
212
|
-
if ("modelIds" in props) {
|
|
213
|
-
return from(Id64.iterable(props.modelIds)).pipe(mergeMap((modelId) => {
|
|
214
|
-
if (props.categoryId) {
|
|
215
|
-
return this.#props.idsCache.getCategoriesModeledElements(modelId, props.categoryId).pipe(map((subModels) => ({ id: modelId, subModels })));
|
|
244
|
+
const searchTargetElements = new Array();
|
|
245
|
+
for (const { elements: elementsMap } of elements) {
|
|
246
|
+
for (const [elementId, { isSearchTarget }] of elementsMap) {
|
|
247
|
+
if (isSearchTarget) {
|
|
248
|
+
searchTargetElements.push(elementId);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
216
251
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
252
|
+
let childrenCountMapObs;
|
|
253
|
+
if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {
|
|
254
|
+
const groupingNodesSearchTargets = node.extendedData?.searchTargets;
|
|
255
|
+
const nestedSearchTargetElements = searchTargetElements.filter((searchTarget) => !groupingNodesSearchTargets?.has(searchTarget));
|
|
256
|
+
// Only need to request children count for indirect children search targets.
|
|
257
|
+
// Direct children search targets already have children count stored in grouping nodes extended data.
|
|
258
|
+
childrenCountMapObs = this.#props.idsCache.getAllChildElementsCount({ elementIds: nestedSearchTargetElements }).pipe(map((elementCountMap) => {
|
|
259
|
+
// Direct children search targets already have children count stored in grouping nodes extended data.
|
|
260
|
+
for (const [key, value] of node.extendedData.searchTargets ?? []) {
|
|
261
|
+
elementCountMap.set(key, value.childrenCount);
|
|
262
|
+
}
|
|
263
|
+
return elementCountMap;
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
childrenCountMapObs = this.#props.idsCache.getAllChildElementsCount({ elementIds: searchTargetElements });
|
|
268
|
+
}
|
|
269
|
+
observables.push(childrenCountMapObs.pipe(mergeMap((elementsChildrenCountMap) => fromWithRelease({ source: elements, releaseOnCount: 50 }).pipe(mergeMap(({ modelId, elements: elementsMap, categoryId, pathToElements, topMostParentElementId }) => {
|
|
270
|
+
const parentElementsIdsPath = topMostParentElementId
|
|
271
|
+
? getParentElementsIdsPath({
|
|
272
|
+
parentInstanceKeys: pathToElements.map((instanceKey) => [instanceKey]),
|
|
273
|
+
topMostParentElementId,
|
|
274
|
+
})
|
|
275
|
+
: [];
|
|
276
|
+
let totalSearchTargetsChildrenCount = 0;
|
|
277
|
+
const nonSearchTargetIds = new Array();
|
|
278
|
+
const searchTargetIds = new Array();
|
|
279
|
+
for (const [elementId, { isSearchTarget }] of elementsMap) {
|
|
280
|
+
if (!isSearchTarget) {
|
|
281
|
+
nonSearchTargetIds.push(elementId);
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
searchTargetIds.push(elementId);
|
|
285
|
+
const childCount = elementsChildrenCountMap.get(elementId);
|
|
286
|
+
if (childCount) {
|
|
287
|
+
totalSearchTargetsChildrenCount += childCount;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return merge(searchTargetIds.length > 0
|
|
291
|
+
? this.#visibilityHelper.getElementsVisibilityStatus({
|
|
292
|
+
modelId,
|
|
293
|
+
categoryId,
|
|
294
|
+
elementIds: searchTargetIds,
|
|
295
|
+
parentElementsIdsPath,
|
|
296
|
+
childrenCount: totalSearchTargetsChildrenCount,
|
|
297
|
+
// Search results tree is created on search paths. Since search paths contain only categories that are directly under models
|
|
298
|
+
// or at the root, categoryId can be used here here.
|
|
299
|
+
categoryOfTopMostParentElement: categoryId,
|
|
300
|
+
})
|
|
301
|
+
: EMPTY,
|
|
302
|
+
// Set childrenCount to undefined for non search targets, as some of their child elements might be filtered out.
|
|
303
|
+
// Since childrenCount is set to undefined, these elements won't check child always/never drawn child elements status.
|
|
304
|
+
// Child always/never drawn elements will be in search paths, and their visibility status will be handled separately.
|
|
305
|
+
nonSearchTargetIds.length > 0
|
|
306
|
+
? this.#visibilityHelper.getElementsVisibilityStatus({
|
|
307
|
+
modelId,
|
|
308
|
+
categoryId,
|
|
309
|
+
elementIds: nonSearchTargetIds,
|
|
310
|
+
parentElementsIdsPath,
|
|
311
|
+
childrenCount: undefined,
|
|
312
|
+
// Search results tree is created on search paths. Since search paths contain only categories that are directly under models
|
|
313
|
+
// or at the root, categoryId can be used here here.
|
|
314
|
+
categoryOfTopMostParentElement: categoryId,
|
|
315
|
+
})
|
|
316
|
+
: EMPTY).pipe(mergeVisibilityStatuses());
|
|
317
|
+
})))));
|
|
226
318
|
}
|
|
227
|
-
return from(
|
|
228
|
-
})
|
|
319
|
+
return from(observables).pipe(mergeAll(), mergeVisibilityStatuses());
|
|
320
|
+
});
|
|
229
321
|
}
|
|
230
322
|
}
|
|
231
323
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoriesTreeVisibilityHandler.js","sourceRoot":"","sources":["../../../../../../../../src/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHandler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,8DAA8D,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAsB3E;;;;;GAKG;AACH,MAAM,OAAO,+BAA+B;IACjC,MAAM,CAAuC;IACtD,iBAAiB,CAAiC;IAClD,YAAY,CAA8C;IAC1D,aAAa,CAAwC;IACrD,UAAU,CAA0C;IACpD,YAAY,gBAAsD;QAChE,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC;QAC/B,6EAA6E;QAC7E,mDAAmD;QACnD,MAAM,YAAY,GAAiB;YACjC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;YACnD,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC/C,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,gB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C,CACxC,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,qCAAqC,CAAC,KAMrD;IACC,OAAO,IAAI,8BAA8B,CAA8B;QACrE,oBAAoB,EAAE,GAAwE,EAAE;YAC9F,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;gBACvB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrH,OAAO,iCAAiC,CAAC;gBACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,iBAAiB,EAAE,aAAa;gBAChC,wBAAwB,EAAE,YAAY;gBACtC,sBAAsB,EAAE,UAAU;aACnC,CAAC,CAAC;QACL,CAAC;QACD,gCAAgC,EAAE,CAAC,IAAI,EAAE,EAAE;YACzC,OAAO,IAAI,+BAA+B,CAAC;gBACzC,8BAA8B,EAAE,IAAI;gBACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,eAAe,EAAE,KAAK,CAAC,eAAe;aACvC,CAAC,CAAC;QACL,CAAC;QACD,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;KAChC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { concat, defer, from, map, merge, mergeMap, of } from \"rxjs\";\nimport { assert, Guid, Id64 } from \"@itwin/core-bentley\";\nimport { HierarchyVisibilityHandlerImpl } from \"../../../common/internal/useTreeHooks/UseCachedVisibility.js\";\nimport { fromWithRelease, getClassesByView } from \"../../../common/internal/Utils.js\";\nimport { mergeVisibilityStatuses } from \"../../../common/internal/VisibilityUtils.js\";\nimport { CategoriesTreeNode } from \"../../CategoriesTreeNode.js\";\nimport { CategoriesTreeVisibilityHelper } from \"./CategoriesTreeVisibilityHelper.js\";\nimport { createCategoriesSearchResultsTree } from \"./SearchResultsTree.js\";\n\nimport type { Observable } from \"rxjs\";\nimport type { HierarchyNode, HierarchySearchPath } from \"@itwin/presentation-hierarchies\";\nimport type { ECClassHierarchyInspector } from \"@itwin/presentation-shared\";\nimport type { AlwaysAndNeverDrawnElementInfo } from \"../../../common/internal/AlwaysAndNeverDrawnElementInfo.js\";\nimport type { SearchResultsTree } from \"../../../common/internal/visibility/BaseSearchResultsTree.js\";\nimport type { BaseIdsCache, TreeSpecificVisibilityHandler } from \"../../../common/internal/visibility/BaseVisibilityHelper.js\";\nimport type { TreeWidgetViewport } from \"../../../common/TreeWidgetViewport.js\";\nimport type { VisibilityStatus } from \"../../../common/UseHierarchyVisibility.js\";\nimport type { CategoriesTreeHierarchyConfiguration } from \"../../CategoriesTreeDefinition.js\";\nimport type { CategoriesTreeIdsCache } from \"../CategoriesTreeIdsCache.js\";\nimport type { CategoriesTreeSearchTargets } from \"./SearchResultsTree.js\";\n\n/** @internal */\nexport interface CategoriesTreeVisibilityHandlerProps {\n idsCache: CategoriesTreeIdsCache;\n viewport: TreeWidgetViewport;\n alwaysAndNeverDrawnElementInfo: AlwaysAndNeverDrawnElementInfo;\n hierarchyConfig: CategoriesTreeHierarchyConfiguration;\n}\n\n/**\n * Handles visibility status of categories tree nodes.\n *\n * This handler knows how to get and change visibility status of nodes created by hierarchy definition.\n * @internal\n */\nexport class CategoriesTreeVisibilityHandler implements Disposable, TreeSpecificVisibilityHandler<CategoriesTreeSearchTargets> {\n readonly #props: CategoriesTreeVisibilityHandlerProps;\n #visibilityHelper: CategoriesTreeVisibilityHelper;\n #elementType: \"GeometricElement3d\" | \"GeometricElement2d\";\n #categoryType: \"DrawingCategory\" | \"SpatialCategory\";\n #modelType: \"GeometricModel3d\" | \"GeometricModel2d\";\n constructor(constructorProps: CategoriesTreeVisibilityHandlerProps) {\n this.#props = constructorProps;\n // Remove after https://github.com/iTwin/viewer-components-react/issues/1421.\n // We won't need to create a custom base ids cache.\n const baseIdsCache: BaseIdsCache = {\n getCategories: (props) => this.getCategories(props),\n getAllCategories: () => this.getAllCategories(),\n getElementsCount: (props) => this.getElementsCount(props),\n getModels: (props) => this.getModels(props),\n getSubCategories: (props) => this.getSubCategories(props),\n getSubModels: (props) => this.getSubModels(props),\n hasSubModel: (props) => this.#props.idsCache.hasSubModel(props),\n };\n this.#visibilityHelper = new CategoriesTreeVisibilityHelper({\n viewport: this.#props.viewport,\n idsCache: this.#props.idsCache,\n alwaysAndNeverDrawnElementInfo: this.#props.alwaysAndNeverDrawnElementInfo,\n baseIdsCache,\n hierarchyConfig: constructorProps.hierarchyConfig,\n });\n\n this.#elementType = this.#props.viewport.viewType === \"2d\" ? \"GeometricElement2d\" : \"GeometricElement3d\";\n this.#categoryType = this.#props.viewport.viewType === \"2d\" ? \"DrawingCategory\" : \"SpatialCategory\";\n this.#modelType = this.#props.viewport.viewType === \"2d\" ? \"GeometricModel2d\" : \"GeometricModel3d\";\n }\n\n public [Symbol.dispose]() {\n this.#visibilityHelper[Symbol.dispose]();\n }\n\n public changeSearchTargetsVisibilityStatus(targets: CategoriesTreeSearchTargets, on: boolean): Observable<void> {\n return defer(() => {\n const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;\n const observables = new Array<Observable<void>>();\n if (definitionContainerIds?.size) {\n observables.push(this.#visibilityHelper.changeDefinitionContainersVisibilityStatus({ definitionContainerIds, on }));\n }\n\n if (modelIds?.size) {\n observables.push(this.#visibilityHelper.changeModelsVisibilityStatus({ modelIds, on }));\n }\n\n if (categories?.length) {\n observables.push(\n from(categories).pipe(mergeMap(({ modelId, categoryIds }) => this.#visibilityHelper.changeCategoriesVisibilityStatus({ categoryIds, modelId, on }))),\n );\n }\n\n if (subCategories?.length) {\n observables.push(\n from(subCategories).pipe(\n mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.changeSubCategoriesVisibilityStatus({ subCategoryIds, categoryId, on })),\n ),\n );\n }\n\n if (elements?.length) {\n observables.push(\n fromWithRelease({ source: elements, releaseOnCount: 50 }).pipe(\n mergeMap(({ modelId, elements: elementsMap, categoryId }) =>\n this.#visibilityHelper.changeElementsVisibilityStatus({ modelId, categoryId, elementIds: [...elementsMap.keys()], on }),\n ),\n ),\n );\n }\n\n return merge(...observables);\n });\n }\n\n public getVisibilityStatus(node: HierarchyNode): Observable<VisibilityStatus> {\n if (CategoriesTreeNode.isElementClassGroupingNode(node)) {\n return this.#visibilityHelper.getGroupedElementsVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n modelElementsMap: node.extendedData.modelElementsMap,\n });\n }\n\n if (CategoriesTreeNode.isDefinitionContainerNode(node)) {\n return this.#visibilityHelper.getDefinitionContainersVisibilityStatus({\n definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n });\n }\n\n if (CategoriesTreeNode.isModelNode(node)) {\n return this.#visibilityHelper.getModelsVisibilityStatus({\n modelIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n type: this.#modelType,\n });\n }\n\n if (CategoriesTreeNode.isCategoryNode(node)) {\n return this.#visibilityHelper.getCategoriesVisibilityStatus({\n categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,\n type: this.#categoryType,\n });\n }\n\n if (CategoriesTreeNode.isSubCategoryNode(node)) {\n return this.#visibilityHelper.getSubCategoriesVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n });\n }\n\n assert(CategoriesTreeNode.isElementNode(node));\n return this.#visibilityHelper.getElementsVisibilityStatus({\n elementIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.modelId,\n categoryId: node.extendedData.categoryId,\n type: this.#elementType,\n });\n }\n\n /** Changes visibility of the items represented by the tree node. */\n public changeVisibilityStatus(node: HierarchyNode, on: boolean): Observable<void> {\n const changeObs = defer(() => {\n if (CategoriesTreeNode.isElementClassGroupingNode(node)) {\n return this.#visibilityHelper.changeGroupedElementsVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n modelElementsMap: node.extendedData.modelElementsMap,\n on,\n });\n }\n\n if (CategoriesTreeNode.isDefinitionContainerNode(node)) {\n return this.#visibilityHelper.changeDefinitionContainersVisibilityStatus({\n definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n on,\n });\n }\n\n if (CategoriesTreeNode.isModelNode(node)) {\n return this.#visibilityHelper.changeModelsVisibilityStatus({\n modelIds: node.key.instanceKeys.map(({ id }) => id),\n on,\n });\n }\n\n if (CategoriesTreeNode.isCategoryNode(node)) {\n return this.#visibilityHelper.changeCategoriesVisibilityStatus({\n categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,\n on,\n });\n }\n\n if (CategoriesTreeNode.isSubCategoryNode(node)) {\n return this.#visibilityHelper.changeSubCategoriesVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n on,\n });\n }\n\n assert(CategoriesTreeNode.isElementNode(node));\n return this.#visibilityHelper.changeElementsVisibilityStatus({\n elementIds: node.key.instanceKeys.map(({ id }) => id),\n modelId: node.extendedData.modelId,\n categoryId: node.extendedData.categoryId,\n on,\n });\n });\n\n if (this.#props.viewport.isAlwaysDrawnExclusive) {\n return concat(this.#visibilityHelper.removeAlwaysDrawnExclusive(), changeObs);\n }\n return changeObs;\n }\n\n public getSearchTargetsVisibilityStatus(targets: CategoriesTreeSearchTargets): Observable<VisibilityStatus> {\n return defer(() => {\n const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;\n const observables = new Array<Observable<VisibilityStatus>>();\n if (definitionContainerIds?.size) {\n observables.push(this.#visibilityHelper.getDefinitionContainersVisibilityStatus({ definitionContainerIds }));\n }\n\n if (modelIds?.size) {\n observables.push(this.#visibilityHelper.getModelsVisibilityStatus({ modelIds, type: this.#modelType }));\n }\n\n if (categories?.length) {\n observables.push(\n from(categories).pipe(\n mergeMap(({ modelId, categoryIds }) =>\n this.#visibilityHelper.getCategoriesVisibilityStatus({\n categoryIds,\n modelId,\n type: this.#categoryType,\n }),\n ),\n ),\n );\n }\n\n if (subCategories?.length) {\n observables.push(\n from(subCategories).pipe(\n mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.getSubCategoriesVisibilityStatus({ subCategoryIds, categoryId })),\n ),\n );\n }\n\n if (elements?.length) {\n observables.push(\n fromWithRelease({ source: elements, releaseOnCount: 50 }).pipe(\n mergeMap(({ modelId, elements: elementsMap, categoryId }) =>\n this.#visibilityHelper.getElementsVisibilityStatus({ modelId, categoryId, elementIds: [...elementsMap.keys()], type: this.#elementType }),\n ),\n ),\n );\n }\n\n return merge(...observables);\n }).pipe(mergeVisibilityStatuses);\n }\n\n private getCategories(props: Parameters<BaseIdsCache[\"getCategories\"]>[0]): ReturnType<BaseIdsCache[\"getCategories\"]> {\n return from(Id64.iterable(props.modelIds)).pipe(\n mergeMap((modelId) =>\n this.#props.idsCache.getModelCategoryIds(modelId).pipe(\n map((categories) => ({\n id: modelId,\n ...(this.#props.viewport.viewType === \"2d\" ? { drawingCategories: categories } : { spatialCategories: categories }),\n })),\n ),\n ),\n );\n }\n\n private getAllCategories(): ReturnType<BaseIdsCache[\"getAllCategories\"]> {\n return this.#props.idsCache.getAllCategories().pipe(\n map((categories) => {\n if (this.#props.viewport.viewType === \"2d\") {\n return { drawingCategories: categories };\n }\n return { spatialCategories: categories };\n }),\n );\n }\n\n private getElementsCount(props: Parameters<BaseIdsCache[\"getElementsCount\"]>[0]): ReturnType<BaseIdsCache[\"getElementsCount\"]> {\n return this.#props.idsCache.getCategoryElementsCount(props.modelId, props.categoryId);\n }\n\n private getModels(props: Parameters<BaseIdsCache[\"getModels\"]>[0]): ReturnType<BaseIdsCache[\"getModels\"]> {\n return this.#props.idsCache.getCategoriesElementModels(props.categoryIds, true);\n }\n\n private getSubCategories(props: Parameters<BaseIdsCache[\"getSubCategories\"]>[0]): ReturnType<BaseIdsCache[\"getSubCategories\"]> {\n return this.#props.idsCache.getSubCategories(props.categoryId);\n }\n\n private getSubModels(props: Parameters<BaseIdsCache[\"getSubModels\"]>[0]): ReturnType<BaseIdsCache[\"getSubModels\"]> {\n if (\"modelIds\" in props) {\n return from(Id64.iterable(props.modelIds)).pipe(\n mergeMap((modelId) => {\n if (props.categoryId) {\n return this.#props.idsCache.getCategoriesModeledElements(modelId, props.categoryId).pipe(map((subModels) => ({ id: modelId, subModels })));\n }\n return this.#props.idsCache.getModelCategoryIds(modelId).pipe(\n mergeMap((categoryIds) => this.#props.idsCache.getCategoriesModeledElements(modelId, categoryIds)),\n map((subModels) => ({ id: modelId, subModels })),\n );\n }),\n );\n }\n\n if (props.modelId) {\n return from(Id64.iterable(props.categoryIds)).pipe(\n mergeMap((categoryId) =>\n this.#props.idsCache.getCategoriesModeledElements(props.modelId!, categoryId).pipe(map((subModels) => ({ id: categoryId, subModels }))),\n ),\n );\n }\n\n return this.#props.idsCache.getCategoriesElementModels(props.categoryIds).pipe(\n mergeMap(({ id, models }) => {\n if (!models) {\n return of({ id, subModels: undefined });\n }\n return from(models).pipe(\n mergeMap((modelId) => this.#props.idsCache.getCategoriesModeledElements(modelId, id)),\n map((subModels) => ({ id, subModels })),\n );\n }),\n );\n }\n}\n\n/**\n * Creates categories tree visibility handler. Is used by integration and performance tests.\n * @internal\n */\nexport function createCategoriesTreeVisibilityHandler(props: {\n viewport: TreeWidgetViewport;\n idsCache: CategoriesTreeIdsCache;\n imodelAccess: ECClassHierarchyInspector;\n searchPaths?: HierarchySearchPath[];\n hierarchyConfig: CategoriesTreeHierarchyConfiguration;\n}) {\n return new HierarchyVisibilityHandlerImpl<CategoriesTreeSearchTargets>({\n getSearchResultsTree: (): undefined | Promise<SearchResultsTree<CategoriesTreeSearchTargets>> => {\n if (!props.searchPaths) {\n return undefined;\n }\n const { categoryClass, elementClass, modelClass } = getClassesByView(props.viewport.viewType === \"2d\" ? \"2d\" : \"3d\");\n return createCategoriesSearchResultsTree({\n idsCache: props.idsCache,\n searchPaths: props.searchPaths,\n imodelAccess: props.imodelAccess,\n categoryClassName: categoryClass,\n categoryElementClassName: elementClass,\n categoryModelClassName: modelClass,\n });\n },\n getTreeSpecificVisibilityHandler: (info) => {\n return new CategoriesTreeVisibilityHandler({\n alwaysAndNeverDrawnElementInfo: info,\n idsCache: props.idsCache,\n viewport: props.viewport,\n hierarchyConfig: props.hierarchyConfig,\n });\n },\n viewport: props.viewport,\n componentId: Guid.createValue(),\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CategoriesTreeVisibilityHandler.js","sourceRoot":"","sources":["../../../../../../../../src/tree-widget-react/components/trees/categories-tree/internal/visibility/CategoriesTreeVisibilityHandler.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,8DAA8D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C,CAAC,CACH,CACF,CACF,CACF,CAAC;YACJ,CAAC;YAED,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,uBAAuB,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,qCAAqC,CAAC,KAMrD;IACC,OAAO,IAAI,8BAA8B,CAA8B;QACrE,oBAAoB,EAAE,GAAwE,EAAE;YAC9F,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;gBACvB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrH,OAAO,iCAAiC,CAAC;gBACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,iBAAiB,EAAE,aAAa;gBAChC,wBAAwB,EAAE,YAAY;gBACtC,sBAAsB,EAAE,UAAU;aACnC,CAAC,CAAC;QACL,CAAC;QACD,gCAAgC,EAAE,CAAC,IAAI,EAAE,EAAE;YACzC,OAAO,IAAI,+BAA+B,CAAC;gBACzC,8BAA8B,EAAE,IAAI;gBACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,eAAe,EAAE,KAAK,CAAC,eAAe;aACvC,CAAC,CAAC;QACL,CAAC;QACD,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;KAChC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { concat, defer, EMPTY, from, map, merge, mergeAll, mergeMap, of } from \"rxjs\";\nimport { assert, Guid } from \"@itwin/core-bentley\";\nimport { HierarchyNodeKey } from \"@itwin/presentation-hierarchies\";\nimport { createVisibilityStatus } from \"../../../common/internal/Tooltip.js\";\nimport { HierarchyVisibilityHandlerImpl } from \"../../../common/internal/useTreeHooks/UseCachedVisibility.js\";\nimport {\n fromWithRelease,\n getClassesByView,\n getIdsFromChildrenTree,\n getParentElementsIdsPath,\n setDifference,\n setIntersection,\n} from \"../../../common/internal/Utils.js\";\nimport { mergeVisibilityStatuses } from \"../../../common/internal/VisibilityUtils.js\";\nimport { CategoriesTreeNodeInternal } from \"../../internal/CategoriesTreeNodeInternal.js\";\nimport { CategoriesTreeVisibilityHelper } from \"./CategoriesTreeVisibilityHelper.js\";\nimport { createCategoriesSearchResultsTree } from \"./SearchResultsTree.js\";\n\nimport type { Observable } from \"rxjs\";\nimport type { Id64Set, Id64String } from \"@itwin/core-bentley\";\nimport type { ClassGroupingNodeKey, HierarchyNode, HierarchySearchPath, InstancesNodeKey } from \"@itwin/presentation-hierarchies\";\nimport type { ECClassHierarchyInspector } from \"@itwin/presentation-shared\";\nimport type { AlwaysAndNeverDrawnElementInfoCache } from \"../../../common/internal/caches/AlwaysAndNeverDrawnElementInfoCache.js\";\nimport type { CategoryId, ElementId, ModelId } from \"../../../common/internal/Types.js\";\nimport type { ChildrenTree } from \"../../../common/internal/Utils.js\";\nimport type { SearchResultsTree } from \"../../../common/internal/visibility/BaseSearchResultsTree.js\";\nimport type { TreeSpecificVisibilityHandler } from \"../../../common/internal/visibility/BaseVisibilityHelper.js\";\nimport type { TreeWidgetViewport } from \"../../../common/TreeWidgetViewport.js\";\nimport type { VisibilityStatus } from \"../../../common/UseHierarchyVisibility.js\";\nimport type { CategoriesTreeHierarchyConfiguration } from \"../../CategoriesTreeDefinition.js\";\nimport type { CategoriesTreeIdsCache } from \"../CategoriesTreeIdsCache.js\";\nimport type { CategoriesTreeSearchTargets } from \"./SearchResultsTree.js\";\n\n/** @internal */\nexport interface CategoriesTreeVisibilityHandlerProps {\n idsCache: CategoriesTreeIdsCache;\n viewport: TreeWidgetViewport;\n alwaysAndNeverDrawnElementInfo: AlwaysAndNeverDrawnElementInfoCache;\n hierarchyConfig: CategoriesTreeHierarchyConfiguration;\n}\n\n/**\n * Handles visibility status of categories tree nodes.\n *\n * This handler knows how to get and change visibility status of nodes created by hierarchy definition.\n * @internal\n */\nexport class CategoriesTreeVisibilityHandler implements Disposable, TreeSpecificVisibilityHandler<CategoriesTreeSearchTargets> {\n readonly #props: CategoriesTreeVisibilityHandlerProps;\n #visibilityHelper: CategoriesTreeVisibilityHelper;\n constructor(constructorProps: CategoriesTreeVisibilityHandlerProps) {\n this.#props = constructorProps;\n this.#visibilityHelper = new CategoriesTreeVisibilityHelper({\n viewport: this.#props.viewport,\n idsCache: this.#props.idsCache,\n alwaysAndNeverDrawnElementInfo: this.#props.alwaysAndNeverDrawnElementInfo,\n baseIdsCache: constructorProps.idsCache,\n hierarchyConfig: constructorProps.hierarchyConfig,\n });\n }\n\n public [Symbol.dispose]() {\n this.#visibilityHelper[Symbol.dispose]();\n }\n\n public changeSearchTargetsVisibilityStatus(targets: CategoriesTreeSearchTargets, on: boolean): Observable<void> {\n return defer(() => {\n if (this.#props.viewport.viewType === \"other\") {\n return EMPTY;\n }\n const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;\n const observables = new Array<Observable<void>>();\n if (definitionContainerIds?.size) {\n observables.push(this.#visibilityHelper.changeDefinitionContainersVisibilityStatus({ definitionContainerIds, on }));\n }\n\n if (modelIds?.size) {\n observables.push(this.#visibilityHelper.changeModelsVisibilityStatus({ modelIds, on }));\n }\n\n if (categories?.length) {\n observables.push(\n from(categories).pipe(mergeMap(({ modelId, categoryIds }) => this.#visibilityHelper.changeCategoriesVisibilityStatus({ categoryIds, modelId, on }))),\n );\n }\n\n if (subCategories?.length) {\n observables.push(\n from(subCategories).pipe(\n mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.changeSubCategoriesVisibilityStatus({ subCategoryIds, categoryId, on })),\n ),\n );\n }\n\n if (elements?.length) {\n const searchTargetElements = new Array<Id64String>();\n const elementIdsSet = new Set<Id64String>();\n const modelCategoryElementMap = new Map<`${ModelId}-${CategoryId}`, Array<ElementId>>();\n // elements is an array that stores elements grouped by:\n // 1. Their path\n // 2. Their modelId and categoryId\n // When changing visibility of elements, visibility handler does not care about the path.\n // So we can first get all elements and group them only by modelId and categoryId.\n for (const { elements: elementsMap, categoryId, modelId } of elements) {\n const key: `${ModelId}-${CategoryId}` = `${modelId}-${categoryId}`;\n let mapEntry = modelCategoryElementMap.get(key);\n if (!mapEntry) {\n mapEntry = [];\n modelCategoryElementMap.set(key, mapEntry);\n }\n for (const [elementId, { isSearchTarget }] of elementsMap) {\n mapEntry.push(elementId);\n elementIdsSet.add(elementId);\n if (isSearchTarget) {\n searchTargetElements.push(elementId);\n }\n }\n }\n observables.push(\n // Get children for search targets, since non search targets don't have all the children present in the hierarchy.\n this.#props.idsCache.getChildElementsTree({ elementIds: searchTargetElements }).pipe(\n // Need to filter out and keep only those children ids that are not part of elements that are present in search paths.\n // Elements in search paths will have their visibility changed directly: they will be provided as elementIds to changeElementsVisibilityStatus.\n map((childrenTree) => ({\n childrenNotInSearchPaths: setDifference(getIdsFromChildrenTree({ tree: childrenTree, predicate: ({ depth }) => depth > 0 }), elementIdsSet),\n childrenTree,\n })),\n mergeMap(({ childrenNotInSearchPaths, childrenTree }) =>\n fromWithRelease({ source: modelCategoryElementMap.entries(), size: modelCategoryElementMap.size, releaseOnCount: 50 }).pipe(\n mergeMap(([key, elementsInSearchPathsGroupedByModelAndCategory]) => {\n const [modelId, categoryId] = key.split(\"-\");\n const childrenIds = new Set<Id64String>();\n // A shared children tree was created, need to get the children for each element in the group.\n for (const elementId of elementsInSearchPathsGroupedByModelAndCategory) {\n const elementChildrenTree: ChildrenTree | undefined = childrenTree.get(elementId)?.children;\n if (!elementChildrenTree) {\n continue;\n }\n for (const childId of getIdsFromChildrenTree({ tree: elementChildrenTree })) {\n childrenIds.add(childId);\n }\n }\n return this.#visibilityHelper.changeElementsVisibilityStatus({\n modelId,\n categoryId,\n elementIds: elementsInSearchPathsGroupedByModelAndCategory,\n // Pass only those children that are not part of search paths.\n children: setIntersection(childrenIds, childrenNotInSearchPaths),\n on,\n });\n }),\n ),\n ),\n ),\n );\n }\n\n return merge(...observables);\n });\n }\n\n public getVisibilityStatus(node: HierarchyNode): Observable<VisibilityStatus> {\n if (this.#props.viewport.viewType === \"other\") {\n return of(createVisibilityStatus(\"disabled\"));\n }\n\n if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {\n return this.#visibilityHelper.getGroupedElementsVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n modelElementsMap: node.extendedData.modelElementsMap,\n parentKeys: node.parentKeys,\n childrenCount: node.extendedData.childrenCount,\n topMostParentElementId: node.extendedData.topMostParentElementId,\n });\n }\n\n if (CategoriesTreeNodeInternal.isDefinitionContainerNode(node)) {\n return this.#visibilityHelper.getDefinitionContainersVisibilityStatus({\n definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n });\n }\n\n if (CategoriesTreeNodeInternal.isModelNode(node)) {\n return this.#visibilityHelper.getModelsVisibilityStatus({\n modelIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n });\n }\n\n if (CategoriesTreeNodeInternal.isCategoryNode(node)) {\n return this.#visibilityHelper.getCategoriesVisibilityStatus({\n categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,\n });\n }\n\n if (CategoriesTreeNodeInternal.isSubCategoryNode(node)) {\n return this.#visibilityHelper.getSubCategoriesVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n });\n }\n\n assert(CategoriesTreeNodeInternal.isElementNode(node));\n const parentElementsIdsPath = getParentElementsIdsPath({\n parentInstanceKeys: node.parentKeys.filter((parentKey) => HierarchyNodeKey.isInstances(parentKey)).map((key) => key.instanceKeys),\n topMostParentElementId: node.extendedData.topMostParentElementId,\n });\n return this.#visibilityHelper.getElementsVisibilityStatus({\n elementIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.modelId,\n categoryId: node.extendedData.categoryId,\n parentElementsIdsPath,\n childrenCount: node.extendedData.childrenCount,\n categoryOfTopMostParentElement: node.extendedData.categoryOfTopMostParentElement,\n });\n }\n\n /** Changes visibility of the items represented by the tree node. */\n public changeVisibilityStatus(node: HierarchyNode, on: boolean): Observable<void> {\n const changeObs = defer(() => {\n if (this.#props.viewport.viewType === \"other\") {\n return EMPTY;\n }\n if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {\n return this.#visibilityHelper.changeGroupedElementsVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n modelElementsMap: node.extendedData.modelElementsMap,\n on,\n });\n }\n\n if (CategoriesTreeNodeInternal.isDefinitionContainerNode(node)) {\n return this.#visibilityHelper.changeDefinitionContainersVisibilityStatus({\n definitionContainerIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n on,\n });\n }\n\n if (CategoriesTreeNodeInternal.isModelNode(node)) {\n return this.#visibilityHelper.changeModelsVisibilityStatus({\n modelIds: node.key.instanceKeys.map(({ id }) => id),\n on,\n });\n }\n\n if (CategoriesTreeNodeInternal.isCategoryNode(node)) {\n return this.#visibilityHelper.changeCategoriesVisibilityStatus({\n categoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n modelId: node.extendedData.isCategoryOfSubModel ? node.extendedData.modelIds[0] : undefined,\n on,\n });\n }\n\n if (CategoriesTreeNodeInternal.isSubCategoryNode(node)) {\n return this.#visibilityHelper.changeSubCategoriesVisibilityStatus({\n categoryId: node.extendedData.categoryId,\n subCategoryIds: node.key.instanceKeys.map((instanceKey) => instanceKey.id),\n on,\n });\n }\n assert(CategoriesTreeNodeInternal.isElementNode(node));\n\n const elementIds = node.key.instanceKeys.map(({ id }) => id);\n return this.#props.idsCache.getChildElementsTree({ elementIds }).pipe(\n map((childrenTree): Id64Set => {\n // Children tree contains provided elementIds, they are at the root of this tree.\n // We want to skip them and only get ids of children.\n return getIdsFromChildrenTree({ tree: childrenTree, predicate: ({ depth }) => depth > 0 });\n }),\n mergeMap((children) =>\n this.#visibilityHelper.changeElementsVisibilityStatus({\n elementIds,\n modelId: node.extendedData.modelId,\n children: children.size > 0 ? children : undefined,\n categoryId: node.extendedData.categoryId,\n on,\n }),\n ),\n );\n });\n\n if (this.#props.viewport.isAlwaysDrawnExclusive) {\n return concat(this.#visibilityHelper.removeAlwaysDrawnExclusive(), changeObs);\n }\n return changeObs;\n }\n\n public getSearchTargetsVisibilityStatus(\n targets: CategoriesTreeSearchTargets,\n node: HierarchyNode & {\n key: ClassGroupingNodeKey | InstancesNodeKey;\n },\n ): Observable<VisibilityStatus> {\n if (this.#props.viewport.viewType === \"other\") {\n return of(createVisibilityStatus(\"disabled\"));\n }\n return defer(() => {\n const { definitionContainerIds, subCategories, modelIds, categories, elements } = targets;\n const observables = new Array<Observable<VisibilityStatus>>();\n if (definitionContainerIds?.size) {\n observables.push(this.#visibilityHelper.getDefinitionContainersVisibilityStatus({ definitionContainerIds }));\n }\n\n if (modelIds?.size) {\n observables.push(this.#visibilityHelper.getModelsVisibilityStatus({ modelIds }));\n }\n\n if (categories?.length) {\n observables.push(\n from(categories).pipe(\n mergeMap(({ modelId, categoryIds }) =>\n this.#visibilityHelper.getCategoriesVisibilityStatus({\n categoryIds,\n modelId,\n }),\n ),\n ),\n );\n }\n\n if (subCategories?.length) {\n observables.push(\n from(subCategories).pipe(\n mergeMap(({ categoryId, subCategoryIds }) => this.#visibilityHelper.getSubCategoriesVisibilityStatus({ subCategoryIds, categoryId })),\n ),\n );\n }\n\n if (elements?.length) {\n const searchTargetElements = new Array<Id64String>();\n for (const { elements: elementsMap } of elements) {\n for (const [elementId, { isSearchTarget }] of elementsMap) {\n if (isSearchTarget) {\n searchTargetElements.push(elementId);\n }\n }\n }\n let childrenCountMapObs: Observable<Map<Id64String, number>>;\n if (CategoriesTreeNodeInternal.isElementClassGroupingNode(node)) {\n const groupingNodesSearchTargets: Map<Id64String, { childrenCount: number }> | undefined = node.extendedData?.searchTargets;\n const nestedSearchTargetElements = searchTargetElements.filter((searchTarget) => !groupingNodesSearchTargets?.has(searchTarget));\n // Only need to request children count for indirect children search targets.\n // Direct children search targets already have children count stored in grouping nodes extended data.\n childrenCountMapObs = this.#props.idsCache.getAllChildElementsCount({ elementIds: nestedSearchTargetElements }).pipe(\n map((elementCountMap) => {\n // Direct children search targets already have children count stored in grouping nodes extended data.\n for (const [key, value] of node.extendedData.searchTargets ?? []) {\n elementCountMap.set(key, value.childrenCount);\n }\n return elementCountMap;\n }),\n );\n } else {\n childrenCountMapObs = this.#props.idsCache.getAllChildElementsCount({ elementIds: searchTargetElements });\n }\n observables.push(\n childrenCountMapObs.pipe(\n mergeMap((elementsChildrenCountMap) =>\n fromWithRelease({ source: elements, releaseOnCount: 50 }).pipe(\n mergeMap(({ modelId, elements: elementsMap, categoryId, pathToElements, topMostParentElementId }) => {\n const parentElementsIdsPath = topMostParentElementId\n ? getParentElementsIdsPath({\n parentInstanceKeys: pathToElements.map((instanceKey) => [instanceKey]),\n topMostParentElementId,\n })\n : [];\n let totalSearchTargetsChildrenCount = 0;\n const nonSearchTargetIds = new Array<Id64String>();\n const searchTargetIds = new Array<Id64String>();\n for (const [elementId, { isSearchTarget }] of elementsMap) {\n if (!isSearchTarget) {\n nonSearchTargetIds.push(elementId);\n continue;\n }\n searchTargetIds.push(elementId);\n const childCount = elementsChildrenCountMap.get(elementId);\n if (childCount) {\n totalSearchTargetsChildrenCount += childCount;\n }\n }\n return merge(\n searchTargetIds.length > 0\n ? this.#visibilityHelper.getElementsVisibilityStatus({\n modelId,\n categoryId,\n elementIds: searchTargetIds,\n parentElementsIdsPath,\n childrenCount: totalSearchTargetsChildrenCount,\n // Search results tree is created on search paths. Since search paths contain only categories that are directly under models\n // or at the root, categoryId can be used here here.\n categoryOfTopMostParentElement: categoryId,\n })\n : EMPTY,\n // Set childrenCount to undefined for non search targets, as some of their child elements might be filtered out.\n // Since childrenCount is set to undefined, these elements won't check child always/never drawn child elements status.\n // Child always/never drawn elements will be in search paths, and their visibility status will be handled separately.\n nonSearchTargetIds.length > 0\n ? this.#visibilityHelper.getElementsVisibilityStatus({\n modelId,\n categoryId,\n elementIds: nonSearchTargetIds,\n parentElementsIdsPath,\n childrenCount: undefined,\n // Search results tree is created on search paths. Since search paths contain only categories that are directly under models\n // or at the root, categoryId can be used here here.\n categoryOfTopMostParentElement: categoryId,\n })\n : EMPTY,\n ).pipe(mergeVisibilityStatuses());\n }),\n ),\n ),\n ),\n );\n }\n\n return from(observables).pipe(mergeAll(), mergeVisibilityStatuses());\n });\n }\n}\n\n/**\n * Creates categories tree visibility handler. Is used by integration and performance tests.\n * @internal\n */\nexport function createCategoriesTreeVisibilityHandler(props: {\n viewport: TreeWidgetViewport;\n idsCache: CategoriesTreeIdsCache;\n imodelAccess: ECClassHierarchyInspector;\n searchPaths?: HierarchySearchPath[];\n hierarchyConfig: CategoriesTreeHierarchyConfiguration;\n}) {\n return new HierarchyVisibilityHandlerImpl<CategoriesTreeSearchTargets>({\n getSearchResultsTree: (): undefined | Promise<SearchResultsTree<CategoriesTreeSearchTargets>> => {\n if (!props.searchPaths) {\n return undefined;\n }\n const { categoryClass, elementClass, modelClass } = getClassesByView(props.viewport.viewType === \"2d\" ? \"2d\" : \"3d\");\n return createCategoriesSearchResultsTree({\n idsCache: props.idsCache,\n searchPaths: props.searchPaths,\n imodelAccess: props.imodelAccess,\n categoryClassName: categoryClass,\n categoryElementClassName: elementClass,\n categoryModelClassName: modelClass,\n });\n },\n getTreeSpecificVisibilityHandler: (info) => {\n return new CategoriesTreeVisibilityHandler({\n alwaysAndNeverDrawnElementInfo: info,\n idsCache: props.idsCache,\n viewport: props.viewport,\n hierarchyConfig: props.hierarchyConfig,\n });\n },\n viewport: props.viewport,\n componentId: Guid.createValue(),\n });\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { HierarchyNodeKey } from "@itwin/presentation-hierarchies";
|
|
1
2
|
import { BaseVisibilityHelper } from "../../../common/internal/visibility/BaseVisibilityHelper.js";
|
|
2
3
|
import type { Observable } from "rxjs";
|
|
3
4
|
import type { Id64Arg, Id64String } from "@itwin/core-bentley";
|
|
4
|
-
import type { ElementId, ModelId } from "../../../common/internal/Types.js";
|
|
5
|
+
import type { CategoryId, ElementId, ModelId } from "../../../common/internal/Types.js";
|
|
5
6
|
import type { BaseVisibilityHelperProps } from "../../../common/internal/visibility/BaseVisibilityHelper.js";
|
|
6
7
|
import type { VisibilityStatus } from "../../../common/UseHierarchyVisibility.js";
|
|
7
8
|
import type { CategoriesTreeHierarchyConfiguration } from "../../CategoriesTreeDefinition.js";
|
|
@@ -30,8 +31,14 @@ export declare class CategoriesTreeVisibilityHelper extends BaseVisibilityHelper
|
|
|
30
31
|
}): Observable<VisibilityStatus>;
|
|
31
32
|
/** Gets grouped elements visibility status. */
|
|
32
33
|
getGroupedElementsVisibilityStatus(props: {
|
|
33
|
-
modelElementsMap: Map<ModelId,
|
|
34
|
+
modelElementsMap: Map<ModelId, {
|
|
35
|
+
elementIds: Set<ElementId>;
|
|
36
|
+
categoryOfTopMostParentElement: CategoryId;
|
|
37
|
+
}>;
|
|
34
38
|
categoryId: Id64String;
|
|
39
|
+
parentKeys: HierarchyNodeKey[];
|
|
40
|
+
childrenCount: number;
|
|
41
|
+
topMostParentElementId?: ElementId;
|
|
35
42
|
}): Observable<VisibilityStatus>;
|
|
36
43
|
/**
|
|
37
44
|
* Changes visibility status of definition containers.
|
|
@@ -54,11 +61,13 @@ export declare class CategoriesTreeVisibilityHelper extends BaseVisibilityHelper
|
|
|
54
61
|
}): Observable<void>;
|
|
55
62
|
/** Changes grouped elements visibility status. */
|
|
56
63
|
changeGroupedElementsVisibilityStatus(props: {
|
|
57
|
-
modelElementsMap: Map<ModelId,
|
|
64
|
+
modelElementsMap: Map<ModelId, {
|
|
65
|
+
elementIds: Set<ElementId>;
|
|
66
|
+
}>;
|
|
58
67
|
categoryId: Id64String;
|
|
59
68
|
on: boolean;
|
|
60
69
|
}): Observable<void>;
|
|
61
|
-
/** Turns on
|
|
62
|
-
private
|
|
70
|
+
/** Turns on category and its' related models. Does not turn on other categories contained in those models.*/
|
|
71
|
+
private enableCategoryWithoutEnablingOtherCategories;
|
|
63
72
|
}
|
|
64
73
|
//# sourceMappingURL=CategoriesTreeVisibilityHelper.d.ts.map
|