/** @packageDocumentation * @module Properties */ import * as React from "react"; import { PropertyRecord } from "@bentley/ui-abstract"; import { Orientation, RatioChangeResult } from "@bentley/ui-core"; import { HighlightingComponentProps } from "../../common/HighlightingComponentProps"; import { PropertyUpdatedArgs } from "../../editors/EditorContainer"; import { PropertyValueRendererManager } from "../ValueRendererManager"; import { ActionButtonRenderer } from "./ActionButtonRenderer"; import { PropertyGridColumnInfo } from "./PropertyGridColumns"; /** Properties shared by all renderers and PropertyView * @public */ export interface SharedRendererProps { /** PropertyRecord to render */ propertyRecord: PropertyRecord; /** Unique string, that identifies this property component. Should be used if onClick or onRightClick are provided */ uniqueKey?: string; /** Orientation to use for displaying the property */ orientation: Orientation; /** Controls component selection */ isSelected?: boolean; /** Called when property gets clicked. If undefined, clicking is disabled */ onClick?: (property: PropertyRecord, key?: string) => void; /** Called when property gets right clicked. If undefined, right clicking is not working */ onRightClick?: (property: PropertyRecord, key?: string) => void; /** Called to show a context menu for properties */ onContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void; /** Ratio between label and value cells */ columnRatio?: number; /** Callback to column ratio changed event */ onColumnRatioChanged?: (ratio: number) => void | RatioChangeResult; /** Indicates that properties have *hover* effect */ isHoverable?: boolean; /** Indicates that properties can be selected */ isSelectable?: boolean; /** Width of the whole property element */ width?: number; /** Array of action button renderers @beta */ actionButtonRenderers?: ActionButtonRenderer[]; /** Is resize handle hovered */ isResizeHandleHovered?: boolean; /** Callback to hover event change */ onResizeHandleHoverChanged?: (isHovered: boolean) => void; /** Is resize handle being dragged */ isResizeHandleBeingDragged?: boolean; /** Callback to drag event change */ onResizeHandleDragChanged?: (isDragStarted: boolean) => void; /** Information for styling property grid columns */ columnInfo?: PropertyGridColumnInfo; } /** Properties of [[PropertyRenderer]] React component * @public */ export interface PropertyRendererProps extends SharedRendererProps { /** Custom value renderer */ propertyValueRendererManager?: PropertyValueRendererManager; /** Multiplier of how much the property is indented to the right */ indentation?: number; /** Indicates property is being edited @beta */ isEditing?: boolean; /** Called when property edit is committed. @beta */ onEditCommit?: (args: PropertyUpdatedArgs) => void; /** Called when property edit is cancelled. @beta */ onEditCancel?: () => void; /** Props used for highlighting. @beta */ highlight?: HighlightingComponentProps; } /** State of [[PropertyRenderer]] React component * @internal */ interface PropertyRendererState { /** Currently loaded property value */ displayValue?: React.ReactNode; } /** A React component that renders properties * @public */ export declare class PropertyRenderer extends React.Component { /** @internal */ readonly state: Readonly; constructor(props: PropertyRendererProps); static getLabelOffset(indentation?: number, orientation?: Orientation, width?: number, columnRatio?: number, minColumnLabelWidth?: number): number; private updateDisplayValue; private _onEditCommit; private _onEditCancel; /** Display property record value in an editor */ updateDisplayValueAsEditor(props: PropertyRendererProps): void; /** @internal */ componentDidMount(): void; /** @internal */ componentDidUpdate(prevProps: PropertyRendererProps): void; /** @internal */ render(): JSX.Element; } export {}; //# sourceMappingURL=PropertyRenderer.d.ts.map