/** @packageDocumentation * @module PropertyEditors */ import * as React from "react"; import { PropertyDescription, PropertyRecord, PropertyValue } from "@bentley/ui-abstract"; import { OutputMessageAlert, OutputMessagePriority, OutputMessageType } from "@bentley/imodeljs-frontend"; /** Asynchronous Error Message returned as part of [[AsyncValueProcessingResult]] * @beta */ export interface AsyncErrorMessage { priority: OutputMessagePriority; briefMessage: string; detailedMessage?: string; msgType?: OutputMessageType; alertType?: OutputMessageAlert; displayTime?: number; } /** Asynchronous Value Process Result * @beta */ export interface AsyncValueProcessingResult { encounteredError: boolean; returnValue?: PropertyValue; errorMessage?: AsyncErrorMessage; } /** DataControllers can be implemented per typename to validate and commit values. * @beta */ export interface DataController { validateValue(newValue: PropertyValue, record: PropertyRecord): Promise; commitValue(newValue: PropertyValue, record: PropertyRecord): Promise; } /** PropertyEditor is the base class for all property editors. * @beta */ export declare abstract class PropertyEditorBase implements DataController { get containerHandlesBlur(): boolean; get containerHandlesEscape(): boolean; get containerHandlesEnter(): boolean; get containerHandlesTab(): boolean; customDataController: DataController | undefined; abstract get reactNode(): React.ReactNode; applyEditorParams(_property: PropertyDescription, _record: PropertyRecord): void; commitValue(newValue: PropertyValue, record: PropertyRecord): Promise; validateValue(newValue: PropertyValue, record: PropertyRecord): Promise; } /** DataControllerBase is the base class for all Data Controllers. * @beta */ export declare abstract class DataControllerBase implements DataController { commitValue(_newValue: PropertyValue, _record: PropertyRecord): Promise; validateValue(_newValue: PropertyValue, _record: PropertyRecord): Promise; } /** Manages Property Editors. Property Editors are registered with and created by the manager. * @beta */ export declare class PropertyEditorManager { private static _editors; private static _dataControllers; static registerEditor(editType: string, editor: new () => PropertyEditorBase, editorName?: string): void; private static getFullEditorName; static registerDataController(controllerName: string, controller: new () => DataControllerBase): void; /** @internal */ static deregisterDataController(controllerName: string): void; static createEditor(editType: string, editorName?: string, dataControllerName?: string): PropertyEditorBase; static hasCustomEditor(editType: string, editorName: string): boolean; } /** Basic Property Editor registered for the "text" and "string" type names. * It uses the [[TextEditor]] React component. * @beta */ export declare class BasicPropertyEditor extends PropertyEditorBase { get reactNode(): React.ReactNode; } //# sourceMappingURL=PropertyEditorManager.d.ts.map