import { InputBox } from "../../../../base/browser/ui/inputbox/inputBox.js"; import { Disposable } from "../../../../base/common/lifecycle.js"; import { IContextMenuService } from "../../../../platform/contextview/browser/contextView.service.js"; import { IContextViewService } from "../../../../platform/contextview/browser/contextView.service.js"; import { IEditableData } from "../../../common/views.js"; export interface IInlineEditInputBoxOptions { /** * The aria label of the input box. */ readonly ariaLabel: string; /** * The initial value of the input box. Defaults to {@link IEditableData.startingValue}. */ readonly value?: string; /** * The initially selected range of the value. Defaults to the whole value. */ readonly selection?: { readonly start: number; readonly end: number; }; } /** * An input box for editing an item inline, for example to rename an item of a list or tree. * * Errors reported by {@link IEditableData.validationMessage} block accepting the value, other * messages are shown as information. Pressing Enter accepts the value, pressing Escape cancels * editing and moving focus elsewhere accepts the value if it is valid. Losing window focus * (for example via Alt+Tab or an OS input-source switcher) keeps editing while the input remains * the active element of its document. * * Once editing finishes the input box is removed and {@link IEditableData.onFinish} is called. * Disposing the input box before editing finishes removes it without calling `onFinish`. */ export declare class InlineEditInputBox extends Disposable { private readonly _editableData; private readonly _contextMenuService; readonly inputBox: InputBox; constructor(container: HTMLElement, _editableData: IEditableData, options: IInlineEditInputBoxOptions, contextViewService: IContextViewService, _contextMenuService: IContextMenuService); /** * Shows non-error validation messages, errors are shown by the input box validation. */ private _showMessage; private _finish; dispose(): void; }