Promote some proposed APIs (#16831)

* Promote some proposed APIs

* Remove buttoncell

* Fix location
This commit is contained in:
Charles Gagnon
2021-08-19 12:29:48 -07:00
committed by GitHub
parent c8602c2ced
commit da73265c9e
2 changed files with 177 additions and 156 deletions

View File

@@ -257,13 +257,6 @@ declare module 'azdata' {
title: string;
}
export interface RadioButtonComponent {
/**
* An event called when the value of radio button changes
*/
onDidChangeCheckedState: vscode.Event<boolean>;
}
export interface DeclarativeTableColumn {
headerCssStyles?: CssStyles;
rowCssStyles?: CssStyles;
@@ -326,10 +319,6 @@ declare module 'azdata' {
slider(): ComponentBuilder<SliderComponent, SliderComponentProperties>;
}
export interface ComponentBuilder<TComponent extends Component, TPropertyBag extends ComponentProperties> {
withProps(properties: TPropertyBag): ComponentBuilder<TComponent, TPropertyBag>;
}
export interface RadioCard {
id: string;
descriptions: RadioCardDescription[];
@@ -600,28 +589,7 @@ declare module 'azdata' {
textType?: TextType;
}
export namespace nb {
/**
* An event that is emitted when the active Notebook editor is changed.
*/
export const onDidChangeActiveNotebookEditor: vscode.Event<NotebookEditor>;
}
export namespace window {
export interface ModelViewDashboard {
registerTabs(handler: (view: ModelView) => Thenable<(DashboardTab | DashboardTabGroup)[]>): void;
open(): Thenable<void>;
close(): Thenable<void>;
updateTabs(tabs: (DashboardTab | DashboardTabGroup)[]): void;
selectTab(id: string): void;
}
/**
*
* @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;
export interface Dialog {
/**
@@ -661,40 +629,41 @@ declare module 'azdata' {
* Width of the wizard
*/
width?: DialogWidth;
/**
* 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(source?: string): Thenable<void>;
}
export interface WizardPage extends ModelViewPanel {
/**
* An optional name for the page. If provided it will be used for telemetry
*/
pageName?: string;
}
/**
* These dialog styles affect how the dialog displays in the application.
* normal: Positioned top and centered.
* flyout (default): Existing panel appearance - positioned full screen height, opens from the right side of the application.
* callout: Opens below or beside button clicked, contains footer section with buttons.
* flyout (default): Positioned full screen height, opens from the right side of the application.
* callout: Opens below or beside parent element, contains footer section with buttons.
*/
export type DialogStyle = 'normal' | 'flyout' | 'callout';
/**
* Where to position the dialog relative to the parent element
*/
export type DialogPosition = 'left' | 'below';
/**
* These are positional data prior to opening of dialog.
* They are needed for positioning relative to the button which triggers the opening of the dialog.
* Default is undefined.
* The p
* They are needed for positioning relative to the element which triggers the opening of the dialog.
*/
export interface IDialogProperties {
/**
* x position of the dialog relative to the parent element
*/
xPos: number,
/**
* y position of the dialog relative to the parent element
*/
yPos: number,
/**
* width of the dialog
*/
width: number,
/**
* height of the dialog
*/
height: number
}
@@ -711,57 +680,6 @@ declare module 'azdata' {
*/
export function createModelViewDialog(title: string, dialogName?: string, width?: DialogWidth, dialogStyle?: DialogStyle, dialogPosition?: DialogPosition, renderHeader?: boolean, renderFooter?: boolean, dialogProperties?: IDialogProperties): Dialog;
export interface Button {
/**
* Specifies whether this is a secondary button. Default is false.
*/
secondary?: boolean;
}
}
export namespace workspace {
/**
* 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, name?: string,): ModelViewEditor;
}
export interface DashboardTab extends Tab {
/**
* Toolbar of the tab, optional.
*/
toolbar?: ToolbarContainer;
}
export interface DashboardTabGroup {
/**
* * Title of the tab group
*/
title: string;
/**
* children 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 Container<TLayout, TItemLayout> extends Component {
setItemLayout(component: Component, layout: TItemLayout): void;
}
export interface TaskInfo {
@@ -772,10 +690,6 @@ declare module 'azdata' {
icon?: IconPath;
}
export interface ButtonCell extends TableCell {
columnName: string;
}
export namespace sqlAssessment {
export enum SqlAssessmentTargetType {
@@ -853,54 +767,6 @@ declare module 'azdata' {
delete?: boolean;
}
export enum AzureResource {
/**
* Azure Log Analytics
*/
AzureLogAnalytics = 8,
/**
* Azure Storage
*/
AzureStorage = 9,
/**
* Kusto
*/
AzureKusto = 10
}
export interface ButtonProperties {
/**
* Specifies whether to use expanded layout or not.
*/
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 enum ButtonType {
File = 'File',
Normal = 'Normal',
Informational = 'Informational'
}
export interface InputBoxProperties {
/**
* The maximum number of characters allowed in the input box.
*/
maxLength?: number;
}
export namespace workspace {
/**
* Creates and enters a workspace at the specified location