@itwin/tree-widget-react 4.0.0-alpha.5 → 4.0.0-alpha.7
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 +22 -1
- package/README.md +2 -1
- package/lib/esm/tree-widget-react/TreeWidget.js +1 -1
- package/lib/esm/tree-widget-react/TreeWidget.js.map +1 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.js +1 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/ErrorState.js +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/ErrorState.js.map +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/SearchBox.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/tree-header/SearchBox.js +3 -2
- package/lib/esm/tree-widget-react/components/tree-header/SearchBox.js.map +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/SelectableTree.css +2 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.d.ts +2 -2
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.js +3 -2
- 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 +9 -2
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.js +53 -7
- 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 +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.js +1 -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 +30 -3
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.js +588 -170
- 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/UseCategoriesTree.d.ts +15 -4
- package/lib/esm/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.js +149 -56
- 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 +30 -15
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js +192 -38
- 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/CategoriesTreeNode.d.ts +18 -3
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeNode.js +30 -3
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeNode.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeVisibilityHandler.d.ts +24 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeVisibilityHandler.js +785 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeVisibilityHandler.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/FilteredTree.d.ts +39 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/FilteredTree.js +221 -0
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/FilteredTree.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.d.ts +5 -17
- package/lib/esm/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.js +5 -62
- package/lib/esm/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.d.ts +2 -0
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.js +4 -2
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseNodeHighlighting.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/UseNodeHighlighting.js +2 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseNodeHighlighting.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseTelemetryContext.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/UseTelemetryContext.js +2 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseTelemetryContext.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/Utils.d.ts +33 -23
- package/lib/esm/tree-widget-react/components/trees/common/Utils.js +60 -47
- package/lib/esm/tree-widget-react/components/trees/common/Utils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/BaseTreeRenderer.js +3 -3
- package/lib/esm/tree-widget-react/components/trees/common/components/BaseTreeRenderer.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/Delayed.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/Delayed.js +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/Delayed.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/EmptyTree.css +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/ProgressOverlay.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/ProgressOverlay.js +4 -3
- package/lib/esm/tree-widget-react/components/trees/common/components/ProgressOverlay.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/{categories-tree/internal/ClassNameDefinitions.js → common/components/SkeletonTree.css} +12 -7
- package/lib/esm/tree-widget-react/components/trees/common/components/SkeletonTree.d.ts +4 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/SkeletonTree.js +16 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/SkeletonTree.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.css +11 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/Tree.js +8 -7
- 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.js +3 -3
- 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/UseVisibilityButtonHandler.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/components/UseVisibilityButtonHandler.js +1 -0
- 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/VisibilityTree.js +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/components/VisibilityTree.js.map +1 -1
- 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/AlwaysAndNeverDrawnElementInfo.d.ts +44 -0
- package/lib/esm/tree-widget-react/components/trees/{models-tree → common}/internal/AlwaysAndNeverDrawnElementInfo.js +81 -31
- package/lib/esm/tree-widget-react/components/trees/common/internal/AlwaysAndNeverDrawnElementInfo.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ClassNameDefinitions.d.ts +33 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ClassNameDefinitions.js +37 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ClassNameDefinitions.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ModelCategoryElementsCountCache.d.ts +16 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ModelCategoryElementsCountCache.js +72 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/ModelCategoryElementsCountCache.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{Rxjs.d.ts → internal/Rxjs.d.ts} +9 -2
- package/lib/esm/tree-widget-react/components/trees/common/{Rxjs.js → internal/Rxjs.js} +9 -2
- package/lib/esm/tree-widget-react/components/trees/common/internal/Rxjs.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{Tooltip.d.ts → internal/Tooltip.d.ts} +5 -1
- package/lib/esm/tree-widget-react/components/trees/common/{Tooltip.js → internal/Tooltip.js} +7 -1
- package/lib/esm/tree-widget-react/components/trees/common/internal/Tooltip.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Types.d.ts +14 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Types.js +6 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Types.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseActiveViewport.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseHierarchiesLocalization.d.ts → internal/UseHierarchiesLocalization.d.ts} +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseHierarchiesLocalization.js → internal/UseHierarchiesLocalization.js} +6 -2
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseHierarchiesLocalization.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseHierarchyFiltering.d.ts → internal/UseHierarchyFiltering.d.ts} +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseHierarchyFiltering.js → internal/UseHierarchyFiltering.js} +4 -3
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseHierarchyFiltering.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseIModelChangeListener.d.ts → internal/UseIModelChangeListener.d.ts} +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/{UseIModelChangeListener.js → internal/UseIModelChangeListener.js} +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/UseIModelChangeListener.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.d.ts +47 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.js +101 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/Utils.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityChangeEventListener.d.ts +20 -0
- package/lib/esm/tree-widget-react/components/trees/{models-tree → common}/internal/VisibilityChangeEventListener.js +17 -9
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityChangeEventListener.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.d.ts +82 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.js +234 -0
- package/lib/esm/tree-widget-react/components/trees/common/internal/VisibilityUtils.js.map +1 -0
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +7 -2
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.js +24 -18
- 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.d.ts +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/external-sources-tree/ExternalSourcesTreeDefinition.d.ts +1 -0
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeDefinition.js +1 -0
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeDefinition.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.d.ts +9 -2
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.js +44 -34
- 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.d.ts +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.d.ts +13 -0
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.js +39 -38
- 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.d.ts +5 -5
- package/lib/esm/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.js +25 -24
- 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 +4 -2
- package/lib/esm/tree-widget-react/components/trees/index.js +4 -2
- 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 +2 -2
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTree.js +2 -2
- 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.js +15 -11
- 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 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.js +1 -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 +7 -2
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.js +73 -70
- 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 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/UseModelsTree.js +73 -49
- 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/FilteredTree.d.ts +7 -9
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/FilteredTree.js +4 -6
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/FilteredTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.d.ts +4 -5
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.js +54 -104
- 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/ModelsTreeVisibilityHandler.d.ts +0 -26
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js +75 -291
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js.map +1 -1
- package/lib/public/locales/en/TreeWidget.json +55 -6
- package/package.json +17 -18
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.d.ts +0 -37
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.js +0 -214
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/ClassNameDefinitions.d.ts +0 -7
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/ClassNameDefinitions.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/Rxjs.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/Tooltip.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseActiveViewport.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseFiltering.d.ts +0 -11
- package/lib/esm/tree-widget-react/components/trees/common/UseFiltering.js +0 -24
- package/lib/esm/tree-widget-react/components/trees/common/UseFiltering.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchiesLocalization.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyFiltering.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseIModelChangeListener.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/Utils.d.ts +0 -7
- package/lib/esm/tree-widget-react/components/trees/models-tree/Utils.js +0 -21
- package/lib/esm/tree-widget-react/components/trees/models-tree/Utils.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.d.ts +0 -29
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.js.map +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.d.ts +0 -12
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.js.map +0 -1
- /package/lib/esm/tree-widget-react/components/trees/common/{UseActiveViewport.d.ts → internal/UseActiveViewport.d.ts} +0 -0
- /package/lib/esm/tree-widget-react/components/trees/common/{UseActiveViewport.js → internal/UseActiveViewport.js} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const CATEGORY_CLASS_NAME = "BisCore.Category";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DEFINITION_CONTAINER_CLASS_NAME = "BisCore.DefinitionContainer";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const DEFINITION_ELEMENT_CLASS_NAME = "BisCore.DefinitionElement";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const DEFINITION_MODEL_CLASS_NAME = "BisCore.DefinitionModel";
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const DRAWING_CATEGORY_CLASS_NAME = "BisCore.DrawingCategory";
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ELEMENT_CLASS_NAME = "BisCore.Element";
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const GEOMETRIC_ELEMENT_2D_CLASS_NAME = "BisCore.GeometricElement2d";
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GEOMETRIC_ELEMENT_3D_CLASS_NAME = "BisCore.GeometricElement3d";
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const GEOMETRIC_MODEL_2D_CLASS_NAME = "BisCore.GeometricModel2d";
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const GEOMETRIC_MODEL_3D_CLASS_NAME = "BisCore.GeometricModel3d";
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const INFORMATION_PARTITION_ELEMENT_CLASS_NAME = "BisCore.InformationPartitionElement";
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const MODEL_CLASS_NAME = "BisCore.Model";
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const SPATIAL_CATEGORY_CLASS_NAME = "BisCore.SpatialCategory";
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const SUBJECT_CLASS_NAME = "BisCore.Subject";
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const SUB_CATEGORY_CLASS_NAME = "BisCore.SubCategory";
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const SUB_MODELED_ELEMENT_CLASS_NAME = "BisCore.ISubModeledElement";
|
|
37
|
+
//# sourceMappingURL=ClassNameDefinitions.js.map
|
package/lib/esm/tree-widget-react/components/trees/common/internal/ClassNameDefinitions.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClassNameDefinitions.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/ClassNameDefinitions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAAG,6BAA6B,CAAC;AAE7E,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAAG,2BAA2B,CAAC;AAEzE,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AAErE,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AAErE,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAEpD,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAAG,4BAA4B,CAAC;AAE5E,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAAG,4BAA4B,CAAC;AAE5E,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAAG,0BAA0B,CAAC;AAExE,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAAG,0BAA0B,CAAC;AAExE,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAAG,qCAAqC,CAAC;AAE9F,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;AAErE,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAEpD,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAAG,4BAA4B,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\n/** @internal */\nexport const CATEGORY_CLASS_NAME = \"BisCore.Category\";\n\n/** @internal */\nexport const DEFINITION_CONTAINER_CLASS_NAME = \"BisCore.DefinitionContainer\";\n\n/** @internal */\nexport const DEFINITION_ELEMENT_CLASS_NAME = \"BisCore.DefinitionElement\";\n\n/** @internal */\nexport const DEFINITION_MODEL_CLASS_NAME = \"BisCore.DefinitionModel\";\n\n/** @internal */\nexport const DRAWING_CATEGORY_CLASS_NAME = \"BisCore.DrawingCategory\";\n\n/** @internal */\nexport const ELEMENT_CLASS_NAME = \"BisCore.Element\";\n\n/** @internal */\nexport const GEOMETRIC_ELEMENT_2D_CLASS_NAME = \"BisCore.GeometricElement2d\";\n\n/** @internal */\nexport const GEOMETRIC_ELEMENT_3D_CLASS_NAME = \"BisCore.GeometricElement3d\";\n\n/** @internal */\nexport const GEOMETRIC_MODEL_2D_CLASS_NAME = \"BisCore.GeometricModel2d\";\n\n/** @internal */\nexport const GEOMETRIC_MODEL_3D_CLASS_NAME = \"BisCore.GeometricModel3d\";\n\n/** @internal */\nexport const INFORMATION_PARTITION_ELEMENT_CLASS_NAME = \"BisCore.InformationPartitionElement\";\n\n/** @internal */\nexport const MODEL_CLASS_NAME = \"BisCore.Model\";\n\n/** @internal */\nexport const SPATIAL_CATEGORY_CLASS_NAME = \"BisCore.SpatialCategory\";\n\n/** @internal */\nexport const SUBJECT_CLASS_NAME = \"BisCore.Subject\";\n\n/** @internal */\nexport const SUB_CATEGORY_CLASS_NAME = \"BisCore.SubCategory\";\n\n/** @internal */\nexport const SUB_MODELED_ELEMENT_CLASS_NAME = \"BisCore.ISubModeledElement\";\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { Id64String } from "@itwin/core-bentley";
|
|
3
|
+
import type { LimitingECSqlQueryExecutor } from "@itwin/presentation-hierarchies";
|
|
4
|
+
/** @internal */
|
|
5
|
+
export declare class ModelCategoryElementsCountCache implements Disposable {
|
|
6
|
+
private _queryExecutor;
|
|
7
|
+
private _elementsClassName;
|
|
8
|
+
private _cache;
|
|
9
|
+
private _requestsStream;
|
|
10
|
+
private _subscription;
|
|
11
|
+
constructor(_queryExecutor: LimitingECSqlQueryExecutor, _elementsClassName: string);
|
|
12
|
+
private queryCategoryElementCounts;
|
|
13
|
+
[Symbol.dispose](): void;
|
|
14
|
+
getCategoryElementsCount(modelId: Id64String, categoryId: Id64String): Promise<number>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ModelCategoryElementsCountCache.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { bufferTime, filter, firstValueFrom, mergeAll, mergeMap, ReplaySubject, Subject } from "rxjs";
|
|
6
|
+
import { assert } from "@itwin/core-bentley";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export class ModelCategoryElementsCountCache {
|
|
9
|
+
constructor(_queryExecutor, _elementsClassName) {
|
|
10
|
+
this._queryExecutor = _queryExecutor;
|
|
11
|
+
this._elementsClassName = _elementsClassName;
|
|
12
|
+
this._cache = new Map();
|
|
13
|
+
this._requestsStream = new Subject();
|
|
14
|
+
this._subscription = this._requestsStream
|
|
15
|
+
.pipe(bufferTime(20), filter((requests) => requests.length > 0), mergeMap(async (requests) => this.queryCategoryElementCounts(requests)), mergeAll())
|
|
16
|
+
.subscribe({
|
|
17
|
+
next: ({ modelId, categoryId, elementsCount }) => {
|
|
18
|
+
const subject = this._cache.get(`${modelId}-${categoryId}`);
|
|
19
|
+
assert(!!subject);
|
|
20
|
+
subject.next(elementsCount);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async queryCategoryElementCounts(input) {
|
|
25
|
+
const reader = this._queryExecutor.createQueryReader({
|
|
26
|
+
ctes: [
|
|
27
|
+
`
|
|
28
|
+
CategoryElements(id, modelId, categoryId) AS (
|
|
29
|
+
SELECT ECInstanceId, Model.Id, Category.Id
|
|
30
|
+
FROM ${this._elementsClassName}
|
|
31
|
+
WHERE
|
|
32
|
+
Parent.Id IS NULL
|
|
33
|
+
AND (
|
|
34
|
+
${input.map(({ modelId, categoryId }) => `Model.Id = ${modelId} AND Category.Id = ${categoryId}`).join(" OR ")}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
UNION ALL
|
|
38
|
+
|
|
39
|
+
SELECT c.ECInstanceId, p.modelId, p.categoryId
|
|
40
|
+
FROM ${this._elementsClassName} c
|
|
41
|
+
JOIN CategoryElements p ON c.Parent.Id = p.id
|
|
42
|
+
)
|
|
43
|
+
`,
|
|
44
|
+
],
|
|
45
|
+
ecsql: `
|
|
46
|
+
SELECT modelId, categoryId, COUNT(id) elementsCount
|
|
47
|
+
FROM CategoryElements
|
|
48
|
+
GROUP BY modelId, categoryId
|
|
49
|
+
`,
|
|
50
|
+
}, { rowFormat: "ECSqlPropertyNames", limit: "unbounded" });
|
|
51
|
+
const result = new Array();
|
|
52
|
+
for await (const row of reader) {
|
|
53
|
+
result.push({ modelId: row.modelId, categoryId: row.categoryId, elementsCount: row.elementsCount });
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
[Symbol.dispose]() {
|
|
58
|
+
this._subscription.unsubscribe();
|
|
59
|
+
}
|
|
60
|
+
async getCategoryElementsCount(modelId, categoryId) {
|
|
61
|
+
const cacheKey = `${modelId}-${categoryId}`;
|
|
62
|
+
let result = this._cache.get(cacheKey);
|
|
63
|
+
if (result !== undefined) {
|
|
64
|
+
return firstValueFrom(result);
|
|
65
|
+
}
|
|
66
|
+
result = new ReplaySubject(1);
|
|
67
|
+
this._cache.set(cacheKey, result);
|
|
68
|
+
this._requestsStream.next({ modelId, categoryId });
|
|
69
|
+
return firstValueFrom(result);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=ModelCategoryElementsCountCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCategoryElementsCountCache.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/ModelCategoryElementsCountCache.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACtG,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAS7C,gBAAgB;AAChB,MAAM,OAAO,+BAA+B;IAK1C,YACU,cAA0C,EAC1C,kBAA0B;QAD1B,mBAAc,GAAd,cAAc,CAA4B;QAC1C,uBAAkB,GAAlB,kBAAkB,CAAQ;QAN5B,WAAM,GAAG,IAAI,GAAG,EAAqC,CAAC;QACtD,oBAAe,GAAG,IAAI,OAAO,EAAmD,CAAC;QAOvF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,eAAe;aACtC,IAAI,CACH,UAAU,CAAC,EAAE,CAAC,EACd,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EACzC,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,EACvE,QAAQ,EAAE,CACX;aACA,SAAS,CAAC;YACT,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,EAAE;gBAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,IAAI,UAAU,EAAE,CAAC,CAAC;gBAC5D,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBAClB,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC9B,CAAC;SACF,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9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACnD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { bufferTime, filter, firstValueFrom, mergeAll, mergeMap, ReplaySubject, Subject } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type { Subscription } from \"rxjs\";\nimport type { LimitingECSqlQueryExecutor } from \"@itwin/presentation-hierarchies\";\nimport type { CategoryId, ModelId } from \"./Types.js\";\n\ntype ModelCategoryKey = `${ModelId}-${CategoryId}`;\n\n/** @internal */\nexport class ModelCategoryElementsCountCache implements Disposable {\n private _cache = new Map<ModelCategoryKey, Subject<number>>();\n private _requestsStream = new Subject<{ modelId: Id64String; categoryId: Id64String }>();\n private _subscription: Subscription;\n\n public constructor(\n private _queryExecutor: LimitingECSqlQueryExecutor,\n private _elementsClassName: string,\n ) {\n this._subscription = this._requestsStream\n .pipe(\n bufferTime(20),\n filter((requests) => requests.length > 0),\n mergeMap(async (requests) => this.queryCategoryElementCounts(requests)),\n mergeAll(),\n )\n .subscribe({\n next: ({ modelId, categoryId, elementsCount }) => {\n const subject = this._cache.get(`${modelId}-${categoryId}`);\n assert(!!subject);\n subject.next(elementsCount);\n },\n });\n }\n\n private async queryCategoryElementCounts(\n input: Array<{ modelId: Id64String; categoryId: Id64String }>,\n ): Promise<Array<{ modelId: number; categoryId: number; elementsCount: number }>> {\n const reader = this._queryExecutor.createQueryReader(\n {\n ctes: [\n `\n CategoryElements(id, modelId, categoryId) AS (\n SELECT ECInstanceId, Model.Id, Category.Id\n FROM ${this._elementsClassName}\n WHERE\n Parent.Id IS NULL\n AND (\n ${input.map(({ modelId, categoryId }) => `Model.Id = ${modelId} AND Category.Id = ${categoryId}`).join(\" OR \")}\n )\n\n UNION ALL\n\n SELECT c.ECInstanceId, p.modelId, p.categoryId\n FROM ${this._elementsClassName} c\n JOIN CategoryElements p ON c.Parent.Id = p.id\n )\n `,\n ],\n ecsql: `\n SELECT modelId, categoryId, COUNT(id) elementsCount\n FROM CategoryElements\n GROUP BY modelId, categoryId\n `,\n },\n { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" },\n );\n\n const result = new Array<{ modelId: number; categoryId: number; elementsCount: number }>();\n for await (const row of reader) {\n result.push({ modelId: row.modelId, categoryId: row.categoryId, elementsCount: row.elementsCount });\n }\n return result;\n }\n\n public [Symbol.dispose]() {\n this._subscription.unsubscribe();\n }\n\n public async getCategoryElementsCount(modelId: Id64String, categoryId: Id64String): Promise<number> {\n const cacheKey: ModelCategoryKey = `${modelId}-${categoryId}`;\n let result = this._cache.get(cacheKey);\n if (result !== undefined) {\n return firstValueFrom(result);\n }\n\n result = new ReplaySubject(1);\n this._cache.set(cacheKey, result);\n this._requestsStream.next({ modelId, categoryId });\n return firstValueFrom(result);\n }\n}\n"]}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { Observable, ObservableInput, OperatorFunction } from "rxjs";
|
|
2
2
|
/**
|
|
3
3
|
* Applies reduce function and "returns" early if the predicate returns `false` for the accumulator.
|
|
4
|
+
* @internal
|
|
4
5
|
*/
|
|
5
6
|
export declare function reduceWhile<TValue, TAccumulator>(predicate: (x: TAccumulator) => boolean, reduceFunc: (acc: TAccumulator, val: TValue) => TAccumulator, initial: TAccumulator): OperatorFunction<TValue, TAccumulator | undefined>;
|
|
6
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Same as `firstValueFrom` except it won't throw if the observable emits no values.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
7
11
|
export declare function toVoidPromise(obs: Observable<any>): Promise<void>;
|
|
8
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Returns observable results in an array
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
9
16
|
export declare function collect<T>(obs: ObservableInput<T>): Promise<T[]>;
|
|
10
17
|
//# sourceMappingURL=Rxjs.d.ts.map
|
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
import { defaultIfEmpty, from, last, scan, takeWhile } from "rxjs";
|
|
6
6
|
/**
|
|
7
7
|
* Applies reduce function and "returns" early if the predicate returns `false` for the accumulator.
|
|
8
|
+
* @internal
|
|
8
9
|
*/
|
|
9
10
|
export function reduceWhile(predicate, reduceFunc, initial) {
|
|
10
11
|
return (obs) => {
|
|
11
12
|
return obs.pipe(scan(reduceFunc, initial), takeWhile(predicate, true), defaultIfEmpty(undefined), last());
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Same as `firstValueFrom` except it won't throw if the observable emits no values.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
15
19
|
export async function toVoidPromise(obs) {
|
|
16
20
|
return new Promise((resolve, reject) => {
|
|
17
21
|
obs.subscribe({
|
|
@@ -20,7 +24,10 @@ export async function toVoidPromise(obs) {
|
|
|
20
24
|
});
|
|
21
25
|
});
|
|
22
26
|
}
|
|
23
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Returns observable results in an array
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
24
31
|
export async function collect(obs) {
|
|
25
32
|
return new Promise((resolve, reject) => {
|
|
26
33
|
const arr = new Array();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rxjs.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/Rxjs.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAInE;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,SAAuC,EACvC,UAA4D,EAC5D,OAAqB;IAErB,OAAO,CAAC,GAAG,EAAE,EAAE;QACb,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5G,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAoB;IACtD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,GAAG,CAAC,SAAS,CAAC;YACZ,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE;YACzB,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAI,GAAuB;IACtD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,IAAI,KAAK,EAAK,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC;YAClB,IAAI,CAAC,IAAO;gBACV,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;YACD,QAAQ;gBACN,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;YACD,KAAK,CAAC,MAAM;gBACV,MAAM,CAAC,MAAM,CAAC,CAAC;YACjB,CAAC;SACF,CAAC,CAAC;IACL,CAAC,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 { defaultIfEmpty, from, last, scan, takeWhile } from \"rxjs\";\n\nimport type { Observable, ObservableInput, OperatorFunction } from \"rxjs\";\n\n/**\n * Applies reduce function and \"returns\" early if the predicate returns `false` for the accumulator.\n * @internal\n */\nexport function reduceWhile<TValue, TAccumulator>(\n predicate: (x: TAccumulator) => boolean,\n reduceFunc: (acc: TAccumulator, val: TValue) => TAccumulator,\n initial: TAccumulator,\n): OperatorFunction<TValue, TAccumulator | undefined> {\n return (obs) => {\n return obs.pipe(scan(reduceFunc, initial), takeWhile(predicate, true), defaultIfEmpty(undefined), last());\n };\n}\n\n/**\n * Same as `firstValueFrom` except it won't throw if the observable emits no values.\n * @internal\n */\nexport async function toVoidPromise(obs: Observable<any>): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n obs.subscribe({\n complete: () => resolve(),\n error: reject,\n });\n });\n}\n\n/**\n * Returns observable results in an array\n * @internal\n */\nexport async function collect<T>(obs: ObservableInput<T>): Promise<T[]> {\n return new Promise((resolve, reject) => {\n const arr = new Array<T>();\n from(obs).subscribe({\n next(item: T) {\n arr.push(item);\n },\n complete() {\n resolve(arr);\n },\n error(reason) {\n reject(reason);\n },\n });\n });\n}\n"]}
|
package/lib/esm/tree-widget-react/components/trees/common/{Tooltip.d.ts → internal/Tooltip.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VisibilityStatus } from "
|
|
1
|
+
import type { VisibilityStatus } from "../UseHierarchyVisibility.js";
|
|
2
2
|
/** @internal */
|
|
3
3
|
export type Visibility = "visible" | "hidden" | "partial";
|
|
4
4
|
/** @internal */
|
|
@@ -13,5 +13,9 @@ export declare function createVisibilityStatus(status: "visible" | "hidden", opt
|
|
|
13
13
|
export declare function createVisibilityStatus(status: "visible" | "hidden" | "partial" | "disabled", options?: VisibilityStatusOptions): VisibilityStatus;
|
|
14
14
|
/** @internal */
|
|
15
15
|
export declare function createTooltip(status: Visibility | "disabled", tooltipStringId: string | undefined): string;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare function getTooltipOptions(key: string | undefined, ignoreTooltip?: boolean): {
|
|
18
|
+
useTooltip: string | false | undefined;
|
|
19
|
+
};
|
|
16
20
|
export {};
|
|
17
21
|
//# sourceMappingURL=Tooltip.d.ts.map
|
package/lib/esm/tree-widget-react/components/trees/common/{Tooltip.js → internal/Tooltip.js}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
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 { TreeWidget } from "
|
|
5
|
+
import { TreeWidget } from "../../../../TreeWidget.js";
|
|
6
6
|
export function createVisibilityStatus(status, { useTooltip } = {}) {
|
|
7
7
|
return {
|
|
8
8
|
state: status === "disabled" ? "hidden" : status,
|
|
@@ -21,4 +21,10 @@ export function createTooltip(status, tooltipStringId) {
|
|
|
21
21
|
const tooltipString = TreeWidget.translate(tooltipStringId);
|
|
22
22
|
return `${statusString}: ${tooltipString}`;
|
|
23
23
|
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export function getTooltipOptions(key, ignoreTooltip) {
|
|
26
|
+
return {
|
|
27
|
+
useTooltip: ignoreTooltip ? false : key,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
24
30
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/Tooltip.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAmBvD,MAAM,UAAU,sBAAsB,CAAC,MAA+B,EAAE,EAAE,UAAU,KAA8B,EAAE;IAClH,OAAO;QACL,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;QAChD,UAAU,EAAE,MAAM,KAAK,UAAU;QACjC,OAAO,EAAE,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC;KAC9E,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,MAA+B,EAAE,eAAmC;IAChG,MAAM,cAAc,GAAG,6BAA6B,MAAM,EAAE,CAAC;IAC7D,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1D,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,YAAY,CAAC;KACrB;IAED,eAAe,GAAG,sBAAsB,eAAe,EAAE,CAAC;IAC1D,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC5D,OAAO,GAAG,YAAY,KAAK,aAAa,EAAE,CAAC;AAC7C,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,iBAAiB,CAAC,GAAuB,EAAE,aAAuB;IAChF,OAAO;QACL,UAAU,EAAE,aAAa,CAAC,CAAC,CAAE,KAAe,CAAC,CAAC,CAAC,GAAG;KACnD,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 { TreeWidget } from \"../../../../TreeWidget.js\";\n\nimport type { VisibilityStatus } from \"../UseHierarchyVisibility.js\";\n\n/** @internal */\nexport type Visibility = \"visible\" | \"hidden\" | \"partial\";\n\n/** @internal */\nexport type NonPartialVisibilityStatus = Omit<VisibilityStatus, \"state\"> & { state: \"visible\" | \"hidden\" };\n\ninterface VisibilityStatusOptions {\n // id of localized string to use as an additional tooltip or false to not use tooltip at all\n // if undefined tooltip will be created based only on the visibility status\n useTooltip?: string | false;\n}\n\n/** @internal */\nexport function createVisibilityStatus(status: \"visible\" | \"hidden\", options?: VisibilityStatusOptions): NonPartialVisibilityStatus;\nexport function createVisibilityStatus(status: \"visible\" | \"hidden\" | \"partial\" | \"disabled\", options?: VisibilityStatusOptions): VisibilityStatus;\nexport function createVisibilityStatus(status: Visibility | \"disabled\", { useTooltip }: VisibilityStatusOptions = {}): VisibilityStatus {\n return {\n state: status === \"disabled\" ? \"hidden\" : status,\n isDisabled: status === \"disabled\",\n tooltip: useTooltip === false ? undefined : createTooltip(status, useTooltip),\n };\n}\n\n/** @internal */\nexport function createTooltip(status: Visibility | \"disabled\", tooltipStringId: string | undefined): string {\n const statusStringId = `visibilityTooltips.status.${status}`;\n const statusString = TreeWidget.translate(statusStringId);\n if (!tooltipStringId) {\n return statusString;\n }\n\n tooltipStringId = `visibilityTooltips.${tooltipStringId}`;\n const tooltipString = TreeWidget.translate(tooltipStringId);\n return `${statusString}: ${tooltipString}`;\n}\n\n/** @internal */\nexport function getTooltipOptions(key: string | undefined, ignoreTooltip?: boolean) {\n return {\n useTooltip: ignoreTooltip ? (false as const) : key,\n };\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Id64String } from "@itwin/core-bentley";
|
|
2
|
+
/** @internal */
|
|
3
|
+
export type SubjectId = Id64String;
|
|
4
|
+
/** @internal */
|
|
5
|
+
export type ModelId = Id64String;
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type CategoryId = Id64String;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type SubCategoryId = Id64String;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export type DefinitionContainerId = Id64String;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type ElementId = Id64String;
|
|
14
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=Types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/Types.ts"],"names":[],"mappings":"AAAA;;;gGAGgG","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 type { Id64String } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport type SubjectId = Id64String;\n\n/** @internal */\nexport type ModelId = Id64String;\n\n/** @internal */\nexport type CategoryId = Id64String;\n\n/** @internal */\nexport type SubCategoryId = Id64String;\n\n/** @internal */\nexport type DefinitionContainerId = Id64String;\n\n/** @internal */\nexport type ElementId = Id64String;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseActiveViewport.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/UseActiveViewport.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IACzF,SAAS,CAAC,GAAG,EAAE;QACb,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACtD,OAAO,SAAS,CAAC,WAAW,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;YAC1E,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,cAAc,CAAC;AACxB,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 { useEffect, useState } from \"react\";\nimport type { ScreenViewport } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\n/**\n * A copy of `useActiveViewport` from `@itwin/appui-react` package until X is fixed.\n * @internal\n */\nexport function useActiveViewport(): ScreenViewport | undefined {\n const [activeViewport, setActiveViewport] = useState(IModelApp.viewManager.selectedView);\n useEffect(() => {\n setActiveViewport(IModelApp.viewManager.selectedView);\n return IModelApp.viewManager.onSelectedViewportChanged.addListener((args) => {\n setActiveViewport(args.current);\n });\n }, []);\n\n return activeViewport;\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import type { TreeRenderer, useIModelTree } from "@itwin/presentation-hierarchie
|
|
|
2
2
|
type UseTreeLocalizedStrings = NonNullable<Parameters<typeof useIModelTree>[0]["localizedStrings"]>;
|
|
3
3
|
type TreeRendererLocalizedStrings = NonNullable<Parameters<typeof TreeRenderer>[0]["localizedStrings"]>;
|
|
4
4
|
type UseHierarchiesLocalizationResult = UseTreeLocalizedStrings & TreeRendererLocalizedStrings;
|
|
5
|
+
/** @internal */
|
|
5
6
|
export declare function useHierarchiesLocalization(): UseHierarchiesLocalizationResult;
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=UseHierarchiesLocalization.d.ts.map
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { useMemo } from "react";
|
|
6
|
-
import { TreeWidget } from "
|
|
6
|
+
import { TreeWidget } from "../../../../TreeWidget.js";
|
|
7
|
+
/** @internal */
|
|
7
8
|
export function useHierarchiesLocalization() {
|
|
8
9
|
const stringValues = Object.values(getLocalizedStrings());
|
|
9
10
|
const localizedStrings = useMemo(getLocalizedStrings, stringValues);
|
|
@@ -17,10 +18,13 @@ function getLocalizedStrings() {
|
|
|
17
18
|
// strings for `TreeRenderer` and `TreeNodeRenderer`
|
|
18
19
|
loading: TreeWidget.translate("presentation-hierarchies.loading"),
|
|
19
20
|
filterHierarchyLevel: TreeWidget.translate("presentation-hierarchies.filterHierarchyLevel"),
|
|
21
|
+
filterHierarchyLevelActiveDescription: TreeWidget.translate("presentation-hierarchies.filterHierarchyLevelActiveDescription"),
|
|
22
|
+
noFilteredChildrenChangeFilter: TreeWidget.translate("presentation-hierarchies.noFilteredChildrenChangeFilter"),
|
|
23
|
+
failedToCreateHierarchy: TreeWidget.translate("presentation-hierarchies.failedToCreateHierarchy"),
|
|
20
24
|
clearHierarchyLevelFilter: TreeWidget.translate("presentation-hierarchies.clearHierarchyLevelFilter"),
|
|
21
25
|
noFilteredChildren: TreeWidget.translate("presentation-hierarchies.noFilteredChildren"),
|
|
22
26
|
resultLimitExceeded: TreeWidget.translate("presentation-hierarchies.resultLimitExceeded"),
|
|
23
|
-
|
|
27
|
+
issuesFound: TreeWidget.translate("presentation-hierarchies.issuesFound"),
|
|
24
28
|
increaseHierarchyLimit: TreeWidget.translate("presentation-hierarchies.increaseHierarchyLimit"),
|
|
25
29
|
increaseHierarchyLimitWithFiltering: TreeWidget.translate("presentation-hierarchies.increaseHierarchyLimitWithFiltering"),
|
|
26
30
|
retry: TreeWidget.translate("presentation-hierarchies.retry"),
|
package/lib/esm/tree-widget-react/components/trees/common/internal/UseHierarchiesLocalization.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseHierarchiesLocalization.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/UseHierarchiesLocalization.ts"],"names":[],"mappings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,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 { useMemo } from \"react\";\nimport { TreeWidget } from \"../../../../TreeWidget.js\";\n\nimport type { TreeRenderer, useIModelTree } from \"@itwin/presentation-hierarchies-react\";\n\ntype UseTreeLocalizedStrings = NonNullable<Parameters<typeof useIModelTree>[0][\"localizedStrings\"]>;\ntype TreeRendererLocalizedStrings = NonNullable<Parameters<typeof TreeRenderer>[0][\"localizedStrings\"]>;\n\ntype UseHierarchiesLocalizationResult = UseTreeLocalizedStrings & TreeRendererLocalizedStrings;\n\n/** @internal */\nexport function useHierarchiesLocalization(): UseHierarchiesLocalizationResult {\n const stringValues = Object.values(getLocalizedStrings());\n const localizedStrings = useMemo(getLocalizedStrings, stringValues);\n return localizedStrings;\n}\n\nfunction getLocalizedStrings(): UseHierarchiesLocalizationResult {\n return {\n // strings for the `useUnifiedSelectionTree` hook\n unspecified: TreeWidget.translate(\"presentation-hierarchies.unspecified\"),\n other: TreeWidget.translate(\"presentation-hierarchies.other\"),\n\n // strings for `TreeRenderer` and `TreeNodeRenderer`\n loading: TreeWidget.translate(\"presentation-hierarchies.loading\"),\n filterHierarchyLevel: TreeWidget.translate(\"presentation-hierarchies.filterHierarchyLevel\"),\n filterHierarchyLevelActiveDescription: TreeWidget.translate(\"presentation-hierarchies.filterHierarchyLevelActiveDescription\"),\n noFilteredChildrenChangeFilter: TreeWidget.translate(\"presentation-hierarchies.noFilteredChildrenChangeFilter\"),\n failedToCreateHierarchy: TreeWidget.translate(\"presentation-hierarchies.failedToCreateHierarchy\"),\n clearHierarchyLevelFilter: TreeWidget.translate(\"presentation-hierarchies.clearHierarchyLevelFilter\"),\n noFilteredChildren: TreeWidget.translate(\"presentation-hierarchies.noFilteredChildren\"),\n resultLimitExceeded: TreeWidget.translate(\"presentation-hierarchies.resultLimitExceeded\"),\n issuesFound: TreeWidget.translate(\"presentation-hierarchies.issuesFound\"),\n increaseHierarchyLimit: TreeWidget.translate(\"presentation-hierarchies.increaseHierarchyLimit\"),\n increaseHierarchyLimitWithFiltering: TreeWidget.translate(\"presentation-hierarchies.increaseHierarchyLimitWithFiltering\"),\n retry: TreeWidget.translate(\"presentation-hierarchies.retry\"),\n };\n}\n"]}
|
|
@@ -5,6 +5,7 @@ interface UseHierarchyLevelFilteringProps {
|
|
|
5
5
|
imodel: IModelConnection;
|
|
6
6
|
defaultHierarchyLevelSizeLimit: number;
|
|
7
7
|
}
|
|
8
|
+
/** @internal */
|
|
8
9
|
export declare function useHierarchyLevelFiltering({ imodel, defaultHierarchyLevelSizeLimit }: UseHierarchyLevelFilteringProps): {
|
|
9
10
|
onFilterClick: import("react").Dispatch<import("react").SetStateAction<HierarchyLevelDetails | undefined>>;
|
|
10
11
|
filteringDialog: import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,9 +11,10 @@ import { DefaultContentDisplayTypes, KeySet } from "@itwin/presentation-common";
|
|
|
11
11
|
import { PresentationInstanceFilter, PresentationInstanceFilterDialog } from "@itwin/presentation-components";
|
|
12
12
|
import { Presentation } from "@itwin/presentation-frontend";
|
|
13
13
|
import { GenericInstanceFilter, RowsLimitExceededError } from "@itwin/presentation-hierarchies";
|
|
14
|
-
import { TreeWidget } from "
|
|
15
|
-
import { Delayed } from "
|
|
16
|
-
import { useTelemetryContext } from "
|
|
14
|
+
import { TreeWidget } from "../../../../TreeWidget.js";
|
|
15
|
+
import { Delayed } from "../components/Delayed.js";
|
|
16
|
+
import { useTelemetryContext } from "../UseTelemetryContext.js";
|
|
17
|
+
/** @internal */
|
|
17
18
|
export function useHierarchyLevelFiltering({ imodel, defaultHierarchyLevelSizeLimit }) {
|
|
18
19
|
const [filteringOptions, setFilteringOptions] = useState();
|
|
19
20
|
const { onFeatureUsed } = useTelemetryContext();
|
package/lib/esm/tree-widget-react/components/trees/common/internal/UseHierarchyFiltering.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseHierarchyFiltering.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/UseHierarchyFiltering.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAchE,gBAAgB;AAChB,MAAM,UAAU,0BAA0B,CAAC,EAAE,MAAM,EAAE,8BAA8B,EAAmC;IACpH,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,EAAyB,CAAC;IAClF,MAAM,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhD,MAAM,gBAAgB,GAAG,OAAO,CAA0E,GAAG,EAAE;QAC7G,IAAI,CAAC,gBAAgB,EAAE;YACrB,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,KAAK,IAAI,EAAE;YAChB,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,gBAAgB,CAA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,UAAU,CAAC,MAAM,EAAE;QACtB,OAAO,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YACtC,CAAC,CAAC;gBACE,kBAAkB,EAAE,EAAE;gBACtB,gBAAgB,EAAE,EAAE;gBACpB,kBAAkB,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;gBACnE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;aACtC;YACH,CAAC,CAAC,SAAS,CAAC;KACf;IAED,OAAO,0BAA0B,CAAC,uBAAuB,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;AACvG,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 { useCallback, useMemo, useState } from \"react\";\nimport { useDebouncedAsyncValue } from \"@itwin/components-react\";\nimport { CompressedId64Set } from \"@itwin/core-bentley\";\nimport { Spinner } from \"@itwin/itwinui-react/bricks\";\nimport { DefaultContentDisplayTypes, KeySet } from \"@itwin/presentation-common\";\nimport { PresentationInstanceFilter, PresentationInstanceFilterDialog } from \"@itwin/presentation-components\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { GenericInstanceFilter, RowsLimitExceededError } from \"@itwin/presentation-hierarchies\";\nimport { TreeWidget } from \"../../../../TreeWidget.js\";\nimport { Delayed } from \"../components/Delayed.js\";\nimport { useTelemetryContext } from \"../UseTelemetryContext.js\";\n\nimport type { Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ClassInfo, Descriptor } from \"@itwin/presentation-common\";\nimport type { PresentationInstanceFilterInfo, PresentationInstanceFilterPropertiesSource } from \"@itwin/presentation-components\";\nimport type { HierarchyLevelDetails } from \"@itwin/presentation-hierarchies-react\";\nimport type { InstanceKey } from \"@itwin/presentation-shared\";\n\ninterface UseHierarchyLevelFilteringProps {\n imodel: IModelConnection;\n defaultHierarchyLevelSizeLimit: number;\n}\n\n/** @internal */\nexport function useHierarchyLevelFiltering({ imodel, defaultHierarchyLevelSizeLimit }: UseHierarchyLevelFilteringProps) {\n const [filteringOptions, setFilteringOptions] = useState<HierarchyLevelDetails>();\n const { onFeatureUsed } = useTelemetryContext();\n\n const propertiesSource = useMemo<(() => Promise<PresentationInstanceFilterPropertiesSource>) | undefined>(() => {\n if (!filteringOptions) {\n return undefined;\n }\n\n return async () => {\n const keySet = await collectInstanceKeys(filteringOptions.getInstanceKeysIterator());\n if (keySet.isEmpty) {\n throw new Error(\"Hierarchy level is empty - unable to create content descriptor.\");\n }\n\n const descriptor = await Presentation.presentation.getContentDescriptor({\n imodel,\n rulesetOrId: {\n id: `Hierarchy level descriptor ruleset`,\n rules: [\n {\n ruleType: \"Content\",\n specifications: [\n {\n specType: \"SelectedNodeInstances\",\n },\n ],\n },\n ],\n },\n displayType: DefaultContentDisplayTypes.PropertyPane,\n keys: keySet,\n });\n if (!descriptor) {\n throw new Error(\"Failed to create content descriptor\");\n }\n\n return { descriptor, inputKeys: keySet };\n };\n }, [filteringOptions, imodel]);\n\n const getInitialFilter = useMemo(() => {\n const currentFilter = filteringOptions?.instanceFilter;\n if (!currentFilter) {\n return undefined;\n }\n\n return (descriptor: Descriptor) => fromGenericFilter(descriptor, currentFilter);\n }, [filteringOptions]);\n\n const filteringDialog = (\n <PresentationInstanceFilterDialog\n imodel={imodel}\n isOpen={!!filteringOptions}\n onApply={(info) => {\n if (!filteringOptions) {\n return;\n }\n onFeatureUsed({ featureId: info ? \"hierarchy-level-filtering\" : undefined, reportInteraction: true });\n filteringOptions.setInstanceFilter(toGenericFilter(info));\n setFilteringOptions(undefined);\n }}\n onClose={() => {\n setFilteringOptions(undefined);\n }}\n propertiesSource={propertiesSource}\n initialFilter={getInitialFilter}\n filterResultsCountRenderer={(filter) => {\n if (!filteringOptions) {\n return null;\n }\n\n return (\n <MatchingInstancesCount filter={filter} hierarchyLevelDetails={filteringOptions} defaultHierarchyLevelSizeLimit={defaultHierarchyLevelSizeLimit} />\n );\n }}\n />\n );\n\n return {\n onFilterClick: setFilteringOptions,\n filteringDialog,\n };\n}\n\ninterface MatchingInstancesCountProps {\n filter: PresentationInstanceFilterInfo;\n hierarchyLevelDetails: HierarchyLevelDetails;\n defaultHierarchyLevelSizeLimit: number;\n}\n\nfunction MatchingInstancesCount({ filter, defaultHierarchyLevelSizeLimit, hierarchyLevelDetails }: MatchingInstancesCountProps) {\n const { value, inProgress } = useDebouncedAsyncValue(\n useCallback(async () => {\n const instanceFilter = toGenericFilter(filter);\n try {\n const instanceCount = await countInstanceKeys(\n hierarchyLevelDetails.getInstanceKeysIterator({\n instanceFilter,\n hierarchyLevelSizeLimit: hierarchyLevelDetails.sizeLimit ?? defaultHierarchyLevelSizeLimit,\n }),\n );\n return TreeWidget.translate(\"filteringDialog.matchingInstancesCount\", {\n instanceCount: instanceCount.toLocaleString(undefined, { useGrouping: true }),\n });\n } catch (e) {\n if (e instanceof RowsLimitExceededError) {\n return TreeWidget.translate(\"filteringDialog.filterExceedsLimit\", { limit: e.limit.toLocaleString(undefined, { useGrouping: true }) });\n }\n return TreeWidget.translate(\"filteringDialog.failedToCalculateMatchingInstancesCount\");\n }\n }, [filter, hierarchyLevelDetails, defaultHierarchyLevelSizeLimit]),\n );\n\n if (inProgress) {\n return (\n <Delayed show={true}>\n {TreeWidget.translate(\"filteringDialog.matchingInstancesCount\", { instanceCount: \"\" })}\n <Spinner size=\"small\" />\n </Delayed>\n );\n }\n\n return value ? <>{value}</> : null;\n}\n\nasync function countInstanceKeys(iterator: AsyncIterableIterator<InstanceKey>) {\n let result = 0;\n for await (const _ of iterator) {\n result++;\n }\n return result;\n}\n\nasync function collectInstanceKeys(iterator: AsyncIterableIterator<InstanceKey>) {\n const idsByClassName = new Map<Id64String, Id64Array>();\n for await (const { className, id } of iterator) {\n let idSet = idsByClassName.get(className);\n if (!idSet) {\n idSet = [];\n idsByClassName.set(className, idSet);\n }\n idSet.push(id);\n }\n\n const instanceKeys = new Array<[className: string, compressedIds: CompressedId64Set]>();\n for (const [className, ids] of idsByClassName) {\n instanceKeys.push([className.toLowerCase(), CompressedId64Set.sortAndCompress(ids)]);\n }\n return KeySet.fromJSON({ instanceKeys, nodeKeys: [] });\n}\n\nfunction fromGenericFilter(descriptor: Descriptor, filter: GenericInstanceFilter): PresentationInstanceFilterInfo {\n const presentationFilter =\n GenericInstanceFilter.isFilterRuleGroup(filter.rules) && filter.rules.rules.length === 0\n ? undefined\n : PresentationInstanceFilter.fromGenericInstanceFilter(descriptor, filter);\n return {\n filter: presentationFilter,\n usedClasses: (filter.filteredClassNames ?? [])\n .map((name) => descriptor.selectClasses.find((selectClass) => selectClass.selectClassInfo.name === name)?.selectClassInfo)\n .filter((classInfo): classInfo is ClassInfo => classInfo !== undefined),\n };\n}\n\nfunction toGenericFilter(filterInfo?: PresentationInstanceFilterInfo): GenericInstanceFilter | undefined {\n if (!filterInfo) {\n return undefined;\n }\n\n if (!filterInfo.filter) {\n return filterInfo.usedClasses.length > 0\n ? {\n propertyClassNames: [],\n relatedInstances: [],\n filteredClassNames: filterInfo.usedClasses.map((info) => info.name),\n rules: { operator: \"and\", rules: [] },\n }\n : undefined;\n }\n\n return PresentationInstanceFilter.toGenericInstanceFilter(filterInfo.filter, filterInfo.usedClasses);\n}\n"]}
|
|
@@ -3,6 +3,7 @@ interface UseIModelChangeListenerProps {
|
|
|
3
3
|
imodel: IModelConnection;
|
|
4
4
|
action: () => void;
|
|
5
5
|
}
|
|
6
|
+
/** @internal */
|
|
6
7
|
export declare function useIModelChangeListener({ imodel, action }: UseIModelChangeListenerProps): void;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=UseIModelChangeListener.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { useEffect } from "react";
|
|
6
6
|
import { registerTxnListeners } from "@itwin/presentation-core-interop";
|
|
7
|
+
/** @internal */
|
|
7
8
|
export function useIModelChangeListener({ imodel, action }) {
|
|
8
9
|
useEffect(() => {
|
|
9
10
|
if (!imodel.isBriefcaseConnection()) {
|
package/lib/esm/tree-widget-react/components/trees/common/internal/UseIModelChangeListener.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseIModelChangeListener.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/UseIModelChangeListener.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AASxE,gBAAgB;AAChB,MAAM,UAAU,uBAAuB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAgC;IACtF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE;YACnC,OAAO;SACR;QACD,OAAO,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACvB,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 { useEffect } from \"react\";\nimport { registerTxnListeners } from \"@itwin/presentation-core-interop\";\n\nimport type { IModelConnection } from \"@itwin/core-frontend\";\n\ninterface UseIModelChangeListenerProps {\n imodel: IModelConnection;\n action: () => void;\n}\n\n/** @internal */\nexport function useIModelChangeListener({ imodel, action }: UseIModelChangeListenerProps) {\n useEffect(() => {\n if (!imodel.isBriefcaseConnection()) {\n return;\n }\n return registerTxnListeners(imodel.txns, action);\n }, [imodel, action]);\n}\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Observable } from "rxjs";
|
|
3
|
+
import type { Id64Array } from "@itwin/core-bentley";
|
|
4
|
+
import type { IModelConnection } from "@itwin/core-frontend";
|
|
5
|
+
import type { SchemaContext } from "@itwin/ecschema-metadata";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export declare function setDifference<T>(lhs: Set<T>, rhs: Set<T>): Set<T>;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare function setIntersection<T>(lhs: Set<T>, rhs: Set<T>): Set<T>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare function getDistinctMapValues(map: Map<any, Array<string> | Set<string>>): Set<string>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare function createIdsSelector(ids: Id64Array): string;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare function parseIdsSelectorResult(selectorResult: any): Id64Array;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare function pushToMap<TKey, TValue>(targetMap: Map<TKey, Set<TValue>>, key: TKey, value: TValue): void;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare function createIModelAccess({ imodel, getSchemaContext }: {
|
|
20
|
+
imodel: IModelConnection;
|
|
21
|
+
getSchemaContext: (imodel: IModelConnection) => SchemaContext;
|
|
22
|
+
}): {
|
|
23
|
+
createQueryReader(query: import("@itwin/presentation-shared").ECSqlQueryDef, config?: (import("@itwin/presentation-shared").ECSqlQueryReaderOptions & {
|
|
24
|
+
limit?: number | "unbounded" | undefined;
|
|
25
|
+
}) | undefined): AsyncIterableIterator<import("@itwin/presentation-shared").ECSqlQueryRow>;
|
|
26
|
+
classDerivesFrom(derivedClassFullName: string, candidateBaseClassFullName: string): boolean | Promise<boolean>;
|
|
27
|
+
getSchema(schemaName: string): Promise<import("@itwin/presentation-shared").EC.Schema | undefined>;
|
|
28
|
+
imodelKey: string;
|
|
29
|
+
};
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare function useLatest<T>(value: T): import("react").MutableRefObject<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Checks if all given models are displayed in given viewport.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare function releaseMainThreadOnItemsCount<T>(elementCount: number): (obs: Observable<T>) => Observable<T>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare function getClassesByView(viewType: "2d" | "3d"): {
|
|
39
|
+
readonly categoryClass: "BisCore.DrawingCategory";
|
|
40
|
+
readonly elementClass: "BisCore.GeometricElement2d";
|
|
41
|
+
readonly modelClass: "BisCore.GeometricModel2d";
|
|
42
|
+
} | {
|
|
43
|
+
readonly categoryClass: "BisCore.SpatialCategory";
|
|
44
|
+
readonly elementClass: "BisCore.GeometricElement3d";
|
|
45
|
+
readonly modelClass: "BisCore.GeometricModel3d";
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=Utils.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { useEffect, useRef } from "react";
|
|
6
|
+
import { bufferCount, concatAll, concatMap, delay, of } from "rxjs";
|
|
7
|
+
import { createECSchemaProvider, createECSqlQueryExecutor } from "@itwin/presentation-core-interop";
|
|
8
|
+
import { createLimitingECSqlQueryExecutor } from "@itwin/presentation-hierarchies";
|
|
9
|
+
import { createCachingECClassHierarchyInspector } from "@itwin/presentation-shared";
|
|
10
|
+
import { DRAWING_CATEGORY_CLASS_NAME, GEOMETRIC_ELEMENT_2D_CLASS_NAME, GEOMETRIC_ELEMENT_3D_CLASS_NAME, GEOMETRIC_MODEL_2D_CLASS_NAME, GEOMETRIC_MODEL_3D_CLASS_NAME, SPATIAL_CATEGORY_CLASS_NAME, } from "./ClassNameDefinitions.js";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export function setDifference(lhs, rhs) {
|
|
13
|
+
const result = new Set();
|
|
14
|
+
lhs.forEach((x) => !rhs.has(x) && result.add(x));
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
export function setIntersection(lhs, rhs) {
|
|
19
|
+
const result = new Set();
|
|
20
|
+
lhs.forEach((x) => rhs.has(x) && result.add(x));
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export function getDistinctMapValues(map) {
|
|
25
|
+
const result = new Set();
|
|
26
|
+
for (const values of map.values()) {
|
|
27
|
+
values.forEach((value) => result.add(value));
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export function createIdsSelector(ids) {
|
|
33
|
+
// Note: `json_array` function only accepts up to 127 arguments and we may have more `ids` than that. As a workaround,
|
|
34
|
+
// we're creating an array of arrays
|
|
35
|
+
const slices = new Array();
|
|
36
|
+
for (let sliceStartIndex = 0; sliceStartIndex < ids.length; sliceStartIndex += 127) {
|
|
37
|
+
let sliceEndIndex = sliceStartIndex + 127;
|
|
38
|
+
if (sliceEndIndex > ids.length) {
|
|
39
|
+
sliceEndIndex = undefined;
|
|
40
|
+
}
|
|
41
|
+
slices.push(ids.slice(sliceStartIndex, sliceEndIndex));
|
|
42
|
+
}
|
|
43
|
+
return `json_array(${slices.map((sliceIds) => `json_array(${sliceIds.map((id) => `'${id}'`).join(",")})`).join(",")})`;
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
export function parseIdsSelectorResult(selectorResult) {
|
|
47
|
+
if (!Array.isArray(selectorResult)) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
return selectorResult.reduce((arr, ids) => [...arr, ...(Array.isArray(ids) ? ids : [ids])], new Array());
|
|
51
|
+
}
|
|
52
|
+
/** @internal */
|
|
53
|
+
export function pushToMap(targetMap, key, value) {
|
|
54
|
+
let set = targetMap.get(key);
|
|
55
|
+
if (!set) {
|
|
56
|
+
set = new Set();
|
|
57
|
+
targetMap.set(key, set);
|
|
58
|
+
}
|
|
59
|
+
set.add(value);
|
|
60
|
+
}
|
|
61
|
+
/** @internal */
|
|
62
|
+
export function createIModelAccess({ imodel, getSchemaContext }) {
|
|
63
|
+
const schemas = getSchemaContext(imodel);
|
|
64
|
+
const schemaProvider = createECSchemaProvider(schemas);
|
|
65
|
+
return {
|
|
66
|
+
imodelKey: imodel.key,
|
|
67
|
+
...schemaProvider,
|
|
68
|
+
...createCachingECClassHierarchyInspector({ schemaProvider, cacheSize: 100 }),
|
|
69
|
+
...createLimitingECSqlQueryExecutor(createECSqlQueryExecutor(imodel), 1000),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/** @internal */
|
|
73
|
+
export function useLatest(value) {
|
|
74
|
+
const ref = useRef(value);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
ref.current = value;
|
|
77
|
+
}, [value]);
|
|
78
|
+
return ref;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Checks if all given models are displayed in given viewport.
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
export function releaseMainThreadOnItemsCount(elementCount) {
|
|
85
|
+
return (obs) => {
|
|
86
|
+
return obs.pipe(bufferCount(elementCount), concatMap((buff, i) => {
|
|
87
|
+
const out = of(buff);
|
|
88
|
+
if (i === 0 && buff.length < elementCount) {
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
return out.pipe(delay(0));
|
|
92
|
+
}), concatAll());
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/** @internal */
|
|
96
|
+
export function getClassesByView(viewType) {
|
|
97
|
+
return viewType === "2d"
|
|
98
|
+
? { categoryClass: DRAWING_CATEGORY_CLASS_NAME, elementClass: GEOMETRIC_ELEMENT_2D_CLASS_NAME, modelClass: GEOMETRIC_MODEL_2D_CLASS_NAME }
|
|
99
|
+
: { categoryClass: SPATIAL_CATEGORY_CLASS_NAME, elementClass: GEOMETRIC_ELEMENT_3D_CLASS_NAME, modelClass: GEOMETRIC_MODEL_3D_CLASS_NAME };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=Utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/common/internal/Utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,+BAA+B,EAC/B,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAOnC,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAI,GAAW,EAAE,GAAW;IACvD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAK,CAAC;IAC5B,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,eAAe,CAAI,GAAW,EAAE,GAA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B;AAChB,MAAM,UAAU,SAAS,CAAI,KAAQ;IACnC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAI,YAAoB;IACnE,OAAO,CAAC,GAAkB,EAAiB,EAAE;QAC3C,OAAO,GAAG,CAAC,IAAI,CACb,WAAW,CAAC,YAAY,CAAC,EACzB,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,YAAY,EAAE;gBACzC,OAAO,GAAG,CAAC;aACZ;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,EACF,SAAS,EAAE,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,gBAAgB,CAAC,QAAqB;IACpD,OAAO,QAAQ,KAAK,IAAI;QACtB,CAAC,CAAE,EAAE,aAAa,EAAE,2BAA2B,EAAE,YAAY,EAAE,+BAA+B,EAAE,UAAU,EAAE,6BAA6B,EAAY;QACrJ,CAAC,CAAE,EAAE,aAAa,EAAE,2BAA2B,EAAE,YAAY,EAAE,+BAA+B,EAAE,UAAU,EAAE,6BAA6B,EAAY,CAAC;AAC1J,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 { useEffect, useRef } from \"react\";\nimport { bufferCount, concatAll, concatMap, delay, of } from \"rxjs\";\nimport { createECSchemaProvider, createECSqlQueryExecutor } from \"@itwin/presentation-core-interop\";\nimport { createLimitingECSqlQueryExecutor } from \"@itwin/presentation-hierarchies\";\nimport { createCachingECClassHierarchyInspector } from \"@itwin/presentation-shared\";\nimport {\n DRAWING_CATEGORY_CLASS_NAME,\n GEOMETRIC_ELEMENT_2D_CLASS_NAME,\n GEOMETRIC_ELEMENT_3D_CLASS_NAME,\n GEOMETRIC_MODEL_2D_CLASS_NAME,\n GEOMETRIC_MODEL_3D_CLASS_NAME,\n SPATIAL_CATEGORY_CLASS_NAME,\n} from \"./ClassNameDefinitions.js\";\n\nimport type { Observable } from \"rxjs\";\nimport type { Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { SchemaContext } from \"@itwin/ecschema-metadata\";\n\n/** @internal */\nexport function setDifference<T>(lhs: Set<T>, rhs: Set<T>): Set<T> {\n const result = new Set<T>();\n lhs.forEach((x) => !rhs.has(x) && result.add(x));\n return result;\n}\n\n/** @internal */\nexport function setIntersection<T>(lhs: Set<T>, rhs: Set<T>): Set<T> {\n const result = new Set<T>();\n lhs.forEach((x) => rhs.has(x) && result.add(x));\n return result;\n}\n\n/** @internal */\nexport function getDistinctMapValues(map: Map<any, Array<string> | Set<string>>): Set<string> {\n const result = new Set<string>();\n for (const values of map.values()) {\n values.forEach((value) => result.add(value));\n }\n return result;\n}\n\n/** @internal */\nexport function createIdsSelector(ids: Id64Array): string {\n // Note: `json_array` function only accepts up to 127 arguments and we may have more `ids` than that. As a workaround,\n // we're creating an array of arrays\n const slices = new Array<Id64String[]>();\n for (let sliceStartIndex = 0; sliceStartIndex < ids.length; sliceStartIndex += 127) {\n let sliceEndIndex: number | undefined = sliceStartIndex + 127;\n if (sliceEndIndex > ids.length) {\n sliceEndIndex = undefined;\n }\n slices.push(ids.slice(sliceStartIndex, sliceEndIndex));\n }\n return `json_array(${slices.map((sliceIds) => `json_array(${sliceIds.map((id) => `'${id}'`).join(\",\")})`).join(\",\")})`;\n}\n\n/** @internal */\nexport function parseIdsSelectorResult(selectorResult: any): Id64Array {\n if (!Array.isArray(selectorResult)) {\n return [];\n }\n return selectorResult.reduce((arr, ids: Id64String | Id64String[]) => [...arr, ...(Array.isArray(ids) ? ids : [ids])], new Array<Id64String>());\n}\n\n/** @internal */\nexport function pushToMap<TKey, TValue>(targetMap: Map<TKey, Set<TValue>>, key: TKey, value: TValue) {\n let set = targetMap.get(key);\n if (!set) {\n set = new Set();\n targetMap.set(key, set);\n }\n set.add(value);\n}\n\n/** @internal */\nexport function createIModelAccess({ imodel, getSchemaContext }: { imodel: IModelConnection; getSchemaContext: (imodel: IModelConnection) => SchemaContext }) {\n const schemas = getSchemaContext(imodel);\n const schemaProvider = createECSchemaProvider(schemas);\n return {\n imodelKey: imodel.key,\n ...schemaProvider,\n ...createCachingECClassHierarchyInspector({ schemaProvider, cacheSize: 100 }),\n ...createLimitingECSqlQueryExecutor(createECSqlQueryExecutor(imodel), 1000),\n };\n}\n\n/** @internal */\nexport function useLatest<T>(value: T) {\n const ref = useRef(value);\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref;\n}\n\n/**\n * Checks if all given models are displayed in given viewport.\n * @internal\n */\nexport function releaseMainThreadOnItemsCount<T>(elementCount: number) {\n return (obs: Observable<T>): Observable<T> => {\n return obs.pipe(\n bufferCount(elementCount),\n concatMap((buff, i) => {\n const out = of(buff);\n if (i === 0 && buff.length < elementCount) {\n return out;\n }\n return out.pipe(delay(0));\n }),\n concatAll(),\n );\n };\n}\n\n/** @internal */\nexport function getClassesByView(viewType: \"2d\" | \"3d\") {\n return viewType === \"2d\"\n ? ({ categoryClass: DRAWING_CATEGORY_CLASS_NAME, elementClass: GEOMETRIC_ELEMENT_2D_CLASS_NAME, modelClass: GEOMETRIC_MODEL_2D_CLASS_NAME } as const)\n : ({ categoryClass: SPATIAL_CATEGORY_CLASS_NAME, elementClass: GEOMETRIC_ELEMENT_3D_CLASS_NAME, modelClass: GEOMETRIC_MODEL_3D_CLASS_NAME } as const);\n}\n"]}
|