@itwin/components-react 4.0.0-dev.19 → 4.0.0-dev.20
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/lib/cjs/components-react/UiComponents.js.map +1 -1
- package/lib/cjs/components-react/_target.scss +9 -9
- package/lib/cjs/components-react/common/DateUtils.js.map +1 -1
- package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/cjs/components-react/common/HighlightedText.js.map +1 -1
- package/lib/cjs/components-react/common/HighlightingComponentProps.js.map +1 -1
- package/lib/cjs/components-react/common/IImageLoader.js.map +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/cjs/components-react/common/Links.js.map +1 -1
- package/lib/cjs/components-react/common/PageOptions.js.map +1 -1
- package/lib/cjs/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/UseRerender.js.map +1 -1
- package/lib/cjs/components-react/common/countMatchesInString.js.map +1 -1
- package/lib/cjs/components-react/common/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/components-react/common/selection/SelectionModes.js.map +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/cjs/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.scss +22 -22
- package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePicker.scss +176 -176
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.scss +57 -57
- package/lib/cjs/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.scss +76 -76
- package/lib/cjs/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/BooleanEditor.scss +22 -22
- package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.scss +20 -20
- package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/DateTimeEditor.scss +9 -9
- package/lib/cjs/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.scss +6 -6
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.scss +141 -141
- package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumEditor.scss +22 -22
- package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/IconEditor.scss +16 -16
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.scss +24 -24
- package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.scss +16 -16
- package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.scss +116 -116
- package/lib/cjs/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.scss +13 -13
- package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.scss +20 -20
- package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextareaEditor.scss +14 -14
- package/lib/cjs/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ToggleEditor.scss +23 -23
- package/lib/cjs/components-react/editors/variables.scss +7 -7
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +38 -38
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.scss +68 -68
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.scss +58 -58
- package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.scss +68 -68
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.scss +75 -75
- package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/cjs/components-react/inputs/ParsedInput.scss +23 -23
- package/lib/cjs/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.scss +25 -25
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.scss +17 -17
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.scss +106 -106
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.scss +88 -88
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MergedPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/ArrayValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.scss +73 -73
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +101 -101
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +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.js.map +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/MutableCustomGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +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.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.scss +20 -20
- package/lib/cjs/components-react/toolbar/Item.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.scss +91 -91
- package/lib/cjs/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.scss +10 -10
- package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.scss +96 -96
- package/lib/cjs/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Overflow.scss +57 -57
- package/lib/cjs/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.scss +37 -37
- package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItem.scss +88 -88
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.scss +18 -18
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/_variables.scss +34 -34
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.scss +44 -44
- package/lib/cjs/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.scss +9 -9
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.scss +10 -10
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.scss +15 -15
- package/lib/cjs/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.scss +33 -33
- package/lib/cjs/components-react/toolbar/groupPanel/_variables.scss +16 -16
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.scss +29 -29
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.scss +117 -117
- package/lib/cjs/components-react/toolbar/groupPanel/tool/_variables.scss +12 -12
- package/lib/cjs/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/cjs/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/cjs/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/cjs/components-react/tree/HighlightingEngine.scss +7 -7
- package/lib/cjs/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeComponentTestId.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/Observable.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.scss +102 -102
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.scss +27 -27
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/cjs/components-react.js.map +1 -1
- package/lib/esm/components-react/UiComponents.js.map +1 -1
- package/lib/esm/components-react/_target.scss +9 -9
- package/lib/esm/components-react/common/DateUtils.js.map +1 -1
- package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/esm/components-react/common/HighlightedText.js.map +1 -1
- package/lib/esm/components-react/common/HighlightingComponentProps.js.map +1 -1
- package/lib/esm/components-react/common/IImageLoader.js.map +1 -1
- package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/esm/components-react/common/Links.js.map +1 -1
- package/lib/esm/components-react/common/PageOptions.js.map +1 -1
- package/lib/esm/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/UseRerender.js.map +1 -1
- package/lib/esm/components-react/common/countMatchesInString.js.map +1 -1
- package/lib/esm/components-react/common/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/components-react/common/selection/SelectionModes.js.map +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/esm/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.scss +22 -22
- package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePicker.scss +176 -176
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.scss +57 -57
- package/lib/esm/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.scss +76 -76
- package/lib/esm/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/esm/components-react/editors/BooleanEditor.scss +22 -22
- package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/esm/components-react/editors/CustomNumberEditor.scss +20 -20
- package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/esm/components-react/editors/DateTimeEditor.scss +9 -9
- package/lib/esm/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.scss +6 -6
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.scss +141 -141
- package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumEditor.scss +22 -22
- package/lib/esm/components-react/editors/IconEditor.js.map +1 -1
- package/lib/esm/components-react/editors/IconEditor.scss +16 -16
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.scss +24 -24
- package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.scss +16 -16
- package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.scss +116 -116
- package/lib/esm/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.scss +13 -13
- package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.scss +20 -20
- package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.scss +14 -14
- package/lib/esm/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ToggleEditor.scss +23 -23
- package/lib/esm/components-react/editors/variables.scss +7 -7
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +38 -38
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.scss +68 -68
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.scss +58 -58
- package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.scss +68 -68
- package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.scss +75 -75
- package/lib/esm/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/esm/components-react/inputs/ParsedInput.scss +23 -23
- package/lib/esm/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.scss +25 -25
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.scss +17 -17
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.scss +106 -106
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.scss +88 -88
- package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MergedPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/WithContextStyle.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/ArrayValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.scss +73 -73
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +101 -101
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +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.js.map +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/MutableCustomGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +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.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.scss +20 -20
- package/lib/esm/components-react/toolbar/Item.js.map +1 -1
- package/lib/esm/components-react/toolbar/Item.scss +91 -91
- package/lib/esm/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/esm/components-react/toolbar/ItemWrapper.scss +10 -10
- package/lib/esm/components-react/toolbar/Items.js.map +1 -1
- package/lib/esm/components-react/toolbar/Items.scss +96 -96
- package/lib/esm/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/Overflow.scss +57 -57
- package/lib/esm/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/OverflowPanel.scss +37 -37
- package/lib/esm/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItem.scss +88 -88
- package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.scss +18 -18
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/_variables.scss +34 -34
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.scss +44 -44
- package/lib/esm/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Column.scss +9 -9
- package/lib/esm/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Columns.scss +10 -10
- package/lib/esm/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Panel.scss +15 -15
- package/lib/esm/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Title.scss +33 -33
- package/lib/esm/components-react/toolbar/groupPanel/_variables.scss +16 -16
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.scss +29 -29
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.scss +117 -117
- package/lib/esm/components-react/toolbar/groupPanel/tool/_variables.scss +12 -12
- package/lib/esm/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/esm/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/esm/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/esm/components-react/tree/HighlightingEngine.scss +7 -7
- package/lib/esm/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/TreeComponentTestId.js.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/Observable.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.scss +102 -102
- package/lib/esm/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/NodeContent.scss +27 -27
- package/lib/esm/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/esm/components-react.js.map +1 -1
- package/lib/public/locales/en/UiComponents.json +139 -139
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAA2B,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEnF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAKlG,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAEnF,OAAO,EAAE,mCAAmC,EAAE,MAAM,4DAA4D,CAAC;AACjH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAk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AAC;SACL;IACH,CAAC;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB,EAAC,KAAK,EAAE,oBAAoB,IAC/D,cAAc,EAAE,CACb,CACP,CAAC;AACJ,CAAC,EACD,QAAQ,CACT,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AASlD,MAAM,qBAAqB,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,KAAK,CAAC,eAAe,CACnB,GAAG,EAAE;QACH,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CACjD,CAAC;IAEF,OAAO,CACL,6BAAK,GAAG,EAAE,MAAM,IACb,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CACvC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport \"./VirtualizedPropertyGrid.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { areEqual, ListChildComponentProps, VariableSizeList } from \"react-window\";\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { Orientation, RatioChangeResult } from \"@itwin/core-react\";\r\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider\";\r\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\r\nimport { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\r\nimport { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns\";\r\nimport { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\r\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase\";\r\nimport { FlatGridItem, GridCategoryItem } from \"../internal/flat-items/FlatGridItem\";\r\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty\";\r\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory\";\r\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem\";\r\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory\";\r\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer\";\r\nimport { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler\";\r\nimport { IPropertyGridModel } from \"../internal/PropertyGridModel\";\r\nimport { PropertyCategoryRendererManager, PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager\";\r\nimport { IPropertyDataProvider, PropertyCategory } from \"../PropertyDataProvider\";\r\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier\";\r\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper\";\r\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock\";\r\nimport { CommonPropertyGridProps, PropertyGridCommons, PropertyGridContentHighlightProps } from \"./PropertyGridCommons\";\r\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier\";\r\n\r\n/** Properties for [[VirtualizedPropertyGrid]] React component\r\n * @public\r\n */\r\nexport interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {\r\n /** Property grid view model that defines what needs to be rendered */\r\n model: IPropertyGridModel;\r\n /** Handler of the events raised from the property grid */\r\n eventHandler: IPropertyGridEventHandler;\r\n /** Property data provider used by the property grid */\r\n dataProvider: IPropertyDataProvider;\r\n /** Properties for highlighting property data in the grid. */\r\n highlight?: PropertyGridContentHighlightProps;\r\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\r\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\r\n /** Width of the property grid component. */\r\n width: number;\r\n /** Height of the property grid component. */\r\n height: number;\r\n}\r\n\r\n/** State of [[VirtualizedPropertyGrid]] React component\r\n * @internal\r\n */\r\ninterface VirtualizedPropertyGridState {\r\n /** List of PropertyGrid categories */\r\n gridItems: FlatGridItem[];\r\n /** Actual orientation used by the property grid */\r\n orientation: Orientation;\r\n /** Keeps record of dynamic node heights */\r\n dynamicNodeHeights: Map<string, number>;\r\n /** When resetting node height cache, marks the point at which heights have become stale */\r\n resetIndex: number;\r\n}\r\n\r\n/**\r\n * Context of [[VirtualizedPropertyGrid]] component.\r\n * @internal\r\n */\r\nexport interface PropertyGridInternalContext {\r\n gridItems: FlatGridItem[];\r\n gridEventHandler: IPropertyGridEventHandler;\r\n gridModel: IPropertyGridModel;\r\n\r\n style?: React.CSSProperties;\r\n className?: string;\r\n gridContext: VirtualizedPropertyGridContext;\r\n onItemHeightChanged: (index: number, key: string, height: number) => void;\r\n}\r\n\r\n/**\r\n * Context of the surrounding [VirtualizedPropertyGrid]($components-react) component.\r\n * @public\r\n */\r\nexport interface VirtualizedPropertyGridContext {\r\n orientation: Orientation;\r\n gridWidth: number;\r\n\r\n isPropertyHoverEnabled: boolean;\r\n isPropertySelectionEnabled: boolean;\r\n selectedPropertyKey?: string;\r\n\r\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\r\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\r\n onPropertyContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void;\r\n\r\n editingPropertyKey?: string;\r\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\r\n onEditCancel?: () => void;\r\n\r\n eventHandler: IPropertyGridEventHandler;\r\n dataProvider: IPropertyDataProvider;\r\n\r\n actionButtonRenderers?: ActionButtonRenderer[];\r\n propertyValueRendererManager?: PropertyValueRendererManager;\r\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\r\n\r\n columnRatio: number;\r\n columnInfo: PropertyGridColumnInfo;\r\n isResizeHandleBeingDragged: boolean;\r\n isResizeHandleHovered: boolean;\r\n onColumnRatioChanged: (ratio: number) => void | RatioChangeResult;\r\n onResizeHandleDragChanged: (newValue: boolean) => void;\r\n onResizeHandleHoverChanged: (newValue: boolean) => void;\r\n\r\n highlight?: PropertyGridContentHighlightProps;\r\n}\r\n\r\nconst [\r\n PropertyGridInternalContextProvider,\r\n _PropertyGridInternalContextConsumer,\r\n usePropertyGridInternalContext,\r\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\"PropertyGridInternalContext\");\r\n\r\n/**\r\n * VirtualizedPropertyGrid React component.\r\n * @public\r\n */\r\nexport class VirtualizedPropertyGrid extends React.Component<VirtualizedPropertyGridProps, VirtualizedPropertyGridState> {\r\n private _listRef = React.createRef<VariableSizeList>();\r\n\r\n /** @internal */\r\n constructor(props: VirtualizedPropertyGridProps) {\r\n super(props);\r\n this.state = {\r\n gridItems: [],\r\n orientation: props.orientation ?? Orientation.Horizontal,\r\n dynamicNodeHeights: new Map(),\r\n resetIndex: 0,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps, prevState: VirtualizedPropertyGridState) {\r\n if (this.props.orientation !== prevProps.orientation\r\n || this.props.isOrientationFixed !== prevProps.isOrientationFixed\r\n || this.props.horizontalOrientationMinWidth !== prevProps.horizontalOrientationMinWidth\r\n || this.props.width !== prevProps.width)\r\n this.updateOrientation(this.props.width);\r\n\r\n if (this.props.model !== prevProps.model) {\r\n // istanbul ignore else\r\n if (this._listRef.current)\r\n this._listRef.current.resetAfterIndex(0);\r\n }\r\n\r\n if (this.props.highlight !== prevProps.highlight && this.props.highlight?.activeHighlight && this.state.gridItems.length !== 0) {\r\n let index = 0;\r\n let foundMatchingItem = false;\r\n for (const item of this.state.gridItems) {\r\n if (item instanceof MutableCategorizedPrimitiveProperty && this.props.highlight.activeHighlight.highlightedItemIdentifier === item.derivedRecord.property.name\r\n || item instanceof MutableGridCategory && this.props.highlight.activeHighlight.highlightedItemIdentifier === item.name) {\r\n foundMatchingItem = true;\r\n break;\r\n }\r\n index++;\r\n }\r\n if (foundMatchingItem) {\r\n // istanbul ignore else\r\n if (this._listRef.current)\r\n this._listRef.current.scrollToItem(index);\r\n }\r\n }\r\n\r\n if (this.state.dynamicNodeHeights !== prevState.dynamicNodeHeights) {\r\n // istanbul ignore else\r\n if (this._listRef.current)\r\n this._listRef.current.resetAfterIndex(this.state.resetIndex);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null {\r\n return {\r\n ...state,\r\n gridItems: props.model.getVisibleFlatGrid(),\r\n };\r\n }\r\n\r\n private updateOrientation(width: number) {\r\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = { ...this.props };\r\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(width, orientation, isOrientationFixed, horizontalOrientationMinWidth);\r\n\r\n if (currentOrientation !== this.state.orientation) {\r\n this.setState({ orientation: currentOrientation });\r\n // istanbul ignore else\r\n if (this._listRef.current)\r\n this._listRef.current.resetAfterIndex(0);\r\n }\r\n }\r\n\r\n /**\r\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\r\n * @param node FlatGridItem node for which to calculate height\r\n * @returns current height of node.\r\n */\r\n private calculateNodeHeight(node: FlatGridItem) {\r\n const categoryHeaderHeight = 38;\r\n const categoryHeaderPadding = 4;\r\n const categoryPropertyHeight = 27;\r\n const bottomBorderPadding = 5;\r\n const verticalPrimitivePropertyHeight = 55;\r\n\r\n return getPropertyHeight(this.state) + node.lastInNumberOfCategories * bottomBorderPadding;\r\n\r\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\r\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\r\n if (dynamicHeight !== undefined) {\r\n if (node instanceof MutableCustomGridCategory) {\r\n return categoryHeaderHeight + categoryHeaderPadding\r\n + (node.isExpanded ? dynamicHeight + bottomBorderPadding : 0);\r\n }\r\n\r\n return dynamicHeight + (state.orientation === Orientation.Vertical ? 28 : 0);\r\n }\r\n\r\n if (node.type === FlatGridItemType.Category) {\r\n return categoryHeaderHeight + categoryHeaderPadding;\r\n }\r\n\r\n if (state.orientation === Orientation.Vertical && node.type === FlatGridItemType.Primitive) {\r\n return verticalPrimitivePropertyHeight;\r\n }\r\n\r\n return categoryPropertyHeight;\r\n }\r\n }\r\n\r\n private _handleNodeHeightChange = (index: number, key: string, newHeight: number) => {\r\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\r\n return;\r\n }\r\n\r\n this.setState((state) => {\r\n return {\r\n ...state,\r\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(key, newHeight),\r\n resetIndex: index,\r\n };\r\n });\r\n };\r\n\r\n private _calculateNodeHeightByIndex = (index: number) => {\r\n const node = this.state.gridItems[index];\r\n return this.calculateNodeHeight(node);\r\n };\r\n\r\n private calculateEstimatedHeight() {\r\n let sum = 0;\r\n for (const node of this.state.gridItems)\r\n sum += this.calculateNodeHeight(node);\r\n\r\n return Math.ceil(sum / this.state.gridItems.length);\r\n }\r\n\r\n private _getNodeKey = (index: number) => {\r\n const node = this.state.gridItems[index];\r\n return node.key;\r\n };\r\n\r\n /** @internal */\r\n public override render() {\r\n return <ColumnResizingPropertyListPropsSupplier\r\n orientation={this.state.orientation}\r\n width={this.props.width}\r\n minLabelWidth={this.props.minLabelWidth}\r\n minValueWidth={this.props.minValueWidth}\r\n actionButtonWidth={this.props.actionButtonWidth}\r\n >\r\n {(columnResizeContext) => (\r\n <PropertyGridEventsRelatedPropsSupplier\r\n isPropertySelectionEnabled={this.props.isPropertySelectionEnabled ?? false}\r\n isPropertySelectionOnRightClickEnabled={this.props.isPropertySelectionOnRightClickEnabled}\r\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\r\n onPropertyContextMenu={this.props.onPropertyContextMenu}\r\n onPropertyUpdated={this.props.onPropertyUpdated}\r\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\r\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\r\n >\r\n {(selectionContext) => {\r\n const gridContext: VirtualizedPropertyGridContext = {\r\n orientation: columnResizeContext.orientation,\r\n gridWidth: this.props.width,\r\n\r\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\r\n isPropertySelectionEnabled: selectionContext.isPropertySelectionEnabled,\r\n selectedPropertyKey: selectionContext.selectedPropertyKey,\r\n\r\n onPropertyClicked: selectionContext.onPropertyClicked,\r\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\r\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\r\n\r\n editingPropertyKey: selectionContext.editingPropertyKey,\r\n onEditCommit: selectionContext.onEditCommit,\r\n onEditCancel: selectionContext.onEditCancel,\r\n\r\n eventHandler: this.props.eventHandler,\r\n dataProvider: this.props.dataProvider,\r\n\r\n actionButtonRenderers: this.props.actionButtonRenderers,\r\n propertyValueRendererManager: this.props.propertyValueRendererManager,\r\n propertyCategoryRendererManager: this.props.propertyCategoryRendererManager,\r\n\r\n columnRatio: columnResizeContext.columnRatio,\r\n columnInfo: columnResizeContext.columnInfo,\r\n isResizeHandleBeingDragged: columnResizeContext.isResizeHandleBeingDragged,\r\n isResizeHandleHovered: columnResizeContext.isResizeHandleHovered,\r\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\r\n onResizeHandleDragChanged: columnResizeContext.onResizeHandleDragChanged,\r\n onResizeHandleHoverChanged: columnResizeContext.onResizeHandleHoverChanged,\r\n\r\n highlight: this.props.highlight,\r\n };\r\n\r\n const renderContext: PropertyGridInternalContext = {\r\n gridItems: this.state.gridItems,\r\n gridEventHandler: this.props.eventHandler,\r\n gridModel: this.props.model,\r\n style: this.props.style,\r\n className: this.props.className,\r\n onItemHeightChanged: this._handleNodeHeightChange,\r\n gridContext,\r\n };\r\n\r\n return (\r\n <PropertyGridInternalContextProvider value={renderContext}>\r\n <div className={classnames(\"components-virtualized-property-grid\", \"components-smallEditor-host\")}>\r\n <VariableSizeList\r\n className={classnames(\"components-property-grid-wrapper\", \"ReactWindow__VariableSizeList\", this.props.className)}\r\n width={this.props.width}\r\n height={this.props.height}\r\n itemCount={this.state.gridItems.length}\r\n itemSize={this._calculateNodeHeightByIndex}\r\n estimatedItemSize={this.calculateEstimatedHeight()}\r\n overscanCount={10}\r\n layout=\"vertical\"\r\n style={this.props.style}\r\n itemKey={this._getNodeKey}\r\n ref={this._listRef}\r\n >\r\n {FlatGridItemNode}\r\n </VariableSizeList>\r\n </div>\r\n </PropertyGridInternalContextProvider>\r\n );\r\n }}\r\n </PropertyGridEventsRelatedPropsSupplier >\r\n )}\r\n </ColumnResizingPropertyListPropsSupplier>;\r\n }\r\n}\r\n\r\nconst FlatGridItemNode = React.memo(\r\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\r\n const { gridItems, gridEventHandler, gridModel, gridContext, className, style, onItemHeightChanged } = usePropertyGridInternalContext(FlatGridItemNode);\r\n const node = gridItems[index];\r\n\r\n const onExpansionToggled = React.useCallback(\r\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\r\n [gridEventHandler, node.selectionKey],\r\n );\r\n const onHeightChanged = React.useCallback(\r\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\r\n [onItemHeightChanged, index, node.key],\r\n );\r\n\r\n function getDisplayNode() {\r\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\r\n switch (node.type) {\r\n case FlatGridItemType.Category:\r\n const categoryRendererManager = gridContext.propertyCategoryRendererManager\r\n ?? PropertyCategoryRendererManager.defaultManager;\r\n const customRenderer = categoryRendererManager.getCategoryComponent(node);\r\n const wrapperClassName = classnames(\r\n \"virtualized-grid-node-content\",\r\n customRenderer !== undefined ? \"virtualized-grid-node-custom-category\" : \"virtualized-grid-node-category\",\r\n );\r\n return (\r\n <FlatItemNestedBorderWrapper\r\n borderCount={node.depth}\r\n bottomBorderCount={lastInNumberOfCategories}\r\n className={wrapperClassName}\r\n >\r\n <PropertyCategoryBlock\r\n className={className}\r\n style={style}\r\n category={node.derivedCategory}\r\n onExpansionToggled={onExpansionToggled}\r\n highlight={gridContext.highlight?.filteredTypes?.includes(FilteredType.Category) ?\r\n gridContext.highlight :\r\n undefined\r\n }\r\n >\r\n {customRenderer !== undefined && (\r\n <CustomCategoryContent\r\n renderer={customRenderer}\r\n categoryItem={node}\r\n gridContext={gridContext}\r\n onHeightChanged={onHeightChanged}\r\n />\r\n )}\r\n </PropertyCategoryBlock>\r\n </FlatItemNestedBorderWrapper>\r\n );\r\n case FlatGridItemType.Array:\r\n case FlatGridItemType.Struct:\r\n case FlatGridItemType.Primitive:\r\n const selectionKey = node.selectionKey;\r\n const parentCategoryItem = gridModel.getItem(node.parentCategorySelectionKey) as GridCategoryItem;\r\n\r\n return (\r\n <FlatItemNestedBorderWrapper\r\n borderCount={parentCategoryItem.depth + 1}\r\n bottomBorderCount={lastInNumberOfCategories}\r\n className=\"virtualized-grid-node-content\"\r\n >\r\n <FlatPropertyRenderer\r\n key={node.key}\r\n uniqueKey={selectionKey}\r\n propertyRecord={node.derivedRecord}\r\n orientation={gridContext.orientation}\r\n indentation={node.depth}\r\n width={gridContext.gridWidth}\r\n\r\n isHoverable={gridContext.isPropertyHoverEnabled}\r\n isSelectable={gridContext.isPropertySelectionEnabled}\r\n isSelected={selectionKey === gridContext.selectedPropertyKey}\r\n\r\n onClick={node.type === FlatGridItemType.Primitive ? gridContext.onPropertyClicked : undefined}\r\n onRightClick={node.type === FlatGridItemType.Primitive ? gridContext.onPropertyRightClicked : undefined}\r\n onContextMenu={gridContext.onPropertyContextMenu}\r\n\r\n category={parentCategoryItem.derivedCategory}\r\n isEditing={selectionKey === gridContext.editingPropertyKey}\r\n onEditCommit={gridContext.onEditCommit}\r\n onEditCancel={gridContext.onEditCancel}\r\n\r\n isExpanded={node.isExpanded}\r\n onExpansionToggled={onExpansionToggled}\r\n onHeightChanged={onHeightChanged}\r\n\r\n actionButtonRenderers={gridContext.actionButtonRenderers}\r\n propertyValueRendererManager={gridContext.propertyValueRendererManager}\r\n\r\n columnRatio={gridContext.columnRatio}\r\n columnInfo={gridContext.columnInfo}\r\n isResizeHandleBeingDragged={gridContext.isResizeHandleBeingDragged}\r\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\r\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\r\n onResizeHandleDragChanged={gridContext.onResizeHandleDragChanged}\r\n onResizeHandleHoverChanged={gridContext.onResizeHandleHoverChanged}\r\n\r\n highlight={gridContext.highlight ?\r\n { applyOnLabel: (gridContext.highlight.filteredTypes?.includes(FilteredType.Label)) ?? false, applyOnValue: (gridContext.highlight.filteredTypes?.includes(FilteredType.Value)) ?? false, ...gridContext.highlight } :\r\n undefined\r\n }\r\n />\r\n </FlatItemNestedBorderWrapper>\r\n );\r\n }\r\n }\r\n\r\n return (\r\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\r\n {getDisplayNode()}\r\n </div>\r\n );\r\n },\r\n areEqual,\r\n);\r\n\r\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\r\n\r\ninterface CustomCategoryContentProps {\r\n categoryItem: GridCategoryItem;\r\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\r\n gridContext: VirtualizedPropertyGridContext;\r\n onHeightChanged: (newHeight: number) => void;\r\n}\r\n\r\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\r\n const { onHeightChanged } = props;\r\n const divRef = React.useRef<HTMLDivElement>(null);\r\n\r\n React.useLayoutEffect(\r\n () => {\r\n assert(divRef.current !== null);\r\n const contentHeight = divRef.current.getBoundingClientRect().height;\r\n onHeightChanged(contentHeight);\r\n },\r\n [props.gridContext.orientation, onHeightChanged],\r\n );\r\n\r\n return (\r\n <div ref={divRef}>\r\n {React.createElement(props.renderer, props)}\r\n </div>\r\n );\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAA2B,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEnF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AAKlG,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAEnF,OAAO,EAAE,mCAAmC,EAAE,MAAM,4DAA4D,CAAC;AACjH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAGxF,OAAO,EAAE,+BAA+B,EAAiC,MAAM,oCAAoC,CAAC;AAEpH,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;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B,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,KAAK,CAAC,eAAe,CACnB,GAAG,EAAE;QACH,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CACjD,CAAC;IAEF,OAAO,CACL,6BAAK,GAAG,EAAE,MAAM,IACb,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CACvC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./VirtualizedPropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { areEqual, ListChildComponentProps, VariableSizeList } from \"react-window\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { Orientation, RatioChangeResult } from \"@itwin/core-react\";\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider\";\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\nimport { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns\";\nimport { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase\";\nimport { FlatGridItem, GridCategoryItem } from \"../internal/flat-items/FlatGridItem\";\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty\";\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory\";\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem\";\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory\";\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer\";\nimport { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler\";\nimport { IPropertyGridModel } from \"../internal/PropertyGridModel\";\nimport { PropertyCategoryRendererManager, PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager\";\nimport { IPropertyDataProvider, PropertyCategory } from \"../PropertyDataProvider\";\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier\";\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock\";\nimport { CommonPropertyGridProps, PropertyGridCommons, PropertyGridContentHighlightProps } from \"./PropertyGridCommons\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier\";\n\n/** Properties for [[VirtualizedPropertyGrid]] React component\n * @public\n */\nexport interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {\n /** Property grid view model that defines what needs to be rendered */\n model: IPropertyGridModel;\n /** Handler of the events raised from the property grid */\n eventHandler: IPropertyGridEventHandler;\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/** State of [[VirtualizedPropertyGrid]] React component\n * @internal\n */\ninterface VirtualizedPropertyGridState {\n /** List of PropertyGrid categories */\n gridItems: FlatGridItem[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** Keeps record of dynamic node heights */\n dynamicNodeHeights: Map<string, number>;\n /** When resetting node height cache, marks the point at which heights have become stale */\n resetIndex: number;\n}\n\n/**\n * Context of [[VirtualizedPropertyGrid]] component.\n * @internal\n */\nexport interface PropertyGridInternalContext {\n gridItems: FlatGridItem[];\n gridEventHandler: IPropertyGridEventHandler;\n gridModel: IPropertyGridModel;\n\n style?: React.CSSProperties;\n className?: string;\n gridContext: VirtualizedPropertyGridContext;\n onItemHeightChanged: (index: number, key: string, height: number) => void;\n}\n\n/**\n * Context of the surrounding [VirtualizedPropertyGrid]($components-react) component.\n * @public\n */\nexport interface VirtualizedPropertyGridContext {\n orientation: Orientation;\n gridWidth: number;\n\n isPropertyHoverEnabled: boolean;\n isPropertySelectionEnabled: boolean;\n selectedPropertyKey?: string;\n\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void;\n\n editingPropertyKey?: string;\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n onEditCancel?: () => void;\n\n eventHandler: IPropertyGridEventHandler;\n dataProvider: IPropertyDataProvider;\n\n actionButtonRenderers?: ActionButtonRenderer[];\n propertyValueRendererManager?: PropertyValueRendererManager;\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n\n columnRatio: number;\n columnInfo: PropertyGridColumnInfo;\n isResizeHandleBeingDragged: boolean;\n isResizeHandleHovered: boolean;\n onColumnRatioChanged: (ratio: number) => void | RatioChangeResult;\n onResizeHandleDragChanged: (newValue: boolean) => void;\n onResizeHandleHoverChanged: (newValue: boolean) => void;\n\n highlight?: PropertyGridContentHighlightProps;\n}\n\nconst [\n PropertyGridInternalContextProvider,\n _PropertyGridInternalContextConsumer,\n usePropertyGridInternalContext,\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\"PropertyGridInternalContext\");\n\n/**\n * VirtualizedPropertyGrid React component.\n * @public\n */\nexport class VirtualizedPropertyGrid extends React.Component<VirtualizedPropertyGridProps, VirtualizedPropertyGridState> {\n private _listRef = React.createRef<VariableSizeList>();\n\n /** @internal */\n constructor(props: VirtualizedPropertyGridProps) {\n super(props);\n this.state = {\n gridItems: [],\n orientation: props.orientation ?? Orientation.Horizontal,\n dynamicNodeHeights: new Map(),\n resetIndex: 0,\n };\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps, prevState: VirtualizedPropertyGridState) {\n if (this.props.orientation !== prevProps.orientation\n || this.props.isOrientationFixed !== prevProps.isOrientationFixed\n || this.props.horizontalOrientationMinWidth !== prevProps.horizontalOrientationMinWidth\n || this.props.width !== prevProps.width)\n this.updateOrientation(this.props.width);\n\n if (this.props.model !== prevProps.model) {\n // istanbul ignore else\n if (this._listRef.current)\n this._listRef.current.resetAfterIndex(0);\n }\n\n if (this.props.highlight !== prevProps.highlight && this.props.highlight?.activeHighlight && this.state.gridItems.length !== 0) {\n let index = 0;\n let foundMatchingItem = false;\n for (const item of this.state.gridItems) {\n if (item instanceof MutableCategorizedPrimitiveProperty && this.props.highlight.activeHighlight.highlightedItemIdentifier === item.derivedRecord.property.name\n || item instanceof MutableGridCategory && this.props.highlight.activeHighlight.highlightedItemIdentifier === item.name) {\n foundMatchingItem = true;\n break;\n }\n index++;\n }\n if (foundMatchingItem) {\n // istanbul ignore else\n if (this._listRef.current)\n this._listRef.current.scrollToItem(index);\n }\n }\n\n if (this.state.dynamicNodeHeights !== prevState.dynamicNodeHeights) {\n // istanbul ignore else\n if (this._listRef.current)\n this._listRef.current.resetAfterIndex(this.state.resetIndex);\n }\n }\n\n /** @internal */\n public static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null {\n return {\n ...state,\n gridItems: props.model.getVisibleFlatGrid(),\n };\n }\n\n private updateOrientation(width: number) {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = { ...this.props };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(width, orientation, isOrientationFixed, horizontalOrientationMinWidth);\n\n if (currentOrientation !== this.state.orientation) {\n this.setState({ orientation: currentOrientation });\n // istanbul ignore else\n if (this._listRef.current)\n this._listRef.current.resetAfterIndex(0);\n }\n }\n\n /**\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\n * @param node FlatGridItem node for which to calculate height\n * @returns current height of node.\n */\n private calculateNodeHeight(node: FlatGridItem) {\n const categoryHeaderHeight = 38;\n const categoryHeaderPadding = 4;\n const categoryPropertyHeight = 27;\n const bottomBorderPadding = 5;\n const verticalPrimitivePropertyHeight = 55;\n\n return getPropertyHeight(this.state) + node.lastInNumberOfCategories * bottomBorderPadding;\n\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\n if (dynamicHeight !== undefined) {\n if (node instanceof MutableCustomGridCategory) {\n return categoryHeaderHeight + categoryHeaderPadding\n + (node.isExpanded ? dynamicHeight + bottomBorderPadding : 0);\n }\n\n return dynamicHeight + (state.orientation === Orientation.Vertical ? 28 : 0);\n }\n\n if (node.type === FlatGridItemType.Category) {\n return categoryHeaderHeight + categoryHeaderPadding;\n }\n\n if (state.orientation === Orientation.Vertical && node.type === FlatGridItemType.Primitive) {\n return verticalPrimitivePropertyHeight;\n }\n\n return categoryPropertyHeight;\n }\n }\n\n private _handleNodeHeightChange = (index: number, key: string, newHeight: number) => {\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\n return;\n }\n\n this.setState((state) => {\n return {\n ...state,\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(key, newHeight),\n resetIndex: index,\n };\n });\n };\n\n private _calculateNodeHeightByIndex = (index: number) => {\n const node = this.state.gridItems[index];\n return this.calculateNodeHeight(node);\n };\n\n private calculateEstimatedHeight() {\n let sum = 0;\n for (const node of this.state.gridItems)\n sum += this.calculateNodeHeight(node);\n\n return Math.ceil(sum / this.state.gridItems.length);\n }\n\n private _getNodeKey = (index: number) => {\n const node = this.state.gridItems[index];\n return node.key;\n };\n\n /** @internal */\n public override render() {\n return <ColumnResizingPropertyListPropsSupplier\n orientation={this.state.orientation}\n width={this.props.width}\n minLabelWidth={this.props.minLabelWidth}\n minValueWidth={this.props.minValueWidth}\n actionButtonWidth={this.props.actionButtonWidth}\n >\n {(columnResizeContext) => (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={this.props.isPropertySelectionEnabled ?? false}\n isPropertySelectionOnRightClickEnabled={this.props.isPropertySelectionOnRightClickEnabled}\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n >\n {(selectionContext) => {\n const gridContext: VirtualizedPropertyGridContext = {\n orientation: columnResizeContext.orientation,\n gridWidth: this.props.width,\n\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\n isPropertySelectionEnabled: selectionContext.isPropertySelectionEnabled,\n selectedPropertyKey: selectionContext.selectedPropertyKey,\n\n onPropertyClicked: selectionContext.onPropertyClicked,\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\n\n editingPropertyKey: selectionContext.editingPropertyKey,\n onEditCommit: selectionContext.onEditCommit,\n onEditCancel: selectionContext.onEditCancel,\n\n eventHandler: this.props.eventHandler,\n dataProvider: this.props.dataProvider,\n\n actionButtonRenderers: this.props.actionButtonRenderers,\n propertyValueRendererManager: this.props.propertyValueRendererManager,\n propertyCategoryRendererManager: this.props.propertyCategoryRendererManager,\n\n columnRatio: columnResizeContext.columnRatio,\n columnInfo: columnResizeContext.columnInfo,\n isResizeHandleBeingDragged: columnResizeContext.isResizeHandleBeingDragged,\n isResizeHandleHovered: columnResizeContext.isResizeHandleHovered,\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\n onResizeHandleDragChanged: columnResizeContext.onResizeHandleDragChanged,\n onResizeHandleHoverChanged: columnResizeContext.onResizeHandleHoverChanged,\n\n highlight: this.props.highlight,\n };\n\n const renderContext: PropertyGridInternalContext = {\n gridItems: this.state.gridItems,\n gridEventHandler: this.props.eventHandler,\n gridModel: this.props.model,\n style: this.props.style,\n className: this.props.className,\n onItemHeightChanged: this._handleNodeHeightChange,\n gridContext,\n };\n\n return (\n <PropertyGridInternalContextProvider value={renderContext}>\n <div className={classnames(\"components-virtualized-property-grid\", \"components-smallEditor-host\")}>\n <VariableSizeList\n className={classnames(\"components-property-grid-wrapper\", \"ReactWindow__VariableSizeList\", this.props.className)}\n width={this.props.width}\n height={this.props.height}\n itemCount={this.state.gridItems.length}\n itemSize={this._calculateNodeHeightByIndex}\n estimatedItemSize={this.calculateEstimatedHeight()}\n overscanCount={10}\n layout=\"vertical\"\n style={this.props.style}\n itemKey={this._getNodeKey}\n ref={this._listRef}\n >\n {FlatGridItemNode}\n </VariableSizeList>\n </div>\n </PropertyGridInternalContextProvider>\n );\n }}\n </PropertyGridEventsRelatedPropsSupplier >\n )}\n </ColumnResizingPropertyListPropsSupplier>;\n }\n}\n\nconst FlatGridItemNode = React.memo(\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\n const { gridItems, gridEventHandler, gridModel, gridContext, className, style, onItemHeightChanged } = usePropertyGridInternalContext(FlatGridItemNode);\n const node = gridItems[index];\n\n const onExpansionToggled = React.useCallback(\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\n [gridEventHandler, node.selectionKey],\n );\n const onHeightChanged = React.useCallback(\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\n [onItemHeightChanged, index, node.key],\n );\n\n function getDisplayNode() {\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\n switch (node.type) {\n case FlatGridItemType.Category:\n const categoryRendererManager = gridContext.propertyCategoryRendererManager\n ?? PropertyCategoryRendererManager.defaultManager;\n const customRenderer = categoryRendererManager.getCategoryComponent(node);\n const wrapperClassName = classnames(\n \"virtualized-grid-node-content\",\n customRenderer !== undefined ? \"virtualized-grid-node-custom-category\" : \"virtualized-grid-node-category\",\n );\n return (\n <FlatItemNestedBorderWrapper\n borderCount={node.depth}\n bottomBorderCount={lastInNumberOfCategories}\n className={wrapperClassName}\n >\n <PropertyCategoryBlock\n className={className}\n style={style}\n category={node.derivedCategory}\n onExpansionToggled={onExpansionToggled}\n highlight={gridContext.highlight?.filteredTypes?.includes(FilteredType.Category) ?\n gridContext.highlight :\n undefined\n }\n >\n {customRenderer !== undefined && (\n <CustomCategoryContent\n renderer={customRenderer}\n categoryItem={node}\n gridContext={gridContext}\n onHeightChanged={onHeightChanged}\n />\n )}\n </PropertyCategoryBlock>\n </FlatItemNestedBorderWrapper>\n );\n case FlatGridItemType.Array:\n case FlatGridItemType.Struct:\n case FlatGridItemType.Primitive:\n const selectionKey = node.selectionKey;\n const parentCategoryItem = gridModel.getItem(node.parentCategorySelectionKey) as GridCategoryItem;\n\n return (\n <FlatItemNestedBorderWrapper\n borderCount={parentCategoryItem.depth + 1}\n bottomBorderCount={lastInNumberOfCategories}\n className=\"virtualized-grid-node-content\"\n >\n <FlatPropertyRenderer\n key={node.key}\n uniqueKey={selectionKey}\n propertyRecord={node.derivedRecord}\n orientation={gridContext.orientation}\n indentation={node.depth}\n width={gridContext.gridWidth}\n\n isHoverable={gridContext.isPropertyHoverEnabled}\n isSelectable={gridContext.isPropertySelectionEnabled}\n isSelected={selectionKey === gridContext.selectedPropertyKey}\n\n onClick={node.type === FlatGridItemType.Primitive ? gridContext.onPropertyClicked : undefined}\n onRightClick={node.type === FlatGridItemType.Primitive ? gridContext.onPropertyRightClicked : undefined}\n onContextMenu={gridContext.onPropertyContextMenu}\n\n category={parentCategoryItem.derivedCategory}\n isEditing={selectionKey === gridContext.editingPropertyKey}\n onEditCommit={gridContext.onEditCommit}\n onEditCancel={gridContext.onEditCancel}\n\n isExpanded={node.isExpanded}\n onExpansionToggled={onExpansionToggled}\n onHeightChanged={onHeightChanged}\n\n actionButtonRenderers={gridContext.actionButtonRenderers}\n propertyValueRendererManager={gridContext.propertyValueRendererManager}\n\n columnRatio={gridContext.columnRatio}\n columnInfo={gridContext.columnInfo}\n isResizeHandleBeingDragged={gridContext.isResizeHandleBeingDragged}\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\n onResizeHandleDragChanged={gridContext.onResizeHandleDragChanged}\n onResizeHandleHoverChanged={gridContext.onResizeHandleHoverChanged}\n\n highlight={gridContext.highlight ?\n { applyOnLabel: (gridContext.highlight.filteredTypes?.includes(FilteredType.Label)) ?? false, applyOnValue: (gridContext.highlight.filteredTypes?.includes(FilteredType.Value)) ?? false, ...gridContext.highlight } :\n undefined\n }\n />\n </FlatItemNestedBorderWrapper>\n );\n }\n }\n\n return (\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\n {getDisplayNode()}\n </div>\n );\n },\n areEqual,\n);\n\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\n\ninterface CustomCategoryContentProps {\n categoryItem: GridCategoryItem;\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\n gridContext: VirtualizedPropertyGridContext;\n onHeightChanged: (newHeight: number) => void;\n}\n\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\n const { onHeightChanged } = props;\n const divRef = React.useRef<HTMLDivElement>(null);\n\n React.useLayoutEffect(\n () => {\n assert(divRef.current !== null);\n const contentHeight = divRef.current.getBoundingClientRect().height;\n onHeightChanged(contentHeight);\n },\n [props.gridContext.orientation, onHeightChanged],\n );\n\n return (\n <div ref={divRef}>\n {React.createElement(props.renderer, props)}\n </div>\n );\n};\n"]}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/expandable/list";
|
|
6
|
-
@import "~@itwin/core-react/lib/cjs/core-react/scrollbar";
|
|
7
|
-
|
|
8
|
-
.components-virtualized-property-grid-loader {
|
|
9
|
-
height: 100%;
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.components-virtualized-property-grid {
|
|
16
|
-
user-select: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.components-property-grid-wrapper {
|
|
20
|
-
@include uicore-touch-scrolling;
|
|
21
|
-
@include uicore-scrollbar();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.virtualized-grid-node {
|
|
25
|
-
> :not(.virtualized-grid-node-category) {
|
|
26
|
-
background: var(--iui-color-background);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nested-border-middle {
|
|
30
|
-
height: 100%;
|
|
31
|
-
padding: 0 4px;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
border-left: 1px solid var(--iui-color-border);
|
|
34
|
-
border-right: 1px solid var(--iui-color-border);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.nested-border-bottom {
|
|
38
|
-
border-bottom: 1px solid var(--iui-color-border);
|
|
39
|
-
padding-bottom: 4px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.components--clickable {
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
box-sizing: border-box;
|
|
45
|
-
|
|
46
|
-
&:not(.components--selected) {
|
|
47
|
-
&:hover {
|
|
48
|
-
// Highlight the whole row of inner-most expandable block
|
|
49
|
-
margin: 0 -4px;
|
|
50
|
-
// Compensate the negative margin by adding padding
|
|
51
|
-
padding: 0 12px;
|
|
52
|
-
|
|
53
|
-
background: var(--iui-color-background-hover);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.components--selected {
|
|
59
|
-
// Highlight the whole row of inner-most expandable block
|
|
60
|
-
margin: 0 -4px;
|
|
61
|
-
// Compensate the negative margin by adding padding (minus one for border)
|
|
62
|
-
padding: 0px 11px;
|
|
63
|
-
|
|
64
|
-
background-color: var(--iui-color-background-accent-muted);
|
|
65
|
-
border: 1px solid var(--iui-color-border-accent);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.components--hoverable {
|
|
69
|
-
&:hover {
|
|
70
|
-
background: var(--iui-color-background-hover);
|
|
71
|
-
|
|
72
|
-
&:not(.components--selected) {
|
|
73
|
-
// Highlight the whole row of inner-most expandable block
|
|
74
|
-
margin: 0 -4px;
|
|
75
|
-
// Compensate the negative margin by adding padding
|
|
76
|
-
padding: 0 12px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.virtualized-grid-node-category {
|
|
83
|
-
padding-top: 4px;
|
|
84
|
-
|
|
85
|
-
.iui-expandable-content {
|
|
86
|
-
// We are rendering virtualized content below the expandable block
|
|
87
|
-
display: none;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.virtualized-grid-node-custom-category {
|
|
92
|
-
padding-top: 4px;
|
|
93
|
-
|
|
94
|
-
.iui-expandable-content > div {
|
|
95
|
-
padding: 0 4px 4px 4px;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.virtualized-grid-node-content {
|
|
100
|
-
height: 100%;
|
|
101
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "~@itwin/core-react/lib/cjs/core-react/expandable/list";
|
|
6
|
+
@import "~@itwin/core-react/lib/cjs/core-react/scrollbar";
|
|
7
|
+
|
|
8
|
+
.components-virtualized-property-grid-loader {
|
|
9
|
+
height: 100%;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.components-virtualized-property-grid {
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.components-property-grid-wrapper {
|
|
20
|
+
@include uicore-touch-scrolling;
|
|
21
|
+
@include uicore-scrollbar();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.virtualized-grid-node {
|
|
25
|
+
> :not(.virtualized-grid-node-category) {
|
|
26
|
+
background: var(--iui-color-background);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nested-border-middle {
|
|
30
|
+
height: 100%;
|
|
31
|
+
padding: 0 4px;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
border-left: 1px solid var(--iui-color-border);
|
|
34
|
+
border-right: 1px solid var(--iui-color-border);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.nested-border-bottom {
|
|
38
|
+
border-bottom: 1px solid var(--iui-color-border);
|
|
39
|
+
padding-bottom: 4px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.components--clickable {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
|
|
46
|
+
&:not(.components--selected) {
|
|
47
|
+
&:hover {
|
|
48
|
+
// Highlight the whole row of inner-most expandable block
|
|
49
|
+
margin: 0 -4px;
|
|
50
|
+
// Compensate the negative margin by adding padding
|
|
51
|
+
padding: 0 12px;
|
|
52
|
+
|
|
53
|
+
background: var(--iui-color-background-hover);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.components--selected {
|
|
59
|
+
// Highlight the whole row of inner-most expandable block
|
|
60
|
+
margin: 0 -4px;
|
|
61
|
+
// Compensate the negative margin by adding padding (minus one for border)
|
|
62
|
+
padding: 0px 11px;
|
|
63
|
+
|
|
64
|
+
background-color: var(--iui-color-background-accent-muted);
|
|
65
|
+
border: 1px solid var(--iui-color-border-accent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.components--hoverable {
|
|
69
|
+
&:hover {
|
|
70
|
+
background: var(--iui-color-background-hover);
|
|
71
|
+
|
|
72
|
+
&:not(.components--selected) {
|
|
73
|
+
// Highlight the whole row of inner-most expandable block
|
|
74
|
+
margin: 0 -4px;
|
|
75
|
+
// Compensate the negative margin by adding padding
|
|
76
|
+
padding: 0 12px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.virtualized-grid-node-category {
|
|
83
|
+
padding-top: 4px;
|
|
84
|
+
|
|
85
|
+
.iui-expandable-content {
|
|
86
|
+
// We are rendering virtualized content below the expandable block
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.virtualized-grid-node-custom-category {
|
|
92
|
+
padding-top: 4px;
|
|
93
|
+
|
|
94
|
+
.iui-expandable-content > div {
|
|
95
|
+
padding: 0 4px 4px 4px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.virtualized-grid-node-content {
|
|
100
|
+
height: 100%;
|
|
101
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAI9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkBpE;;;;GAIG;AACH,MAAM,UAAU,uCAAuC,CAAC,KAAmD;IACzG,MAAM,WAAW,GAAG,0BAA0B,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IACrF,MAAM,KAAK,GAAG,oBAAoB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,2BAA2B,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAElE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,CACL,6BAAK,SAAS,EAAC,6CAA6C;YAC1D,oBAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAC3B,CACP,CAAC;KACH;IAED,OAAO,CAAC,oBAAC,uBAAuB,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAI9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkBpE;;;;GAIG;AACH,MAAM,UAAU,uCAAuC,CAAC,KAAmD;IACzG,MAAM,WAAW,GAAG,0BAA0B,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IACrF,MAAM,KAAK,GAAG,oBAAoB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,2BAA2B,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAElE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,CACL,6BAAK,SAAS,EAAC,6CAA6C;YAC1D,oBAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAC3B,CACP,CAAC;KACH;IAED,OAAO,CAAC,oBAAC,uBAAuB,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport React from \"react\";\nimport { DelayedSpinner } from \"../../common/DelayedSpinner\";\nimport { usePropertyGridEventHandler, usePropertyGridModel, usePropertyGridModelSource } from \"../internal/PropertyGridHooks\";\nimport { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager\";\nimport { IPropertyDataProvider } from \"../PropertyDataProvider\";\nimport { CommonPropertyGridProps, PropertyGridContentHighlightProps } from \"./PropertyGridCommons\";\nimport { VirtualizedPropertyGrid } from \"./VirtualizedPropertyGrid\";\n\n/** Properties for [[VirtualizedPropertyGridWithDataProvider]] React component\n * @public\n */\nexport interface VirtualizedPropertyGridWithDataProviderProps extends CommonPropertyGridProps {\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for [[IPropertyGridModelSource]] and [[IPropertyGridEventHandler]]\n * @public\n */\nexport function VirtualizedPropertyGridWithDataProvider(props: VirtualizedPropertyGridWithDataProviderProps) {\n const modelSource = usePropertyGridModelSource({ dataProvider: props.dataProvider });\n const model = usePropertyGridModel({ modelSource });\n const eventHandler = usePropertyGridEventHandler({ modelSource });\n\n if (!model) {\n return (\n <div className=\"components-virtualized-property-grid-loader\">\n <DelayedSpinner size=\"large\" />\n </div>\n );\n }\n\n return (<VirtualizedPropertyGrid {...props} model={model} eventHandler={eventHandler} />);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteringDataProvider.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/dataproviders/FilteringDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAiC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI3F,OAAO,EAAyD,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAiCzH;;;GAGG;AACH,MAAM,OAAO,6BAA6B;IAMxC,YAA2B,aAAoC,EAAU,SAAgC;QAA9E,kBAAa,GAAb,aAAa,CAAuB;QAAU,cAAS,GAAT,SAAS,CAAuB;QALlG,kBAAa,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAC7C,0BAAqB,GAA8C,SAAS,CAAC;QAKnF,IAAI,CAAC,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACpK,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa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AC,GAAG,KAAK,CAAC,CAAC;YACrE,OAAO;gBACL,WAAW,EAAE,mBAAmB,CAAC,MAAM;gBACvC,OAAO;aACR,CAAC;KACL;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\n\r\nimport { PropertyRecord, PropertyValue, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { IDisposable } from \"@itwin/core-bentley\";\r\nimport { HighlightInfo } from \"../../common/HighlightingComponentProps\";\r\nimport { CategoryRecordsDict } from \"../internal/flat-items/MutableGridCategory\";\r\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"../PropertyDataProvider\";\r\nimport { FilteredType, IPropertyDataFilterer, PropertyDataFilterResult } from \"./filterers/PropertyDataFiltererBase\";\r\n\r\ninterface FilteredRecords {\r\n filteredRecords: PropertyRecord[];\r\n shouldExpandNodeParents: boolean;\r\n matchesCount: number;\r\n activeMatch?: HighlightInfo;\r\n filteredResultMatches: { id: string, matchesCount: number }[];\r\n filteredTypes: FilteredType[];\r\n}\r\n\r\n/**\r\n * Data returned by [[FilteringPropertyDataProvider]]\r\n * @public\r\n */\r\nexport interface FilteredPropertyData extends PropertyData {\r\n /**\r\n * Shows how many matches were found when filtering data.\r\n * `undefined` when filterer is not active\r\n */\r\n matchesCount?: number;\r\n\r\n /**\r\n * Function used for getting [[HighlightInfo]] by index from all the filtered matches.\r\n * `undefined` when filterer is not active\r\n */\r\n getMatchByIndex?: (index: number) => HighlightInfo | undefined;\r\n\r\n /** Types of objects that were used for filtering. */\r\n filteredTypes?: FilteredType[];\r\n}\r\n\r\n/**\r\n * [[IPropertyDataProvider]] implementation which filters wrapped provider [[PropertyData]] using passed [[IPropertyDataFilterer]].\r\n * @public\r\n */\r\nexport class FilteringPropertyDataProvider implements IPropertyDataProvider, IDisposable {\r\n public onDataChanged = new PropertyDataChangeEvent();\r\n private _filteredPropertyData: Promise<FilteredPropertyData> | undefined = undefined;\r\n private _disposeFilterChangedListener: Function;\r\n private _disposeDataChangedListener: Function;\r\n\r\n public constructor(private _dataProvider: IPropertyDataProvider, private _filterer: IPropertyDataFilterer) {\r\n this._disposeFilterChangedListener = this._filterer.onFilterChanged.addListener(() => { this._filteredPropertyData = undefined; this.onDataChanged.raiseEvent(); });\r\n this._disposeDataChangedListener = this._dataProvider.onDataChanged.addListener(() => { this._filteredPropertyData = undefined; this.onDataChanged.raiseEvent(); });\r\n }\r\n\r\n public dispose(): void {\r\n this._disposeDataChangedListener();\r\n this._disposeFilterChangedListener();\r\n }\r\n\r\n public async getData(): Promise<FilteredPropertyData> {\r\n if (this._filteredPropertyData) {\r\n return this._filteredPropertyData;\r\n }\r\n\r\n this._filteredPropertyData = this._dataProvider.getData().then(async (propertyData) => {\r\n return ((this._filterer.isActive) ?\r\n this.filterPropertyData(propertyData) : propertyData);\r\n });\r\n\r\n return this._filteredPropertyData;\r\n }\r\n\r\n private async filterPropertyData(propertyData: PropertyData) {\r\n const { categories, records, label, description } = { ...propertyData };\r\n const { filteredCategories, filteredRecords, matchesCount, filteredResultMatches, filteredTypes } = await matchHierarchy(this._filterer, categories, records, undefined);\r\n\r\n const uniqueTypes = [...new Set(filteredTypes)];\r\n const getMatchByIndex = (index: number) => {\r\n let activeMatch: HighlightInfo | undefined;\r\n if (index <= 0)\r\n return undefined;\r\n\r\n let i = 1;\r\n for (const record of filteredResultMatches) {\r\n const fullMatchesCount = record.matchesCount;\r\n if (index < i + fullMatchesCount) {\r\n activeMatch = {\r\n highlightedItemIdentifier: record.id,\r\n highlightIndex: index - i,\r\n };\r\n break;\r\n }\r\n\r\n i += fullMatchesCount;\r\n }\r\n return activeMatch;\r\n };\r\n\r\n return {\r\n label,\r\n description,\r\n categories: filteredCategories,\r\n records: filteredRecords,\r\n reusePropertyDataState: false,\r\n matchesCount,\r\n getMatchByIndex,\r\n filteredTypes: uniqueTypes,\r\n };\r\n }\r\n}\r\n\r\nasync function matchHierarchy(filterer: IPropertyDataFilterer, categories: PropertyCategory[], records: CategoryRecordsDict, newRecords?: CategoryRecordsDict, parentMatchInfo?: PropertyDataFilterResult) {\r\n const newCategories: PropertyCategory[] = [];\r\n newRecords = newRecords ?? {};\r\n let matchesCount = 0;\r\n let allFilteredResultMatches: { id: string, matchesCount: number }[] = [];\r\n let allFilteredTypes: FilteredType[] = [];\r\n\r\n for (const category of categories) {\r\n const matchInfo = await filterer.categoryMatchesFilter(category, []);\r\n\r\n if (matchInfo.matchesFilter) {\r\n allFilteredResultMatches.push({ id: category.name, matchesCount: matchInfo.matchesCount ?? 0 });\r\n allFilteredTypes = allFilteredTypes.concat(matchInfo.filteredTypes ?? []);\r\n matchesCount += matchInfo.matchesCount ?? 0;\r\n }\r\n\r\n const childRecords = records[category.name] ?? [];\r\n const { filteredRecords, matchesCount: count, filteredResultMatches, filteredTypes } = await matchRecordHierarchy(filterer, childRecords, []);\r\n allFilteredResultMatches = allFilteredResultMatches.concat(filteredResultMatches);\r\n allFilteredTypes = allFilteredTypes.concat(filteredTypes);\r\n matchesCount += count;\r\n\r\n const parentInfo = parentMatchInfo?.matchesFilter ? parentMatchInfo : matchInfo;\r\n\r\n const childCategories = category.childCategories ?? [];\r\n const { filteredCategories, matchesCount: childCount, filteredResultMatches: childFilteredResultMatches, filteredTypes: childFilteredTypes } = await matchHierarchy(filterer, childCategories, records, newRecords, parentInfo);\r\n allFilteredResultMatches = allFilteredResultMatches.concat(childFilteredResultMatches);\r\n allFilteredTypes = allFilteredTypes.concat(childFilteredTypes);\r\n matchesCount += childCount;\r\n\r\n let expand = !(count === 0 && childCount === 0);\r\n if (matchInfo.matchesFilter || (parentMatchInfo?.matchesFilter && parentMatchInfo.shouldForceIncludeDescendants)) {\r\n newRecords[category.name] = records[category.name];\r\n if (matchInfo.matchesFilter) {\r\n expand = true;\r\n }\r\n const newCategory = copyPropertyCategory(category, filteredCategories, expand);\r\n newCategories.push(newCategory);\r\n }\r\n\r\n if ((filteredRecords.length !== 0 || filteredCategories.length !== 0) && !matchInfo.matchesFilter && !(parentMatchInfo?.shouldExpandNodeParents && parentMatchInfo.matchesFilter)) {\r\n const newCategory = copyPropertyCategory(category, filteredCategories, expand);\r\n newRecords[newCategory.name] = filteredRecords;\r\n newCategories.push(newCategory);\r\n }\r\n }\r\n\r\n return { filteredCategories: newCategories, filteredRecords: newRecords, matchesCount, filteredResultMatches: allFilteredResultMatches, filteredTypes: allFilteredTypes };\r\n}\r\n\r\nasync function matchRecordHierarchy(filterer: IPropertyDataFilterer, records: PropertyRecord[], parents: PropertyRecord[], forceIncludeItem: boolean = false): Promise<FilteredRecords> {\r\n const newMatchedRecords: PropertyRecord[] = [];\r\n let expandParent = false; // property passed back to parent to indicate whether it should be expanded\r\n let matchesCount = 0;\r\n let filteredResultMatches: { id: string, matchesCount: number }[] = [];\r\n let filteredTypes: FilteredType[] = [];\r\n\r\n for (const record of records) {\r\n const matchInfo = await filterer.recordMatchesFilter(record, parents);\r\n const shouldForceIncludeDescendants = forceIncludeItem || matchInfo.shouldForceIncludeDescendants;\r\n const { filteredRecords: filteredChildren, shouldExpandNodeParents, matchesCount: childrenMatchesCount, filteredResultMatches: childrenResultMatches, filteredTypes: childrenFilteredTypes } = await matchRecordHierarchy(filterer, record.getChildrenRecords(), [...parents, record], shouldForceIncludeDescendants);\r\n filteredResultMatches = filteredResultMatches.concat(childrenResultMatches);\r\n filteredTypes = [...filteredTypes, ...childrenFilteredTypes];\r\n matchesCount += childrenMatchesCount;\r\n // if child hierarchy indicates parents should be expanded, then it should be passed back up to the top parent\r\n expandParent = expandParent || shouldExpandNodeParents;\r\n\r\n let newRecord: PropertyRecord | undefined;\r\n if (matchInfo.matchesFilter) {\r\n filteredTypes = [...filteredTypes, ...(matchInfo.filteredTypes ?? [])];\r\n const recordMatchesCount = matchInfo.matchesCount ?? 0;\r\n matchesCount += recordMatchesCount;\r\n // Item is included if it matches filter\r\n // If at least one matched record from records list needs its parent expanded,\r\n // then `expandParent` should be set to true\r\n expandParent = expandParent || !!matchInfo.shouldExpandNodeParents;\r\n newRecord = copyPropertyRecord(record, filteredChildren, shouldExpandNodeParents);\r\n filteredResultMatches.push({ id: newRecord.property.name, matchesCount: recordMatchesCount });\r\n } else if (filteredChildren.length !== 0 || forceIncludeItem) {\r\n // Item is also included if it has at least one matched child or is forcefully included by its parent\r\n newRecord = copyPropertyRecord(record, filteredChildren, shouldExpandNodeParents);\r\n }\r\n\r\n if (newRecord)\r\n newMatchedRecords.push(newRecord);\r\n }\r\n\r\n return { filteredRecords: newMatchedRecords, shouldExpandNodeParents: expandParent, matchesCount, filteredResultMatches, filteredTypes };\r\n}\r\n\r\nfunction copyPropertyCategory(\r\n propertyCategory: PropertyCategory,\r\n newChildren: PropertyCategory[],\r\n expand: boolean,\r\n): PropertyCategory {\r\n return {\r\n ...propertyCategory,\r\n childCategories: newChildren,\r\n expand,\r\n };\r\n}\r\n\r\nfunction copyPropertyRecord(record: PropertyRecord, newChildren: PropertyRecord[], autoExpand: boolean) {\r\n const r = record.copyWithNewValue(createNewPropertyValue(record.value, newChildren));\r\n r.autoExpand = autoExpand;\r\n return r;\r\n}\r\n\r\nfunction createNewPropertyValue(value: PropertyValue, newChildren: PropertyRecord[]): PropertyValue {\r\n switch (value.valueFormat) {\r\n case PropertyValueFormat.Primitive:\r\n return { ...value };\r\n case PropertyValueFormat.Array:\r\n return {\r\n valueFormat: PropertyValueFormat.Array,\r\n itemsTypeName: value.itemsTypeName,\r\n items: newChildren,\r\n };\r\n case PropertyValueFormat.Struct:\r\n const members: { [name: string]: PropertyRecord } = {};\r\n newChildren.forEach((child) => members[child.property.name] = child);\r\n return {\r\n valueFormat: PropertyValueFormat.Struct,\r\n members,\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"FilteringDataProvider.js","sourceRoot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6B,EAAE,UAAmB;IACpG,MAAM,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IACrF,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC;IAC1B,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAoB,EAAE,WAA6B;IACjF,QAAQ,KAAK,CAAC,WAAW,EAAE;QACzB,KAAK,mBAAmB,CAAC,SAAS;YAChC,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;QACtB,KAAK,mBAAmB,CAAC,KAAK;YAC5B,OAAO;gBACL,WAAW,EAAE,mBAAmB,CAAC,KAAK;gBACtC,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,KAAK,EAAE,WAAW;aACnB,CAAC;QACJ,KAAK,mBAAmB,CAAC,MAAM;YAC7B,MAAM,OAAO,GAAuC,EAAE,CAAC;YACvD,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YACrE,OAAO;gBACL,WAAW,EAAE,mBAAmB,CAAC,MAAM;gBACvC,OAAO;aACR,CAAC;KACL;AACH,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 { PropertyRecord, PropertyValue, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { IDisposable } from \"@itwin/core-bentley\";\nimport { HighlightInfo } from \"../../common/HighlightingComponentProps\";\nimport { CategoryRecordsDict } from \"../internal/flat-items/MutableGridCategory\";\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"../PropertyDataProvider\";\nimport { FilteredType, IPropertyDataFilterer, PropertyDataFilterResult } from \"./filterers/PropertyDataFiltererBase\";\n\ninterface FilteredRecords {\n filteredRecords: PropertyRecord[];\n shouldExpandNodeParents: boolean;\n matchesCount: number;\n activeMatch?: HighlightInfo;\n filteredResultMatches: { id: string, matchesCount: number }[];\n filteredTypes: FilteredType[];\n}\n\n/**\n * Data returned by [[FilteringPropertyDataProvider]]\n * @public\n */\nexport interface FilteredPropertyData extends PropertyData {\n /**\n * Shows how many matches were found when filtering data.\n * `undefined` when filterer is not active\n */\n matchesCount?: number;\n\n /**\n * Function used for getting [[HighlightInfo]] by index from all the filtered matches.\n * `undefined` when filterer is not active\n */\n getMatchByIndex?: (index: number) => HighlightInfo | undefined;\n\n /** Types of objects that were used for filtering. */\n filteredTypes?: FilteredType[];\n}\n\n/**\n * [[IPropertyDataProvider]] implementation which filters wrapped provider [[PropertyData]] using passed [[IPropertyDataFilterer]].\n * @public\n */\nexport class FilteringPropertyDataProvider implements IPropertyDataProvider, IDisposable {\n public onDataChanged = new PropertyDataChangeEvent();\n private _filteredPropertyData: Promise<FilteredPropertyData> | undefined = undefined;\n private _disposeFilterChangedListener: Function;\n private _disposeDataChangedListener: Function;\n\n public constructor(private _dataProvider: IPropertyDataProvider, private _filterer: IPropertyDataFilterer) {\n this._disposeFilterChangedListener = this._filterer.onFilterChanged.addListener(() => { this._filteredPropertyData = undefined; this.onDataChanged.raiseEvent(); });\n this._disposeDataChangedListener = this._dataProvider.onDataChanged.addListener(() => { this._filteredPropertyData = undefined; this.onDataChanged.raiseEvent(); });\n }\n\n public dispose(): void {\n this._disposeDataChangedListener();\n this._disposeFilterChangedListener();\n }\n\n public async getData(): Promise<FilteredPropertyData> {\n if (this._filteredPropertyData) {\n return this._filteredPropertyData;\n }\n\n this._filteredPropertyData = this._dataProvider.getData().then(async (propertyData) => {\n return ((this._filterer.isActive) ?\n this.filterPropertyData(propertyData) : propertyData);\n });\n\n return this._filteredPropertyData;\n }\n\n private async filterPropertyData(propertyData: PropertyData) {\n const { categories, records, label, description } = { ...propertyData };\n const { filteredCategories, filteredRecords, matchesCount, filteredResultMatches, filteredTypes } = await matchHierarchy(this._filterer, categories, records, undefined);\n\n const uniqueTypes = [...new Set(filteredTypes)];\n const getMatchByIndex = (index: number) => {\n let activeMatch: HighlightInfo | undefined;\n if (index <= 0)\n return undefined;\n\n let i = 1;\n for (const record of filteredResultMatches) {\n const fullMatchesCount = record.matchesCount;\n if (index < i + fullMatchesCount) {\n activeMatch = {\n highlightedItemIdentifier: record.id,\n highlightIndex: index - i,\n };\n break;\n }\n\n i += fullMatchesCount;\n }\n return activeMatch;\n };\n\n return {\n label,\n description,\n categories: filteredCategories,\n records: filteredRecords,\n reusePropertyDataState: false,\n matchesCount,\n getMatchByIndex,\n filteredTypes: uniqueTypes,\n };\n }\n}\n\nasync function matchHierarchy(filterer: IPropertyDataFilterer, categories: PropertyCategory[], records: CategoryRecordsDict, newRecords?: CategoryRecordsDict, parentMatchInfo?: PropertyDataFilterResult) {\n const newCategories: PropertyCategory[] = [];\n newRecords = newRecords ?? {};\n let matchesCount = 0;\n let allFilteredResultMatches: { id: string, matchesCount: number }[] = [];\n let allFilteredTypes: FilteredType[] = [];\n\n for (const category of categories) {\n const matchInfo = await filterer.categoryMatchesFilter(category, []);\n\n if (matchInfo.matchesFilter) {\n allFilteredResultMatches.push({ id: category.name, matchesCount: matchInfo.matchesCount ?? 0 });\n allFilteredTypes = allFilteredTypes.concat(matchInfo.filteredTypes ?? []);\n matchesCount += matchInfo.matchesCount ?? 0;\n }\n\n const childRecords = records[category.name] ?? [];\n const { filteredRecords, matchesCount: count, filteredResultMatches, filteredTypes } = await matchRecordHierarchy(filterer, childRecords, []);\n allFilteredResultMatches = allFilteredResultMatches.concat(filteredResultMatches);\n allFilteredTypes = allFilteredTypes.concat(filteredTypes);\n matchesCount += count;\n\n const parentInfo = parentMatchInfo?.matchesFilter ? parentMatchInfo : matchInfo;\n\n const childCategories = category.childCategories ?? [];\n const { filteredCategories, matchesCount: childCount, filteredResultMatches: childFilteredResultMatches, filteredTypes: childFilteredTypes } = await matchHierarchy(filterer, childCategories, records, newRecords, parentInfo);\n allFilteredResultMatches = allFilteredResultMatches.concat(childFilteredResultMatches);\n allFilteredTypes = allFilteredTypes.concat(childFilteredTypes);\n matchesCount += childCount;\n\n let expand = !(count === 0 && childCount === 0);\n if (matchInfo.matchesFilter || (parentMatchInfo?.matchesFilter && parentMatchInfo.shouldForceIncludeDescendants)) {\n newRecords[category.name] = records[category.name];\n if (matchInfo.matchesFilter) {\n expand = true;\n }\n const newCategory = copyPropertyCategory(category, filteredCategories, expand);\n newCategories.push(newCategory);\n }\n\n if ((filteredRecords.length !== 0 || filteredCategories.length !== 0) && !matchInfo.matchesFilter && !(parentMatchInfo?.shouldExpandNodeParents && parentMatchInfo.matchesFilter)) {\n const newCategory = copyPropertyCategory(category, filteredCategories, expand);\n newRecords[newCategory.name] = filteredRecords;\n newCategories.push(newCategory);\n }\n }\n\n return { filteredCategories: newCategories, filteredRecords: newRecords, matchesCount, filteredResultMatches: allFilteredResultMatches, filteredTypes: allFilteredTypes };\n}\n\nasync function matchRecordHierarchy(filterer: IPropertyDataFilterer, records: PropertyRecord[], parents: PropertyRecord[], forceIncludeItem: boolean = false): Promise<FilteredRecords> {\n const newMatchedRecords: PropertyRecord[] = [];\n let expandParent = false; // property passed back to parent to indicate whether it should be expanded\n let matchesCount = 0;\n let filteredResultMatches: { id: string, matchesCount: number }[] = [];\n let filteredTypes: FilteredType[] = [];\n\n for (const record of records) {\n const matchInfo = await filterer.recordMatchesFilter(record, parents);\n const shouldForceIncludeDescendants = forceIncludeItem || matchInfo.shouldForceIncludeDescendants;\n const { filteredRecords: filteredChildren, shouldExpandNodeParents, matchesCount: childrenMatchesCount, filteredResultMatches: childrenResultMatches, filteredTypes: childrenFilteredTypes } = await matchRecordHierarchy(filterer, record.getChildrenRecords(), [...parents, record], shouldForceIncludeDescendants);\n filteredResultMatches = filteredResultMatches.concat(childrenResultMatches);\n filteredTypes = [...filteredTypes, ...childrenFilteredTypes];\n matchesCount += childrenMatchesCount;\n // if child hierarchy indicates parents should be expanded, then it should be passed back up to the top parent\n expandParent = expandParent || shouldExpandNodeParents;\n\n let newRecord: PropertyRecord | undefined;\n if (matchInfo.matchesFilter) {\n filteredTypes = [...filteredTypes, ...(matchInfo.filteredTypes ?? [])];\n const recordMatchesCount = matchInfo.matchesCount ?? 0;\n matchesCount += recordMatchesCount;\n // Item is included if it matches filter\n // If at least one matched record from records list needs its parent expanded,\n // then `expandParent` should be set to true\n expandParent = expandParent || !!matchInfo.shouldExpandNodeParents;\n newRecord = copyPropertyRecord(record, filteredChildren, shouldExpandNodeParents);\n filteredResultMatches.push({ id: newRecord.property.name, matchesCount: recordMatchesCount });\n } else if (filteredChildren.length !== 0 || forceIncludeItem) {\n // Item is also included if it has at least one matched child or is forcefully included by its parent\n newRecord = copyPropertyRecord(record, filteredChildren, shouldExpandNodeParents);\n }\n\n if (newRecord)\n newMatchedRecords.push(newRecord);\n }\n\n return { filteredRecords: newMatchedRecords, shouldExpandNodeParents: expandParent, matchesCount, filteredResultMatches, filteredTypes };\n}\n\nfunction copyPropertyCategory(\n propertyCategory: PropertyCategory,\n newChildren: PropertyCategory[],\n expand: boolean,\n): PropertyCategory {\n return {\n ...propertyCategory,\n childCategories: newChildren,\n expand,\n };\n}\n\nfunction copyPropertyRecord(record: PropertyRecord, newChildren: PropertyRecord[], autoExpand: boolean) {\n const r = record.copyWithNewValue(createNewPropertyValue(record.value, newChildren));\n r.autoExpand = autoExpand;\n return r;\n}\n\nfunction createNewPropertyValue(value: PropertyValue, newChildren: PropertyRecord[]): PropertyValue {\n switch (value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return { ...value };\n case PropertyValueFormat.Array:\n return {\n valueFormat: PropertyValueFormat.Array,\n itemsTypeName: value.itemsTypeName,\n items: newChildren,\n };\n case PropertyValueFormat.Struct:\n const members: { [name: string]: PropertyRecord } = {};\n newChildren.forEach((child) => members[child.property.name] = child);\n return {\n valueFormat: PropertyValueFormat.Struct,\n members,\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositePropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAuC,wBAAwB,EAA4B,MAAM,4BAA4B,CAAC;AAErI;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,yDAAE,CAAA;AACJ,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,wBAAwB;IACzE,YAA2B,aAAoC,EAAU,SAA8B,EAAU,cAAqC;QACpJ,KAAK,EAAE,CAAC;QADiB,kBAAa,GAAb,aAAa,CAAuB;QAAU,cAAS,GAAT,SAAS,CAAqB;QAAU,mBAAc,GAAd,cAAc,CAAuB;QAEpJ,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;QACxF,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEtF,KAAK,CAAC,mBAAmB,CAAC,IAAoB,EAAE,OAAyB;QAC9E,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACnC,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,I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6B,EAAE,GAAG,CAAC,6BAA6B,IAAI,GAAG,CAAC,6BAA6B;YACrG,YAAY,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;YACtE,aAAa;SACd,CAAC;IACJ,CAAC;CACF;AAED,SAAS,kBAAkB,CAAC,GAAuB,EAAE,GAAuB;IAC1E,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG;QACxC,OAAO,SAAS,CAAC;IACnB,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,kBAAkB,CAAC,GAA+B,EAAE,GAA+B;IAC1F,IAAI,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG;QACxC,OAAO,SAAS,CAAC;IACnB,OAAO,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"CompositePropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAuC,wBAAwB,EAA4B,MAAM,4BAA4B,CAAC;AAErI;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,yDAAE,CAAA;AACJ,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,wBAAwB;IACzE,YAA2B,aAAoC,EAAU,SAA8B,EAAU,cAAqC;QACpJ,KAAK,EAAE,CAAC;QADiB,kBAAa,GAAb,aAAa,CAAuB;QAAU,cAAS,GAAT,SAAS,CAAqB;QAAU,mBA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------------------------------\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 { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FilteredType, IPropertyDataFilterer, PropertyDataFiltererBase, PropertyDataFilterResult } from \"./PropertyDataFiltererBase\";\n\n/**\n * Logical operator for composite filterer.\n * @public\n */\nexport enum CompositeFilterType {\n And,\n Or,\n}\n\n/**\n * Composite PropertyData filter which can join two filters using logic operators\n * @public\n */\nexport class CompositePropertyDataFilterer extends PropertyDataFiltererBase {\n public constructor(private _leftFilterer: IPropertyDataFilterer, private _operator: CompositeFilterType, private _rightFilterer: IPropertyDataFilterer) {\n super();\n this._leftFilterer.onFilterChanged.addListener(() => this.onFilterChanged.raiseEvent());\n this._rightFilterer.onFilterChanged.addListener(() => this.onFilterChanged.raiseEvent());\n }\n\n public get isActive() { return this._leftFilterer.isActive || this._rightFilterer.isActive; }\n\n public async recordMatchesFilter(node: PropertyRecord, parents: PropertyRecord[]): Promise<PropertyDataFilterResult> {\n const [lhs, rhs] = await Promise.all([\n this._leftFilterer.recordMatchesFilter(node, parents),\n this._rightFilterer.recordMatchesFilter(node, parents),\n ]);\n\n return this.getFiltererResult(lhs, rhs);\n }\n\n public async categoryMatchesFilter(node: PropertyCategory, parents: PropertyCategory[]): Promise<PropertyDataFilterResult> {\n const [lhs, rhs] = await Promise.all([\n this._leftFilterer.categoryMatchesFilter(node, parents),\n this._rightFilterer.categoryMatchesFilter(node, parents),\n ]);\n\n return this.getFiltererResult(lhs, rhs);\n }\n\n private getFiltererResult(lhs: PropertyDataFilterResult, rhs: PropertyDataFilterResult) {\n const matchesFilter = (this._operator === CompositeFilterType.And) ? (lhs.matchesFilter && rhs.matchesFilter) : (lhs.matchesFilter || rhs.matchesFilter);\n if (!matchesFilter)\n return { matchesFilter: false };\n\n const filteredTypes = joinNullableArrays(lhs.matchesFilter ? lhs.filteredTypes : undefined, rhs.matchesFilter ? rhs.filteredTypes : undefined);\n\n return {\n matchesFilter: true,\n shouldExpandNodeParents: lhs.shouldExpandNodeParents || rhs.shouldExpandNodeParents,\n shouldForceIncludeDescendants: lhs.shouldForceIncludeDescendants || rhs.shouldForceIncludeDescendants,\n matchesCount: (sumNullableNumbers(lhs.matchesCount, rhs.matchesCount)),\n filteredTypes,\n };\n }\n}\n\nfunction sumNullableNumbers(lhs: number | undefined, rhs: number | undefined) {\n if (undefined === lhs && undefined === rhs)\n return undefined;\n return (lhs ?? 0) + (rhs ?? 0);\n}\n\nfunction joinNullableArrays(lhs: FilteredType[] | undefined, rhs: FilteredType[] | undefined) {\n if (undefined === lhs && undefined === rhs)\n return undefined;\n return [...lhs ?? [], ...rhs ?? []];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayValuePropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAA4B,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAEpH;;;GAGG;AACH,MAAM,OAAO,gCAAiC,SAAQ,8BAA8B;IAGlF,YAAmB,aAAqB,EAAE;QACxC,KAAK,EAAE,CAAC;QAHF,gBAAW,GAAW,EAAE,CAAC;QAI/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAW,UAAU,CAAC,KAAa;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC9C,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;SACnC;IACH,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC;IAEjD,KAAK,CAAC,mBAAmB,CAAC,IAAoB;QACnD,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEjC,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS;YAC1D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAElC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAClE,MAAM,YAAY,GAAG,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEzE,IAAI,YAAY,KAAK,CAAC;YACpB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAElC,OAAO;YACL,aAAa,EAAE,IAAI;YACnB,uBAAuB,EAAE,IAAI;YAC7B,YAAY;YACZ,aAAa,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"DisplayValuePropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5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YACZ,aAAa,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { countMatchesInString } from \"../../../common/countMatchesInString\";\nimport { FilteredType, PropertyDataFilterResult, PropertyRecordDataFiltererBase } from \"./PropertyDataFiltererBase\";\n\n/**\n * Property data filterer which matches on Primitive Property Record display value text.\n * @public\n */\nexport class DisplayValuePropertyDataFilterer extends PropertyRecordDataFiltererBase {\n private _filterText: string = \"\";\n\n public constructor(filterText: string = \"\") {\n super();\n this._filterText = filterText;\n }\n\n public get filterText(): string { return this._filterText; }\n public set filterText(value: string) {\n const lowerValue = value.toLowerCase().trim();\n if (lowerValue !== this.filterText) {\n this._filterText = lowerValue;\n this.onFilterChanged.raiseEvent();\n }\n }\n\n public get isActive() { return this.filterText !== \"\"; }\n\n public async recordMatchesFilter(node: PropertyRecord): Promise<PropertyDataFilterResult> {\n if (!this.isActive)\n return { matchesFilter: true };\n\n if (node.value.valueFormat !== PropertyValueFormat.Primitive)\n return { matchesFilter: false };\n\n const displayValue = node.value.displayValue?.toLowerCase() ?? \"\";\n const matchesCount = countMatchesInString(displayValue, this.filterText);\n\n if (matchesCount === 0)\n return { matchesFilter: false };\n\n return {\n matchesFilter: true,\n shouldExpandNodeParents: true,\n matchesCount,\n filteredTypes: [FilteredType.Value],\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelPropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,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pC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"LabelPropertyDataFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAA4B,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAEpH;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,8BAA8B;IAG3E,YAAmB,aAAqB,EAAE;QACxC,KAAK,EAAE,CAAC;QAHF,gBAAW,GAAW,EAAE,CAAC;QAI/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAW,UAAU,CAAC,KAAa;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC9C,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;SACnC;IACH,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC;IAEjD,KAAK,CAAC,mBAAmB,CAAC,IAAoB;QACnD,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEjC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAC9D,MAAM,YAAY,GAAG,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACzE,IAAI,YAAY,KAAK,CAAC;YACpB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAElC,OAAO;YACL,aAAa,EAAE,IAAI;YACnB,uBAAuB,EAAE,IAAI;YAC7B,6BAA6B,EAAE,IAAI;YACnC,YAAY;YACZ,aAAa,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { countMatchesInString } from \"../../../common/countMatchesInString\";\nimport { FilteredType, PropertyDataFilterResult, PropertyRecordDataFiltererBase } from \"./PropertyDataFiltererBase\";\n\n/**\n * PropertyData filter which matches on any record type label and includes descendant nodes on match\n * @public\n */\nexport class LabelPropertyDataFilterer extends PropertyRecordDataFiltererBase {\n private _filterText: string = \"\";\n\n public constructor(filterText: string = \"\") {\n super();\n this._filterText = filterText;\n }\n\n public get filterText(): string { return this._filterText; }\n public set filterText(value: string) {\n const lowerValue = value.toLowerCase().trim();\n if (lowerValue !== this.filterText) {\n this._filterText = lowerValue;\n this.onFilterChanged.raiseEvent();\n }\n }\n\n public get isActive() { return this.filterText !== \"\"; }\n\n public async recordMatchesFilter(node: PropertyRecord): Promise<PropertyDataFilterResult> {\n if (!this.isActive)\n return { matchesFilter: true };\n\n const displayLabel = node.property.displayLabel.toLowerCase();\n const matchesCount = countMatchesInString(displayLabel, this.filterText);\n if (matchesCount === 0)\n return { matchesFilter: false };\n\n return {\n matchesFilter: true,\n shouldExpandNodeParents: true,\n shouldForceIncludeDescendants: true,\n matchesCount,\n filteredTypes: [FilteredType.Label],\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategoryLabelFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAA4B,MAAM,4BAA4B,CAAC;AAEtH;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,gCAAgC;IAGjF,YAAmB,aAAqB,EAAE;QACxC,KAAK,EAAE,CAAC;QAHF,gBAAW,GAAW,EAAE,CAAC;QAI/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAW,UAAU,CAAC,KAAa;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC9C,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;SACnC;IACH,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC;IAEjD,KAAK,CAAC,qBAAqB,CAAC,IAAsB;QACvD,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEjC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,YAAY,GAAG,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEzE,IAAI,YAAY,KAAK,CAAC;YACpB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAElC,OAAO;YACL,aAAa,EAAE,IAAI;YACnB,uBAAuB,EAAE,IAAI;YAC7B,6BAA6B,EAAE,IAAI;YACnC,YAAY;YACZ,aAAa,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;SACvC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"PropertyCategoryLabelFilterer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAA4B,MAAM,4BAA4B,CAAC;AAEtH;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,gCAAgC;IAGjF,YAAmB,aAAqB,EAAE;QACxC,KAAK,EAAE,CAAC;QAHF,gBAAW,GAAW,EAAE,CAAC;QAI/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAW,UAAU,CAAC,KAAa;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC9C,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;SACnC;IACH,CAAC;IAED,IAAW,QAAQ,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC;IAEjD,KAAK,CAAC,qBAAqB,CAAC,IAAsB;QACvD,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEjC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC9C,MAAM,YAAY,GAAG,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEzE,IAAI,YAAY,KAAK,CAAC;YACpB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAElC,OAAO;YACL,aAAa,EAAE,IAAI;YACnB,uBAAuB,EAAE,IAAI;YAC7B,6BAA6B,EAAE,IAAI;YACnC,YAAY;YACZ,aAAa,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;SACvC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { countMatchesInString } from \"../../../common/countMatchesInString\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FilteredType, PropertyCategoryDataFiltererBase, PropertyDataFilterResult } from \"./PropertyDataFiltererBase\";\n\n/**\n * PropertyData filterer which matches on PropertyCategory's label.\n * @public\n */\nexport class PropertyCategoryLabelFilterer extends PropertyCategoryDataFiltererBase {\n private _filterText: string = \"\";\n\n public constructor(filterText: string = \"\") {\n super();\n this._filterText = filterText;\n }\n\n public get filterText(): string { return this._filterText; }\n public set filterText(value: string) {\n const lowerValue = value.toLowerCase().trim();\n if (lowerValue !== this.filterText) {\n this._filterText = lowerValue;\n this.onFilterChanged.raiseEvent();\n }\n }\n\n public get isActive() { return this.filterText !== \"\"; }\n\n public async categoryMatchesFilter(node: PropertyCategory): Promise<PropertyDataFilterResult> {\n if (!this.isActive)\n return { matchesFilter: true };\n\n const displayLabel = node.label.toLowerCase();\n const matchesCount = countMatchesInString(displayLabel, this.filterText);\n\n if (matchesCount === 0)\n return { matchesFilter: false };\n\n return {\n matchesFilter: true,\n shouldExpandNodeParents: true,\n shouldForceIncludeDescendants: true,\n matchesCount,\n filteredTypes: [FilteredType.Category],\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyDataFiltererBase.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C;;;GAGG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,uDAAQ,CAAA;IACR,iDAAK,CAAA;IACL,iDAAK,CAAA;AACP,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAuCD;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAsC;CAAI;AAczF;;;GAGG;AACH,MAAM,OAAgB,wBAAwB;IAA9C;QACS,oBAAe,GAA8B,IAAI,yBAAyB,EAAE,CAAC;IAItF,CAAC;CAAA;AAED;;;;GAIG;AACH,MAAM,OAAgB,gCAAiC,SAAQ,wBAAwB;IAC9E,KAAK,CAAC,mBAAmB;QAC9B,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAgB,8BAA+B,SAAQ,wBAAwB;IAC5E,KAAK,CAAC,qBAAqB;QAChC,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"PropertyDataFiltererBase.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C;;;GAGG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,uDAAQ,CAAA;IACR,iDAAK,CAAA;IACL,iDAAK,CAAA;AACP,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAuCD;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAsC;CAAI;AAczF;;;GAGG;AACH,MAAM,OAAgB,wBAAwB;IAA9C;QACS,oBAAe,GAA8B,IAAI,yBAAyB,EAAE,CAAC;IAItF,CAAC;CAAA;AAED;;;;GAIG;AACH,MAAM,OAAgB,gCAAiC,SAAQ,wBAAwB;IAC9E,KAAK,CAAC,mBAAmB;QAC9B,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAgB,8BAA+B,SAAQ,wBAAwB;IAC5E,KAAK,CAAC,qBAAqB;QAChC,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\n\n/**\n * Enumeration of possible component filtered types\n * @public\n */\nexport enum FilteredType {\n Category,\n Label,\n Value\n}\n\n/**\n * Data structure for storing [[IPropertyDataFilterer]] matching results\n * @public\n */\nexport interface PropertyDataFilterResult {\n /** Indicates whether provided item matched filter */\n matchesFilter: boolean;\n\n /**\n * Indicates whether descendants nodes should be forcefully included in filtered results.\n * Can only be true for nodes that have `matchesFilter` set to true.\n */\n shouldForceIncludeDescendants?: boolean;\n\n /**\n * Indicates whether parents of node should be expanded up to this match node.\n * Can only be true for nodes that have `matchesFilter` set to true.\n */\n shouldExpandNodeParents?: boolean;\n\n /**\n * Indicates how many times filter was matched in the provided item.\n */\n matchesCount?: number;\n\n /**\n * Indicates what item types were matched.\n */\n filteredTypes?: FilteredType[];\n}\n\n/**\n * A signature for property data change listeners\n * @public\n */\nexport declare type PropertyFilterChangesListener = () => void;\n\n/**\n * An event broadcasted when property filter changes\n * @public\n */\nexport class PropertyFilterChangeEvent extends BeEvent<PropertyFilterChangesListener> { }\n\n/**\n * An interface for a filterer that filters [[PropertyData]] based on content of [[PropertyRecord]]\n * and [[PropertyCategory]] objects.\n * @public\n */\nexport interface IPropertyDataFilterer {\n readonly isActive: boolean;\n recordMatchesFilter: (node: PropertyRecord, parents: PropertyRecord[]) => Promise<PropertyDataFilterResult>;\n categoryMatchesFilter: (node: PropertyCategory, parents: PropertyCategory[]) => Promise<PropertyDataFilterResult>;\n onFilterChanged: PropertyFilterChangeEvent;\n}\n\n/**\n * An abstract implementation of [[IPropertyDataFilterer]] to share common behavior between different implementations.\n * @public\n */\nexport abstract class PropertyDataFiltererBase implements IPropertyDataFilterer {\n public onFilterChanged: PropertyFilterChangeEvent = new PropertyFilterChangeEvent();\n public abstract get isActive(): boolean;\n public abstract recordMatchesFilter(node: PropertyRecord, parents: PropertyRecord[]): Promise<PropertyDataFilterResult>;\n public abstract categoryMatchesFilter(node: PropertyCategory, parents: PropertyCategory[]): Promise<PropertyDataFilterResult>;\n}\n\n/**\n * An abstract implementation of [[IPropertyDataFilterer]] that can be used as base for all\n * filterers that filter based on [[PropertyCategory]] content.\n * @public\n */\nexport abstract class PropertyCategoryDataFiltererBase extends PropertyDataFiltererBase {\n public async recordMatchesFilter(): Promise<PropertyDataFilterResult> {\n return { matchesFilter: !this.isActive };\n }\n}\n\n/**\n * An abstract implementation of [[IPropertyDataFilterer]] that can be used as base for all\n * filterers that filter based on [[PropertyRecord]] content.\n * @public\n */\nexport abstract class PropertyRecordDataFiltererBase extends PropertyDataFiltererBase {\n public async categoryMatchesFilter(): Promise<PropertyDataFilterResult> {\n return { matchesFilter: !this.isActive };\n }\n}\n"]}
|