@itwin/tree-widget-react 3.10.0 → 3.10.2
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 +19 -2
- package/lib/cjs/tree-widget-react/TreeWidget.js +2 -0
- package/lib/cjs/tree-widget-react/TreeWidget.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/SelectableTree.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/SelectableTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/SelectableTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/TreeSelector.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/TreeSelector.js +1 -2
- package/lib/cjs/tree-widget-react/components/TreeSelector.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/TreeWidgetUiItemsProvider.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/TreeWidgetUiItemsProvider.js +2 -3
- package/lib/cjs/tree-widget-react/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/tree-header/TreeHeader.js +1 -2
- package/lib/cjs/tree-widget-react/components/tree-header/TreeHeader.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/tree-header/TreeWithHeader.js +1 -2
- package/lib/cjs/tree-widget-react/components/tree-header/TreeWithHeader.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTree.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.js +5 -6
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.js +6 -0
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/CategoriesTreeDefinition.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/UseCategoriesTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js +11 -2
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.js +16 -13
- package/lib/cjs/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.js +7 -8
- package/lib/cjs/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/FocusedInstancesContext.js +2 -3
- package/lib/cjs/tree-widget-react/components/trees/common/FocusedInstancesContext.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/Rxjs.js +3 -4
- package/lib/cjs/tree-widget-react/components/trees/common/Rxjs.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/Tooltip.js +2 -3
- package/lib/cjs/tree-widget-react/components/trees/common/Tooltip.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/TreeErrors.js +1 -0
- package/lib/cjs/tree-widget-react/components/trees/common/TreeErrors.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseActiveViewport.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseActiveViewport.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseFiltering.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseFiltering.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchiesLocalization.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchiesLocalization.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchyFiltering.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchyFiltering.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchyFiltering.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchyVisibility.js +2 -3
- package/lib/cjs/tree-widget-react/components/trees/common/UseHierarchyVisibility.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseIModelAccess.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseIModelAccess.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseIModelChangeListener.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseIModelChangeListener.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseMultiCheckboxHandler.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseMultiCheckboxHandler.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseNodeHighlighting.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseNodeHighlighting.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/UseNodeHighlighting.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/UseTelemetryContext.js +3 -4
- package/lib/cjs/tree-widget-react/components/trees/common/UseTelemetryContext.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/Utils.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/common/Utils.js +4 -5
- package/lib/cjs/tree-widget-react/components/trees/common/Utils.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/Delayed.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/Delayed.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/ProgressOverlay.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/ProgressOverlay.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/ProgressOverlay.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/Tree.js +2 -3
- package/lib/cjs/tree-widget-react/components/trees/common/components/Tree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/TreeNodeCheckbox.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/TreeNodeCheckbox.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/TreeRenderer.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/TreeRenderer.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/VisibilityTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/VisibilityTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/VisibilityTreeRenderer.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/common/components/VisibilityTreeRenderer.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/common/components/VisibilityTreeRenderer.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeComponent.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeDefinition.js +5 -0
- package/lib/cjs/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTreeDefinition.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeComponent.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeComponent.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.js +6 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/IModelContentTreeDefinition.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.js +4 -0
- package/lib/cjs/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTree.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.js +7 -8
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.js +8 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/ModelsTreeDefinition.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/UseModelsTree.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/models-tree/UseModelsTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/Utils.js +1 -2
- package/lib/cjs/tree-widget-react/components/trees/models-tree/Utils.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.js +8 -3
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/FilteredTree.js +3 -3
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/FilteredTree.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.js +59 -31
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeIdsCache.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeNode.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.d.ts +0 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js +15 -11
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.d.ts +1 -2
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.js +2 -3
- package/lib/cjs/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.js.map +1 -1
- package/lib/cjs/tree-widget-react/components/utils/IsPromiseLike.js +1 -2
- package/lib/cjs/tree-widget-react/components/utils/IsPromiseLike.js.map +1 -1
- package/lib/esm/tree-widget-react/TreeWidget.js +2 -0
- package/lib/esm/tree-widget-react/TreeWidget.js.map +1 -1
- package/lib/esm/tree-widget-react/components/SelectableTree.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/SelectableTree.js.map +1 -1
- package/lib/esm/tree-widget-react/components/TreeSelector.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/esm/tree-widget-react/components/tree-header/TreeHeader.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTree.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeButtons.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/CategoriesTreeComponent.d.ts +0 -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.js +6 -0
- 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.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesTreeIdsCache.js +9 -0
- 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/CategoriesVisibilityHandler.js +16 -13
- package/lib/esm/tree-widget-react/components/trees/categories-tree/internal/CategoriesVisibilityHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/CategoriesVisibilityUtils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/FocusedInstancesContext.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/Tooltip.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/TreeErrors.js +1 -0
- package/lib/esm/tree-widget-react/components/trees/common/TreeErrors.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyFiltering.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyFiltering.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseHierarchyVisibility.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseIModelChangeListener.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseMultiCheckboxHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/UseNodeHighlighting.d.ts +0 -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.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/common/Utils.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/common/Utils.js.map +1 -1
- 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/ProgressOverlay.d.ts +0 -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/TreeNodeCheckbox.js.map +1 -1
- 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/VisibilityTreeRenderer.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +0 -1
- 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 +0 -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.js +5 -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 +0 -1
- 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 +0 -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 +6 -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 +4 -0
- 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/models-tree/ModelsTree.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.d.ts +0 -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.js +8 -1
- 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.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/Utils.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.js +8 -3
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/AlwaysAndNeverDrawnElementInfo.js.map +1 -1
- 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.js +60 -32
- 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/ModelsTreeNode.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.d.ts +0 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js +9 -4
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/ModelsTreeVisibilityHandler.js.map +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.d.ts +1 -2
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.js +1 -1
- package/lib/esm/tree-widget-react/components/trees/models-tree/internal/VisibilityChangeEventListener.js.map +1 -1
- package/package.json +31 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelContentTreeIdsCache.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA6C;AAC7C,oDAAkD;AAgBlD,gBAAgB;AAChB,MAAa,yBAAyB;IAKpC,YAAoB,cAA0C;QAA1C,mBAAc,GAAd,cAAc,CAA4B;IAAG,CAAC;IAE1D,KAAK,CAAC,CAAC,aAAa;QAC1B,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;KAmBrB,CAAC;QACF,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE;YAChJ,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,EAAE,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;SAChI;IACH,CAAC;IAEO,KAAK,CAAC,C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BAAgB,GAAG,YAAY,CAAC,GAAG,CAAC,cAAc,CAAE,CAAC;YAC3D,IAAI,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC,KAAK,OAAO,EAAE;gBACpD,OAAO;aACR;YACD,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;AACP,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 { assert } from \"@itwin/core-bentley\";\nimport { pushToMap } from \"../../common/Utils.js\";\n\nimport type { Id64Array, Id64Set, Id64String } from \"@itwin/core-bentley\";\nimport type { LimitingECSqlQueryExecutor } from \"@itwin/presentation-hierarchies\";\n\ninterface SubjectInfo {\n parentSubject: Id64String | undefined;\n hideInHierarchy: boolean;\n childSubjects: Id64Set;\n childModels: Id64Set;\n}\n\ninterface ModelInfo {\n categories: Id64Set;\n}\n\n/** @internal */\nexport class IModelContentTreeIdsCache {\n private _subjectInfos: Promise<Map<Id64String, SubjectInfo>> | undefined;\n private _parentSubjectIds: Promise<Id64Array> | undefined; // the list should contain a subject id if its node should be shown as having children\n private _modelInfos: Promise<Map<Id64String, ModelInfo>> | undefined;\n\n constructor(private _queryExecutor: LimitingECSqlQueryExecutor) {}\n\n private async *querySubjects(): AsyncIterableIterator<{ id: Id64String; parentId?: Id64String; targetPartitionId?: Id64String; hideInHierarchy: boolean }> {\n const subjectsQuery = `\n SELECT\n s.ECInstanceId id,\n s.Parent.Id parentId,\n (\n SELECT m.ECInstanceId\n FROM bis.Model m\n WHERE\n m.ECInstanceId = HexToId(json_extract(s.JsonProperties, '$.Subject.Model.TargetPartition'))\n AND NOT m.IsPrivate\n ) targetPartitionId,\n CASE\n WHEN (\n json_extract(s.JsonProperties, '$.Subject.Job.Bridge') IS NOT NULL\n OR json_extract(s.JsonProperties, '$.Subject.Model.Type') = 'Hierarchy'\n ) THEN 1\n ELSE 0\n END hideInHierarchy\n FROM bis.Subject s\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: subjectsQuery }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { id: row.id, parentId: row.parentId, targetPartitionId: row.targetPartitionId, hideInHierarchy: !!row.hideInHierarchy };\n }\n }\n\n private async *queryModels(): AsyncIterableIterator<{ id: Id64String; parentId: Id64String }> {\n const modelsQuery = `\n SELECT p.ECInstanceId id, p.Parent.Id parentId\n FROM bis.InformationPartitionElement p\n INNER JOIN bis.Model m ON m.ModeledElement.Id = p.ECInstanceId\n WHERE NOT m.IsPrivate\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: modelsQuery }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { id: row.id, parentId: row.parentId };\n }\n }\n\n private async getSubjectInfos() {\n this._subjectInfos ??= (async () => {\n const [subjectInfos, targetPartitionSubjects] = await Promise.all([\n (async () => {\n const result = new Map<Id64String, SubjectInfo>();\n for await (const subject of this.querySubjects()) {\n const subjectInfo: SubjectInfo = {\n parentSubject: subject.parentId,\n hideInHierarchy: subject.hideInHierarchy,\n childSubjects: new Set(),\n childModels: new Set(),\n };\n if (subject.targetPartitionId) {\n subjectInfo.childModels.add(subject.targetPartitionId);\n }\n result.set(subject.id, subjectInfo);\n }\n return result;\n })(),\n (async () => {\n const result = new Map<Id64String, Set<Id64String>>();\n for await (const model of this.queryModels()) {\n pushToMap(result, model.id, model.parentId);\n }\n return result;\n })(),\n ]);\n\n for (const [subjectId, { parentSubject: parentSubjectId }] of subjectInfos.entries()) {\n if (parentSubjectId) {\n const parentSubjectInfo = subjectInfos.get(parentSubjectId);\n assert(!!parentSubjectInfo);\n parentSubjectInfo.childSubjects.add(subjectId);\n }\n }\n\n for (const [partitionId, subjectIds] of targetPartitionSubjects) {\n subjectIds.forEach((subjectId) => {\n const subjectInfo = subjectInfos.get(subjectId);\n assert(!!subjectInfo);\n subjectInfo.childModels.add(partitionId);\n });\n }\n\n return subjectInfos;\n })();\n return this._subjectInfos;\n }\n\n /** Returns ECInstanceIDs of Subjects that either have direct Model or at least one child Subject with a Model. */\n public async getParentSubjectIds(): Promise<Id64String[]> {\n this._parentSubjectIds ??= (async () => {\n const subjectInfos = await this.getSubjectInfos();\n const parentSubjectIds = new Set<Id64String>();\n subjectInfos.forEach((subjectInfo, subjectId) => {\n if (subjectInfo.childModels.size === 0 && subjectInfo.childSubjects.size === 0) {\n return;\n }\n parentSubjectIds.add(subjectId);\n let currParentId = subjectInfo.parentSubject;\n while (currParentId) {\n parentSubjectIds.add(currParentId);\n currParentId = subjectInfos.get(currParentId)?.parentSubject;\n }\n });\n return [...parentSubjectIds];\n })();\n return this._parentSubjectIds;\n }\n\n /**\n * Returns child subjects of the specified parent subjects as they're displayed in the hierarchy - taking into\n * account `hideInHierarchy` flag.\n */\n public async getChildSubjectIds(parentSubjectIds: Id64String[]): Promise<Id64String[]> {\n const childSubjectIds = new Array<Id64String>();\n const subjectInfos = await this.getSubjectInfos();\n parentSubjectIds.forEach((subjectId) => {\n forEachChildSubject(subjectInfos, subjectId, (childSubjectId, childSubjectInfo) => {\n if (!childSubjectInfo.hideInHierarchy) {\n childSubjectIds.push(childSubjectId);\n return \"break\";\n }\n return \"continue\";\n });\n });\n return childSubjectIds;\n }\n\n /** Returns ECInstanceIDs of Models under specific parent Subjects as they are displayed in the hierarchy. */\n public async getChildSubjectModelIds(parentSubjectIds: Id64String[]): Promise<Id64String[]> {\n const subjectInfos = await this.getSubjectInfos();\n\n const hiddenSubjectIds = new Array<Id64String>();\n parentSubjectIds.forEach((subjectId) => {\n forEachChildSubject(subjectInfos, subjectId, (childSubjectId, childSubjectInfo) => {\n if (childSubjectInfo.hideInHierarchy) {\n hiddenSubjectIds.push(childSubjectId);\n return \"continue\";\n }\n return \"break\";\n });\n });\n\n const modelIds = new Array<Id64String>();\n [...parentSubjectIds, ...hiddenSubjectIds].forEach((subjectId) => {\n const subjectInfo = subjectInfos.get(subjectId);\n subjectInfo && modelIds.push(...subjectInfo.childModels);\n });\n return modelIds;\n }\n\n private async *queryModelCategories() {\n const query = /* sql */ `\n SELECT Model.Id modelId, Category.Id categoryId\n FROM BisCore.GeometricElement3d\n WHERE Parent.Id IS NULL\n GROUP BY Model.Id, Category.Id\n UNION ALL\n SELECT Model.Id modelId, Category.Id categoryId\n FROM BisCore.GeometricElement2d\n WHERE Parent.Id IS NULL\n GROUP BY Model.Id, Category.Id\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: query }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { modelId: row.modelId, categoryId: row.categoryId };\n }\n }\n\n private async getModelInfos() {\n this._modelInfos ??= (async () => {\n const modelInfos = new Map<Id64String, { categories: Id64Set; elementCount: number }>();\n for await (const { modelId, categoryId } of this.queryModelCategories()) {\n const entry = modelInfos.get(modelId);\n if (entry) {\n entry.categories.add(categoryId);\n } else {\n modelInfos.set(modelId, { categories: new Set([categoryId]), elementCount: 0 });\n }\n }\n return modelInfos;\n })();\n return this._modelInfos;\n }\n\n public async getModelCategories(modelIds: Id64String[]): Promise<Id64Array> {\n const modelInfos = await this.getModelInfos();\n return modelIds.map((modelId) => modelInfos.get(modelId)?.categories).flatMap((categories) => (categories ? [...categories] : []));\n }\n}\n\nfunction forEachChildSubject(\n subjectInfos: Map<Id64String, SubjectInfo>,\n parentSubject: Id64String | SubjectInfo,\n cb: (childSubjectId: Id64String, childSubjectInfo: SubjectInfo) => \"break\" | \"continue\",\n) {\n const parentSubjectInfo = typeof parentSubject === \"string\" ? subjectInfos.get(parentSubject) : parentSubject;\n parentSubjectInfo &&\n parentSubjectInfo.childSubjects.forEach((childSubjectId) => {\n const childSubjectInfo = subjectInfos.get(childSubjectId)!;\n if (cb(childSubjectId, childSubjectInfo) === \"break\") {\n return;\n }\n forEachChildSubject(subjectInfos, childSubjectInfo, cb);\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelContentTreeIdsCache.js","sourceRoot":"","sources":["../../../../../../../src/tree-widget-react/components/trees/imodel-content-tree/internal/IModelContentTreeIdsCache.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA6C;AAC7C,oDAAkD;AAgBlD,gBAAgB;AAChB,MAAa,yBAAyB;IAKhB;IAJZ,aAAa,CAAoD;IACjE,iBAAiB,CAAiC,CAAC,sFAAsF;IACzI,WAAW,CAAkD;IAErE,YAAoB,cAA0C;QAA1C,mBAAc,GAAd,cAAc,CAA4B;IAAG,CAAC;IAE1D,KAAK,CAAC,CAAC,aAAa;QAC1B,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;KAmBrB,CAAC;QACF,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;YACjJ,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,EAAE,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;QACjI,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,CAAC,WAAW;QACxB,MAAM,WAAW,GAAG;;;;;KAKnB,CAAC;QACF,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;YAC/I,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAA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CAAC;YACD,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;AACP,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 { assert } from \"@itwin/core-bentley\";\nimport { pushToMap } from \"../../common/Utils.js\";\n\nimport type { Id64Array, Id64Set, Id64String } from \"@itwin/core-bentley\";\nimport type { LimitingECSqlQueryExecutor } from \"@itwin/presentation-hierarchies\";\n\ninterface SubjectInfo {\n parentSubject: Id64String | undefined;\n hideInHierarchy: boolean;\n childSubjects: Id64Set;\n childModels: Id64Set;\n}\n\ninterface ModelInfo {\n categories: Id64Set;\n}\n\n/** @internal */\nexport class IModelContentTreeIdsCache {\n private _subjectInfos: Promise<Map<Id64String, SubjectInfo>> | undefined;\n private _parentSubjectIds: Promise<Id64Array> | undefined; // the list should contain a subject id if its node should be shown as having children\n private _modelInfos: Promise<Map<Id64String, ModelInfo>> | undefined;\n\n constructor(private _queryExecutor: LimitingECSqlQueryExecutor) {}\n\n private async *querySubjects(): AsyncIterableIterator<{ id: Id64String; parentId?: Id64String; targetPartitionId?: Id64String; hideInHierarchy: boolean }> {\n const subjectsQuery = `\n SELECT\n s.ECInstanceId id,\n s.Parent.Id parentId,\n (\n SELECT m.ECInstanceId\n FROM bis.Model m\n WHERE\n m.ECInstanceId = HexToId(json_extract(s.JsonProperties, '$.Subject.Model.TargetPartition'))\n AND NOT m.IsPrivate\n ) targetPartitionId,\n CASE\n WHEN (\n json_extract(s.JsonProperties, '$.Subject.Job.Bridge') IS NOT NULL\n OR json_extract(s.JsonProperties, '$.Subject.Model.Type') = 'Hierarchy'\n ) THEN 1\n ELSE 0\n END hideInHierarchy\n FROM bis.Subject s\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: subjectsQuery }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { id: row.id, parentId: row.parentId, targetPartitionId: row.targetPartitionId, hideInHierarchy: !!row.hideInHierarchy };\n }\n }\n\n private async *queryModels(): AsyncIterableIterator<{ id: Id64String; parentId: Id64String }> {\n const modelsQuery = `\n SELECT p.ECInstanceId id, p.Parent.Id parentId\n FROM bis.InformationPartitionElement p\n INNER JOIN bis.Model m ON m.ModeledElement.Id = p.ECInstanceId\n WHERE NOT m.IsPrivate\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: modelsQuery }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { id: row.id, parentId: row.parentId };\n }\n }\n\n private async getSubjectInfos() {\n this._subjectInfos ??= (async () => {\n const [subjectInfos, targetPartitionSubjects] = await Promise.all([\n (async () => {\n const result = new Map<Id64String, SubjectInfo>();\n for await (const subject of this.querySubjects()) {\n const subjectInfo: SubjectInfo = {\n parentSubject: subject.parentId,\n hideInHierarchy: subject.hideInHierarchy,\n childSubjects: new Set(),\n childModels: new Set(),\n };\n if (subject.targetPartitionId) {\n subjectInfo.childModels.add(subject.targetPartitionId);\n }\n result.set(subject.id, subjectInfo);\n }\n return result;\n })(),\n (async () => {\n const result = new Map<Id64String, Set<Id64String>>();\n for await (const model of this.queryModels()) {\n pushToMap(result, model.id, model.parentId);\n }\n return result;\n })(),\n ]);\n\n for (const [subjectId, { parentSubject: parentSubjectId }] of subjectInfos.entries()) {\n if (parentSubjectId) {\n const parentSubjectInfo = subjectInfos.get(parentSubjectId);\n assert(!!parentSubjectInfo);\n parentSubjectInfo.childSubjects.add(subjectId);\n }\n }\n\n for (const [partitionId, subjectIds] of targetPartitionSubjects) {\n subjectIds.forEach((subjectId) => {\n const subjectInfo = subjectInfos.get(subjectId);\n assert(!!subjectInfo);\n subjectInfo.childModels.add(partitionId);\n });\n }\n\n return subjectInfos;\n })();\n return this._subjectInfos;\n }\n\n /** Returns ECInstanceIDs of Subjects that either have direct Model or at least one child Subject with a Model. */\n public async getParentSubjectIds(): Promise<Id64String[]> {\n this._parentSubjectIds ??= (async () => {\n const subjectInfos = await this.getSubjectInfos();\n const parentSubjectIds = new Set<Id64String>();\n subjectInfos.forEach((subjectInfo, subjectId) => {\n if (subjectInfo.childModels.size === 0 && subjectInfo.childSubjects.size === 0) {\n return;\n }\n parentSubjectIds.add(subjectId);\n let currParentId = subjectInfo.parentSubject;\n while (currParentId) {\n parentSubjectIds.add(currParentId);\n currParentId = subjectInfos.get(currParentId)?.parentSubject;\n }\n });\n return [...parentSubjectIds];\n })();\n return this._parentSubjectIds;\n }\n\n /**\n * Returns child subjects of the specified parent subjects as they're displayed in the hierarchy - taking into\n * account `hideInHierarchy` flag.\n */\n public async getChildSubjectIds(parentSubjectIds: Id64String[]): Promise<Id64String[]> {\n const childSubjectIds = new Array<Id64String>();\n const subjectInfos = await this.getSubjectInfos();\n parentSubjectIds.forEach((subjectId) => {\n forEachChildSubject(subjectInfos, subjectId, (childSubjectId, childSubjectInfo) => {\n if (!childSubjectInfo.hideInHierarchy) {\n childSubjectIds.push(childSubjectId);\n return \"break\";\n }\n return \"continue\";\n });\n });\n return childSubjectIds;\n }\n\n /** Returns ECInstanceIDs of Models under specific parent Subjects as they are displayed in the hierarchy. */\n public async getChildSubjectModelIds(parentSubjectIds: Id64String[]): Promise<Id64String[]> {\n const subjectInfos = await this.getSubjectInfos();\n\n const hiddenSubjectIds = new Array<Id64String>();\n parentSubjectIds.forEach((subjectId) => {\n forEachChildSubject(subjectInfos, subjectId, (childSubjectId, childSubjectInfo) => {\n if (childSubjectInfo.hideInHierarchy) {\n hiddenSubjectIds.push(childSubjectId);\n return \"continue\";\n }\n return \"break\";\n });\n });\n\n const modelIds = new Array<Id64String>();\n [...parentSubjectIds, ...hiddenSubjectIds].forEach((subjectId) => {\n const subjectInfo = subjectInfos.get(subjectId);\n subjectInfo && modelIds.push(...subjectInfo.childModels);\n });\n return modelIds;\n }\n\n private async *queryModelCategories() {\n const query = /* sql */ `\n SELECT Model.Id modelId, Category.Id categoryId\n FROM BisCore.GeometricElement3d\n WHERE Parent.Id IS NULL\n GROUP BY Model.Id, Category.Id\n UNION ALL\n SELECT Model.Id modelId, Category.Id categoryId\n FROM BisCore.GeometricElement2d\n WHERE Parent.Id IS NULL\n GROUP BY Model.Id, Category.Id\n `;\n for await (const row of this._queryExecutor.createQueryReader({ ecsql: query }, { rowFormat: \"ECSqlPropertyNames\", limit: \"unbounded\" })) {\n yield { modelId: row.modelId, categoryId: row.categoryId };\n }\n }\n\n private async getModelInfos() {\n this._modelInfos ??= (async () => {\n const modelInfos = new Map<Id64String, { categories: Id64Set; elementCount: number }>();\n for await (const { modelId, categoryId } of this.queryModelCategories()) {\n const entry = modelInfos.get(modelId);\n if (entry) {\n entry.categories.add(categoryId);\n } else {\n modelInfos.set(modelId, { categories: new Set([categoryId]), elementCount: 0 });\n }\n }\n return modelInfos;\n })();\n return this._modelInfos;\n }\n\n public async getModelCategories(modelIds: Id64String[]): Promise<Id64Array> {\n const modelInfos = await this.getModelInfos();\n return modelIds.map((modelId) => modelInfos.get(modelId)?.categories).flatMap((categories) => (categories ? [...categories] : []));\n }\n}\n\nfunction forEachChildSubject(\n subjectInfos: Map<Id64String, SubjectInfo>,\n parentSubject: Id64String | SubjectInfo,\n cb: (childSubjectId: Id64String, childSubjectInfo: SubjectInfo) => \"break\" | \"continue\",\n) {\n const parentSubjectInfo = typeof parentSubject === \"string\" ? subjectInfos.get(parentSubject) : parentSubject;\n parentSubjectInfo &&\n parentSubjectInfo.childSubjects.forEach((childSubjectId) => {\n const childSubjectInfo = subjectInfos.get(childSubjectId)!;\n if (cb(childSubjectId, childSubjectInfo) === \"break\") {\n return;\n }\n forEachChildSubject(subjectInfos, childSubjectInfo, cb);\n });\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelsTree =
|
|
3
|
+
exports.ModelsTree = ModelsTree;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/*---------------------------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -22,5 +22,4 @@ function ModelsTree({ imodel, getSchemaContext, selectionStorage, activeView, fi
|
|
|
22
22
|
});
|
|
23
23
|
return ((0, jsx_runtime_1.jsx)(VisibilityTree_js_1.VisibilityTree, { ...modelsTreeProps, imodel: imodel, selectionStorage: selectionStorage, getSchemaContext: getSchemaContext, hierarchyLevelSizeLimit: hierarchyLevelConfig?.sizeLimit, density: density, selectionMode: selectionMode, treeRenderer: (treeProps) => (0, jsx_runtime_1.jsx)(VisibilityTreeRenderer_js_1.VisibilityTreeRenderer, { ...treeProps, ...rendererProps }) }));
|
|
24
24
|
}
|
|
25
|
-
exports.ModelsTree = ModelsTree;
|
|
26
25
|
//# sourceMappingURL=ModelsTree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTree.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTree.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModelsTree.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTree.tsx"],"names":[],"mappings":";;AAqBA,gCAqCC;;AA1DD;;;gGAGgG;AAEhG,8EAAwE;AACxE,8FAAwF;AACxF,yDAAmD;AAanD,YAAY;AACZ,SAAgB,UAAU,CAAC,EACzB,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,MAAM,EACN,OAAO,EACP,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACA;IAChB,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAa,EAAC;QACvD,UAAU;QACV,MAAM;QACN,eAAe;QACf,0BAA0B;QAC1B,gBAAgB;QAChB,gBAAgB;QAChB,kBAAkB;KACnB,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,kCAAc,OACT,eAAe,EACnB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,uBAAuB,EAAE,oBAAoB,EAAE,SAAS,EACxD,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,uBAAC,kDAAsB,OAAK,SAAS,KAAM,aAAa,GAAI,GACzF,CACH,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 { VisibilityTree } from \"../common/components/VisibilityTree.js\";\nimport { VisibilityTreeRenderer } from \"../common/components/VisibilityTreeRenderer.js\";\nimport { useModelsTree } from \"./UseModelsTree.js\";\n\nimport type { UseModelsTreeProps } from \"./UseModelsTree.js\";\nimport type { VisibilityTreeProps } from \"../common/components/VisibilityTree.js\";\n\n/** @beta */\nexport type ModelsTreeProps = Pick<VisibilityTreeProps, \"imodel\" | \"getSchemaContext\" | \"selectionStorage\" | \"density\" | \"selectionMode\"> &\n UseModelsTreeProps & {\n hierarchyLevelConfig?: {\n sizeLimit?: number;\n };\n };\n\n/** @beta */\nexport function ModelsTree({\n imodel,\n getSchemaContext,\n selectionStorage,\n activeView,\n filter,\n density,\n hierarchyLevelConfig,\n hierarchyConfig,\n selectionMode,\n selectionPredicate,\n visibilityHandlerOverrides,\n getFilteredPaths,\n onModelsFiltered,\n}: ModelsTreeProps) {\n const { modelsTreeProps, rendererProps } = useModelsTree({\n activeView,\n filter,\n hierarchyConfig,\n visibilityHandlerOverrides,\n getFilteredPaths,\n onModelsFiltered,\n selectionPredicate,\n });\n\n return (\n <VisibilityTree\n {...modelsTreeProps}\n imodel={imodel}\n selectionStorage={selectionStorage}\n getSchemaContext={getSchemaContext}\n hierarchyLevelSizeLimit={hierarchyLevelConfig?.sizeLimit}\n density={density}\n selectionMode={selectionMode}\n treeRenderer={(treeProps) => <VisibilityTreeRenderer {...treeProps} {...rendererProps} />}\n />\n );\n}\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useModelsTreeButtonProps = useModelsTreeButtonProps;
|
|
4
|
+
exports.ShowAllButton = ShowAllButton;
|
|
5
|
+
exports.HideAllButton = HideAllButton;
|
|
6
|
+
exports.InvertButton = InvertButton;
|
|
7
|
+
exports.View2DButton = View2DButton;
|
|
8
|
+
exports.View3DButton = View3DButton;
|
|
9
|
+
exports.ToggleInstancesFocusButton = ToggleInstancesFocusButton;
|
|
4
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
11
|
/*---------------------------------------------------------------------------------------------
|
|
6
12
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -43,7 +49,6 @@ function useModelsTreeButtonProps({ imodel, viewport }) {
|
|
|
43
49
|
onModelsFiltered: setFilteredModels,
|
|
44
50
|
};
|
|
45
51
|
}
|
|
46
|
-
exports.useModelsTreeButtonProps = useModelsTreeButtonProps;
|
|
47
52
|
function useAvailableModels(imodel) {
|
|
48
53
|
const [availableModels, setAvailableModels] = (0, react_1.useState)([]);
|
|
49
54
|
(0, react_1.useEffect)(() => {
|
|
@@ -80,7 +85,6 @@ function ShowAllButton(props) {
|
|
|
80
85
|
void (0, ModelsTreeVisibilityHandler_js_1.showAllModels)(props.models.map((model) => model.id), props.viewport);
|
|
81
86
|
}, children: (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityShow, {}) }));
|
|
82
87
|
}
|
|
83
|
-
exports.ShowAllButton = ShowAllButton;
|
|
84
88
|
/** @public */
|
|
85
89
|
function HideAllButton(props) {
|
|
86
90
|
return ((0, jsx_runtime_1.jsx)(itwinui_react_1.IconButton, { size: props.density === "enlarged" ? "large" : "small", styleType: "borderless", label: TreeWidget_js_1.TreeWidget.translate("modelsTree.buttons.hideAll.tooltip"), onClick: () => {
|
|
@@ -88,7 +92,6 @@ function HideAllButton(props) {
|
|
|
88
92
|
void (0, ModelsTreeVisibilityHandler_js_1.hideAllModels)(props.models.map((model) => model.id), props.viewport);
|
|
89
93
|
}, children: (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityHide, {}) }));
|
|
90
94
|
}
|
|
91
|
-
exports.HideAllButton = HideAllButton;
|
|
92
95
|
/** @public */
|
|
93
96
|
function InvertButton(props) {
|
|
94
97
|
return ((0, jsx_runtime_1.jsx)(itwinui_react_1.IconButton, { size: props.density === "enlarged" ? "large" : "small", styleType: "borderless", label: TreeWidget_js_1.TreeWidget.translate("modelsTree.buttons.invert.tooltip"), onClick: () => {
|
|
@@ -96,7 +99,6 @@ function InvertButton(props) {
|
|
|
96
99
|
void (0, ModelsTreeVisibilityHandler_js_1.invertAllModels)(props.models.map((model) => model.id), props.viewport);
|
|
97
100
|
}, children: (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityHalf, {}) }));
|
|
98
101
|
}
|
|
99
|
-
exports.InvertButton = InvertButton;
|
|
100
102
|
/** @public */
|
|
101
103
|
function View2DButton(props) {
|
|
102
104
|
const models2d = (0, react_1.useMemo)(() => {
|
|
@@ -112,7 +114,6 @@ function View2DButton(props) {
|
|
|
112
114
|
void (0, ModelsTreeVisibilityHandler_js_1.toggleModels)(models2d, is2dToggleActive, props.viewport);
|
|
113
115
|
}, disabled: models2d.length === 0, endIcon: is2dToggleActive ? (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityShow, {}) : (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityHide, {}), children: TreeWidget_js_1.TreeWidget.translate("modelsTree.buttons.toggle2d.label") }) }));
|
|
114
116
|
}
|
|
115
|
-
exports.View2DButton = View2DButton;
|
|
116
117
|
/** @public */
|
|
117
118
|
function View3DButton(props) {
|
|
118
119
|
const models3d = (0, react_1.useMemo)(() => {
|
|
@@ -128,7 +129,6 @@ function View3DButton(props) {
|
|
|
128
129
|
void (0, ModelsTreeVisibilityHandler_js_1.toggleModels)(models3d, is3dToggleActive, props.viewport);
|
|
129
130
|
}, disabled: models3d.length === 0, endIcon: is3dToggleActive ? (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityShow, {}) : (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgVisibilityHide, {}), children: TreeWidget_js_1.TreeWidget.translate("modelsTree.buttons.toggle3d.label") }) }));
|
|
130
131
|
}
|
|
131
|
-
exports.View3DButton = View3DButton;
|
|
132
132
|
/** @public */
|
|
133
133
|
function ToggleInstancesFocusButton({ density, onFeatureUsed }) {
|
|
134
134
|
const { enabled, toggle } = (0, FocusedInstancesContext_js_1.useFocusedInstancesContext)();
|
|
@@ -140,5 +140,4 @@ function ToggleInstancesFocusButton({ density, onFeatureUsed }) {
|
|
|
140
140
|
toggle();
|
|
141
141
|
}, isActive: enabled, children: (0, jsx_runtime_1.jsx)(itwinui_icons_react_1.SvgCursorClick, {}) }));
|
|
142
142
|
}
|
|
143
|
-
exports.ToggleInstancesFocusButton = ToggleInstancesFocusButton;
|
|
144
143
|
//# sourceMappingURL=ModelsTreeButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTreeButtons.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.tsx"],"names":[],"mappings":";;;;AAAA;;;gGAGgG;AAEhG,iCAAqD;AACrD,oEAAqH;AACrH,wDAAmE;AACnE,0DAAoD;AACpD,qFAAkF;AAClF,8FAA6I;AA0B7I;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,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B,KAAG,YAExE,0BAAU,CAAC,SAAS,CAAC,mCAAmC,CAAC,GACnD,GACD,CACX,CAAC;AACJ,CAAC;AA5BD,oCA4BC;AAED,cAAc;AACd,SAAgB,0BAA0B,CAAC,EAAE,OAAO,EAAE,aAAa,EAAmF;IACpJ,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAA,uDAA0B,GAAE,CAAC;IACzD,MAAM,KAAK,GAAG,OAAO;QACnB,CAAC,CAAC,0BAAU,CAAC,SAAS,CAAC,oDAAoD,CAAC;QAC5E,CAAC,CAAC,0BAAU,CAAC,SAAS,CAAC,mDAAmD,CAAC,CAAC;IAC9E,OAAO,CACL,uBAAC,0BAAU,IACT,SAAS,EAAC,YAAY,EACtB,IAAI,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAChD,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE;YACZ,aAAa,EAAE,CAAC,4BAA4B,CAAC,CAAC;YAC9C,MAAM,EAAE,CAAC;QACX,CAAC,EACD,QAAQ,EAAE,OAAO,YAEjB,uBAAC,oCAAc,KAAG,GACP,CACd,CAAC;AACJ,CAAC;AAnBD,gEAmBC","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, useMemo, useState } from \"react\";\nimport { SvgCursorClick, SvgVisibilityHalf, SvgVisibilityHide, SvgVisibilityShow } from \"@itwin/itwinui-icons-react\";\nimport { Button, IconButton, Tooltip } from \"@itwin/itwinui-react\";\nimport { TreeWidget } from \"../../../TreeWidget.js\";\nimport { useFocusedInstancesContext } from \"../common/FocusedInstancesContext.js\";\nimport { areAllModelsVisible, hideAllModels, invertAllModels, showAllModels, toggleModels } from \"./internal/ModelsTreeVisibilityHandler.js\";\n\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type { GeometricModel3dProps, ModelQueryParams } from \"@itwin/core-common\";\nimport type { IModelConnection, Viewport } from \"@itwin/core-frontend\";\nimport type { TreeHeaderButtonProps } from \"../../tree-header/TreeHeader.js\";\n\n/**\n * Information about a single Model.\n * @public\n */\nexport interface ModelInfo {\n id: string;\n isPlanProjection?: boolean;\n}\n\n/**\n * Props that get passed to `ModelsTreeComponent` header button renderer.\n * @see ModelTreeComponentProps.headerButtons\n * @public\n */\nexport interface ModelsTreeHeaderButtonProps extends TreeHeaderButtonProps {\n /** A list of models available in the iModel. */\n models: ModelInfo[];\n}\n\n/**\n * Custom hook that creates props required to render `ModelsTreeComponent` header button.\n *\n * Example:\n * ```tsx\n * const { buttonProps, onModelsFiltered } = useModelsTreeButtonProps({ imodel, viewport });\n * <TreeWithHeader\n * buttons={[\n * <ModelsTreeComponent.ShowAllButton {...buttonProps} />,\n * <ModelsTreeComponent.HideAllButton {...buttonProps} />,\n * ]}\n * >\n * <ModelsTree {...treeProps} onModelsFiltered={onModelsFiltered} />\n * </TreeWithHeader>\n * ```\n *\n *\n * @public\n */\nexport function useModelsTreeButtonProps({ imodel, viewport }: { imodel: IModelConnection; viewport: Viewport }): {\n buttonProps: Pick<ModelsTreeHeaderButtonProps, \"models\" | \"viewport\">;\n onModelsFiltered: (models: Id64String[] | undefined) => void;\n} {\n const [filteredModels, setFilteredModels] = useState<Id64String[] | undefined>();\n const models = useAvailableModels(imodel);\n const availableModels = useMemo(() => (!filteredModels ? models : models.filter((model) => filteredModels.includes(model.id))), [models, filteredModels]);\n return {\n buttonProps: {\n models: availableModels,\n viewport,\n },\n onModelsFiltered: setFilteredModels,\n };\n}\n\nfunction useAvailableModels(imodel: IModelConnection): ModelInfo[] {\n const [availableModels, setAvailableModels] = useState<ModelInfo[]>([]);\n\n useEffect(() => {\n queryModelsForHeaderActions(imodel)\n .then((modelInfos: ModelInfo[]) => {\n setAvailableModels(modelInfos);\n })\n .catch(() => {\n setAvailableModels([]);\n });\n }, [imodel]);\n\n return availableModels;\n}\n\nasync function queryModelsForHeaderActions(iModel: IModelConnection) {\n const queryParams: ModelQueryParams = {\n from: \"BisCore.GeometricModel3d\",\n where: `\n EXISTS (\n SELECT 1\n FROM BisCore.Element e\n WHERE e.ECClassId IS (BisCore.GeometricElement3d, BisCore.InformationPartitionElement)\n AND e.ECInstanceId = GeometricModel3d.ModeledElement.Id\n )\n `,\n wantPrivate: false,\n };\n\n const modelProps = await iModel.models.queryProps(queryParams);\n return modelProps.map(({ id, isPlanProjection }: GeometricModel3dProps) => ({ id, isPlanProjection })).filter(({ id }) => id) as ModelInfo[];\n}\n\n/** @public */\nexport type ModelsTreeHeaderButtonType = (props: ModelsTreeHeaderButtonProps) => JSX.Element | null;\n\n/** @public */\nexport function ShowAllButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.showAll.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-showall\");\n void showAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityShow />\n </IconButton>\n );\n}\n\n/** @public */\nexport function HideAllButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.hideAll.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-hideall\");\n void hideAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityHide />\n </IconButton>\n );\n}\n\n/** @public */\nexport function InvertButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.invert.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-invert\");\n void invertAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityHalf />\n </IconButton>\n );\n}\n\n/** @public */\nexport function View2DButton(props: ModelsTreeHeaderButtonProps) {\n const models2d = useMemo(() => {\n return props.models.filter((model) => model.isPlanProjection).map((model) => model.id);\n }, [props.models]);\n\n const [is2dToggleActive, setIs2dToggleActive] = useState(false);\n\n useEffect(() => {\n setIs2dToggleActive(areAllModelsVisible(models2d, props.viewport));\n return props.viewport.onViewedModelsChanged.addListener((vp: Viewport) => setIs2dToggleActive(areAllModelsVisible(models2d, vp)));\n }, [models2d, props.viewport]);\n\n return (\n <Tooltip content={TreeWidget.translate(\"modelsTree.buttons.toggle2d.tooltip\")}>\n <Button\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-view2d\");\n void toggleModels(models2d, is2dToggleActive, props.viewport);\n }}\n disabled={models2d.length === 0}\n endIcon={is2dToggleActive ? <SvgVisibilityShow /> : <SvgVisibilityHide />}\n >\n {TreeWidget.translate(\"modelsTree.buttons.toggle2d.label\")}\n </Button>\n </Tooltip>\n );\n}\n\n/** @public */\nexport function View3DButton(props: ModelsTreeHeaderButtonProps) {\n const models3d = useMemo(() => {\n return props.models.filter((model) => !model.isPlanProjection).map((model) => model.id);\n }, [props.models]);\n\n const [is3dToggleActive, setIs3dToggleActive] = useState(false);\n\n useEffect(() => {\n setIs3dToggleActive(areAllModelsVisible(models3d, props.viewport));\n return props.viewport.onViewedModelsChanged.addListener((vp: Viewport) => setIs3dToggleActive(areAllModelsVisible(models3d, vp)));\n }, [models3d, props.viewport]);\n\n return (\n <Tooltip content={TreeWidget.translate(\"modelsTree.buttons.toggle3d.tooltip\")}>\n <Button\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-view3d\");\n void toggleModels(models3d, is3dToggleActive, props.viewport);\n }}\n disabled={models3d.length === 0}\n endIcon={is3dToggleActive ? <SvgVisibilityShow /> : <SvgVisibilityHide />}\n >\n {TreeWidget.translate(\"modelsTree.buttons.toggle3d.label\")}\n </Button>\n </Tooltip>\n );\n}\n\n/** @public */\nexport function ToggleInstancesFocusButton({ density, onFeatureUsed }: { density?: \"default\" | \"enlarged\"; onFeatureUsed?: (feature: string) => void }) {\n const { enabled, toggle } = useFocusedInstancesContext();\n const label = enabled\n ? TreeWidget.translate(\"modelsTree.buttons.toggleFocusMode.disable.tooltip\")\n : TreeWidget.translate(\"modelsTree.buttons.toggleFocusMode.enable.tooltip\");\n return (\n <IconButton\n styleType=\"borderless\"\n size={density === \"enlarged\" ? \"large\" : \"small\"}\n label={label}\n onClick={() => {\n onFeatureUsed?.(\"models-tree-instancesfocus\");\n toggle();\n }}\n isActive={enabled}\n >\n <SvgCursorClick />\n </IconButton>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ModelsTreeButtons.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTreeButtons.tsx"],"names":[],"mappings":";;AAuDA,4DAcC;AAwCD,sCAiBC;AAGD,sCAiBC;AAGD,oCAiBC;AAGD,oCA4BC;AAGD,oCA4BC;AAGD,gEAmBC;;AA1PD;;;gGAGgG;AAEhG,iCAAqD;AACrD,oEAAqH;AACrH,wDAAmE;AACnE,0DAAoD;AACpD,qFAAkF;AAClF,8FAA6I;AA0B7I;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,wBAAwB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAoD;IAI7G,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,GAA4B,CAAC;IACjF,MAAM,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,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C,SAAS,CAAC,mDAAmD,CAAC,CAAC;IAC9E,OAAO,CACL,uBAAC,0BAAU,IACT,SAAS,EAAC,YAAY,EACtB,IAAI,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAChD,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE;YACZ,aAAa,EAAE,CAAC,4BAA4B,CAAC,CAAC;YAC9C,MAAM,EAAE,CAAC;QACX,CAAC,EACD,QAAQ,EAAE,OAAO,YAEjB,uBAAC,oCAAc,KAAG,GACP,CACd,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 { useEffect, useMemo, useState } from \"react\";\nimport { SvgCursorClick, SvgVisibilityHalf, SvgVisibilityHide, SvgVisibilityShow } from \"@itwin/itwinui-icons-react\";\nimport { Button, IconButton, Tooltip } from \"@itwin/itwinui-react\";\nimport { TreeWidget } from \"../../../TreeWidget.js\";\nimport { useFocusedInstancesContext } from \"../common/FocusedInstancesContext.js\";\nimport { areAllModelsVisible, hideAllModels, invertAllModels, showAllModels, toggleModels } from \"./internal/ModelsTreeVisibilityHandler.js\";\n\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type { GeometricModel3dProps, ModelQueryParams } from \"@itwin/core-common\";\nimport type { IModelConnection, Viewport } from \"@itwin/core-frontend\";\nimport type { TreeHeaderButtonProps } from \"../../tree-header/TreeHeader.js\";\n\n/**\n * Information about a single Model.\n * @public\n */\nexport interface ModelInfo {\n id: string;\n isPlanProjection?: boolean;\n}\n\n/**\n * Props that get passed to `ModelsTreeComponent` header button renderer.\n * @see ModelTreeComponentProps.headerButtons\n * @public\n */\nexport interface ModelsTreeHeaderButtonProps extends TreeHeaderButtonProps {\n /** A list of models available in the iModel. */\n models: ModelInfo[];\n}\n\n/**\n * Custom hook that creates props required to render `ModelsTreeComponent` header button.\n *\n * Example:\n * ```tsx\n * const { buttonProps, onModelsFiltered } = useModelsTreeButtonProps({ imodel, viewport });\n * <TreeWithHeader\n * buttons={[\n * <ModelsTreeComponent.ShowAllButton {...buttonProps} />,\n * <ModelsTreeComponent.HideAllButton {...buttonProps} />,\n * ]}\n * >\n * <ModelsTree {...treeProps} onModelsFiltered={onModelsFiltered} />\n * </TreeWithHeader>\n * ```\n *\n *\n * @public\n */\nexport function useModelsTreeButtonProps({ imodel, viewport }: { imodel: IModelConnection; viewport: Viewport }): {\n buttonProps: Pick<ModelsTreeHeaderButtonProps, \"models\" | \"viewport\">;\n onModelsFiltered: (models: Id64String[] | undefined) => void;\n} {\n const [filteredModels, setFilteredModels] = useState<Id64String[] | undefined>();\n const models = useAvailableModels(imodel);\n const availableModels = useMemo(() => (!filteredModels ? models : models.filter((model) => filteredModels.includes(model.id))), [models, filteredModels]);\n return {\n buttonProps: {\n models: availableModels,\n viewport,\n },\n onModelsFiltered: setFilteredModels,\n };\n}\n\nfunction useAvailableModels(imodel: IModelConnection): ModelInfo[] {\n const [availableModels, setAvailableModels] = useState<ModelInfo[]>([]);\n\n useEffect(() => {\n queryModelsForHeaderActions(imodel)\n .then((modelInfos: ModelInfo[]) => {\n setAvailableModels(modelInfos);\n })\n .catch(() => {\n setAvailableModels([]);\n });\n }, [imodel]);\n\n return availableModels;\n}\n\nasync function queryModelsForHeaderActions(iModel: IModelConnection) {\n const queryParams: ModelQueryParams = {\n from: \"BisCore.GeometricModel3d\",\n where: `\n EXISTS (\n SELECT 1\n FROM BisCore.Element e\n WHERE e.ECClassId IS (BisCore.GeometricElement3d, BisCore.InformationPartitionElement)\n AND e.ECInstanceId = GeometricModel3d.ModeledElement.Id\n )\n `,\n wantPrivate: false,\n };\n\n const modelProps = await iModel.models.queryProps(queryParams);\n return modelProps.map(({ id, isPlanProjection }: GeometricModel3dProps) => ({ id, isPlanProjection })).filter(({ id }) => id) as ModelInfo[];\n}\n\n/** @public */\nexport type ModelsTreeHeaderButtonType = (props: ModelsTreeHeaderButtonProps) => JSX.Element | null;\n\n/** @public */\nexport function ShowAllButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.showAll.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-showall\");\n void showAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityShow />\n </IconButton>\n );\n}\n\n/** @public */\nexport function HideAllButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.hideAll.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-hideall\");\n void hideAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityHide />\n </IconButton>\n );\n}\n\n/** @public */\nexport function InvertButton(props: ModelsTreeHeaderButtonProps) {\n return (\n <IconButton\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n label={TreeWidget.translate(\"modelsTree.buttons.invert.tooltip\")}\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-invert\");\n void invertAllModels(\n props.models.map((model) => model.id),\n props.viewport,\n );\n }}\n >\n <SvgVisibilityHalf />\n </IconButton>\n );\n}\n\n/** @public */\nexport function View2DButton(props: ModelsTreeHeaderButtonProps) {\n const models2d = useMemo(() => {\n return props.models.filter((model) => model.isPlanProjection).map((model) => model.id);\n }, [props.models]);\n\n const [is2dToggleActive, setIs2dToggleActive] = useState(false);\n\n useEffect(() => {\n setIs2dToggleActive(areAllModelsVisible(models2d, props.viewport));\n return props.viewport.onViewedModelsChanged.addListener((vp: Viewport) => setIs2dToggleActive(areAllModelsVisible(models2d, vp)));\n }, [models2d, props.viewport]);\n\n return (\n <Tooltip content={TreeWidget.translate(\"modelsTree.buttons.toggle2d.tooltip\")}>\n <Button\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-view2d\");\n void toggleModels(models2d, is2dToggleActive, props.viewport);\n }}\n disabled={models2d.length === 0}\n endIcon={is2dToggleActive ? <SvgVisibilityShow /> : <SvgVisibilityHide />}\n >\n {TreeWidget.translate(\"modelsTree.buttons.toggle2d.label\")}\n </Button>\n </Tooltip>\n );\n}\n\n/** @public */\nexport function View3DButton(props: ModelsTreeHeaderButtonProps) {\n const models3d = useMemo(() => {\n return props.models.filter((model) => !model.isPlanProjection).map((model) => model.id);\n }, [props.models]);\n\n const [is3dToggleActive, setIs3dToggleActive] = useState(false);\n\n useEffect(() => {\n setIs3dToggleActive(areAllModelsVisible(models3d, props.viewport));\n return props.viewport.onViewedModelsChanged.addListener((vp: Viewport) => setIs3dToggleActive(areAllModelsVisible(models3d, vp)));\n }, [models3d, props.viewport]);\n\n return (\n <Tooltip content={TreeWidget.translate(\"modelsTree.buttons.toggle3d.tooltip\")}>\n <Button\n size={props.density === \"enlarged\" ? \"large\" : \"small\"}\n styleType=\"borderless\"\n onClick={() => {\n props.onFeatureUsed?.(\"models-tree-view3d\");\n void toggleModels(models3d, is3dToggleActive, props.viewport);\n }}\n disabled={models3d.length === 0}\n endIcon={is3dToggleActive ? <SvgVisibilityShow /> : <SvgVisibilityHide />}\n >\n {TreeWidget.translate(\"modelsTree.buttons.toggle3d.label\")}\n </Button>\n </Tooltip>\n );\n}\n\n/** @public */\nexport function ToggleInstancesFocusButton({ density, onFeatureUsed }: { density?: \"default\" | \"enlarged\"; onFeatureUsed?: (feature: string) => void }) {\n const { enabled, toggle } = useFocusedInstancesContext();\n const label = enabled\n ? TreeWidget.translate(\"modelsTree.buttons.toggleFocusMode.disable.tooltip\")\n : TreeWidget.translate(\"modelsTree.buttons.toggleFocusMode.enable.tooltip\");\n return (\n <IconButton\n styleType=\"borderless\"\n size={density === \"enlarged\" ? \"large\" : \"small\"}\n label={label}\n onClick={() => {\n onFeatureUsed?.(\"models-tree-instancesfocus\");\n toggle();\n }}\n isActive={enabled}\n >\n <SvgCursorClick />\n </IconButton>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelsTreeComponent.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.tsx"],"names":[],"mappings":";;;;;AAAA;;;gGAGgG;AAEhG,iCAA4C;AAC5C,oDAA+D;AAC/D,0DAAoD;AACpD,2EAAqE;AACrE,qFAAmH;AACnH,yEAAmE;AACnE,+DAAyD;AACzD,6EAA4E;AAC5E,mDAA6C;AAC7C,iEAQgC;AAuChC;;;;;GAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACrE,MAAM,MAAM,GAAG,IAAA,uCAAyB,GAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAA,wCAAiB,GAAE,CAAC;IAErC,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"ModelsTreeComponent.js","sourceRoot":"","sources":["../../../../../../src/tree-widget-react/components/trees/models-tree/ModelsTreeComponent.tsx"],"names":[],"mappings":";;;;;AAAA;;;gGAGgG;AAEhG,iCAA4C;AAC5C,oDAA+D;AAC/D,0DAAoD;AACpD,2EAAqE;AACrE,qFAAmH;AACnH,yEAAmE;AACnE,+DAAyD;AACzD,6EAA4E;AAC5E,mDAA6C;AAC7C,iEAQgC;AAuChC;;;;;GAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACrE,MAAM,MAAM,GAAG,IAAA,uCAAyB,GAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAA,wCAAiB,GAAE,CAAC;IAErC,IAAI,CAAC,MAAM,IAAI,CAAC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Aa,EAAE,aAAa,EAAE,qBAAqB,EAAE,qBAAqB,YAC/I,uBAAC,kCAAc,IACb,cAAc,EAAE;gBACd,aAAa,EAAE,WAAW;gBAC1B,aAAa,EAAE,WAAW;gBAC1B,UAAU,EAAE,oBAAoB,IAAI,CAAC,CAAC,SAAS,CAAC,gBAAgB;aACjE,EACD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,YAEhB,uBAAC,0BAAU,OAAK,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,GACxG,GACQ,CAC5B,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 { Fragment, useEffect } from \"react\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport { TreeWidget } from \"../../../TreeWidget.js\";\nimport { TreeWithHeader } from \"../../tree-header/TreeWithHeader.js\";\nimport { FocusedInstancesContextProvider, useFocusedInstancesContext } from \"../common/FocusedInstancesContext.js\";\nimport { useActiveViewport } from \"../common/UseActiveViewport.js\";\nimport { useFiltering } from \"../common/UseFiltering.js\";\nimport { TelemetryContextProvider } from \"../common/UseTelemetryContext.js\";\nimport { ModelsTree } from \"./ModelsTree.js\";\nimport {\n HideAllButton,\n InvertButton,\n ShowAllButton,\n ToggleInstancesFocusButton,\n useModelsTreeButtonProps,\n View2DButton,\n View3DButton,\n} from \"./ModelsTreeButtons.js\";\n\nimport type { ModelsTreeProps } from \"./ModelsTree.js\";\nimport type { ReactNode } from \"react\";\nimport type { IModelConnection, ScreenViewport } from \"@itwin/core-frontend\";\nimport type { ModelsTreeHeaderButtonProps, ModelsTreeHeaderButtonType } from \"./ModelsTreeButtons.js\";\n\n/** @public */\ninterface ModelsTreeComponentProps\n extends Pick<\n ModelsTreeProps,\n | \"getSchemaContext\"\n | \"selectionStorage\"\n | \"density\"\n | \"hierarchyLevelConfig\"\n | \"selectionMode\"\n | \"selectionPredicate\"\n | \"hierarchyConfig\"\n | \"visibilityHandlerOverrides\"\n | \"getFilteredPaths\"\n > {\n /**\n * Renderers of header buttons. Defaults to:\n * ```ts\n * [\n * ModelsTreeComponent.ShowAllButton,\n * ModelsTreeComponent.HideAllButton,\n * ModelsTreeComponent.InvertButton,\n * ModelsTreeComponent.View2DButton,\n * ModelsTreeComponent.View3DButton,\n * ModelsTreeComponent.ToggleInstancesFocusButton,\n * ]\n * ```\n */\n headerButtons?: Array<(props: ModelsTreeHeaderButtonProps) => React.ReactNode>;\n onPerformanceMeasured?: (featureId: string, duration: number) => void;\n onFeatureUsed?: (feature: string) => void;\n}\n\n/**\n * A component that renders `ModelsTree` and a header with filtering capabilities\n * and header buttons.\n *\n * @public\n */\nexport const ModelsTreeComponent = (props: ModelsTreeComponentProps) => {\n const iModel = useActiveIModelConnection();\n const viewport = useActiveViewport();\n\n if (!iModel || !viewport) {\n return null;\n }\n\n return (\n <FocusedInstancesContextProvider selectionStorage={props.selectionStorage} imodelKey={iModel.key}>\n <ModelsTreeComponentImpl {...props} iModel={iModel} viewport={viewport} />\n </FocusedInstancesContextProvider>\n );\n};\n\n/**\n * Renders a \"Show all\" button that enables display of all models.\n * @public\n */\nModelsTreeComponent.ShowAllButton = ShowAllButton as ModelsTreeHeaderButtonType;\n\n/**\n * Renders a \"Hide all\" button that disables display of all models.\n * @public\n */\nModelsTreeComponent.HideAllButton = HideAllButton as ModelsTreeHeaderButtonType;\n\n/**\n * Renders an \"Invert all\" button that inverts display of all models.\n * @public\n */\nModelsTreeComponent.InvertButton = InvertButton as ModelsTreeHeaderButtonType;\n\n/**\n * Renders a \"View 2D\" button that enables display of all plan projection models and disables all others.\n * @public\n */\nModelsTreeComponent.View2DButton = View2DButton as ModelsTreeHeaderButtonType;\n\n/**\n * Renders a \"View 3D\" button that enables display of all non-plan projection models and disables all plan projection ones.\n * @public\n */\nModelsTreeComponent.View3DButton = View3DButton as ModelsTreeHeaderButtonType;\n\n/**\n * Renders an \"Instance focus\" toggle button that enables/disables instances focusing mode.\n *\n * Requires instances focus context to be provided using `FocusedInstancesContextProvider`. The context\n * is provided automatically, when using `ModelsTreeComponent`, but needs to be provided by consumers\n * when rendering `ToggleInstancesFocusButton` outside of `ModelsTreeComponent`.\n *\n * @public\n */\nModelsTreeComponent.ToggleInstancesFocusButton = ToggleInstancesFocusButton as ModelsTreeHeaderButtonType;\n\n/**\n * Id of the component. May be used when a creating a `TreeDefinition` for `SelectableTree`.\n * @public\n */\nModelsTreeComponent.id = \"models-tree-v2\";\n\n/**\n * Label of the component. May be used when a creating a `TreeDefinition` for `SelectableTree`.\n * @public\n */\nModelsTreeComponent.getLabel = () => TreeWidget.translate(\"modelsTree.label\");\n\nfunction ModelsTreeComponentImpl({\n iModel,\n viewport,\n headerButtons,\n onFeatureUsed,\n onPerformanceMeasured,\n ...treeProps\n}: ModelsTreeComponentProps & { iModel: IModelConnection; viewport: ScreenViewport }) {\n const { buttonProps, onModelsFiltered } = useModelsTreeButtonProps({ imodel: iModel, viewport });\n const { filter, applyFilter, clearFilter } = useFiltering();\n const { enabled: instanceFocusEnabled } = useFocusedInstancesContext();\n const density = treeProps.density;\n\n const buttons: ReactNode = headerButtons\n ? headerButtons.map((btn, index) => <Fragment key={index}>{btn({ ...buttonProps, onFeatureUsed })}</Fragment>)\n : [\n <ShowAllButton {...buttonProps} key=\"show-all-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n <HideAllButton {...buttonProps} key=\"hide-all-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n <InvertButton {...buttonProps} key=\"invert-all-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n <View2DButton {...buttonProps} key=\"view-2d-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n <View3DButton {...buttonProps} key=\"view-3d-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n <ToggleInstancesFocusButton key=\"toggle-instances-focus-btn\" density={density} onFeatureUsed={onFeatureUsed} />,\n ];\n\n useEffect(() => {\n if (instanceFocusEnabled) {\n clearFilter();\n }\n }, [instanceFocusEnabled, clearFilter]);\n\n return (\n <TelemetryContextProvider componentIdentifier={ModelsTreeComponent.id} onFeatureUsed={onFeatureUsed} onPerformanceMeasured={onPerformanceMeasured}>\n <TreeWithHeader\n filteringProps={{\n onFilterStart: applyFilter,\n onFilterClear: clearFilter,\n isDisabled: instanceFocusEnabled || !!treeProps.getFilteredPaths,\n }}\n buttons={buttons}\n density={density}\n >\n <ModelsTree {...treeProps} imodel={iModel} activeView={viewport} filter={filter} onModelsFiltered={onModelsFiltered} />\n </TreeWithHeader>\n </TelemetryContextProvider>\n );\n}\n"]}
|
|
@@ -31,6 +31,13 @@ var ModelsTreeInstanceKeyPathsProps;
|
|
|
31
31
|
ModelsTreeInstanceKeyPathsProps.isLabelProps = isLabelProps;
|
|
32
32
|
})(ModelsTreeInstanceKeyPathsProps || (exports.ModelsTreeInstanceKeyPathsProps = ModelsTreeInstanceKeyPathsProps = {}));
|
|
33
33
|
class ModelsTreeDefinition {
|
|
34
|
+
_impl;
|
|
35
|
+
_idsCache;
|
|
36
|
+
_hierarchyConfig;
|
|
37
|
+
_selectQueryFactory;
|
|
38
|
+
_nodeLabelSelectClauseFactory;
|
|
39
|
+
_queryExecutor;
|
|
40
|
+
_isSupported;
|
|
34
41
|
constructor(props) {
|
|
35
42
|
this._impl = (0, presentation_hierarchies_1.createPredicateBasedHierarchyDefinition)({
|
|
36
43
|
classHierarchyInspector: props.imodelAccess,
|
|
@@ -219,7 +226,7 @@ class ModelsTreeDefinition {
|
|
|
219
226
|
${await this._selectQueryFactory.createSelectClause({
|
|
220
227
|
ecClassId: { selector: "this.ECClassId" },
|
|
221
228
|
ecInstanceId: { selector: "this.ECInstanceId" },
|
|
222
|
-
nodeLabel: "",
|
|
229
|
+
nodeLabel: "", // doesn't matter - the node is always hidden
|
|
223
230
|
hideNodeInHierarchy: true,
|
|
224
231
|
})}
|
|
225
232
|
FROM BisCore.GeometricModel3d this
|