mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Feat/add dom component (#2622)
* add dom component for model view * formatting * make css style hardcoded in dom.component * comment out the unused CSS * address comments * address comment
This commit is contained in:
committed by
Kevin Cunnane
parent
08f2e72af8
commit
917f9eead3
@@ -191,6 +191,13 @@ class ModelBuilderImpl implements sqlops.ModelBuilder {
|
||||
return builder;
|
||||
}
|
||||
|
||||
dom(): sqlops.ComponentBuilder<sqlops.DomComponent> {
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<sqlops.DomComponent> = this.getComponentBuilder(new DomComponentWrapper(this._proxy, this._handle, id), id);
|
||||
this._componentBuilders.set(id, builder);
|
||||
return builder;
|
||||
}
|
||||
|
||||
getComponentBuilder<T extends sqlops.Component>(component: ComponentWrapper, id: string): ComponentBuilderImpl<T> {
|
||||
let componentBuilder: ComponentBuilderImpl<T> = new ComponentBuilderImpl<T>(component);
|
||||
this._componentBuilders.set(id, componentBuilder);
|
||||
@@ -840,8 +847,8 @@ class WebViewWrapper extends ComponentWrapper implements sqlops.WebViewComponent
|
||||
public get html(): string {
|
||||
return this.properties['html'];
|
||||
}
|
||||
public set html(v: string) {
|
||||
this.setProperty('html', v);
|
||||
public set html(html: string) {
|
||||
this.setProperty('html', html);
|
||||
}
|
||||
|
||||
public get onMessage(): vscode.Event<any> {
|
||||
@@ -857,6 +864,21 @@ class WebViewWrapper extends ComponentWrapper implements sqlops.WebViewComponent
|
||||
}
|
||||
}
|
||||
|
||||
class DomComponentWrapper extends ComponentWrapper implements sqlops.DomComponent {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.Dom, id);
|
||||
this.properties = {};
|
||||
}
|
||||
|
||||
public get html(): string {
|
||||
return this.properties['html'];
|
||||
}
|
||||
public set html(html: string) {
|
||||
this.setProperty('html', html);
|
||||
}
|
||||
}
|
||||
|
||||
class EditorWrapper extends ComponentWrapper implements sqlops.EditorComponent {
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.Editor, id);
|
||||
|
||||
Reference in New Issue
Block a user