/** @packageDocumentation * @module Tree */ import * as React from "react"; import { PropertyRecord } from "@bentley/ui-abstract"; import { TreeNodeItem } from "../TreeDataProvider"; import { BeInspireTreeNode } from "./component/BeInspireTree"; /** Properties for a [[Tree]] that has cell editing enabled * @beta * @deprecated Use [ControlledTree]($ui-components) instead. Will be removed in iModel.js 3.0. */ export interface EditableTreeProps { /** Callback to when editing starts */ onCellEditing: (currentlyActiveNode?: BeInspireTreeNode) => void; /** Callback to when editing finishes */ onCellUpdated: (args: TreeCellUpdatedArgs) => Promise; /** @internal */ ignoreEditorBlur?: boolean; } /** Arguments for the Tree Cell Updated event callback * @beta * @deprecated Use [ControlledTree]($ui-components) instead. Will be removed in iModel.js 3.0. */ export interface TreeCellUpdatedArgs { /** The cell being updated. */ node: BeInspireTreeNode; /** The new value for the cell. */ newValue: string; } /** Prototype for function to set the currently edited tree node * @beta * @deprecated Use [ControlledTree]($ui-components) instead. Will be removed in iModel.js 3.0. */ export declare type SetCurrentlyEditedNode = (currentlyEditedNode?: BeInspireTreeNode) => void; /** Prototype for function to get the currently edited tree node * @beta * @deprecated Use [ControlledTree]($ui-components) instead. Will be removed in iModel.js 3.0. */ export declare type GetCurrentlyEditedNode = () => BeInspireTreeNode | undefined; /** Tree Cell editing information * @beta * @deprecated Use [ControlledTree]($ui-components) instead. Will be removed in iModel.js 3.0. */ export declare class CellEditingEngine { private _getCurrentlyEditedNode?; private _setCurrentlyEditedNode?; private readonly _props; /** * @param props Cell editing properties */ constructor(props: EditableTreeProps); /** * @param getCurrentNode Function, that returns currently edited node * @param setCurrentNode Function, that sets currently edited node */ subscribe(getCurrentNode: GetCurrentlyEditedNode, setCurrentNode: SetCurrentlyEditedNode): void; get hasSubscriptions(): boolean; unsubscribe(): void; static createPropertyRecord(value: string, typename?: string, editor?: string): PropertyRecord; private _onCommit; deactivateEditor: () => void; checkStatus: (node: BeInspireTreeNode, isPressedItemSelected: boolean) => void; activateEditor: (node: BeInspireTreeNode) => void; isEditingEnabled(node: BeInspireTreeNode): boolean | undefined; renderEditor(node: BeInspireTreeNode, style?: React.CSSProperties): JSX.Element; } //# sourceMappingURL=CellEditingEngine.d.ts.map