mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
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:
@@ -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;
|
||||
|
||||
@@ -324,9 +324,12 @@ export function createApiFactory(
|
||||
const dashboard = {
|
||||
registerWebviewProvider(widgetId: string, handler: (webview: sqlops.DashboardWebview) => void) {
|
||||
extHostWebviewWidgets.$registerProvider(widgetId, handler);
|
||||
},
|
||||
registerModelViewProvider(widgetId: string, handler: (view: sqlops.ModelView) => void): void {
|
||||
extHostModelView.$registerProvider(widgetId, handler);
|
||||
}
|
||||
};
|
||||
|
||||
const ui = {
|
||||
registerModelViewProvider(modelViewId: string, handler: (view: sqlops.ModelView) => void): void {
|
||||
extHostModelView.$registerProvider(modelViewId, handler);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -361,7 +364,8 @@ export function createApiFactory(
|
||||
tasks,
|
||||
dashboard,
|
||||
workspace,
|
||||
queryeditor: queryEditor
|
||||
queryeditor: queryEditor,
|
||||
ui: ui
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user