Feature/schemacompare include exclude checkboxes (#5548)

* Adding include exclude boxes

* Adding as table component generic column and rememebering state.

* converged custome action and select checkboxes, moved sc checkbox to middle, can have multiple checkboxes and can remember state now

* adding action on column as a common column property

* Taking PR comments

* Changing Arg name as per CR comment

* Taking a PR comment
This commit is contained in:
udeeshagautam
2019-05-22 13:53:50 -07:00
committed by GitHub
parent 2e0756ad8d
commit 2d7eb0dcb5
8 changed files with 293 additions and 17 deletions

View File

@@ -189,7 +189,8 @@ export enum ComponentEventType {
validityChanged,
onMessage,
onSelectedRowChanged,
onComponentCreated
onComponentCreated,
onCellAction,
}
export interface IComponentEventArgs {
@@ -633,4 +634,15 @@ export enum SchemaObjectType {
ServerRoleMembership = 63,
ServerRoles = 64,
ServerTriggers = 65
}
export enum ColumnType {
text = 0,
checkBox = 1,
button = 2
}
export enum ActionOnCellCheckboxCheck {
selectRow = 0,
customAction = 1
}

View File

@@ -1094,6 +1094,7 @@ class TableComponentWrapper extends ComponentWrapper implements azdata.TableComp
super(proxy, handle, ModelComponentTypes.Table, id);
this.properties = {};
this._emitterMap.set(ComponentEventType.onSelectedRowChanged, new Emitter<any>());
this._emitterMap.set(ComponentEventType.onCellAction, new Emitter<any>());
}
public get data(): any[][] {
@@ -1129,6 +1130,11 @@ class TableComponentWrapper extends ComponentWrapper implements azdata.TableComp
let emitter = this._emitterMap.get(ComponentEventType.onSelectedRowChanged);
return emitter && emitter.event;
}
public get onCellAction(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onCellAction);
return emitter && emitter.event;
}
}
class DropDownWrapper extends ComponentWrapper implements azdata.DropDownComponent {

View File

@@ -542,7 +542,9 @@ export function createApiFactory(
SchemaUpdateAction: sqlExtHostTypes.SchemaUpdateAction,
SchemaDifferenceType: sqlExtHostTypes.SchemaDifferenceType,
SchemaCompareEndpointType: sqlExtHostTypes.SchemaCompareEndpointType,
SchemaObjectType: sqlExtHostTypes.SchemaObjectType
SchemaObjectType: sqlExtHostTypes.SchemaObjectType,
ColumnType: sqlExtHostTypes.ColumnType,
ActionOnCellCheckboxCheck: sqlExtHostTypes.ActionOnCellCheckboxCheck,
};
},