added properties to inputbox and form to be able to change style fro… (#1371)

* added properties to inputbox and form to be able to change style from extension
* moved registerModelViewProvider from dashboard to ui namespace
This commit is contained in:
Leila Lali
2018-05-09 10:58:23 -07:00
committed by GitHub
parent f10e281ffc
commit bcd6178d67
10 changed files with 115 additions and 27 deletions

View File

@@ -243,6 +243,14 @@ class ComponentWrapper implements sqlops.Component {
return this.itemConfigs.map(itemConfig => itemConfig.component);
}
public get enabled(): boolean {
return this.properties['enabled'];
}
public set enabled(value: boolean) {
this.setProperty('enabled', value);
}
public toComponentShape(): IComponentShape {
return <IComponentShape>{
id: this.id,
@@ -391,6 +399,34 @@ class InputBoxWrapper extends ComponentWrapper implements sqlops.InputBoxCompone
this.setProperty('value', v);
}
public get ariaLabel(): string {
return this.properties['ariaLabel'];
}
public set ariaLabel(v: string) {
this.setProperty('ariaLabel', v);
}
public get placeHolder(): string {
return this.properties['placeHolder'];
}
public set placeHolder(v: string) {
this.setProperty('placeHolder', v);
}
public get height(): number {
return this.properties['height'];
}
public set height(v: number) {
this.setProperty('height', v);
}
public get width(): number {
return this.properties['width'];
}
public set width(v: number) {
this.setProperty('width', v);
}
public get onTextChanged(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onDidChange);
return emitter && emitter.event;