mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Support view model toolbar (#1533)
* support view model toolbar * add EULA * formatting * address comment
This commit is contained in:
27
src/sql/sqlops.proposed.d.ts
vendored
27
src/sql/sqlops.proposed.d.ts
vendored
@@ -30,6 +30,7 @@ declare module 'sqlops' {
|
||||
dashboardWebview(webviewId: string): ComponentBuilder<DashboardWebviewComponent>;
|
||||
formContainer(): FormBuilder;
|
||||
groupContainer(): GroupBuilder;
|
||||
toolbarContainer(): ToolbarBuilder;
|
||||
}
|
||||
|
||||
export interface ComponentBuilder<T extends Component> {
|
||||
@@ -49,6 +50,24 @@ declare module 'sqlops' {
|
||||
export interface GroupBuilder extends ContainerBuilder<GroupContainer, GroupLayout, GroupItemLayout> {
|
||||
}
|
||||
|
||||
export interface ToolbarBuilder extends ContainerBuilder<ToolbarContainer, any, any> {
|
||||
withToolbarItems(components: ToolbarComponent[]): ContainerBuilder<ToolbarContainer, any, any>;
|
||||
|
||||
/**
|
||||
* Creates a collection of child components and adds them all to this container
|
||||
*
|
||||
* @param toolbarComponents the definitions
|
||||
*/
|
||||
addToolbarItems(toolbarComponents: Array<ToolbarComponent>): void;
|
||||
|
||||
/**
|
||||
* Creates a child component and adds it to this container.
|
||||
*
|
||||
* @param toolbarComponent the component to be added
|
||||
*/
|
||||
addToolbarItem(toolbarComponent: ToolbarComponent): void;
|
||||
}
|
||||
|
||||
export interface FormBuilder extends ContainerBuilder<FormContainer, FormLayout, FormItemLayout> {
|
||||
withFormItems(components: FormComponent[], itemLayout?: FormItemLayout): ContainerBuilder<FormContainer, FormLayout, FormItemLayout>;
|
||||
|
||||
@@ -104,6 +123,11 @@ declare module 'sqlops' {
|
||||
actions?: Component[];
|
||||
}
|
||||
|
||||
export interface ToolbarComponent {
|
||||
component: Component;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A component that contains other components
|
||||
*/
|
||||
@@ -212,6 +236,9 @@ declare module 'sqlops' {
|
||||
export interface GroupContainer extends Container<GroupLayout, GroupItemLayout> {
|
||||
}
|
||||
|
||||
export interface ToolbarContainer extends Container<any, any> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes an action to be shown in the UI, with a user-readable label
|
||||
* and a callback to execute the action
|
||||
|
||||
Reference in New Issue
Block a user