mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 01:25:38 -05:00
Move some more azdata APIs to stable (#18691)
* Move some more apis to stable * update
This commit is contained in:
188
src/sql/azdata.d.ts
vendored
188
src/sql/azdata.d.ts
vendored
@@ -515,6 +515,14 @@ declare module 'azdata' {
|
||||
* The Operating System version string of the machine running the instance.
|
||||
*/
|
||||
osVersion: string;
|
||||
/**
|
||||
* The CPU count of the host running the server.
|
||||
*/
|
||||
cpuCount?: number;
|
||||
/**
|
||||
* The physical memory of the host running the server.
|
||||
*/
|
||||
physicalMemoryInMb?: number;
|
||||
/**
|
||||
* options for all new server properties.
|
||||
*/
|
||||
@@ -3231,7 +3239,11 @@ declare module 'azdata' {
|
||||
export enum CardType {
|
||||
VerticalButton = 'VerticalButton',
|
||||
Details = 'Details',
|
||||
ListItem = 'ListItem'
|
||||
ListItem = 'ListItem',
|
||||
/**
|
||||
* Card with the icon as a background image
|
||||
*/
|
||||
Image = 'Image'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3451,13 +3463,25 @@ declare module 'azdata' {
|
||||
withCheckbox?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of control of a declarative table column
|
||||
*/
|
||||
export enum DeclarativeDataType {
|
||||
string = 'string',
|
||||
category = 'category',
|
||||
boolean = 'boolean',
|
||||
editableCategory = 'editableCategory'
|
||||
editableCategory = 'editableCategory',
|
||||
component = 'component',
|
||||
menu = 'menu'
|
||||
}
|
||||
|
||||
/**
|
||||
* Details for the DeclarativeTableRowSelectedEvent event
|
||||
*/
|
||||
export type DeclarativeTableRowSelectedEvent = {
|
||||
row: number
|
||||
};
|
||||
|
||||
export interface RadioButtonProperties extends ComponentProperties {
|
||||
name?: string | undefined;
|
||||
label?: string | undefined;
|
||||
@@ -3465,14 +3489,50 @@ declare module 'azdata' {
|
||||
checked?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* The heading levels an HTML heading element can be.
|
||||
*/
|
||||
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
||||
|
||||
/**
|
||||
* The type of text this is - used to determine display color and how the text is displayed
|
||||
*/
|
||||
export enum TextType {
|
||||
Normal = 'Normal',
|
||||
Error = 'Error',
|
||||
UnorderedList = 'UnorderedList',
|
||||
OrderedList = 'OrderedList'
|
||||
}
|
||||
|
||||
export interface TextComponentProperties extends ComponentProperties, TitledComponentProperties {
|
||||
/**
|
||||
* Provide value to be displayed in the text component. An array of value will be displayed as an unordered list.
|
||||
* Provide value to be displayed in the text component. An array of values will be displayed as an unordered list.
|
||||
*/
|
||||
value?: string | string[] | undefined;
|
||||
/**
|
||||
* List of links to embed within the text. If links are specified there must be placeholder
|
||||
* values in the value indicating where the links should be placed, in the format {i}
|
||||
*
|
||||
* e.g. "Click {0} for more information!""
|
||||
*/
|
||||
links?: LinkArea[] | undefined;
|
||||
/**
|
||||
* If set then an info icon is displayed next to the text which will display the description text when hovered over.
|
||||
*/
|
||||
description?: string | undefined;
|
||||
/**
|
||||
* Whether to display a * next to the text to indicate that the field is required. Default is false.
|
||||
*/
|
||||
requiredIndicator?: boolean | undefined;
|
||||
/**
|
||||
* The heading level for this component - if set the text component will be created as an h#
|
||||
* HTML element with this value being the #.
|
||||
*/
|
||||
headingLevel?: HeadingLevel;
|
||||
/**
|
||||
* Sets the type of text box to be displayed. Default is plain text.
|
||||
*/
|
||||
textType?: TextType;
|
||||
}
|
||||
|
||||
export interface ImageComponentProperties extends ComponentWithIconProperties {
|
||||
@@ -3483,8 +3543,20 @@ declare module 'azdata' {
|
||||
}
|
||||
|
||||
export interface LinkArea {
|
||||
/**
|
||||
* The text that is visible to the user
|
||||
*/
|
||||
text: string;
|
||||
/**
|
||||
* The URL that is navigated to when the link is clicked
|
||||
*/
|
||||
url: string;
|
||||
/*
|
||||
* Accessibility information used when screen reader interacts with this link.
|
||||
* Generally, a link has no need to set the `role` of the accessibilityInformation;
|
||||
* but it is exposed for situations that may require it.
|
||||
*/
|
||||
accessibilityInformation?: vscode.AccessibilityInformation
|
||||
}
|
||||
|
||||
export interface HyperlinkComponentProperties extends TitledComponentProperties {
|
||||
@@ -3506,14 +3578,57 @@ declare module 'azdata' {
|
||||
editable?: boolean | undefined;
|
||||
fireOnTextChange?: boolean | undefined;
|
||||
required?: boolean | undefined;
|
||||
/**
|
||||
* Adds a short hint that describes the expected value for the editable dropdown
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Define error messages to show when custom validation fails. For empty required dropdowns we use a default error message.
|
||||
*/
|
||||
validationErrorMessages?: string[];
|
||||
}
|
||||
|
||||
export interface DeclarativeTableColumn {
|
||||
/**
|
||||
* The name of the column displayed to the user
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
* The type of column this is
|
||||
*/
|
||||
valueType: DeclarativeDataType;
|
||||
/**
|
||||
* Whether the column is read-only
|
||||
*/
|
||||
isReadOnly: boolean;
|
||||
/**
|
||||
* The width of the column, either as a number (in px) or a string
|
||||
*/
|
||||
width: number | string;
|
||||
/**
|
||||
* The list of values when the valueType is category or editableCategory. Unused for other types. Default is an empty array.
|
||||
*/
|
||||
categoryValues?: CategoryValue[] | undefined;
|
||||
/**
|
||||
* The optional CSS style attributes to assign to the header elements
|
||||
*/
|
||||
headerCssStyles?: CssStyles;
|
||||
/**
|
||||
* The optional CSS style attributes to assign to each row
|
||||
*/
|
||||
rowCssStyles?: CssStyles;
|
||||
/**
|
||||
* The optional accessibility label for the column. Default is the display name for the column.
|
||||
*/
|
||||
ariaLabel?: string;
|
||||
/**
|
||||
* Whether to display the "Check All" checkbox in the header row. Only used when the valueType is boolean.
|
||||
*/
|
||||
showCheckAll?: boolean;
|
||||
/**
|
||||
* Whether this column is hidden. Default is false.
|
||||
*/
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
export interface DeclarativeTableProperties extends ComponentProperties {
|
||||
@@ -3521,7 +3636,56 @@ declare module 'azdata' {
|
||||
* @deprecated Use dataValues instead.
|
||||
*/
|
||||
data?: any[][] | undefined;
|
||||
/**
|
||||
* The column definitions for the table
|
||||
*/
|
||||
columns: DeclarativeTableColumn[];
|
||||
/**
|
||||
* dataValues will only be used if data is an empty array.
|
||||
* To set the dataValues, it is recommended to use the setDataValues method that returns a promise.
|
||||
*/
|
||||
dataValues?: DeclarativeTableCellValue[][];
|
||||
|
||||
/**
|
||||
* Gets a boolean value determines whether the row selection is enabled. Default value is false.
|
||||
*/
|
||||
enableRowSelection?: boolean;
|
||||
|
||||
/**
|
||||
* Gets or sets the selected row number of the table. -1 means to no selected row.
|
||||
*/
|
||||
selectedRow?: number;
|
||||
}
|
||||
|
||||
export interface DeclarativeTableCellValue {
|
||||
/**
|
||||
* The cell value
|
||||
*/
|
||||
value: string | number | boolean | Component | DeclarativeTableMenuCellValue;
|
||||
/**
|
||||
* The aria-label of the cell
|
||||
*/
|
||||
ariaLabel?: string;
|
||||
/**
|
||||
* The CSS style of the cell
|
||||
*/
|
||||
style?: CssStyles;
|
||||
/**
|
||||
* Whether the cell is enabled. Default value is true.
|
||||
* Only used when the valueType is boolean
|
||||
*/
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface DeclarativeTableMenuCellValue {
|
||||
/**
|
||||
* commands for the menu. Use an array for a group and menu separators will be added.
|
||||
*/
|
||||
commands: (string | string[])[];
|
||||
/**
|
||||
* context that will be passed to the commands.
|
||||
*/
|
||||
context: { [key: string]: string | boolean | number } | string | boolean | number | undefined
|
||||
}
|
||||
|
||||
export interface ListBoxProperties extends ComponentProperties {
|
||||
@@ -3725,7 +3889,25 @@ declare module 'azdata' {
|
||||
}
|
||||
|
||||
export interface DeclarativeTableComponent extends Component, DeclarativeTableProperties {
|
||||
/**
|
||||
* Event that is fired whenever the data for a cell is changed
|
||||
*/
|
||||
onDataChanged: vscode.Event<any>;
|
||||
/**
|
||||
* Event that is fired whenever a row in the table is selected
|
||||
*/
|
||||
onRowSelected: vscode.Event<DeclarativeTableRowSelectedEvent>;
|
||||
/**
|
||||
* Sets the filter currently applied to this table - only rows with index in the given array will be visible. undefined
|
||||
* will clear the filter
|
||||
*/
|
||||
setFilter(rowIndexes: number[] | undefined): void;
|
||||
|
||||
/**
|
||||
* Sets the data values.
|
||||
* @param v The new data values
|
||||
*/
|
||||
setDataValues(v: DeclarativeTableCellValue[][]): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ListBoxComponent extends Component, ListBoxProperties {
|
||||
|
||||
Reference in New Issue
Block a user