@itwin/components-react 4.0.0-dev.2 → 4.0.0-dev.3
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/LICENSE.md +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +4 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +22 -25
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js +19 -81
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js +83 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +22 -12
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +4 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js +22 -14
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +60 -8
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js +25 -7
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.d.ts +24 -4
- package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js +11 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.d.ts +2 -2
- package/lib/cjs/components-react/properties/LinkHandler.js +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts +2 -0
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js +1 -0
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +4 -4
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +8 -8
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react.d.ts +4 -6
- package/lib/cjs/components-react.d.ts.map +1 -1
- package/lib/cjs/components-react.js +4 -6
- package/lib/cjs/components-react.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +4 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +22 -25
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js +12 -73
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js +60 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +17 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +4 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js +15 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js +54 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js +23 -5
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.d.ts +24 -4
- package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js +11 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.d.ts +2 -2
- package/lib/esm/components-react/properties/LinkHandler.js +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts +2 -0
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js +1 -0
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +4 -4
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +8 -8
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react.d.ts +4 -6
- package/lib/esm/components-react.d.ts.map +1 -1
- package/lib/esm/components-react.js +4 -6
- package/lib/esm/components-react.js.map +1 -1
- package/package.json +5 -5
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,0DAA4E;AAE5E,uFAAoF;AACpF,+FAA4F;AAC5F,yFAAsF;AACtF,2EAAwE;AAExE,+DAAiF;AAwBjF;;;GAGG;AACH,MAAa,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,yEAAmC,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACpJ,CAAC;IAES,mBAAmB,CAC3B,M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DAAyD,mBAAmB,EAAE,CAAC,CAAC;SACnG;IACH,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAA0B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,qDAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAzFD,wDAyFC","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/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\nimport { CategoryRecordsDict, MutableGridCategory } from \"./MutableGridCategory\";\n\n/**\n * IMutableGridItemFactory interface for creating MutableGridItem objects\n * @
|
|
1
|
+
{"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../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0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACzI,KAAK,oCAAmB,CAAC,KAAK;gBAC5B,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACrI,KAAK,oCAAmB,CAAC,MAAM;gBAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACtI,0BAA0B;YAC1B;gBACE,MAAM,mBAAmB,GAAU,WAAW,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,mBAAmB,EAAE,CAAC,CAAC;SACnG;IACH,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAA0B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,qDAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAzFD,wDAyFC","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/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\nimport { CategoryRecordsDict, MutableGridCategory } from \"./MutableGridCategory\";\n\n/**\n * IMutableGridItemFactory interface for creating MutableGridItem objects\n * @public\n */\nexport interface IMutableGridItemFactory {\n createCategorizedProperty: (\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) => IMutableCategorizedPropertyItem;\n\n createGridCategory: (\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number,\n ) => IMutableGridCategoryItem;\n}\n\n/**\n * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.\n * @public\n */\nexport class MutableGridItemFactory implements IMutableGridItemFactory {\n protected createPrimitiveProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n return new MutableCategorizedPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n }\n\n protected createArrayProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n return new MutableCategorizedArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\n }\n\n protected createStructProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n return new MutableCategorizedStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\n }\n\n /**\n * Converts record into FlatGridItem.\n * @param record record to convert to a FlatGridItem.\n * @param parentSelectionKey parent selection key of provided `record`.\n * @param parentCategorySelectionKey parent category selection key of provided `record`.\n * @param depth current depth counting from parent category.\n * @param overrideName property name that overrides original record property name.\n * @param overrideDisplayLabel property display label that overrides original record property display label.\n * @returns converted CategorizedProperty.\n */\n public createCategorizedProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ): IMutableCategorizedPropertyItem {\n const valueFormat = record.value.valueFormat;\n switch (valueFormat) {\n case PropertyValueFormat.Primitive:\n return this.createPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Array:\n return this.createArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Struct:\n return this.createStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n /* istanbul ignore next */\n default:\n const unhandledRecordType: never = valueFormat;\n throw new Error(`Unhandled property record type. Was a new type added? ${unhandledRecordType}`);\n }\n }\n\n /**\n * Converts category into GridCategoryItem.\n * @param category PropertyCategory to convert.\n * @param recordsDict dictionary of category records.\n * @param parentSelectionKey parent selection key of this category.\n * @param depth current depth counting from root category.\n * @returns converted GridCategory.\n */\n public createGridCategory(\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number,\n ): IMutableGridCategoryItem {\n if (category.renderer !== undefined)\n return new MutableCustomGridCategory(category, recordsDict, this, parentSelectionKey, depth ?? 0);\n\n if (parentSelectionKey !== undefined && depth !== undefined)\n return new MutableGridCategory(category, recordsDict, this, parentSelectionKey, depth);\n\n return new MutableGridCategory(category, recordsDict, this);\n }\n}\n"]}
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts
CHANGED
|
@@ -16,14 +16,11 @@ export interface FlatPropertyRendererProps extends SharedRendererProps {
|
|
|
16
16
|
propertyValueRendererManager?: PropertyValueRendererManager;
|
|
17
17
|
/** Multiplier of how much the property is indented to the right */
|
|
18
18
|
indentation?: number;
|
|
19
|
-
/** Indicates property is being edited
|
|
20
|
-
* @beta */
|
|
19
|
+
/** Indicates property is being edited */
|
|
21
20
|
isEditing?: boolean;
|
|
22
|
-
/** Called when property edit is committed.
|
|
23
|
-
* @beta */
|
|
21
|
+
/** Called when property edit is committed. */
|
|
24
22
|
onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;
|
|
25
|
-
/** Called when property edit is cancelled.
|
|
26
|
-
* @beta */
|
|
23
|
+
/** Called when property edit is cancelled. */
|
|
27
24
|
onEditCancel?: () => void;
|
|
28
25
|
/** Whether property value is displayed in expanded state. */
|
|
29
26
|
isExpanded: boolean;
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;
|
|
1
|
+
{"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/E,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,uCAAuC;IACvC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,SAAS,CAAC,EAAE,0BAA0B,GAAG;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC;IAE1F,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsDpE,CAAC"}
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAG5E,sEAAwF;AACxF,iGAA8F;AAC9F,uGAA4H;AAI5H,yFAAsF;
|
|
1
|
+
{"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAG5E,sEAAwF;AACxF,iGAA8F;AAC9F,uGAA4H;AAI5H,yFAAsF;AA6BtF;;GAEG;AACI,MAAM,oBAAoB,GAAwC,CAAC,KAAK,EAAE,EAAE;IACjF,MAAM,EACJ,QAAQ,EACR,4BAA4B,EAC5B,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,SAAS,EACT,GAAG,gBAAgB,EACpB,GAAG,KAAK,CAAC;IAEV,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CACjC,oBAAC,YAAY,IACX,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAC/C,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,WAAW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ACvB;QAED,wBAAwB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC/C,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/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\n\n/** Properties of [[FlatPropertyRenderer]] React component\n * @internal\n */\nexport interface FlatPropertyRendererProps extends SharedRendererProps {\n category?: PropertyCategory;\n /** Custom value renderer */\n propertyValueRendererManager?: PropertyValueRendererManager;\n /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Indicates property is being edited */\n isEditing?: boolean;\n /** Called when property edit is committed. */\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n /** Called when property edit is cancelled. */\n onEditCancel?: () => void;\n /** Whether property value is displayed in expanded state. */\n isExpanded: boolean;\n /** Called when toggling between expanded and collapsed property value display state. */\n onExpansionToggled: () => void;\n /** Reports property height changes. */\n onHeightChanged?: (newHeight: number) => void;\n\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\n\n children?: never;\n}\n\n/** A React component that renders flat properties\n * @internal\n */\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (props) => {\n const {\n category,\n propertyValueRendererManager,\n isEditing,\n onEditCommit,\n onEditCancel,\n onHeightChanged,\n highlight,\n ...passthroughProps\n } = props;\n\n const valueElementRenderer = () => (\n <DisplayValue\n propertyRecord={passthroughProps.propertyRecord}\n orientation={passthroughProps.orientation}\n columnRatio={passthroughProps.columnRatio}\n width={passthroughProps.width}\n category={category}\n propertyValueRendererManager={propertyValueRendererManager}\n isEditing={isEditing}\n onEditCommit={onEditCommit}\n onEditCancel={onEditCancel}\n isExpanded={passthroughProps.isExpanded}\n onExpansionToggled={passthroughProps.onExpansionToggled}\n onHeightChanged={onHeightChanged}\n highlight={highlight}\n />\n );\n\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...passthroughProps,\n valueElementRenderer,\n indentation: props.indentation,\n };\n switch (props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n case PropertyValueFormat.Array:\n // If array is empty, render it as a primitive property\n if (props.propertyRecord.value.items.length === 0)\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n return (\n <FlatNonPrimitivePropertyRenderer\n isExpanded={props.isExpanded}\n onExpandToggled={props.onExpansionToggled}\n {...primitiveRendererProps}\n />\n );\n }\n};\n\ninterface DisplayValueProps {\n isEditing?: boolean;\n propertyRecord: PropertyRecord;\n\n orientation: Orientation;\n columnRatio?: number;\n /** Pass width to rerender component as property grid width changes */\n width?: number;\n indentation?: number;\n propertyValueRendererManager?: PropertyValueRendererManager;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n\n category?: PropertyCategory;\n onEditCancel?: () => void;\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\n}\n\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\n useResetHeightOnEdit(props.isEditing, props.onHeightChanged);\n\n if (props.isEditing) {\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\n /* istanbul ignore else */\n if (props.category)\n props.onEditCommit?.(args, props.category);\n };\n\n return (\n <EditorContainer\n propertyRecord={props.propertyRecord}\n onCommit={_onEditCommit}\n onCancel={props.onEditCancel ?? (/* istanbul ignore next */() => { })}\n setFocus={true}\n />\n );\n }\n\n return (\n <>\n {\n CommonPropertyRenderer.createNewDisplayValue(\n props.orientation,\n props.propertyRecord,\n props.indentation,\n props.propertyValueRendererManager,\n props.isExpanded,\n props.onExpansionToggled,\n props.onHeightChanged,\n props.highlight\n )\n }\n </>\n );\n};\n\nfunction useResetHeightOnEdit(isEditing?: boolean, onHeightChanged?: (newHeight: number) => void) {\n const previousEditingStatusRef = React.useRef(isEditing);\n React.useEffect(() => {\n if (!previousEditingStatusRef.current && isEditing) {\n onHeightChanged?.(27);\n }\n\n previousEditingStatusRef.current = isEditing;\n });\n}\n"]}
|
|
@@ -43,10 +43,7 @@ export interface ControlledTreeProps extends CommonProps {
|
|
|
43
43
|
spinnerRenderer?: () => React.ReactElement;
|
|
44
44
|
/** Custom renderer to be used when there is no data to show in tree. */
|
|
45
45
|
noDataRenderer?: () => React.ReactElement;
|
|
46
|
-
/**
|
|
47
|
-
* Callback that is invoked when rendered items range changes.
|
|
48
|
-
* @beta
|
|
49
|
-
*/
|
|
46
|
+
/** Callback that is invoked when rendered items range changes. */
|
|
50
47
|
onItemsRendered?: (items: RenderedItemsRange) => void;
|
|
51
48
|
/** Width of the tree renderer. */
|
|
52
49
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ControlledTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/ControlledTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAwC,SAAS,EAA6D,MAAM,cAAc,CAAC;AAC1I,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAgB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,iEAAiE;IACjE,UAAU,EAAE,eAAe,CAAC;IAC5B,2BAA2B;IAC3B,aAAa,EAAE,UAAU,CAAC;IAC1B,wCAAwC;IACxC,aAAa,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;IAC/C,mDAAmD;IACnD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC;IAChE,8DAA8D;IAC9D,eAAe,CAAC,EAAE,MAAM,KAAK,CAAC,YAAY,CAAC;IAC3C,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,KAAK,CAAC,YAAY,CAAC;IAC1C
|
|
1
|
+
{"version":3,"file":"ControlledTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/ControlledTree.tsx"],"names":[],"mappings":"AAIA;;GAEG;A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;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAiCxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ControlledTree.js","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/ControlledTree.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,kDAA8D;AAC9D,mEAAgE;AAEhE,wDAAqD;AAErD,mDAAoD;AACpD,8CAAiD;AACjD,gEAA6D;AAE7D,4CAA0I;AAE1I,yDAA6E;AAC7E,iDAAqF;AA+CrF;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,6BAAe,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAgC,EAAE,EAAE,CAAC,CAC3E,oBAAC,mCAAgB,OACX,SAAS,EACb,kBAAkB,EAAE,KAAK,CAAC,mBAAmB,EAC7C,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GACzD,CACH,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAA,+BAAmB,EAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,MAAM,eAAe,GAAG,kBAAkB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAA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AED,SAAS,aAAa,CACpB,mBAA4B;IAE5B,OAAO,KAAK,CAAC,WAAW,CACtB,CAAC,IAA8C,EAAU,EAAE;QACzD,MAAM,aAAa,GAAG,CAAC,IAAA,2BAAe,EAAC,IAAI,CAAC,IAAI,mBAAmB,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3G,MAAM,UAAU,GAAG,CAAC,CAAC;QACrB,uFAAuF;QACvF,OAAO,aAAa,GAAG,UAAU,CAAC;IACpC,CAAC,EACD,CAAC,mBAAmB,CAAC,CACtB,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/** @packageDocumentation\n * @module Tree\n */\n\nimport * as React from \"react\";\nimport { CommonProps, FillCentered } from \"@itwin/core-react\";\nimport { DelayedSpinner } from \"../../../common/DelayedSpinner\";\nimport { SelectionMode } from \"../../../common/selection/SelectionModes\";\nimport { UiComponents } from \"../../../UiComponents\";\nimport { HighlightableTreeProps } from \"../../HighlightingEngine\";\nimport { TreeImageLoader } from \"../../ImageLoader\";\nimport { toRxjsObservable } from \"../Observable\";\nimport { TreeEventDispatcher } from \"../TreeEventDispatcher\";\nimport { TreeEvents } from \"../TreeEvents\";\nimport { computeVisibleNodes, isTreeModelNode, TreeModel, TreeModelNode, TreeModelNodePlaceholder, VisibleTreeNodes } from \"../TreeModel\";\nimport { ITreeNodeLoader } from \"../TreeNodeLoader\";\nimport { TreeNodeRenderer, TreeNodeRendererProps } from \"./TreeNodeRenderer\";\nimport { RenderedItemsRange, TreeRenderer, TreeRendererProps } from \"./TreeRenderer\";\n\n/**\n * Properties for [[ControlledTree]]\n * @public\n */\nexport interface ControlledTreeProps extends CommonProps {\n /** Model of the tree to display. */\n model: TreeModel;\n /** Node loader used to load root nodes and placeholder nodes. */\n nodeLoader: ITreeNodeLoader;\n /** Tree events handler. */\n eventsHandler: TreeEvents;\n /** Mode of nodes' selection in tree. */\n selectionMode: SelectionMode;\n /**\n * Specifies whether to show node description or not. It is used in default node renderer and to determine node height.\n * If custom node renderer and node height callbacks are used it does nothing.\n */\n descriptionsEnabled?: boolean;\n /**\n * Specifies whether to show node icon or not. It is used in default node renderer.\n * If custom node renderer is used it does nothing.\n */\n iconsEnabled?: boolean;\n /**\n * Used to highlight matches when filtering tree.\n * It is passed to treeRenderer.\n */\n nodeHighlightingProps?: HighlightableTreeProps;\n /** Custom renderer to be used to render a tree. */\n treeRenderer?: (props: TreeRendererProps) => React.ReactElement;\n /** Custom renderer to be used while root nodes is loading. */\n spinnerRenderer?: () => React.ReactElement;\n /** Custom renderer to be used when there is no data to show in tree. */\n noDataRenderer?: () => React.ReactElement;\n /**\n * Callback that is invoked when rendered items range changes.\n * @beta\n */\n onItemsRendered?: (items: RenderedItemsRange) => void;\n /** Width of the tree renderer. */\n width: number;\n /** Height of the tree renderer. */\n height: number;\n}\n\n/**\n * React tree component which rendering is fully controlled from outside.\n * @public\n */\nexport function ControlledTree(props: ControlledTreeProps) {\n const nodeHeight = useNodeHeight(!!props.descriptionsEnabled);\n const imageLoader = React.useMemo(() => new TreeImageLoader(), []);\n const nodeRenderer = React.useCallback((nodeProps: TreeNodeRendererProps) => (\n <TreeNodeRenderer\n {...nodeProps}\n descriptionEnabled={props.descriptionsEnabled}\n imageLoader={props.iconsEnabled ? imageLoader : undefined}\n />\n ), [props.descriptionsEnabled, props.iconsEnabled, imageLoader]);\n\n const visibleNodes = React.useMemo(() => computeVisibleNodes(props.model), [props.model]);\n const eventDispatcher = useEventDispatcher(props.nodeLoader, props.eventsHandler, props.selectionMode, visibleNodes);\n\n const treeProps: TreeRendererProps = {\n nodeRenderer,\n nodeHeight,\n visibleNodes,\n treeActions: eventDispatcher,\n nodeLoader: props.nodeLoader,\n nodeHighlightingProps: props.nodeHighlightingProps,\n onItemsRendered: props.onItemsRendered,\n width: props.width,\n height: props.height,\n };\n\n const loading = useRootNodeLoader(visibleNodes, props.nodeLoader);\n const noData = visibleNodes.getNumRootNodes() === 0;\n return (\n <Loader loading={loading} noData={noData} spinnerRenderer={props.spinnerRenderer} noDataRenderer={props.noDataRenderer}>\n {props.treeRenderer ? props.treeRenderer(treeProps) : <TreeRenderer {...treeProps} />}\n </Loader>\n );\n}\n\nfunction useRootNodeLoader(visibleNodes: VisibleTreeNodes, nodeLoader: ITreeNodeLoader): boolean {\n React.useEffect(() => {\n if (visibleNodes.getNumRootNodes() === undefined) {\n const subscription = toRxjsObservable(nodeLoader.loadNode(visibleNodes.getModel().getRootNode(), 0)).subscribe();\n return () => subscription.unsubscribe();\n }\n\n return () => { };\n }, [visibleNodes, nodeLoader]);\n\n return visibleNodes.getNumRootNodes() === undefined;\n}\n\nfunction useEventDispatcher(nodeLoader: ITreeNodeLoader, treeEvents: TreeEvents, selectionMode: SelectionMode, visibleNodes: VisibleTreeNodes) {\n /* istanbul ignore next */\n const getVisibleNodes = React.useCallback(() => visibleNodes, [visibleNodes]);\n const eventDispatcher = React.useMemo(() => new TreeEventDispatcher(treeEvents, nodeLoader, selectionMode), [treeEvents, nodeLoader, selectionMode]);\n\n React.useEffect(() => {\n eventDispatcher.setVisibleNodes(getVisibleNodes);\n }, [eventDispatcher, getVisibleNodes]);\n\n return eventDispatcher;\n}\n\ninterface LoaderProps {\n loading: boolean;\n noData: boolean;\n spinnerRenderer?: () => React.ReactElement;\n noDataRenderer?: () => React.ReactElement;\n children: JSX.Element;\n}\n\nfunction Loader(props: LoaderProps) {\n if (props.loading) {\n return props.spinnerRenderer\n ? props.spinnerRenderer()\n : (\n <div className=\"components-controlledTree-loader\">\n <DelayedSpinner size=\"large\" />\n </div>\n );\n }\n if (props.noData) {\n return props.noDataRenderer\n ? props.noDataRenderer()\n : (\n <FillCentered>\n <p className=\"components-controlledTree-errorMessage\">\n {UiComponents.translate(\"general.noData\")}\n </p>\n </FillCentered>\n );\n }\n\n return props.children;\n}\n\nfunction useNodeHeight(\n descriptionsEnabled: boolean,\n): (node: TreeModelNode | TreeModelNodePlaceholder) => number {\n return React.useCallback(\n (node: TreeModelNode | TreeModelNodePlaceholder): number => {\n const contentHeight = (isTreeModelNode(node) && descriptionsEnabled && node && node.description) ? 43 : 24;\n const borderSize = 1;\n // Not counting node's border size twice because we want neighboring borders to overlap\n return contentHeight + borderSize;\n },\n [descriptionsEnabled],\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ControlledTree.js","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/ControlledTree.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,kDAA8D;AAC9D,mEAAgE;AAEhE,wDAAqD;AAErD,mDAAoD;AACpD,8CAAiD;AACjD,gEAA6D;AAE7D,4CAA0I;AAE1I,yDAA6E;AAC7E,iDAAqF;AA4CrF;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,6BAAe,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAgC,EAAE,EAAE,CAAC,CAC3E,oBAAC,mCAAgB,OACX,SAAS,EACb,kBAAkB,EAAE,KAAK,CAAC,mBAAmB,EAC7C,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GACzD,CACH,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG,KA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CAAC,CAAC,KAAK,CAAC,cAAc,EAAE;YACxB,CAAC,CAAC,CACA,oBAAC,yBAAY;gBACX,2BAAG,SAAS,EAAC,wCAAwC,IAClD,2BAAY,CAAC,SAAS,CAAC,gBAAgB,CAAC,CACvC,CACS,CAChB,CAAC;KACL;IAED,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC;AAED,SAAS,aAAa,CACpB,mBAA4B;IAE5B,OAAO,KAAK,CAAC,WAAW,CACtB,CAAC,IAA8C,EAAU,EAAE;QACzD,MAAM,aAAa,GAAG,CAAC,IAAA,2BAAe,EAAC,IAAI,CAAC,IAAI,mBAAmB,IAAI,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3G,MAAM,UAAU,GAAG,CAAC,CAAC;QACrB,uFAAuF;QACvF,OAAO,aAAa,GAAG,UAAU,CAAC;IACpC,CAAC,EACD,CAAC,mBAAmB,CAAC,CACtB,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/** @packageDocumentation\n * @module Tree\n */\n\nimport * as React from \"react\";\nimport { CommonProps, FillCentered } from \"@itwin/core-react\";\nimport { DelayedSpinner } from \"../../../common/DelayedSpinner\";\nimport { SelectionMode } from \"../../../common/selection/SelectionModes\";\nimport { UiComponents } from \"../../../UiComponents\";\nimport { HighlightableTreeProps } from \"../../HighlightingEngine\";\nimport { TreeImageLoader } from \"../../ImageLoader\";\nimport { toRxjsObservable } from \"../Observable\";\nimport { TreeEventDispatcher } from \"../TreeEventDispatcher\";\nimport { TreeEvents } from \"../TreeEvents\";\nimport { computeVisibleNodes, isTreeModelNode, TreeModel, TreeModelNode, TreeModelNodePlaceholder, VisibleTreeNodes } from \"../TreeModel\";\nimport { ITreeNodeLoader } from \"../TreeNodeLoader\";\nimport { TreeNodeRenderer, TreeNodeRendererProps } from \"./TreeNodeRenderer\";\nimport { RenderedItemsRange, TreeRenderer, TreeRendererProps } from \"./TreeRenderer\";\n\n/**\n * Properties for [[ControlledTree]]\n * @public\n */\nexport interface ControlledTreeProps extends CommonProps {\n /** Model of the tree to display. */\n model: TreeModel;\n /** Node loader used to load root nodes and placeholder nodes. */\n nodeLoader: ITreeNodeLoader;\n /** Tree events handler. */\n eventsHandler: TreeEvents;\n /** Mode of nodes' selection in tree. */\n selectionMode: SelectionMode;\n /**\n * Specifies whether to show node description or not. It is used in default node renderer and to determine node height.\n * If custom node renderer and node height callbacks are used it does nothing.\n */\n descriptionsEnabled?: boolean;\n /**\n * Specifies whether to show node icon or not. It is used in default node renderer.\n * If custom node renderer is used it does nothing.\n */\n iconsEnabled?: boolean;\n /**\n * Used to highlight matches when filtering tree.\n * It is passed to treeRenderer.\n */\n nodeHighlightingProps?: HighlightableTreeProps;\n /** Custom renderer to be used to render a tree. */\n treeRenderer?: (props: TreeRendererProps) => React.ReactElement;\n /** Custom renderer to be used while root nodes is loading. */\n spinnerRenderer?: () => React.ReactElement;\n /** Custom renderer to be used when there is no data to show in tree. */\n noDataRenderer?: () => React.ReactElement;\n /** Callback that is invoked when rendered items range changes. */\n onItemsRendered?: (items: RenderedItemsRange) => void;\n /** Width of the tree renderer. */\n width: number;\n /** Height of the tree renderer. */\n height: number;\n}\n\n/**\n * React tree component which rendering is fully controlled from outside.\n * @public\n */\nexport function ControlledTree(props: ControlledTreeProps) {\n const nodeHeight = useNodeHeight(!!props.descriptionsEnabled);\n const imageLoader = React.useMemo(() => new TreeImageLoader(), []);\n const nodeRenderer = React.useCallback((nodeProps: TreeNodeRendererProps) => (\n <TreeNodeRenderer\n {...nodeProps}\n descriptionEnabled={props.descriptionsEnabled}\n imageLoader={props.iconsEnabled ? imageLoader : undefined}\n />\n ), [props.descriptionsEnabled, props.iconsEnabled, imageLoader]);\n\n const visibleNodes = React.useMemo(() => computeVisibleNodes(props.model), [props.model]);\n const eventDispatcher = useEventDispatcher(props.nodeLoader, props.eventsHandler, props.selectionMode, visibleNodes);\n\n const treeProps: TreeRendererProps = {\n nodeRenderer,\n nodeHeight,\n visibleNodes,\n treeActions: eventDispatcher,\n nodeLoader: props.nodeLoader,\n nodeHighlightingProps: props.nodeHighlightingProps,\n onItemsRendered: props.onItemsRendered,\n width: props.width,\n height: props.height,\n };\n\n const loading = useRootNodeLoader(visibleNodes, props.nodeLoader);\n const noData = visibleNodes.getNumRootNodes() === 0;\n return (\n <Loader loading={loading} noData={noData} spinnerRenderer={props.spinnerRenderer} noDataRenderer={props.noDataRenderer}>\n {props.treeRenderer ? props.treeRenderer(treeProps) : <TreeRenderer {...treeProps} />}\n </Loader>\n );\n}\n\nfunction useRootNodeLoader(visibleNodes: VisibleTreeNodes, nodeLoader: ITreeNodeLoader): boolean {\n React.useEffect(() => {\n if (visibleNodes.getNumRootNodes() === undefined) {\n const subscription = toRxjsObservable(nodeLoader.loadNode(visibleNodes.getModel().getRootNode(), 0)).subscribe();\n return () => subscription.unsubscribe();\n }\n\n return () => { };\n }, [visibleNodes, nodeLoader]);\n\n return visibleNodes.getNumRootNodes() === undefined;\n}\n\nfunction useEventDispatcher(nodeLoader: ITreeNodeLoader, treeEvents: TreeEvents, selectionMode: SelectionMode, visibleNodes: VisibleTreeNodes) {\n /* istanbul ignore next */\n const getVisibleNodes = React.useCallback(() => visibleNodes, [visibleNodes]);\n const eventDispatcher = React.useMemo(() => new TreeEventDispatcher(treeEvents, nodeLoader, selectionMode), [treeEvents, nodeLoader, selectionMode]);\n\n React.useEffect(() => {\n eventDispatcher.setVisibleNodes(getVisibleNodes);\n }, [eventDispatcher, getVisibleNodes]);\n\n return eventDispatcher;\n}\n\ninterface LoaderProps {\n loading: boolean;\n noData: boolean;\n spinnerRenderer?: () => React.ReactElement;\n noDataRenderer?: () => React.ReactElement;\n children: JSX.Element;\n}\n\nfunction Loader(props: LoaderProps) {\n if (props.loading) {\n return props.spinnerRenderer\n ? props.spinnerRenderer()\n : (\n <div className=\"components-controlledTree-loader\">\n <DelayedSpinner size=\"large\" />\n </div>\n );\n }\n if (props.noData) {\n return props.noDataRenderer\n ? props.noDataRenderer()\n : (\n <FillCentered>\n <p className=\"components-controlledTree-errorMessage\">\n {UiComponents.translate(\"general.noData\")}\n </p>\n </FillCentered>\n );\n }\n\n return props.children;\n}\n\nfunction useNodeHeight(\n descriptionsEnabled: boolean,\n): (node: TreeModelNode | TreeModelNodePlaceholder) => number {\n return React.useCallback(\n (node: TreeModelNode | TreeModelNodePlaceholder): number => {\n const contentHeight = (isTreeModelNode(node) && descriptionsEnabled && node && node.description) ? 43 : 24;\n const borderSize = 1;\n // Not counting node's border size twice because we want neighboring borders to overlap\n return contentHeight + borderSize;\n },\n [descriptionsEnabled],\n );\n}\n"]}
|
|
@@ -10,7 +10,7 @@ import { ITreeNodeLoader } from "../TreeNodeLoader";
|
|
|
10
10
|
import { TreeNodeRendererProps } from "./TreeNodeRenderer";
|
|
11
11
|
/**
|
|
12
12
|
* Data structure that describes range of rendered items in the tree.
|
|
13
|
-
* @
|
|
13
|
+
* @public
|
|
14
14
|
*/
|
|
15
15
|
export interface RenderedItemsRange {
|
|
16
16
|
overscanStartIndex: number;
|
|
@@ -33,10 +33,7 @@ export interface TreeRendererProps {
|
|
|
33
33
|
nodeRenderer?: (props: TreeNodeRendererProps) => React.ReactNode;
|
|
34
34
|
/** Properties used to highlight nodes and scroll to active match while filtering. */
|
|
35
35
|
nodeHighlightingProps?: HighlightableTreeProps;
|
|
36
|
-
/**
|
|
37
|
-
* Callback that is called when rendered items range changes.
|
|
38
|
-
* @beta
|
|
39
|
-
*/
|
|
36
|
+
/** Callback that is called when rendered items range changes. */
|
|
40
37
|
onItemsRendered?: (renderedItems: RenderedItemsRange) => void;
|
|
41
38
|
/**
|
|
42
39
|
* Callback used when an editor closes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/TreeRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,sBAAsB,EAAsB,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAC6D,aAAa,EAAE,wBAAwB,EAAE,gBAAgB,EAC5H,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAoB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAI7E;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,eAAe,CAAC;IAE5B,sDAAsD;IACtD,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,wBAAwB,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAEtF,yCAAyC;IACzC,YAAY,EAAE,gBAAgB,CAAC;IAE/B,uCAAuC;IACvC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEjE,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,sBAAsB,CAAC;IAE/C
|
|
1
|
+
{"version":3,"file":"TreeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/TreeRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK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MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3D;AAED,aAAK,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAsC/D;;;GAGG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAE,YAAW,sBAAsB;IACpG,OAAO,CAAC,IAAI,CAA6C;IAEzD,kBAAkB;IACX,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAMzC,MAAM;CAKvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/TreeRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAC/B,4DAAoC;AACpC,6CAA+B;AAC/B,+CAA6G;AAC7G,4DAAyD;AACzD,0DAAuD;AACvD,sDAA6C;AAC7C,kDAA0E;AAC1E,qGAAqG;AACrG,iEAAsF;AAEtF,4CAEsB;AAEtB,yDAA6E;AAE7E,MAAM,eAAe,GAAG,GAAG,CAAC;AA4F5B,mEAAmE;AACnE,MAAM;AACJ,4CAA4C;AAC5C,2BAA2B;AAE3B,4CAA4C;AAC5C,4BAA4B;AAE5B,mDAAmD;AACnD,sBAAsB,EACvB,GAAG,IAAA,oEAAkC,EAAsB,qBAAqB,CAAC,CAAC;AAEnF;;;GAGG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,SAA4B;IAApE;;QACU,SAAI,GAAG,KAAK,CAAC,SAAS,EAA0B,CAAC;IAc3D,CAAC;IAZC,kBAAkB;IACX,YAAY,CAAC,MAAc,EAAE,SAAqB;QACvD,uBAAuB;QACvB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;YACnB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC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CAAC,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC,EAAE,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC,CAAC;IAExC,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAkC;IAC5D,0BAA0B;IAC1B,IAAI,OAAO,CAAC,OAAO;QACjB,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;AACvE,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/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./ControlledTree.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { areEqual, ListChildComponentProps, ListOnItemsRenderedProps, VariableSizeList } from \"react-window\";\nimport { concat } from \"rxjs/internal/observable/concat\";\nimport { timer } from \"rxjs/internal/observable/timer\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { Tree as CoreTree, TreeNodePlaceholder } from \"@itwin/core-react\";\nimport { createContextWithMandatoryProvider } from \"../../../common/UseContextWithMandatoryProvider\";\nimport { HighlightableTreeProps, HighlightingEngine } from \"../../HighlightingEngine\";\nimport { TreeActions } from \"../TreeActions\";\nimport {\n isTreeModelNode, isTreeModelNodePlaceholder, isTreeModelRootNode, TreeModelNode, TreeModelNodePlaceholder, VisibleTreeNodes,\n} from \"../TreeModel\";\nimport { ITreeNodeLoader } from \"../TreeNodeLoader\";\nimport { TreeNodeRenderer, TreeNodeRendererProps } from \"./TreeNodeRenderer\";\n\nconst NODE_LOAD_DELAY = 500;\n\n/**\n * Data structure that describes range of rendered items in the tree.\n * @beta\n */\nexport interface RenderedItemsRange {\n overscanStartIndex: number;\n overscanStopIndex: number;\n visibleStartIndex: number;\n visibleStopIndex: number;\n}\n\n/**\n * Properties for [[TreeRenderer]] component.\n * @public\n */\nexport interface TreeRendererProps {\n treeActions: TreeActions;\n nodeLoader: ITreeNodeLoader;\n\n /** Callback that is used to determine node height. */\n nodeHeight: (node: TreeModelNode | TreeModelNodePlaceholder, index: number) => number;\n\n /** Flat list of nodes to be rendered. */\n visibleNodes: VisibleTreeNodes;\n\n /** Callback to render custom node. */\n nodeRenderer?: (props: TreeNodeRendererProps) => React.ReactNode;\n\n /** Properties used to highlight nodes and scroll to active match while filtering. */\n nodeHighlightingProps?: HighlightableTreeProps;\n\n /**\n * Callback that is called when rendered items range changes.\n * @beta\n */\n onItemsRendered?: (renderedItems: RenderedItemsRange) => void;\n\n /**\n * Callback used when an editor closes\n * @internal\n */\n onNodeEditorClosed?: () => void;\n\n /** Width of the tree area. */\n width: number;\n\n /** Height of the tree area. */\n height: number;\n}\n\n/**\n * Attributes found on TreeRenderer component\n * @public\n */\nexport interface TreeRendererAttributes {\n /**\n * Scroll to the specified node.\n * @param nodeId Id of the target node to scroll to.\n * @param alignment Controls scrolling behavior. See [react-window](https://github.com/bvaughn/react-window) documentation\n * on `scrollToItem` for details.\n */\n scrollToNode(nodeId: string, alignment?: Alignment): void;\n}\n\ntype Alignment = \"auto\" | \"smart\" | \"center\" | \"end\" | \"start\";\n\n/** [[TreeRenderer]] context that is provided to each rendered node. */\ninterface TreeRendererContext {\n /** Callback to render custom node. */\n nodeRenderer: (props: TreeNodeRendererProps) => React.ReactNode;\n\n treeActions: TreeActions;\n nodeLoader: ITreeNodeLoader;\n\n /** Flat list of nodes to be rendered. */\n visibleNodes: VisibleTreeNodes;\n\n /** Engine used to created node highlighting properties. */\n highlightingEngine?: HighlightingEngine;\n\n /** Callback used detect when label is rendered. It is used by TreeRenderer for scrolling to active match. */\n onLabelRendered?: (node: TreeModelNode) => void;\n\n /** A callback that node calls after rendering to report its width */\n onNodeWidthMeasured?: (width: number) => void;\n\n /** Callback used when an editor closes */\n onNodeEditorClosed?: () => void;\n}\n\n/** [[TreeRenderer]] context provider, consumer and custom hook. */\nconst [\n /** Context of [[TreeRenderer]] provider. */\n TreeRendererContextProvider,\n\n /** Context of [[TreeRenderer]] consumer. */\n _TreeRendererContextConsumer,\n\n /** Custom hook to use [[TreeRenderer]] context. */\n useTreeRendererContext,\n] = createContextWithMandatoryProvider<TreeRendererContext>(\"TreeRendererContext\");\n\n/**\n * Default tree rendering component.\n * @public\n */\nexport class TreeRenderer extends React.Component<TreeRendererProps> implements TreeRendererAttributes {\n private _ref = React.createRef<TreeRendererAttributes>();\n\n /** @inheritdoc */\n public scrollToNode(nodeId: string, alignment?: Alignment) {\n // istanbul ignore else\n if (this._ref.current)\n this._ref.current.scrollToNode(nodeId, alignment);\n }\n\n public override render() {\n return (\n <TreeRendererInner ref={this._ref} {...this.props} />\n );\n }\n}\n\n// eslint-disable-next-line react/display-name\nconst TreeRendererInner = React.forwardRef<TreeRendererAttributes, TreeRendererProps>((props, ref) => {\n const variableSizeListRef = React.useRef<VariableSizeList>(null);\n useTreeRendererAttributes(ref, variableSizeListRef, props.visibleNodes);\n\n const previousVisibleNodes = usePrevious(props.visibleNodes);\n const previousNodeHeight = usePrevious(props.nodeHeight);\n if ((previousVisibleNodes !== undefined && previousVisibleNodes !== props.visibleNodes)\n || (previousNodeHeight !== undefined && previousNodeHeight !== props.nodeHeight)) {\n /* istanbul ignore else */\n if (variableSizeListRef.current) {\n variableSizeListRef.current.resetAfterIndex(0, false);\n }\n }\n\n const coreTreeRef = React.useRef<CoreTree>(null);\n const minContainerWidth = React.useRef<number>(0);\n const onLabelRendered = useScrollToActiveMatch(coreTreeRef, props.nodeHighlightingProps);\n const highlightingEngine = React.useMemo(\n () => props.nodeHighlightingProps && new HighlightingEngine(props.nodeHighlightingProps),\n [props.nodeHighlightingProps],\n );\n\n const rendererContext = React.useMemo<TreeRendererContext>(() => ({\n nodeRenderer: props.nodeRenderer ? props.nodeRenderer : (nodeProps) => (<TreeNodeRenderer {...nodeProps} />),\n treeActions: props.treeActions,\n nodeLoader: props.nodeLoader,\n visibleNodes: props.visibleNodes,\n onLabelRendered,\n highlightingEngine,\n onNodeWidthMeasured: (width: number) => {\n if (width > minContainerWidth.current)\n minContainerWidth.current = width;\n },\n onNodeEditorClosed: () => {\n setFocusToSelected(coreTreeRef);\n props.onNodeEditorClosed && props.onNodeEditorClosed();\n },\n }), [props, onLabelRendered, highlightingEngine]);\n\n const prevTreeWidth = React.useRef<number>(0);\n if (props.width !== prevTreeWidth.current) {\n minContainerWidth.current = 0;\n prevTreeWidth.current = props.width;\n }\n\n const itemKey = React.useCallback(\n (index: number) => getNodeKey(props.visibleNodes.getAtIndex(index)!),\n [props.visibleNodes],\n );\n\n const { nodeHeight, visibleNodes } = props;\n const itemSize = React.useCallback(\n (index: number) => nodeHeight(visibleNodes.getAtIndex(index)!, index),\n [nodeHeight, visibleNodes],\n );\n\n const { nodeHighlightingProps } = props;\n React.useEffect(() => {\n const highlightedNodeId = getHighlightedNodeId(nodeHighlightingProps);\n if (!highlightedNodeId)\n return;\n\n let index = 0;\n for (const node of visibleNodes) {\n if (isTreeModelNode(node) && node.id === highlightedNodeId)\n break;\n\n index++;\n }\n\n assert(variableSizeListRef.current !== null);\n variableSizeListRef.current.scrollToItem(index);\n }, [nodeHighlightingProps]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const innerElementType = React.useCallback(\n // eslint-disable-next-line react/display-name\n React.forwardRef(({ style, ...rest }: ListChildComponentProps, innerRef: React.Ref<HTMLDivElement>) => (\n <div\n ref={innerRef}\n style={{ ...style, minWidth: minContainerWidth.current }}\n {...rest}\n />\n )),\n [],\n );\n\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\n props.treeActions.onTreeKeyDown(e);\n }, [props.treeActions]);\n\n const handleKeyUp = React.useCallback((e: React.KeyboardEvent) => {\n props.treeActions.onTreeKeyUp(e);\n }, [props.treeActions]);\n\n const onItemsRendered = props.onItemsRendered;\n const handleRenderedItemsChange = React.useCallback((onItemsRenderedProps: ListOnItemsRenderedProps) => {\n onItemsRendered && onItemsRendered({ ...onItemsRenderedProps });\n }, [onItemsRendered]);\n\n return (\n <TreeRendererContextProvider value={rendererContext}>\n <CoreTree ref={coreTreeRef}\n className={classnames(\"components-controlledTree\", \"components-smallEditor-host\")}\n onKeyDown={handleKeyDown} onKeyUp={handleKeyUp}\n >\n <VariableSizeList\n ref={variableSizeListRef}\n className={\"ReactWindow__VariableSizeList\"}\n width={props.width}\n height={props.height}\n itemCount={props.visibleNodes.getNumNodes()}\n itemSize={itemSize}\n estimatedItemSize={25}\n overscanCount={10}\n itemKey={itemKey}\n innerElementType={innerElementType}\n onItemsRendered={handleRenderedItemsChange}\n >\n {Node}\n </VariableSizeList>\n </CoreTree>\n </TreeRendererContextProvider>\n );\n});\n\nfunction getNodeKey(node: TreeModelNode | TreeModelNodePlaceholder): string {\n if (isTreeModelNode(node)) {\n return node.id;\n }\n return `${node.parentId || \"\"}-${node.childIndex}`;\n}\n\nconst Node = React.memo<React.FC<ListChildComponentProps>>( // eslint-disable-line @typescript-eslint/naming-convention\n (props: ListChildComponentProps) => {\n const { index, style } = props;\n\n const {\n nodeRenderer,\n visibleNodes,\n treeActions,\n nodeLoader,\n onLabelRendered,\n highlightingEngine,\n onNodeWidthMeasured,\n onNodeEditorClosed,\n } = useTreeRendererContext(Node);\n const node = visibleNodes.getAtIndex(index)!;\n\n useNodeLoading(node, visibleNodes, nodeLoader);\n\n // Mark selected node's wrapper to make detecting consecutively selected nodes with css selectors possible\n const className = classnames(\"node-wrapper\", { \"is-selected\": isTreeModelNode(node) && node.isSelected });\n\n const ref = React.useRef<HTMLDivElement>(null);\n React.useEffect(() => {\n // istanbul ignore else\n if (onNodeWidthMeasured && ref.current)\n onNodeWidthMeasured(ref.current.offsetWidth);\n }, [onNodeWidthMeasured]);\n\n const isEditing = React.useRef(false);\n React.useEffect(() => {\n if (!isTreeModelNode(node))\n return;\n\n if (!isEditing.current && node.editingInfo) {\n isEditing.current = true;\n } else if (isEditing.current && node.editingInfo === undefined) {\n isEditing.current = false;\n /* istanbul ignore else */\n if (onNodeEditorClosed)\n onNodeEditorClosed();\n }\n }, [node, onNodeEditorClosed]);\n\n return (\n <div className={className} style={style} ref={ref}>\n {React.useMemo(() => {\n if (isTreeModelNode(node)) {\n const nodeHighlightProps = highlightingEngine ? highlightingEngine.createRenderProps(node) : undefined;\n return nodeRenderer({ node, treeActions, onLabelRendered, nodeHighlightProps });\n }\n\n return <TreeNodePlaceholder level={node.depth} />;\n }, [node, treeActions, nodeRenderer, onLabelRendered, highlightingEngine])}\n </div>\n );\n },\n areEqual,\n);\n\nfunction useNodeLoading(\n node: TreeModelNode | TreeModelNodePlaceholder,\n visibleNodes: VisibleTreeNodes,\n nodeLoader: ITreeNodeLoader,\n): void {\n React.useEffect(\n () => {\n if (!isTreeModelNodePlaceholder(node)) {\n return;\n }\n\n const treeModel = visibleNodes.getModel();\n const parentNode = node.parentId ? treeModel.getNode(node.parentId) : treeModel.getRootNode();\n if (!isTreeModelNode(parentNode) && !isTreeModelRootNode(parentNode)) {\n return;\n }\n\n const subscription = concat(timer(NODE_LOAD_DELAY), nodeLoader.loadNode(parentNode, node.childIndex)).subscribe();\n return () => subscription.unsubscribe();\n },\n // Mounted node component never changes its node key, thus it's safe to run this effect only once for every\n // nodeLoader change.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [nodeLoader],\n );\n}\n\nfunction useTreeRendererAttributes(\n ref: React.Ref<TreeRendererAttributes>,\n variableSizeListRef: React.RefObject<VariableSizeList>,\n visibleNodes: VisibleTreeNodes,\n) {\n const visibleNodesRef = React.useRef(visibleNodes);\n visibleNodesRef.current = visibleNodes;\n React.useImperativeHandle(\n ref,\n () => ({\n scrollToNode: (nodeId, alignment) => {\n assert(variableSizeListRef.current !== null);\n variableSizeListRef.current.scrollToItem(visibleNodesRef.current.getIndexOfNode(nodeId), alignment);\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n}\n\nfunction usePrevious<T>(value: T): T | undefined {\n const ref = React.useRef<T>();\n\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n\nfunction getHighlightedNodeId(highlightableTreeProps?: HighlightableTreeProps) {\n return (highlightableTreeProps && highlightableTreeProps.activeMatch)\n ? highlightableTreeProps.activeMatch.nodeId\n : undefined;\n}\n\nfunction useScrollToActiveMatch(treeRef: React.RefObject<CoreTree>, highlightableTreeProps?: HighlightableTreeProps) {\n const scrollToActive = React.useRef(false);\n React.useEffect(() => {\n scrollToActive.current = true;\n }, [highlightableTreeProps]);\n\n const onLabelRendered = React.useCallback(\n (node: TreeModelNode) => {\n const highlightedNodeId = getHighlightedNodeId(highlightableTreeProps);\n if (!treeRef.current || !scrollToActive.current || !highlightedNodeId || highlightedNodeId !== node.id)\n return;\n\n scrollToActive.current = false;\n const scrollTo = [...treeRef.current.getElementsByClassName(HighlightingEngine.ACTIVE_CLASS_NAME)];\n // istanbul ignore else\n if (scrollTo.length > 0 && scrollTo[0].scrollIntoView)\n scrollTo[0].scrollIntoView({ behavior: \"auto\", block: \"nearest\", inline: \"end\" });\n }, [highlightableTreeProps, treeRef]);\n\n return onLabelRendered;\n}\n\nfunction setFocusToSelected(treeRef: React.RefObject<CoreTree>) {\n /* istanbul ignore else */\n if (treeRef.current)\n treeRef.current.setFocusByClassName(\".core-tree-node.is-selected\");\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TreeRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/tree/controlled/component/TreeRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAC/B,4DAAoC;AACpC,6CAA+B;AAC/B,+CAA6G;AAC7G,4DAAyD;AACzD,0DAAuD;AACvD,sDAA6C;AAC7C,kDAA0E;AAC1E,qGAAqG;AACrG,iE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AC,WAAW,CACvC,CAAC,IAAmB,EAAE,EAAE;QACtB,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;QACvE,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,IAAI,CAAC,EAAE;YACpG,OAAO;QAET,cAAc,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/B,MAAM,QAAQ,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,uCAAkB,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACnG,uBAAuB;QACvB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc;YACnD,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC,EAAE,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC,CAAC;IAExC,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAkC;IAC5D,0BAA0B;IAC1B,IAAI,OAAO,CAAC,OAAO;QACjB,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;AACvE,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/** @packageDocumentation\n * @module Tree\n */\n\nimport \"./ControlledTree.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { areEqual, ListChildComponentProps, ListOnItemsRenderedProps, VariableSizeList } from \"react-window\";\nimport { concat } from \"rxjs/internal/observable/concat\";\nimport { timer } from \"rxjs/internal/observable/timer\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { Tree as CoreTree, TreeNodePlaceholder } from \"@itwin/core-react\";\nimport { createContextWithMandatoryProvider } from \"../../../common/UseContextWithMandatoryProvider\";\nimport { HighlightableTreeProps, HighlightingEngine } from \"../../HighlightingEngine\";\nimport { TreeActions } from \"../TreeActions\";\nimport {\n isTreeModelNode, isTreeModelNodePlaceholder, isTreeModelRootNode, TreeModelNode, TreeModelNodePlaceholder, VisibleTreeNodes,\n} from \"../TreeModel\";\nimport { ITreeNodeLoader } from \"../TreeNodeLoader\";\nimport { TreeNodeRenderer, TreeNodeRendererProps } from \"./TreeNodeRenderer\";\n\nconst NODE_LOAD_DELAY = 500;\n\n/**\n * Data structure that describes range of rendered items in the tree.\n * @public\n */\nexport interface RenderedItemsRange {\n overscanStartIndex: number;\n overscanStopIndex: number;\n visibleStartIndex: number;\n visibleStopIndex: number;\n}\n\n/**\n * Properties for [[TreeRenderer]] component.\n * @public\n */\nexport interface TreeRendererProps {\n treeActions: TreeActions;\n nodeLoader: ITreeNodeLoader;\n\n /** Callback that is used to determine node height. */\n nodeHeight: (node: TreeModelNode | TreeModelNodePlaceholder, index: number) => number;\n\n /** Flat list of nodes to be rendered. */\n visibleNodes: VisibleTreeNodes;\n\n /** Callback to render custom node. */\n nodeRenderer?: (props: TreeNodeRendererProps) => React.ReactNode;\n\n /** Properties used to highlight nodes and scroll to active match while filtering. */\n nodeHighlightingProps?: HighlightableTreeProps;\n\n /** Callback that is called when rendered items range changes. */\n onItemsRendered?: (renderedItems: RenderedItemsRange) => void;\n\n /**\n * Callback used when an editor closes\n * @internal\n */\n onNodeEditorClosed?: () => void;\n\n /** Width of the tree area. */\n width: number;\n\n /** Height of the tree area. */\n height: number;\n}\n\n/**\n * Attributes found on TreeRenderer component\n * @public\n */\nexport interface TreeRendererAttributes {\n /**\n * Scroll to the specified node.\n * @param nodeId Id of the target node to scroll to.\n * @param alignment Controls scrolling behavior. See [react-window](https://github.com/bvaughn/react-window) documentation\n * on `scrollToItem` for details.\n */\n scrollToNode(nodeId: string, alignment?: Alignment): void;\n}\n\ntype Alignment = \"auto\" | \"smart\" | \"center\" | \"end\" | \"start\";\n\n/** [[TreeRenderer]] context that is provided to each rendered node. */\ninterface TreeRendererContext {\n /** Callback to render custom node. */\n nodeRenderer: (props: TreeNodeRendererProps) => React.ReactNode;\n\n treeActions: TreeActions;\n nodeLoader: ITreeNodeLoader;\n\n /** Flat list of nodes to be rendered. */\n visibleNodes: VisibleTreeNodes;\n\n /** Engine used to created node highlighting properties. */\n highlightingEngine?: HighlightingEngine;\n\n /** Callback used detect when label is rendered. It is used by TreeRenderer for scrolling to active match. */\n onLabelRendered?: (node: TreeModelNode) => void;\n\n /** A callback that node calls after rendering to report its width */\n onNodeWidthMeasured?: (width: number) => void;\n\n /** Callback used when an editor closes */\n onNodeEditorClosed?: () => void;\n}\n\n/** [[TreeRenderer]] context provider, consumer and custom hook. */\nconst [\n /** Context of [[TreeRenderer]] provider. */\n TreeRendererContextProvider,\n\n /** Context of [[TreeRenderer]] consumer. */\n _TreeRendererContextConsumer,\n\n /** Custom hook to use [[TreeRenderer]] context. */\n useTreeRendererContext,\n] = createContextWithMandatoryProvider<TreeRendererContext>(\"TreeRendererContext\");\n\n/**\n * Default tree rendering component.\n * @public\n */\nexport class TreeRenderer extends React.Component<TreeRendererProps> implements TreeRendererAttributes {\n private _ref = React.createRef<TreeRendererAttributes>();\n\n /** @inheritdoc */\n public scrollToNode(nodeId: string, alignment?: Alignment) {\n // istanbul ignore else\n if (this._ref.current)\n this._ref.current.scrollToNode(nodeId, alignment);\n }\n\n public override render() {\n return (\n <TreeRendererInner ref={this._ref} {...this.props} />\n );\n }\n}\n\n// eslint-disable-next-line react/display-name\nconst TreeRendererInner = React.forwardRef<TreeRendererAttributes, TreeRendererProps>((props, ref) => {\n const variableSizeListRef = React.useRef<VariableSizeList>(null);\n useTreeRendererAttributes(ref, variableSizeListRef, props.visibleNodes);\n\n const previousVisibleNodes = usePrevious(props.visibleNodes);\n const previousNodeHeight = usePrevious(props.nodeHeight);\n if ((previousVisibleNodes !== undefined && previousVisibleNodes !== props.visibleNodes)\n || (previousNodeHeight !== undefined && previousNodeHeight !== props.nodeHeight)) {\n /* istanbul ignore else */\n if (variableSizeListRef.current) {\n variableSizeListRef.current.resetAfterIndex(0, false);\n }\n }\n\n const coreTreeRef = React.useRef<CoreTree>(null);\n const minContainerWidth = React.useRef<number>(0);\n const onLabelRendered = useScrollToActiveMatch(coreTreeRef, props.nodeHighlightingProps);\n const highlightingEngine = React.useMemo(\n () => props.nodeHighlightingProps && new HighlightingEngine(props.nodeHighlightingProps),\n [props.nodeHighlightingProps],\n );\n\n const rendererContext = React.useMemo<TreeRendererContext>(() => ({\n nodeRenderer: props.nodeRenderer ? props.nodeRenderer : (nodeProps) => (<TreeNodeRenderer {...nodeProps} />),\n treeActions: props.treeActions,\n nodeLoader: props.nodeLoader,\n visibleNodes: props.visibleNodes,\n onLabelRendered,\n highlightingEngine,\n onNodeWidthMeasured: (width: number) => {\n if (width > minContainerWidth.current)\n minContainerWidth.current = width;\n },\n onNodeEditorClosed: () => {\n setFocusToSelected(coreTreeRef);\n props.onNodeEditorClosed && props.onNodeEditorClosed();\n },\n }), [props, onLabelRendered, highlightingEngine]);\n\n const prevTreeWidth = React.useRef<number>(0);\n if (props.width !== prevTreeWidth.current) {\n minContainerWidth.current = 0;\n prevTreeWidth.current = props.width;\n }\n\n const itemKey = React.useCallback(\n (index: number) => getNodeKey(props.visibleNodes.getAtIndex(index)!),\n [props.visibleNodes],\n );\n\n const { nodeHeight, visibleNodes } = props;\n const itemSize = React.useCallback(\n (index: number) => nodeHeight(visibleNodes.getAtIndex(index)!, index),\n [nodeHeight, visibleNodes],\n );\n\n const { nodeHighlightingProps } = props;\n React.useEffect(() => {\n const highlightedNodeId = getHighlightedNodeId(nodeHighlightingProps);\n if (!highlightedNodeId)\n return;\n\n let index = 0;\n for (const node of visibleNodes) {\n if (isTreeModelNode(node) && node.id === highlightedNodeId)\n break;\n\n index++;\n }\n\n assert(variableSizeListRef.current !== null);\n variableSizeListRef.current.scrollToItem(index);\n }, [nodeHighlightingProps]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const innerElementType = React.useCallback(\n // eslint-disable-next-line react/display-name\n React.forwardRef(({ style, ...rest }: ListChildComponentProps, innerRef: React.Ref<HTMLDivElement>) => (\n <div\n ref={innerRef}\n style={{ ...style, minWidth: minContainerWidth.current }}\n {...rest}\n />\n )),\n [],\n );\n\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\n props.treeActions.onTreeKeyDown(e);\n }, [props.treeActions]);\n\n const handleKeyUp = React.useCallback((e: React.KeyboardEvent) => {\n props.treeActions.onTreeKeyUp(e);\n }, [props.treeActions]);\n\n const onItemsRendered = props.onItemsRendered;\n const handleRenderedItemsChange = React.useCallback((onItemsRenderedProps: ListOnItemsRenderedProps) => {\n onItemsRendered && onItemsRendered({ ...onItemsRenderedProps });\n }, [onItemsRendered]);\n\n return (\n <TreeRendererContextProvider value={rendererContext}>\n <CoreTree ref={coreTreeRef}\n className={classnames(\"components-controlledTree\", \"components-smallEditor-host\")}\n onKeyDown={handleKeyDown} onKeyUp={handleKeyUp}\n >\n <VariableSizeList\n ref={variableSizeListRef}\n className={\"ReactWindow__VariableSizeList\"}\n width={props.width}\n height={props.height}\n itemCount={props.visibleNodes.getNumNodes()}\n itemSize={itemSize}\n estimatedItemSize={25}\n overscanCount={10}\n itemKey={itemKey}\n innerElementType={innerElementType}\n onItemsRendered={handleRenderedItemsChange}\n >\n {Node}\n </VariableSizeList>\n </CoreTree>\n </TreeRendererContextProvider>\n );\n});\n\nfunction getNodeKey(node: TreeModelNode | TreeModelNodePlaceholder): string {\n if (isTreeModelNode(node)) {\n return node.id;\n }\n return `${node.parentId || \"\"}-${node.childIndex}`;\n}\n\nconst Node = React.memo<React.FC<ListChildComponentProps>>( // eslint-disable-line @typescript-eslint/naming-convention\n (props: ListChildComponentProps) => {\n const { index, style } = props;\n\n const {\n nodeRenderer,\n visibleNodes,\n treeActions,\n nodeLoader,\n onLabelRendered,\n highlightingEngine,\n onNodeWidthMeasured,\n onNodeEditorClosed,\n } = useTreeRendererContext(Node);\n const node = visibleNodes.getAtIndex(index)!;\n\n useNodeLoading(node, visibleNodes, nodeLoader);\n\n // Mark selected node's wrapper to make detecting consecutively selected nodes with css selectors possible\n const className = classnames(\"node-wrapper\", { \"is-selected\": isTreeModelNode(node) && node.isSelected });\n\n const ref = React.useRef<HTMLDivElement>(null);\n React.useEffect(() => {\n // istanbul ignore else\n if (onNodeWidthMeasured && ref.current)\n onNodeWidthMeasured(ref.current.offsetWidth);\n }, [onNodeWidthMeasured]);\n\n const isEditing = React.useRef(false);\n React.useEffect(() => {\n if (!isTreeModelNode(node))\n return;\n\n if (!isEditing.current && node.editingInfo) {\n isEditing.current = true;\n } else if (isEditing.current && node.editingInfo === undefined) {\n isEditing.current = false;\n /* istanbul ignore else */\n if (onNodeEditorClosed)\n onNodeEditorClosed();\n }\n }, [node, onNodeEditorClosed]);\n\n return (\n <div className={className} style={style} ref={ref}>\n {React.useMemo(() => {\n if (isTreeModelNode(node)) {\n const nodeHighlightProps = highlightingEngine ? highlightingEngine.createRenderProps(node) : undefined;\n return nodeRenderer({ node, treeActions, onLabelRendered, nodeHighlightProps });\n }\n\n return <TreeNodePlaceholder level={node.depth} />;\n }, [node, treeActions, nodeRenderer, onLabelRendered, highlightingEngine])}\n </div>\n );\n },\n areEqual,\n);\n\nfunction useNodeLoading(\n node: TreeModelNode | TreeModelNodePlaceholder,\n visibleNodes: VisibleTreeNodes,\n nodeLoader: ITreeNodeLoader,\n): void {\n React.useEffect(\n () => {\n if (!isTreeModelNodePlaceholder(node)) {\n return;\n }\n\n const treeModel = visibleNodes.getModel();\n const parentNode = node.parentId ? treeModel.getNode(node.parentId) : treeModel.getRootNode();\n if (!isTreeModelNode(parentNode) && !isTreeModelRootNode(parentNode)) {\n return;\n }\n\n const subscription = concat(timer(NODE_LOAD_DELAY), nodeLoader.loadNode(parentNode, node.childIndex)).subscribe();\n return () => subscription.unsubscribe();\n },\n // Mounted node component never changes its node key, thus it's safe to run this effect only once for every\n // nodeLoader change.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [nodeLoader],\n );\n}\n\nfunction useTreeRendererAttributes(\n ref: React.Ref<TreeRendererAttributes>,\n variableSizeListRef: React.RefObject<VariableSizeList>,\n visibleNodes: VisibleTreeNodes,\n) {\n const visibleNodesRef = React.useRef(visibleNodes);\n visibleNodesRef.current = visibleNodes;\n React.useImperativeHandle(\n ref,\n () => ({\n scrollToNode: (nodeId, alignment) => {\n assert(variableSizeListRef.current !== null);\n variableSizeListRef.current.scrollToItem(visibleNodesRef.current.getIndexOfNode(nodeId), alignment);\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n}\n\nfunction usePrevious<T>(value: T): T | undefined {\n const ref = React.useRef<T>();\n\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n\nfunction getHighlightedNodeId(highlightableTreeProps?: HighlightableTreeProps) {\n return (highlightableTreeProps && highlightableTreeProps.activeMatch)\n ? highlightableTreeProps.activeMatch.nodeId\n : undefined;\n}\n\nfunction useScrollToActiveMatch(treeRef: React.RefObject<CoreTree>, highlightableTreeProps?: HighlightableTreeProps) {\n const scrollToActive = React.useRef(false);\n React.useEffect(() => {\n scrollToActive.current = true;\n }, [highlightableTreeProps]);\n\n const onLabelRendered = React.useCallback(\n (node: TreeModelNode) => {\n const highlightedNodeId = getHighlightedNodeId(highlightableTreeProps);\n if (!treeRef.current || !scrollToActive.current || !highlightedNodeId || highlightedNodeId !== node.id)\n return;\n\n scrollToActive.current = false;\n const scrollTo = [...treeRef.current.getElementsByClassName(HighlightingEngine.ACTIVE_CLASS_NAME)];\n // istanbul ignore else\n if (scrollTo.length > 0 && scrollTo[0].scrollIntoView)\n scrollTo[0].scrollIntoView({ behavior: \"auto\", block: \"nearest\", inline: \"end\" });\n }, [highlightableTreeProps, treeRef]);\n\n return onLabelRendered;\n}\n\nfunction setFocusToSelected(treeRef: React.RefObject<CoreTree>) {\n /* istanbul ignore else */\n if (treeRef.current)\n treeRef.current.setFocusByClassName(\".core-tree-node.is-selected\");\n}\n"]}
|
|
@@ -58,12 +58,6 @@ export * from "./components-react/properties/renderers/value/MultilineTextProper
|
|
|
58
58
|
export * from "./components-react/properties/renderers/value/UrlPropertyValueRenderer";
|
|
59
59
|
export * from "./components-react/properties/renderers/value/WithContextStyle";
|
|
60
60
|
export * from "./components-react/filter-builder/FilterBuilder";
|
|
61
|
-
export * from "./components-react/filter-builder/FilterBuilderRule";
|
|
62
|
-
export * from "./components-react/filter-builder/FilterBuilderRuleGroup";
|
|
63
|
-
export * from "./components-react/filter-builder/FilterBuilderRuleOperator";
|
|
64
|
-
export * from "./components-react/filter-builder/FilterBuilderRuleProperty";
|
|
65
|
-
export * from "./components-react/filter-builder/FilterBuilderRuleValue";
|
|
66
|
-
export * from "./components-react/filter-builder/FilterBuilderState";
|
|
67
61
|
export * from "./components-react/filter-builder/Operators";
|
|
68
62
|
export * from "./components-react/filter-builder/Types";
|
|
69
63
|
export * from "./components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer";
|
|
@@ -202,4 +196,8 @@ export * from "./components-react/tree/controlled/internal/SparseTree";
|
|
|
202
196
|
* @docs-group-description TypeConverters
|
|
203
197
|
* Classes for working with Type Converters.
|
|
204
198
|
*/
|
|
199
|
+
/**
|
|
200
|
+
* @docs-group-description PropertyFilterBuilder
|
|
201
|
+
* Classes and components for working with PropertyFilterBuilder.
|
|
202
|
+
*/
|
|
205
203
|
//# sourceMappingURL=components-react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-react.d.ts","sourceRoot":"","sources":["../../src/components-react.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE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AAEtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oDAAoD,CAAC;AACnE,cAAc,sEAAsE,CAAC;AACrF,cAAc,mEAAmE,CAAC;AAClF,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,0DAA0D,CAAC;AACzE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,kFAAkF,CAAC;AACjG,cAAc,wEAAwE,CAAC;AACvF,cAAc,gEAAgE,CAAC;AAE/E,cAAc,iDAAiD,CAAC;AAChE,cAAc,
|
|
1
|
+
{"version":3,"file":"components-react.d.ts","sourceRoot":"","sources":["../../src/components-react.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,kDAAkD,CAAC;AACjE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,cAAc,wDAAwD,CAAC;AACvE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,oDAAoD,CAAC;AACnE,cAAc,kDAAkD,CAAC;AACjE,cAAc,mDAAmD,CAAC;AAClE,cAAc,sDAAsD,CAAC;AAErE,cAAc,yDAAyD,CAAC;AAExE,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qDAAqD,CAAC;AACpE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AAExD,cAAc,0CAA0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AAC/D,cAAc,wDAAwD,CAAC;AACvE,cAAc,qDAAqD,CAAC;AACpE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oDAAoD,CAAC;AACnE,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,6DAA6D,CAAC;AAC5E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wDAAwD,CAAC;AAEvE;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
|
@@ -77,12 +77,6 @@ __exportStar(require("./components-react/properties/renderers/value/MultilineTex
|
|
|
77
77
|
__exportStar(require("./components-react/properties/renderers/value/UrlPropertyValueRenderer"), exports);
|
|
78
78
|
__exportStar(require("./components-react/properties/renderers/value/WithContextStyle"), exports);
|
|
79
79
|
__exportStar(require("./components-react/filter-builder/FilterBuilder"), exports);
|
|
80
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderRule"), exports);
|
|
81
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderRuleGroup"), exports);
|
|
82
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderRuleOperator"), exports);
|
|
83
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderRuleProperty"), exports);
|
|
84
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderRuleValue"), exports);
|
|
85
|
-
__exportStar(require("./components-react/filter-builder/FilterBuilderState"), exports);
|
|
86
80
|
__exportStar(require("./components-react/filter-builder/Operators"), exports);
|
|
87
81
|
__exportStar(require("./components-react/filter-builder/Types"), exports);
|
|
88
82
|
__exportStar(require("./components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer"), exports);
|
|
@@ -222,4 +216,8 @@ __exportStar(require("./components-react/tree/controlled/internal/SparseTree"),
|
|
|
222
216
|
* @docs-group-description TypeConverters
|
|
223
217
|
* Classes for working with Type Converters.
|
|
224
218
|
*/
|
|
219
|
+
/**
|
|
220
|
+
* @docs-group-description PropertyFilterBuilder
|
|
221
|
+
* Classes and components for working with PropertyFilterBuilder.
|
|
222
|
+
*/
|
|
225
223
|
//# sourceMappingURL=components-react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-react.js","sourceRoot":"","sources":["../../src/components-react.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;AAE/F,qEAAqE;AAErE,gEAA+D;AAAtD,4GAAA,YAAY,OAAA;AAErB,kEAAgD;AAChD,wEAAsD;AACtD,qFAAmE;AACnE,uFAAqE;AACrE,4EAA0D;AAC1D,yEAAuD;AACvD,uFAAqE;AACrE,0EAAwD;AACxD,mFAAiE;AACjE,sEAAoD;AAEpD,8EAA4D;AAC5D,qFAAmE;AACnE,qFAAmE;AACnE,sFAAoE;AACpE,kFAAgE;AAChE,yFAAuE;AACvE,gGAA8E;AAC9E,qFAAmE;AACnE,mFAAiE;AACjE,oFAAkE;AAClE,uFAAqE;AAErE,0FAAwE;AAExE,0EAAwD;AACxD,2EAAyD;AACzD,sFAAoE;AACpE,8EAA4D;AAC5D,0EAAwD;AAExD,2EAAyD;AACzD,gFAA8D;AAC9D,4EAA0D;AAC1D,6EAA2D;AAC3D,mFAAiE;AACjE,wEAAsD;AACtD,wEAAsD;AACtD,iFAA+D;AAC/D,gFAA8D;AAC9D,mFAAiE;AACjE,0EAAwD;AACxD,wEAAsD;AACtD,4EAA0D;AAC1D,0EAAwD;AAExD,yFAAuE;AACvE,mFAAiE;AAEjE,8EAA4D;AAC5D,8EAA4D;AAE5D,wEAAsD;AAEtD,4EAA0D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EAA6D;AAC7D,qFAAmE;AACnE,oFAAkE;AAClE,gFAA8D;AAC9D,+EAA6D;AAC7D,8FAA4E;AAC5E,8FAA4E;AAC5E,gGAA8E;AAC9E,4FAA0E;AAC1E,yFAAuE;AAEvE;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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// cSpell:ignore iconpicker lineweight hocs datepicker quantityformat\n\nexport { UiComponents } from \"./components-react/UiComponents\";\n\nexport * from \"./components-react/common/Links\";\nexport * from \"./components-react/common/PageOptions\";\nexport * from \"./components-react/common/selection/SelectionModes\";\nexport * from \"./components-react/common/HighlightingComponentProps\";\nexport * from \"./components-react/common/HighlightedText\";\nexport * from \"./components-react/common/IImageLoader\";\nexport * from \"./components-react/common/selection/SelectionHandler\";\nexport * from \"./components-react/common/UseAsyncValue\";\nexport * from \"./components-react/common/UseDebouncedAsyncValue\";\nexport * from \"./components-react/common/DateUtils\";\n\nexport * from \"./components-react/converters/TypeConverter\";\nexport * from \"./components-react/converters/TypeConverterManager\";\nexport * from \"./components-react/converters/BooleanTypeConverter\";\nexport * from \"./components-react/converters/DateTimeTypeConverter\";\nexport * from \"./components-react/converters/EnumTypeConverter\";\nexport * from \"./components-react/converters/HexadecimalTypeConverter\";\nexport * from \"./components-react/converters/NavigationPropertyTypeConverter\";\nexport * from \"./components-react/converters/NumericTypeConverter\";\nexport * from \"./components-react/converters/PointTypeConverter\";\nexport * from \"./components-react/converters/StringTypeConverter\";\nexport * from \"./components-react/converters/CompositeTypeConverter\";\n\nexport * from \"./components-react/converters/valuetypes/ConvertedTypes\";\n\nexport * from \"./components-react/datepicker/DateField\";\nexport * from \"./components-react/datepicker/DatePicker\";\nexport * from \"./components-react/datepicker/DatePickerPopupButton\";\nexport * from \"./components-react/datepicker/IntlFormatter\";\nexport * from \"./components-react/datepicker/TimeField\";\n\nexport * from \"./components-react/editors/BooleanEditor\";\nexport * from \"./components-react/editors/CustomNumberEditor\";\nexport * from \"./components-react/editors/DateTimeEditor\";\nexport * from \"./components-react/editors/EditorContainer\";\nexport * from \"./components-react/editors/EnumButtonGroupEditor\";\nexport * from \"./components-react/editors/EnumEditor\";\nexport * from \"./components-react/editors/IconEditor\";\nexport * from \"./components-react/editors/ImageCheckBoxEditor\";\nexport * from \"./components-react/editors/NumericInputEditor\";\nexport * from \"./components-react/editors/PropertyEditorManager\";\nexport * from \"./components-react/editors/SliderEditor\";\nexport * from \"./components-react/editors/TextEditor\";\nexport * from \"./components-react/editors/TextareaEditor\";\nexport * from \"./components-react/editors/ToggleEditor\";\n\nexport * from \"./components-react/favorite/FavoritePropertiesRenderer\";\nexport * from \"./components-react/favorite/FavoritePropertyList\";\n\nexport * from \"./components-react/filtering/FilteringInput\";\nexport * from \"./components-react/filtering/ResultSelector\";\n\nexport * from \"./components-react/inputs/ParsedInput\";\n\nexport * from \"./components-react/properties/LinkHandler\";\nexport * from \"./components-react/properties/ValueRendererManager\";\nexport * from \"./components-react/properties/renderers/NonPrimitivePropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PrimitivePropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PropertyView\";\nexport * from \"./components-react/properties/renderers/ActionButtonList\";\nexport * from \"./components-react/properties/renderers/ActionButtonRenderer\";\nexport * from \"./components-react/properties/renderers/value/MergedPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/MultilineTextPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/UrlPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/WithContextStyle\";\n\nexport * from \"./components-react/filter-builder/FilterBuilder\";\nexport * from \"./components-react/filter-builder/FilterBuilderRule\";\nexport * from \"./components-react/filter-builder/FilterBuilderRuleGroup\";\nexport * from \"./components-react/filter-builder/FilterBuilderRuleOperator\";\nexport * from \"./components-react/filter-builder/FilterBuilderRuleProperty\";\nexport * from \"./components-react/filter-builder/FilterBuilderRuleValue\";\nexport * from \"./components-react/filter-builder/FilterBuilderState\";\nexport * from \"./components-react/filter-builder/Operators\";\nexport * from \"./components-react/filter-builder/Types\";\n\nexport * from \"./components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer\";\nexport * from \"./components-react/properties/renderers/label/PrimitivePropertyLabelRenderer\";\nexport * from \"./components-react/properties/renderers/label/PropertyLabelRenderer\";\n\nexport * from \"./components-react/properties/renderers/value/PrimitivePropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/ArrayPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/StructPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/DoublePropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/NavigationPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/ArrayValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/StructValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/NonPrimitiveValueRenderer\";\nexport * from \"./components-react/properties/ItemStyle\";\n\nexport * from \"./components-react/propertygrid/PropertyCategoryRendererManager\";\nexport * from \"./components-react/propertygrid/PropertyDataProvider\";\nexport * from \"./components-react/propertygrid/SimplePropertyDataProvider\";\nexport * from \"./components-react/propertygrid/component/PropertyGrid\";\nexport * from \"./components-react/propertygrid/component/VirtualizedPropertyGrid\";\nexport * from \"./components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider\";\nexport * from \"./components-react/propertygrid/component/PropertyCategoryBlock\";\nexport * from \"./components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier\";\nexport * from \"./components-react/propertygrid/component/PropertyGridCommons\";\nexport * from \"./components-react/propertygrid/component/PropertyList\";\nexport * from \"./components-react/propertygrid/internal/flat-items/FlatGridItem\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableFlatGridItem\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableGridCategory\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableGridItemFactory\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridEventHandler\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridHooks\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModel\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModelChangeEvent\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModelSource\";\nexport * from \"./components-react/propertygrid/dataproviders/FilteringDataProvider\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase\";\n\nexport * from \"./components-react/selectable-content/SelectableContent\";\n\nexport * from \"./components-react/table/TableDataProvider\";\n\n// TODO: toolbar/groupPanel components needs a refactor.\nexport * from \"./components-react/toolbar/groupPanel/tool/Tool\";\n\nexport * from \"./components-react/toolbar/groupPanel/Column\";\nexport * from \"./components-react/toolbar/groupPanel/Columns\";\nexport * from \"./components-react/toolbar/groupPanel/Panel\";\nexport * from \"./components-react/toolbar/groupPanel/Title\";\n\nexport * from \"./components-react/toolbar/Toolbar\";\nexport * from \"./components-react/toolbar/ToolbarWithOverflow\";\nexport * from \"./components-react/toolbar/PopupItem\";\nexport * from \"./components-react/toolbar/PopupItemWithDrag\";\nexport * from \"./components-react/toolbar/Item\";\nexport * from \"./components-react/toolbar/utilities/Direction\";\n\nexport * from \"./components-react/tree/TreeDataProvider\";\nexport * from \"./components-react/tree/SimpleTreeDataProvider\";\nexport * from \"./components-react/tree/HighlightingEngine\";\nexport * from \"./components-react/tree/ImageLoader\";\nexport * from \"./components-react/tree/controlled/TreeActions\";\nexport * from \"./components-react/tree/controlled/TreeEventDispatcher\";\nexport * from \"./components-react/tree/controlled/TreeEventHandler\";\nexport * from \"./components-react/tree/controlled/TreeEvents\";\nexport * from \"./components-react/tree/controlled/TreeModel\";\nexport * from \"./components-react/tree/controlled/TreeModelSource\";\nexport * from \"./components-react/tree/controlled/TreeNodeLoader\";\nexport * from \"./components-react/tree/controlled/Observable\";\nexport * from \"./components-react/tree/controlled/TreeHooks\";\nexport * from \"./components-react/tree/controlled/component/ControlledTree\";\nexport * from \"./components-react/tree/controlled/component/TreeNodeEditor\";\nexport * from \"./components-react/tree/controlled/component/TreeNodeRenderer\";\nexport * from \"./components-react/tree/controlled/component/TreeRenderer\";\nexport * from \"./components-react/tree/controlled/internal/SparseTree\";\n\n/** @docs-package-description\n * The components-react package contains React components that are data-oriented, such as PropertyGrid, Table and Tree.\n * For more information, see [learning about components-react]($docs/learning/ui/components/index.md).\n */\n/**\n * @docs-group-description Common\n * Common classes used across various UI components.\n */\n/**\n * @docs-group-description Breadcrumb\n * Classes and components for working with a Breadcrumb.\n * As of version 3.0, the Breadcrumb is deprecated.\n */\n/**\n * @docs-group-description Date\n * Classes, interfaces, and components for showing and setting date and time.\n */\n/**\n * @docs-group-description DragDrop\n * Classes and Higher Order Components for working with the DragDrop API.\n */\n/**\n * @docs-group-description Favorite\n * Classes and components for displaying favorite properties.\n */\n/**\n * @docs-group-description Filtering\n * Classes and components for working with filtering.\n */\n/**\n * @docs-group-description Inputs\n * Input Components that format and parse input.\n */\n/**\n * @docs-group-description SelectableContent\n * Classes and components for working with SelectableContent component.\n */\n/**\n * @docs-group-description Properties\n * Classes and components for working with Properties.\n */\n/**\n * @docs-group-description PropertyEditors\n * Classes and components for working with Property Editors.\n */\n/**\n * @docs-group-description PropertyGrid\n * Classes and components for working with a PropertyGrid.\n */\n/**\n * @docs-group-description Table\n * Classes and components for working with a Table.\n */\n/**\n * @docs-group-description Toolbar\n * Functions and components that provide a Toolbar.\n */\n/**\n * @docs-group-description Tree\n * Classes and components for working with a Tree.\n */\n/**\n * @docs-group-description TypeConverters\n * Classes for working with Type Converters.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"components-react.js","sourceRoot":"","sources":["../../src/components-react.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;AAE/F,qEAAqE;AAErE,gEAA+D;AAAtD,4GAAA,YAAY,OAAA;AAErB,kEAAgD;AAChD,wEAAsD;AACtD,qFAAmE;AACnE,uFAAqE;AACrE,4EAA0D;AAC1D,yEAAuD;AACvD,uFAAqE;AACrE,0EAAwD;AACxD,mFAAiE;AACjE,sEAAoD;AAEpD,8EAA4D;AAC5D,qFAAmE;AACnE,qFAAmE;AACnE,sFAAoE;AACpE,kFAAgE;AAChE,yFAAuE;AACvE,gGAA8E;AAC9E,qFAAmE;AACnE,mFAAiE;AACjE,oFAAkE;AAClE,uFAAqE;AAErE,0FAAwE;AAExE,0EAAwD;AACxD,2EAAyD;AACzD,sFAAoE;AACpE,8EAA4D;AAC5D,0EAAwD;AAExD,2EAAyD;AACzD,gFAA8D;AAC9D,4EAA0D;AAC1D,6EAA2D;AAC3D,mFAAiE;AACjE,wEAAsD;AACtD,wEAAsD;AACtD,iFAA+D;AAC/D,gFAA8D;AAC9D,mFAAiE;AACjE,0EAAwD;AACxD,wEAAsD;AACtD,4EAA0D;AAC1D,0EAAwD;AAExD,yFAAuE;AACvE,mFAAiE;AAEjE,8EAA4D;AAC5D,8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AAC9D,+EAA6D;AAC7D,8FAA4E;AAC5E,8FAA4E;AAC5E,gGAA8E;AAC9E,4FAA0E;AAC1E,yFAAuE;AAEvE;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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// cSpell:ignore iconpicker lineweight hocs datepicker quantityformat\n\nexport { UiComponents } from \"./components-react/UiComponents\";\n\nexport * from \"./components-react/common/Links\";\nexport * from \"./components-react/common/PageOptions\";\nexport * from \"./components-react/common/selection/SelectionModes\";\nexport * from \"./components-react/common/HighlightingComponentProps\";\nexport * from \"./components-react/common/HighlightedText\";\nexport * from \"./components-react/common/IImageLoader\";\nexport * from \"./components-react/common/selection/SelectionHandler\";\nexport * from \"./components-react/common/UseAsyncValue\";\nexport * from \"./components-react/common/UseDebouncedAsyncValue\";\nexport * from \"./components-react/common/DateUtils\";\n\nexport * from \"./components-react/converters/TypeConverter\";\nexport * from \"./components-react/converters/TypeConverterManager\";\nexport * from \"./components-react/converters/BooleanTypeConverter\";\nexport * from \"./components-react/converters/DateTimeTypeConverter\";\nexport * from \"./components-react/converters/EnumTypeConverter\";\nexport * from \"./components-react/converters/HexadecimalTypeConverter\";\nexport * from \"./components-react/converters/NavigationPropertyTypeConverter\";\nexport * from \"./components-react/converters/NumericTypeConverter\";\nexport * from \"./components-react/converters/PointTypeConverter\";\nexport * from \"./components-react/converters/StringTypeConverter\";\nexport * from \"./components-react/converters/CompositeTypeConverter\";\n\nexport * from \"./components-react/converters/valuetypes/ConvertedTypes\";\n\nexport * from \"./components-react/datepicker/DateField\";\nexport * from \"./components-react/datepicker/DatePicker\";\nexport * from \"./components-react/datepicker/DatePickerPopupButton\";\nexport * from \"./components-react/datepicker/IntlFormatter\";\nexport * from \"./components-react/datepicker/TimeField\";\n\nexport * from \"./components-react/editors/BooleanEditor\";\nexport * from \"./components-react/editors/CustomNumberEditor\";\nexport * from \"./components-react/editors/DateTimeEditor\";\nexport * from \"./components-react/editors/EditorContainer\";\nexport * from \"./components-react/editors/EnumButtonGroupEditor\";\nexport * from \"./components-react/editors/EnumEditor\";\nexport * from \"./components-react/editors/IconEditor\";\nexport * from \"./components-react/editors/ImageCheckBoxEditor\";\nexport * from \"./components-react/editors/NumericInputEditor\";\nexport * from \"./components-react/editors/PropertyEditorManager\";\nexport * from \"./components-react/editors/SliderEditor\";\nexport * from \"./components-react/editors/TextEditor\";\nexport * from \"./components-react/editors/TextareaEditor\";\nexport * from \"./components-react/editors/ToggleEditor\";\n\nexport * from \"./components-react/favorite/FavoritePropertiesRenderer\";\nexport * from \"./components-react/favorite/FavoritePropertyList\";\n\nexport * from \"./components-react/filtering/FilteringInput\";\nexport * from \"./components-react/filtering/ResultSelector\";\n\nexport * from \"./components-react/inputs/ParsedInput\";\n\nexport * from \"./components-react/properties/LinkHandler\";\nexport * from \"./components-react/properties/ValueRendererManager\";\nexport * from \"./components-react/properties/renderers/NonPrimitivePropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PrimitivePropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PropertyRenderer\";\nexport * from \"./components-react/properties/renderers/PropertyView\";\nexport * from \"./components-react/properties/renderers/ActionButtonList\";\nexport * from \"./components-react/properties/renderers/ActionButtonRenderer\";\nexport * from \"./components-react/properties/renderers/value/MergedPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/MultilineTextPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/UrlPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/WithContextStyle\";\n\nexport * from \"./components-react/filter-builder/FilterBuilder\";\nexport * from \"./components-react/filter-builder/Operators\";\nexport * from \"./components-react/filter-builder/Types\";\n\nexport * from \"./components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer\";\nexport * from \"./components-react/properties/renderers/label/PrimitivePropertyLabelRenderer\";\nexport * from \"./components-react/properties/renderers/label/PropertyLabelRenderer\";\n\nexport * from \"./components-react/properties/renderers/value/PrimitivePropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/ArrayPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/StructPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/DoublePropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/NavigationPropertyValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/ArrayValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/StructValueRenderer\";\nexport * from \"./components-react/properties/renderers/value/table/NonPrimitiveValueRenderer\";\nexport * from \"./components-react/properties/ItemStyle\";\n\nexport * from \"./components-react/propertygrid/PropertyCategoryRendererManager\";\nexport * from \"./components-react/propertygrid/PropertyDataProvider\";\nexport * from \"./components-react/propertygrid/SimplePropertyDataProvider\";\nexport * from \"./components-react/propertygrid/component/PropertyGrid\";\nexport * from \"./components-react/propertygrid/component/VirtualizedPropertyGrid\";\nexport * from \"./components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider\";\nexport * from \"./components-react/propertygrid/component/PropertyCategoryBlock\";\nexport * from \"./components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier\";\nexport * from \"./components-react/propertygrid/component/PropertyGridCommons\";\nexport * from \"./components-react/propertygrid/component/PropertyList\";\nexport * from \"./components-react/propertygrid/internal/flat-items/FlatGridItem\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableFlatGridItem\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableGridCategory\";\nexport * from \"./components-react/propertygrid/internal/flat-items/MutableGridItemFactory\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridEventHandler\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridHooks\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModel\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModelChangeEvent\";\nexport * from \"./components-react/propertygrid/internal/PropertyGridModelSource\";\nexport * from \"./components-react/propertygrid/dataproviders/FilteringDataProvider\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer\";\nexport * from \"./components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase\";\n\nexport * from \"./components-react/selectable-content/SelectableContent\";\n\nexport * from \"./components-react/table/TableDataProvider\";\n\n// TODO: toolbar/groupPanel components needs a refactor.\nexport * from \"./components-react/toolbar/groupPanel/tool/Tool\";\n\nexport * from \"./components-react/toolbar/groupPanel/Column\";\nexport * from \"./components-react/toolbar/groupPanel/Columns\";\nexport * from \"./components-react/toolbar/groupPanel/Panel\";\nexport * from \"./components-react/toolbar/groupPanel/Title\";\n\nexport * from \"./components-react/toolbar/Toolbar\";\nexport * from \"./components-react/toolbar/ToolbarWithOverflow\";\nexport * from \"./components-react/toolbar/PopupItem\";\nexport * from \"./components-react/toolbar/PopupItemWithDrag\";\nexport * from \"./components-react/toolbar/Item\";\nexport * from \"./components-react/toolbar/utilities/Direction\";\n\nexport * from \"./components-react/tree/TreeDataProvider\";\nexport * from \"./components-react/tree/SimpleTreeDataProvider\";\nexport * from \"./components-react/tree/HighlightingEngine\";\nexport * from \"./components-react/tree/ImageLoader\";\nexport * from \"./components-react/tree/controlled/TreeActions\";\nexport * from \"./components-react/tree/controlled/TreeEventDispatcher\";\nexport * from \"./components-react/tree/controlled/TreeEventHandler\";\nexport * from \"./components-react/tree/controlled/TreeEvents\";\nexport * from \"./components-react/tree/controlled/TreeModel\";\nexport * from \"./components-react/tree/controlled/TreeModelSource\";\nexport * from \"./components-react/tree/controlled/TreeNodeLoader\";\nexport * from \"./components-react/tree/controlled/Observable\";\nexport * from \"./components-react/tree/controlled/TreeHooks\";\nexport * from \"./components-react/tree/controlled/component/ControlledTree\";\nexport * from \"./components-react/tree/controlled/component/TreeNodeEditor\";\nexport * from \"./components-react/tree/controlled/component/TreeNodeRenderer\";\nexport * from \"./components-react/tree/controlled/component/TreeRenderer\";\nexport * from \"./components-react/tree/controlled/internal/SparseTree\";\n\n/** @docs-package-description\n * The components-react package contains React components that are data-oriented, such as PropertyGrid, Table and Tree.\n * For more information, see [learning about components-react]($docs/learning/ui/components/index.md).\n */\n/**\n * @docs-group-description Common\n * Common classes used across various UI components.\n */\n/**\n * @docs-group-description Breadcrumb\n * Classes and components for working with a Breadcrumb.\n * As of version 3.0, the Breadcrumb is deprecated.\n */\n/**\n * @docs-group-description Date\n * Classes, interfaces, and components for showing and setting date and time.\n */\n/**\n * @docs-group-description DragDrop\n * Classes and Higher Order Components for working with the DragDrop API.\n */\n/**\n * @docs-group-description Favorite\n * Classes and components for displaying favorite properties.\n */\n/**\n * @docs-group-description Filtering\n * Classes and components for working with filtering.\n */\n/**\n * @docs-group-description Inputs\n * Input Components that format and parse input.\n */\n/**\n * @docs-group-description SelectableContent\n * Classes and components for working with SelectableContent component.\n */\n/**\n * @docs-group-description Properties\n * Classes and components for working with Properties.\n */\n/**\n * @docs-group-description PropertyEditors\n * Classes and components for working with Property Editors.\n */\n/**\n * @docs-group-description PropertyGrid\n * Classes and components for working with a PropertyGrid.\n */\n/**\n * @docs-group-description Table\n * Classes and components for working with a Table.\n */\n/**\n * @docs-group-description Toolbar\n * Functions and components that provide a Toolbar.\n */\n/**\n * @docs-group-description Tree\n * Classes and components for working with a Tree.\n */\n/**\n * @docs-group-description TypeConverters\n * Classes for working with Type Converters.\n */\n/**\n * @docs-group-description PropertyFilterBuilder\n * Classes and components for working with PropertyFilterBuilder.\n */\n"]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Common
|
|
3
|
+
*/
|
|
1
4
|
/**
|
|
2
5
|
* Custom hook for working with promise values.
|
|
3
6
|
* Promises are debounced using trailing and leading edge.
|
|
4
7
|
* The first promise will always be executed.
|
|
5
8
|
* Any promises following the first while it is executing will be scheduled (and unscheduled), leaving only the last promise to be resolved.
|
|
6
9
|
* Once the first promise finishes resolving, the last passed promise starts resolving.
|
|
7
|
-
* @
|
|
10
|
+
* @beta
|
|
8
11
|
*/
|
|
9
12
|
export declare function useDebouncedAsyncValue<TReturn>(valueToBeResolved: undefined | (() => Promise<TReturn>)): {
|
|
10
13
|
value: TReturn | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseDebouncedAsyncValue.d.ts","sourceRoot":"","sources":["../../../../src/components-react/common/UseDebouncedAsyncValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UseDebouncedAsyncValue.d.ts","sourceRoot":"","sources":["../../../../src/components-react/common/UseDebouncedAsyncValue.ts"],"names":[],"mappings":"AAIA;;GAEG;AAQH;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;;;EAgCtG"}
|
|
@@ -2,6 +2,9 @@
|
|
|
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
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Common
|
|
7
|
+
*/
|
|
5
8
|
import { useEffect, useMemo, useState } from "react";
|
|
6
9
|
import { publish } from "rxjs/internal/operators/publish";
|
|
7
10
|
import { refCount } from "rxjs/internal/operators/refCount";
|
|
@@ -13,7 +16,7 @@ import { scheduleSubscription, SubscriptionScheduler } from "./SubscriptionSched
|
|
|
13
16
|
* The first promise will always be executed.
|
|
14
17
|
* Any promises following the first while it is executing will be scheduled (and unscheduled), leaving only the last promise to be resolved.
|
|
15
18
|
* Once the first promise finishes resolving, the last passed promise starts resolving.
|
|
16
|
-
* @
|
|
19
|
+
* @beta
|
|
17
20
|
*/
|
|
18
21
|
export function useDebouncedAsyncValue(valueToBeResolved) {
|
|
19
22
|
const scheduler = useMemo(() => new SubscriptionScheduler(), []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseDebouncedAsyncValue.js","sourceRoot":"","sources":["../../../../src/components-react/common/UseDebouncedAsyncValue.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;
|
|
1
|
+
{"version":3,"file":"UseDebouncedAsyncValue.js","sourceRoot":"","sources":["../../../../src/components-react/common/UseDebouncedAsyncValue.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEtF;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAU,iBAAuD;IACrG,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,qBAAqB,EAAW,EAAE,EAAE,CAAC,CAAC,CAAC,kDAAkD;IAE7H,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAW,CAAC;IAC9C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,iBAAiB,EAAE;YACtB,QAAQ,CAAC,SAAS,CAAC,CAAC;YACpB,aAAa,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO;SACR;QAED,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,yFAAyF;QACzF,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;aAC1C,IAAI,CACH,OAAO,EAAE,EACT,QAAQ,EAAE,EACV,oBAAoB,CAAC,SAAS,CAAC,CAChC;aACA,SAAS,CAAC;YACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;gBACb,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACf,aAAa,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;QAEL,OAAO,GAAG,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/B,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/** @packageDocumentation\n * @module Common\n */\n\nimport { useEffect, useMemo, useState } from \"react\";\nimport { publish } from \"rxjs/internal/operators/publish\";\nimport { refCount } from \"rxjs/internal/operators/refCount\";\nimport { defer } from \"rxjs/internal/observable/defer\";\nimport { scheduleSubscription, SubscriptionScheduler } from \"./SubscriptionScheduler\";\n\n/**\n * Custom hook for working with promise values.\n * Promises are debounced using trailing and leading edge.\n * The first promise will always be executed.\n * Any promises following the first while it is executing will be scheduled (and unscheduled), leaving only the last promise to be resolved.\n * Once the first promise finishes resolving, the last passed promise starts resolving.\n * @beta\n */\nexport function useDebouncedAsyncValue<TReturn>(valueToBeResolved: undefined | (() => Promise<TReturn>)) {\n const scheduler = useMemo(() => new SubscriptionScheduler<TReturn>(), []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const [value, setValue] = useState<TReturn>();\n const [inProgress, setInProgress] = useState(false);\n\n useEffect(() => {\n if (!valueToBeResolved) {\n setValue(undefined);\n setInProgress(false);\n return;\n }\n\n setInProgress(true);\n // schedule and subscribe to the observable emitting value from valueToBeResolved promise\n const subscription = defer(valueToBeResolved)\n .pipe(\n publish(),\n refCount(),\n scheduleSubscription(scheduler),\n )\n .subscribe({\n next: (data) => {\n setValue(data);\n setInProgress(false);\n },\n });\n\n return () => { subscription.unsubscribe(); };\n }, [valueToBeResolved, scheduler]);\n\n return { value, inProgress };\n}\n"]}
|