/** @packageDocumentation * @module Properties */ import * as React from "react"; import { PropertyRecord } from "@bentley/ui-abstract"; import { Orientation } from "@bentley/ui-core"; /** Types of property containers * @public */ export declare enum PropertyContainerType { PropertyPane = "pane", Table = "table", Tree = "tree" } /** State of the Dialog component in a container which renders properties * @public */ export interface PropertyDialogState { title: string; content: React.ReactNode; } /** State of the Popup component in a container which renders properties * @public */ export interface PropertyPopupState { fixedPosition: { top: number; left: number; }; content: React.ReactNode; } /** Additional parameters to the renderer * @public */ export interface PropertyValueRendererContext { /** Type of container that holds the property */ containerType?: string; /** Style that should be applied to the rendered element */ style?: React.CSSProperties; /** Orientation of property/container */ orientation?: Orientation; /** Callback to request for a Popup to be shown. */ onPopupShow?: (popupState: PropertyPopupState) => void; /** Callback to request for a Popup to be hidden. */ onPopupHide?: () => void; /** Callback to request for Dialog to be opened. */ onDialogOpen?: (dialogState: PropertyDialogState) => void; /** Text with custom style applied to it */ decoratedTextElement?: React.ReactNode; /** Callback to highlight text */ textHighlighter?: (text: string) => React.ReactNode; /** Default value to show if value rendering is asynchronous */ defaultValue?: React.ReactNode; /** Whether property value is expanded. */ isExpanded?: boolean; /** Called when property value expansion or collapse is requested. */ onExpansionToggled?: () => void; /** Called when property value element height changes. */ onHeightChanged?: (newHeight: number) => void; } /** Custom property value renderer interface * @public */ export interface IPropertyValueRenderer { /** Checks if the renderer can handle given property */ canRender: (record: PropertyRecord, context?: PropertyValueRendererContext) => boolean; /** Method that returns a JSX representation of PropertyRecord */ render: (record: PropertyRecord, context?: PropertyValueRendererContext) => React.ReactNode; } /** Default implementation of property value renderer manager * @public */ export declare class PropertyValueRendererManager { private static _defaultRendererManager; protected _propertyRenderers: Map; protected _defaultPrimitiveValueRenderer: IPropertyValueRenderer; protected _defaultArrayValueRenderer: IPropertyValueRenderer; protected _defaultStructValueRenderer: IPropertyValueRenderer; protected _defaultMergedValueRenderer: IPropertyValueRenderer; private selectRenderer; /** Render property into JSX element */ render(record: PropertyRecord, context?: PropertyValueRendererContext): React.ReactNode; /** Register a specified property type renderer */ registerRenderer(rendererType: string, propertyRenderer: IPropertyValueRenderer, overwrite?: boolean): void; /** Unregister a specified property type renderer */ unregisterRenderer(rendererType: string): void; /** Get the specified property type renderer instance */ getRegisteredRenderer(rendererType: string): IPropertyValueRenderer | undefined; /** Returns default PropertyValueRendererManager instance */ static get defaultManager(): PropertyValueRendererManager; } //# sourceMappingURL=ValueRendererManager.d.ts.map