mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { IQuickPickItem, IPickOptions, IInputOptions, IQuickNavigateConfiguration, IQuickPick, IQuickInputButton, IInputBox, QuickPickInput } from 'vs/base/parts/quickinput/common/quickInput';
|
||||
import { IQuickAccessController } from 'vs/platform/quickinput/common/quickAccess';
|
||||
|
||||
export { IQuickPickItem, IPickOptions, IInputOptions, IQuickNavigateConfiguration, IQuickPick, IQuickInput, IQuickInputButton, IInputBox, IQuickPickItemButtonEvent, QuickPickInput, IQuickPickSeparator, IKeyMods } from 'vs/base/parts/quickinput/common/quickInput';
|
||||
export * from 'vs/base/parts/quickinput/common/quickInput';
|
||||
|
||||
export const IQuickInputService = createDecorator<IQuickInputService>('quickInputService');
|
||||
|
||||
@@ -18,7 +20,28 @@ export interface IQuickInputService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Opens the quick input box for selecting items and returns a promise with the user selected item(s) if any.
|
||||
* Provides access to the back button in quick input.
|
||||
*/
|
||||
readonly backButton: IQuickInputButton;
|
||||
|
||||
/**
|
||||
* Provides access to the quick access providers.
|
||||
*/
|
||||
readonly quickAccess: IQuickAccessController;
|
||||
|
||||
/**
|
||||
* Allows to register on the event that quick input is showing.
|
||||
*/
|
||||
readonly onShow: Event<void>;
|
||||
|
||||
/**
|
||||
* Allows to register on the event that quick input is hiding.
|
||||
*/
|
||||
readonly onHide: Event<void>;
|
||||
|
||||
/**
|
||||
* Opens the quick input box for selecting items and returns a promise
|
||||
* with the user selected item(s) if any.
|
||||
*/
|
||||
pick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: true }, token?: CancellationToken): Promise<T[]>;
|
||||
pick<T extends IQuickPickItem>(picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: IPickOptions<T> & { canPickMany: false }, token?: CancellationToken): Promise<T>;
|
||||
@@ -29,20 +52,46 @@ export interface IQuickInputService {
|
||||
*/
|
||||
input(options?: IInputOptions, token?: CancellationToken): Promise<string>;
|
||||
|
||||
backButton: IQuickInputButton;
|
||||
|
||||
/**
|
||||
* Provides raw access to the quick pick controller.
|
||||
*/
|
||||
createQuickPick<T extends IQuickPickItem>(): IQuickPick<T>;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
accept(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Navigate back in a multi-step quick input.
|
||||
*/
|
||||
back(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Accept the selected item.
|
||||
*/
|
||||
accept(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Cancels quick input and closes it.
|
||||
*/
|
||||
cancel(): Promise<void>;
|
||||
|
||||
// TODO@Ben remove once quick open is gone
|
||||
hide(focusLost?: boolean): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user