import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri'; import { IQuickNavigateConfiguration, IKeyMods } from '../quick-open'; import { IQuickPickItem, IPickItem, IPickInputOptions, IInputOptions } from '../generated-model'; export interface IPickOptions { /** * an optional string to show as place holder in the input box to guide the user what she picks on */ placeHolder?: string; /** * an optional flag to include the description when filtering the picks */ matchOnDescription?: boolean; /** * an optional flag to include the detail when filtering the picks */ matchOnDetail?: boolean; /** * an optional flag to filter the picks based on label. Defaults to true. */ matchOnLabel?: boolean; /** * an option flag to control whether focus is always automatically brought to a list item. Defaults to true. */ autoFocusOnList?: boolean; /** * an optional flag to not close the picker on focus lost */ ignoreFocusLost?: boolean; /** * an optional flag to make this picker multi-select */ canPickMany?: boolean; /** * enables quick navigate in the picker to open an element without typing */ quickNavigate?: IQuickNavigateConfiguration; /** * a context key to set when this picker is active */ contextKey?: string; /** * an optional property for the item to focus initially. */ activeItem?: Promise | T; onKeyMods?: (keyMods: IKeyMods) => void; onDidFocus?: (entry: T) => void; onDidTriggerItemButton?: (context: IQuickPickItemButtonContext) => void; } export interface IQuickInputButton { /** iconPath or iconClass required */ iconPath?: { dark: URI; light?: URI; }; /** iconPath or iconClass required */ iconClass?: string; tooltip?: string; } export interface IQuickPickItemButtonEvent { button: IQuickInputButton; item: T; } export interface IQuickPickItemButtonContext extends IQuickPickItemButtonEvent { removeItem(): void; } export interface IQuickInputService { /** * Provides access to the back button in quick input. */ /** * Allows to register on the event that quick input is showing. */ /** * Allows to register on the event that quick input is hiding. */ /** * Opens the quick input box for selecting items and returns a promise * with the user selected item(s) if any. */ pick(picks: IPickItem[], options?: IPickInputOptions): Promise; /** * Opens the quick input box for text input and returns a promise with the user typed value if any. */ input(options?: IInputOptions): Promise; /** * Provides raw access to the quick pick controller. */ /** * Provides raw access to the quick input controller. */ /** * Moves focus into quick input. */ /** * Toggle the checked state of the selected item. */ /** * Navigate inside the opened quick input list. */ /** * Navigate back in a multi-step quick input. */ /** * Accept the selected item. * * @param keyMods allows to override the state of key * modifiers that should be present when invoking. */ /** * Cancels quick input and closes it. */ cancel(): Promise; /** * Set selected value*/ setSelected(selectedValue: IPickItem[], inputValue: string): Promise; }