Feature/webview for model view (#1463)

* support webview for view model

* formatting

* remove unused imports
This commit is contained in:
Abbie Petchtes
2018-05-23 09:51:44 -07:00
committed by GitHub
parent 1461929f86
commit 36a8991682
10 changed files with 325 additions and 72 deletions

View File

@@ -22,11 +22,12 @@ declare module 'sqlops' {
inputBox(): ComponentBuilder<InputBoxComponent>;
checkBox(): ComponentBuilder<CheckBoxComponent>;
radioButton(): ComponentBuilder<RadioButtonComponent>;
webView(): ComponentBuilder<WebViewComponent>;
text(): ComponentBuilder<TextComponent>;
button(): ComponentBuilder<ButtonComponent>;
dropDown(): ComponentBuilder<DropDownComponent>;
dashboardWidget(widgetId: string): ComponentBuilder<WidgetComponent>;
dashboardWebview(webviewId: string): ComponentBuilder<WebviewComponent>;
dashboardWidget(widgetId: string): ComponentBuilder<DashboardWidgetComponent>;
dashboardWebview(webviewId: string): ComponentBuilder<DashboardWebviewComponent>;
formContainer(): FormBuilder;
}
@@ -273,6 +274,11 @@ declare module 'sqlops' {
editable?: boolean;
}
export interface WebViewProperties {
message?: any;
html?: string;
}
export interface ButtonProperties {
label?: string;
}
@@ -308,16 +314,22 @@ declare module 'sqlops' {
onValueChanged: vscode.Event<any>;
}
export interface WebViewComponent extends Component {
html: string;
message: any;
onMessage: vscode.Event<any>;
}
export interface ButtonComponent extends Component {
label: string;
onDidClick: vscode.Event<any>;
}
export interface WidgetComponent extends Component {
export interface DashboardWidgetComponent extends Component {
widgetId: string;
}
export interface WebviewComponent extends Component {
export interface DashboardWebviewComponent extends Component {
webviewId: string;
}