/** @packageDocumentation * @module PropertyGrid */ import "./VirtualizedPropertyGrid.scss"; import * as React from "react"; import { PropertyRecord } from "@bentley/ui-abstract"; import { Orientation, RatioChangeResult } from "@bentley/ui-core"; import { FilteredType } from "../dataproviders/filterers/PropertyDataFiltererBase"; import { HighlightingComponentProps } from "../../common/HighlightingComponentProps"; import { PropertyUpdatedArgs } from "../../editors/EditorContainer"; import { ActionButtonRenderer } from "../../properties/renderers/ActionButtonRenderer"; import { PropertyGridColumnInfo } from "../../properties/renderers/PropertyGridColumns"; import { PropertyValueRendererManager } from "../../properties/ValueRendererManager"; import { FlatGridItem } from "../internal/flat-items/FlatGridItem"; import { IPropertyGridEventHandler } from "../internal/PropertyGridEventHandler"; import { IPropertyGridModel } from "../internal/PropertyGridModel"; import { PropertyCategoryRendererManager } from "../PropertyCategoryRendererManager"; import { IPropertyDataProvider, PropertyCategory } from "../PropertyDataProvider"; import { CommonPropertyGridProps } from "./PropertyGridCommons"; /** Properties for [[VirtualizedPropertyGrid]] React component * @beta */ export interface VirtualizedPropertyGridProps extends CommonPropertyGridProps { model: IPropertyGridModel; eventHandler: IPropertyGridEventHandler; dataProvider: IPropertyDataProvider; highlight?: HighlightingComponentProps & { filteredTypes?: FilteredType[]; }; propertyCategoryRendererManager?: PropertyCategoryRendererManager; width?: number; height?: number; } /** State of [[VirtualizedPropertyGrid]] React component * @internal */ interface VirtualizedPropertyGridState { /** List of PropertyGrid categories */ gridItems: FlatGridItem[]; /** Actual orientation used by the property grid */ orientation: Orientation; /** Width of PropertyGrid */ width: number; /** Keeps record of dynamic node heights */ dynamicNodeHeights: Map; /** When resetting node height cache, marks the point at which heights have become stale */ resetIndex: number; } /** * Context of [[VirtualizedPropertyGrid]] component. * @internal */ export interface PropertyGridInternalContext { gridItems: FlatGridItem[]; gridEventHandler: IPropertyGridEventHandler; gridModel: IPropertyGridModel; style?: React.CSSProperties; className?: string; gridContext: VirtualizedPropertyGridContext; onItemHeightChanged: (index: number, key: string, height: number) => void; } /** * Context of the surrounding [VirtualizedPropertyGrid]($ui-components) component. * @beta */ export interface VirtualizedPropertyGridContext { orientation: Orientation; gridWidth: number; isPropertyHoverEnabled: boolean; isPropertySelectionEnabled: boolean; selectedPropertyKey?: string; onPropertyClicked?: (property: PropertyRecord, key?: string) => void; onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void; onPropertyContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void; editingPropertyKey?: string; onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void; onEditCancel?: () => void; eventHandler: IPropertyGridEventHandler; dataProvider: IPropertyDataProvider; actionButtonRenderers?: ActionButtonRenderer[]; propertyValueRendererManager?: PropertyValueRendererManager; propertyCategoryRendererManager?: PropertyCategoryRendererManager; columnRatio: number; columnInfo: PropertyGridColumnInfo; isResizeHandleBeingDragged: boolean; isResizeHandleHovered: boolean; onColumnRatioChanged: (ratio: number) => void | RatioChangeResult; onResizeHandleDragChanged: (newValue: boolean) => void; onResizeHandleHoverChanged: (newValue: boolean) => void; highlight?: HighlightingComponentProps & { filteredTypes?: FilteredType[]; }; } /** * VirtualizedPropertyGrid React component. * @beta */ export declare class VirtualizedPropertyGrid extends React.Component { private _listRef; /** @internal */ constructor(props: VirtualizedPropertyGridProps); /** @internal */ componentDidUpdate(prevProps: VirtualizedPropertyGridProps, prevState: VirtualizedPropertyGridState): void; /** @internal */ static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null; private getPreferredOrientation; private _onResize; private updateOrientation; /** * Calculate given node height depending on it's type, position in category, parent category depth and current orientation. * @param node FlatGridItem node for which to calculate height * @returns current height of node. */ private calculateNodeHeight; private _handleNodeHeightChange; private _calculateNodeHeightByIndex; private calculateEstimatedHeight; private _getNodeKey; /** @internal */ render(): JSX.Element; } export {}; //# sourceMappingURL=VirtualizedPropertyGrid.d.ts.map