/* tslint:disable */ 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'; // interface IQuickPickItem { // type?: 'item'; // id?: string; // label?: string; // description?: string; // detail?: string; // iconClasses?: string[]; // buttons?: IQuickInputButton[]; // picked?: boolean; // alwaysShow?: boolean; // } 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 { // _serviceBrand: undefined; /** * Provides access to the back button in quick input. */ // readonly backButton: IQuickInputButton; /** * Allows to register on the event that quick input is showing. */ // readonly onShow: Event; /** * Allows to register on the event that quick input is hiding. */ // readonly onHide: Event; /** * Opens the quick input box for selecting items and returns a promise * with the user selected item(s) if any. */ // pick(picks: IQuickInput[], options?: IPickOptions & { canPickMany: true }, token?: boolean): Promise; // pick(picks: IQuickInput[], options?: IPickOptions & { canPickMany: false }, token?: boolean): Promise; // pick(picks: IQuickInput[], options?: Omit, 'canPickMany'>, token?: boolean): Promise; 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. */ // createQuickPick(): IQuickPick; /** * Provides raw access to the quick input controller. */ // createInputBox(): IInputBox; /** * Moves focus into quick input. */ // focus(): void; /** * Toggle the checked state of the selected item. */ // toggle(): void; /** * Navigate inside the opened quick input list. */ // navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void; /** * Navigate back in a multi-step quick input. */ // back(): Promise; /** * Accept the selected item. * * @param keyMods allows to override the state of key * modifiers that should be present when invoking. */ // accept(keyMods?: IKeyMods): Promise; /** * Cancels quick input and closes it. */ cancel(): Promise; /** * Set selected value*/ setSelected(selectedValue: IPickItem[], inputValue: string): Promise; }