table designer improvements (#18206)

* new table experience

* new table info for existing table

* allow delete confirmation

* fix editor lock isue

* vbump sts

* PR feedback
This commit is contained in:
Alan Ren
2022-02-02 18:46:09 -08:00
committed by GitHub
parent c35eae5969
commit c535c2dbde
14 changed files with 164 additions and 111 deletions

View File

@@ -1042,7 +1042,7 @@ declare module 'azdata' {
* Publish the changes.
* @param table the table information
*/
publishChanges(table: TableInfo): Thenable<void>;
publishChanges(table: TableInfo): Thenable<PublishChangesResult>;
/**
* Generate script for the changes.
@@ -1154,7 +1154,7 @@ declare module 'azdata' {
*/
export enum TableForeignKeyProperty {
Name = 'name',
PrimaryKeyTable = 'primaryKeyTable',
ForeignTable = 'foreignTable',
OnDeleteAction = 'onDeleteAction',
OnUpdateAction = 'onUpdateAction',
Columns = 'columns'
@@ -1164,8 +1164,8 @@ declare module 'azdata' {
* Name of the columns mapping properties for foreign key.
*/
export enum ForeignKeyColumnMappingProperty {
PrimaryKeyColumn = 'primaryKeyColumn',
ForeignKeyColumn = 'foreignKeyColumn'
Column = 'column',
ForeignColumn = 'foreignColumn'
}
/**
@@ -1238,7 +1238,7 @@ declare module 'azdata' {
indexColumnSpecificationTableOptions?: TableDesignerBuiltInTableViewOptions;
}
export interface TableDesignerBuiltInTableViewOptions {
export interface TableDesignerBuiltInTableViewOptions extends DesignerTablePropertiesBase {
/**
* Whether to show the table. Default value is false.
*/
@@ -1247,14 +1247,6 @@ declare module 'azdata' {
* Properties to be displayed in the table, other properties can be accessed in the properties view.
*/
propertiesToDisplay?: string[];
/**
* Whether adding new rows is supported.
*/
canAddRows?: boolean;
/**
* Whether removing rows is supported.
*/
canRemoveRows?: boolean;
/**
* Additional properties for the entity.
*/
@@ -1317,39 +1309,45 @@ declare module 'azdata' {
*/
export type DesignerComponentTypeName = 'input' | 'checkbox' | 'dropdown' | 'table';
/**
* The properties for the table component in the designer.
*/
export interface DesignerTableProperties extends ComponentProperties {
/**
* the name of the properties to be displayed, properties not in this list will be accessible in properties pane.
*/
columns?: string[];
/**
* The display name of the object type.
*/
objectTypeDisplayName: string;
/**
* the properties of the table data item.
*/
itemProperties?: DesignerDataPropertyInfo[];
/**
* The data to be displayed.
*/
data?: DesignerTableComponentDataItem[];
export interface DesignerTablePropertiesBase {
/**
* Whether user can add new rows to the table. The default value is true.
*/
canAddRows?: boolean;
/**
* Whether user can remove rows from the table. The default value is true.
*/
canRemoveRows?: boolean;
/**
* Whether to show confirmation when user removes a row. The default value is false.
*/
showRemoveRowConfirmation?: boolean;
/**
* The confirmation message to be displayed when user removes a row.
*/
removeRowConfirmationMessage?: string;
}
/**
* The properties for the table component in the designer.
*/
export interface DesignerTableProperties extends ComponentProperties, DesignerTablePropertiesBase {
/**
* the name of the properties to be displayed, properties not in this list will be accessible in properties pane.
*/
columns?: string[];
/**
* The display name of the object type.
*/
objectTypeDisplayName: string;
/**
* the properties of the table data item.
*/
itemProperties?: DesignerDataPropertyInfo[];
/**
* The data to be displayed.
*/
data?: DesignerTableComponentDataItem[];
}
/**
@@ -1429,6 +1427,16 @@ declare module 'azdata' {
*/
errors?: { message: string, property?: DesignerEditPath }[];
}
/**
* The result returned by the table designer provider after handling the publish changes request.
*/
export interface PublishChangesResult {
/**
* The new table information after the changes are published.
*/
newTableInfo: TableInfo;
}
}
export interface ExecutionPlanGraph {