added text component (#1462)

* added text component
This commit is contained in:
Leila Lali
2018-05-22 16:12:02 -07:00
committed by GitHub
parent 4bfc549927
commit 1461929f86
6 changed files with 109 additions and 1 deletions

View File

@@ -59,6 +59,13 @@ class ModelBuilderImpl implements sqlops.ModelBuilder {
return builder;
}
text(): sqlops.ComponentBuilder<sqlops.TextComponent> {
let id = this.getNextComponentId();
let builder: ComponentBuilderImpl<sqlops.TextComponent> = this.getComponentBuilder(new TextComponentWrapper(this._proxy, this._handle, id), id);
this._componentBuilders.set(id, builder);
return builder;
}
radioButton(): sqlops.ComponentBuilder<sqlops.RadioButtonComponent> {
let id = this.getNextComponentId();
let builder: ComponentBuilderImpl<sqlops.RadioButtonComponent> = this.getComponentBuilder(new RadioButtonWrapper(this._proxy, this._handle, id), id);
@@ -557,6 +564,21 @@ class RadioButtonWrapper extends ComponentWrapper implements sqlops.RadioButtonC
}
}
class TextComponentWrapper extends ComponentWrapper implements sqlops.TextComponentProperties {
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
super(proxy, handle, ModelComponentTypes.Text, id);
this.properties = {};
}
public get value(): string {
return this.properties['value'];
}
public set value(v: string) {
this.setProperty('value', v);
}
}
class DropDownWrapper extends ComponentWrapper implements sqlops.DropDownComponent {
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {