mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Add info/warning/error messages for wizards and dialogs (#1696)
This commit is contained in:
30
src/sql/sqlops.proposed.d.ts
vendored
30
src/sql/sqlops.proposed.d.ts
vendored
@@ -582,6 +582,24 @@ declare module 'sqlops' {
|
||||
*/
|
||||
export function createWizard(title: string): Wizard;
|
||||
|
||||
/**
|
||||
* Used to control whether a message in a dialog/wizard is displayed as an error,
|
||||
* warning, or informational message. Default is error.
|
||||
*/
|
||||
export enum MessageLevel {
|
||||
Error = 0,
|
||||
Warning = 1,
|
||||
Information = 2
|
||||
}
|
||||
|
||||
/**
|
||||
* A message shown in a dialog. If the level is not set it defaults to error.
|
||||
*/
|
||||
export type DialogMessage = {
|
||||
readonly text: string,
|
||||
readonly level?: MessageLevel
|
||||
};
|
||||
|
||||
export interface ModelViewPanel {
|
||||
/**
|
||||
* Register model view content for the dialog.
|
||||
@@ -632,6 +650,12 @@ declare module 'sqlops' {
|
||||
* Any additional buttons that should be displayed
|
||||
*/
|
||||
customButtons: Button[];
|
||||
|
||||
/**
|
||||
* Set the informational message shown in the dialog. Hidden when the message is
|
||||
* undefined or the text is empty or undefined. The default level is error.
|
||||
*/
|
||||
message: DialogMessage;
|
||||
}
|
||||
|
||||
export interface DialogTab extends ModelViewPanel {
|
||||
@@ -798,6 +822,12 @@ declare module 'sqlops' {
|
||||
* cancel it.
|
||||
*/
|
||||
registerNavigationValidator(validator: (pageChangeInfo: WizardPageChangeInfo) => boolean | Thenable<boolean>): void;
|
||||
|
||||
/**
|
||||
* Set the informational message shown in the wizard. Hidden when the message is
|
||||
* undefined or the text is empty or undefined. The default level is error.
|
||||
*/
|
||||
message: DialogMessage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user