mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
new component - infobox (#14027)
* new component: infobox * comments * new option * add comments
This commit is contained in:
@@ -271,6 +271,14 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
return builder;
|
||||
}
|
||||
|
||||
infoBox(): azdata.ComponentBuilder<azdata.InfoBoxComponent, azdata.InfoBoxComponentProperties> {
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<azdata.InfoBoxComponent, azdata.InfoBoxComponentProperties> = this.getComponentBuilder(new InfoBoxComponentWrapper(this._proxy, this._handle, id), id);
|
||||
|
||||
this._componentBuilders.set(id, builder);
|
||||
return builder;
|
||||
}
|
||||
|
||||
getComponentBuilder<T extends azdata.Component, TPropertyBag extends azdata.ComponentProperties>(component: ComponentWrapper, id: string): ComponentBuilderImpl<T, TPropertyBag> {
|
||||
let componentBuilder: ComponentBuilderImpl<T, TPropertyBag> = new ComponentBuilderImpl<T, TPropertyBag>(component);
|
||||
this._componentBuilders.set(id, componentBuilder);
|
||||
@@ -1984,6 +1992,37 @@ class PropertiesContainerComponentWrapper extends ComponentWrapper implements az
|
||||
}
|
||||
}
|
||||
|
||||
class InfoBoxComponentWrapper extends ComponentWrapper implements azdata.InfoBoxComponent {
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.InfoBox, id);
|
||||
this.properties = {};
|
||||
}
|
||||
|
||||
public get style(): azdata.InfoBoxStyle {
|
||||
return this.properties['style'];
|
||||
}
|
||||
|
||||
public set style(v: azdata.InfoBoxStyle) {
|
||||
this.setProperty('style', v);
|
||||
}
|
||||
|
||||
public get text(): string {
|
||||
return this.properties['text'];
|
||||
}
|
||||
|
||||
public set text(v: string) {
|
||||
this.setProperty('text', v);
|
||||
}
|
||||
|
||||
public get announceText(): boolean {
|
||||
return this.properties['announceText'];
|
||||
}
|
||||
|
||||
public set announceText(v: boolean) {
|
||||
this.setProperty('announceText', v);
|
||||
}
|
||||
}
|
||||
|
||||
class GroupContainerComponentWrapper extends ComponentWrapper implements azdata.GroupContainer {
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
|
||||
super(proxy, handle, type, id);
|
||||
|
||||
@@ -177,7 +177,8 @@ export enum ModelComponentTypes {
|
||||
ListView,
|
||||
TabbedPanel,
|
||||
Separator,
|
||||
PropertiesContainer
|
||||
PropertiesContainer,
|
||||
InfoBox
|
||||
}
|
||||
|
||||
export enum ModelViewAction {
|
||||
|
||||
Reference in New Issue
Block a user