mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
Promote some proposed APIs (#16831)
* Promote some proposed APIs * Remove buttoncell * Fix location
This commit is contained in:
161
src/sql/azdata.d.ts
vendored
161
src/sql/azdata.d.ts
vendored
@@ -2306,7 +2306,19 @@ declare module 'azdata' {
|
||||
/**
|
||||
* Microsoft Graph
|
||||
*/
|
||||
MsGraph = 7
|
||||
MsGraph = 7,
|
||||
/**
|
||||
* Azure Log Analytics
|
||||
*/
|
||||
AzureLogAnalytics = 8,
|
||||
/**
|
||||
* Azure Storage
|
||||
*/
|
||||
AzureStorage = 9,
|
||||
/**
|
||||
* Kusto
|
||||
*/
|
||||
AzureKusto = 10
|
||||
}
|
||||
|
||||
export interface DidChangeAccountsParams {
|
||||
@@ -2568,8 +2580,9 @@ declare module 'azdata' {
|
||||
* Create a new ModelView editor
|
||||
* @param title The title shown in the editor tab
|
||||
* @param options Options to configure the editor
|
||||
* @param name The name used to identify the editor in telemetry
|
||||
*/
|
||||
export function createModelViewEditor(title: string, options?: ModelViewEditorOptions): ModelViewEditor;
|
||||
export function createModelViewEditor(title: string, options?: ModelViewEditorOptions, name?: string,): ModelViewEditor;
|
||||
|
||||
export interface ModelViewEditor extends window.ModelViewPanel {
|
||||
/**
|
||||
@@ -2693,7 +2706,15 @@ declare module 'azdata' {
|
||||
|
||||
export interface ComponentBuilder<TComponent extends Component, TPropertyBag extends ComponentProperties> {
|
||||
component(): TComponent;
|
||||
/**
|
||||
* @deprecated Use withProps instead
|
||||
*/
|
||||
withProperties<U>(properties: U): ComponentBuilder<TComponent, TPropertyBag>;
|
||||
/**
|
||||
* Sets the initial set of properties for the component being created
|
||||
* @param properties The properties to apply to the component
|
||||
*/
|
||||
withProps(properties: TPropertyBag): ComponentBuilder<TComponent, TPropertyBag>;
|
||||
withValidation(validation: (component: TComponent) => boolean | Thenable<boolean>): ComponentBuilder<TComponent, TPropertyBag>;
|
||||
}
|
||||
export interface ContainerBuilder<TComponent extends Component, TLayout, TItemLayout, TPropertyBag extends ComponentProperties> extends ComponentBuilder<TComponent, TPropertyBag> {
|
||||
@@ -2900,6 +2921,13 @@ declare module 'azdata' {
|
||||
* @param layout object
|
||||
*/
|
||||
setLayout(layout: TLayout): void;
|
||||
|
||||
/**
|
||||
* Sets the layout for the specified child component
|
||||
* @param component The component to set the layout for
|
||||
* @param layout The layout to apply
|
||||
*/
|
||||
setItemLayout(component: Component, layout: TItemLayout): void;
|
||||
}
|
||||
|
||||
export interface NavContainer extends Container<any, any> {
|
||||
@@ -3306,6 +3334,10 @@ declare module 'azdata' {
|
||||
* This title will show when hovered over
|
||||
*/
|
||||
title?: string | undefined;
|
||||
/**
|
||||
* The maximum number of characters allowed in the input box.
|
||||
*/
|
||||
maxLength?: number;
|
||||
}
|
||||
|
||||
export interface TableColumn {
|
||||
@@ -3507,19 +3539,57 @@ declare module 'azdata' {
|
||||
isAutoResizable: boolean;
|
||||
}
|
||||
|
||||
export enum ButtonType {
|
||||
/**
|
||||
* Opens up the File Picker dialog when clicked
|
||||
*/
|
||||
File = 'File',
|
||||
/**
|
||||
* Normal button with no special behavior
|
||||
*/
|
||||
Normal = 'Normal',
|
||||
/**
|
||||
* Button that displays additional information when hovered over
|
||||
*/
|
||||
Informational = 'Informational'
|
||||
}
|
||||
|
||||
export interface ButtonProperties extends ComponentWithIconProperties {
|
||||
/**
|
||||
* The label for the button
|
||||
*/
|
||||
label?: string | undefined;
|
||||
|
||||
/**
|
||||
* Whether the button opens the file browser dialog
|
||||
* @deprecated Use fileType instead
|
||||
*/
|
||||
isFile?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The content of the currently selected file
|
||||
*/
|
||||
fileContent?: string | undefined;
|
||||
|
||||
/**
|
||||
* Specifies the type of button this is. Default is Normal.
|
||||
*/
|
||||
buttonType?: ButtonType;
|
||||
|
||||
/**
|
||||
* Description text to display inside button element.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Specifies whether this is a secondary button. Default value is false.
|
||||
*/
|
||||
secondary?: boolean;
|
||||
|
||||
/**
|
||||
* The file type filter used for the file input dialog box - only used when the button type is File
|
||||
*/
|
||||
fileType?: string
|
||||
}
|
||||
|
||||
export interface LoadingComponentProperties extends ComponentProperties {
|
||||
@@ -3599,6 +3669,10 @@ declare module 'azdata' {
|
||||
* An event called when the radio button is clicked
|
||||
*/
|
||||
onDidClick: vscode.Event<any>;
|
||||
/**
|
||||
* An event called when the value of radio button changes
|
||||
*/
|
||||
onDidChangeCheckedState: vscode.Event<boolean>;
|
||||
}
|
||||
|
||||
export interface CheckBoxComponent extends Component, CheckBoxProperties {
|
||||
@@ -3890,6 +3964,40 @@ declare module 'azdata' {
|
||||
*/
|
||||
export function createModelViewDialog(title: string, dialogName?: string, width?: DialogWidth): Dialog;
|
||||
|
||||
export interface ModelViewDashboard {
|
||||
/**
|
||||
* Registers the initial set of tabs for this dashboard
|
||||
* @param handler Callback for creating the initial set of tabs to display
|
||||
*/
|
||||
registerTabs(handler: (view: ModelView) => Thenable<(DashboardTab | DashboardTabGroup)[]>): void;
|
||||
/**
|
||||
* Open the dashboard
|
||||
*/
|
||||
open(): Thenable<void>;
|
||||
/**
|
||||
* Close the dashboard
|
||||
*/
|
||||
close(): Thenable<void>;
|
||||
/**
|
||||
* Updates the tabs that are currently displayed
|
||||
* @param tabs The new set of tabs to display
|
||||
*/
|
||||
updateTabs(tabs: (DashboardTab | DashboardTabGroup)[]): void;
|
||||
/**
|
||||
* Selects the tab with the given ID
|
||||
* @param id The ID of the tab to select
|
||||
*/
|
||||
selectTab(id: string): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ModelView Dashboard that when opened will be displayed in an editor pane.
|
||||
* @param title The title displayed in the editor tab for the dashboard
|
||||
* @param name The name used to identify this dashboard in telemetry
|
||||
* @param options Options to configure the dashboard
|
||||
*/
|
||||
export function createModelViewDashboard(title: string, name?: string, options?: ModelViewDashboardOptions): ModelViewDashboard;
|
||||
|
||||
/**
|
||||
* Create a dialog tab which can be included as part of the content of a dialog
|
||||
* @param title The title of the page, displayed on the tab to select the page
|
||||
@@ -4077,6 +4185,11 @@ declare module 'azdata' {
|
||||
* Position of the button on the dialog footer
|
||||
*/
|
||||
position?: DialogButtonPosition | undefined;
|
||||
|
||||
/**
|
||||
* Specifies whether this is a secondary button. Default is false.
|
||||
*/
|
||||
secondary?: boolean;
|
||||
}
|
||||
|
||||
export type DialogButtonPosition = 'left' | 'right';
|
||||
@@ -4119,6 +4232,11 @@ declare module 'azdata' {
|
||||
* An optional description for the page. If provided it will be displayed underneath the page title.
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* An optional name for the page. If provided it will be used for telemetry
|
||||
*/
|
||||
pageName?: string;
|
||||
}
|
||||
|
||||
export interface Wizard {
|
||||
@@ -4210,8 +4328,9 @@ declare module 'azdata' {
|
||||
|
||||
/**
|
||||
* Open the wizard. Does nothing if the wizard is already open.
|
||||
* @param source Where the wizard was opened from for telemetry (ex: command palette, context menu)
|
||||
*/
|
||||
open(): Thenable<void>;
|
||||
open(source?: string): Thenable<void>;
|
||||
|
||||
/**
|
||||
* Close the wizard. Does nothing if the wizard is not open.
|
||||
@@ -4307,6 +4426,37 @@ declare module 'azdata' {
|
||||
export function getQueryDocument(fileUri: string): Thenable<QueryDocument>;
|
||||
}
|
||||
|
||||
export interface DashboardTab extends Tab {
|
||||
/**
|
||||
* Toolbar of the tab, optional.
|
||||
*/
|
||||
toolbar?: ToolbarContainer;
|
||||
}
|
||||
|
||||
export interface DashboardTabGroup {
|
||||
/**
|
||||
* Title of the tab group
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* Child tabs of the tab group
|
||||
*/
|
||||
tabs: DashboardTab[];
|
||||
}
|
||||
|
||||
export interface ModelViewDashboardOptions {
|
||||
/**
|
||||
* Whether to show the tab icon, default is true
|
||||
*/
|
||||
showIcon?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to show the tab navigation pane even when there is only one tab, default is false
|
||||
*/
|
||||
alwaysShowTabs?: boolean;
|
||||
}
|
||||
|
||||
export interface ModelViewEditorOptions {
|
||||
/**
|
||||
* Should the model view editor's context be kept around even when the editor is no longer visible? It is false by default
|
||||
@@ -4480,6 +4630,11 @@ declare module 'azdata' {
|
||||
*/
|
||||
export const onDidChangeNotebookCell: vscode.Event<NotebookCellChangeEvent>;
|
||||
|
||||
/**
|
||||
* An event that is emitted when the active Notebook editor is changed.
|
||||
*/
|
||||
export const onDidChangeActiveNotebookEditor: vscode.Event<NotebookEditor>;
|
||||
|
||||
/**
|
||||
* Show the given document in a notebook editor. A [column](#ViewColumn) can be provided
|
||||
* to control where the editor is being shown. Might change the [active editor](#nb.activeNotebookEditor).
|
||||
|
||||
Reference in New Issue
Block a user