Feature/input box component (#1190)

* Adding new view component for input box
This commit is contained in:
Leila Lali
2018-04-20 16:26:58 -07:00
committed by GitHub
parent 93aa052856
commit a7c4686980
11 changed files with 289 additions and 18 deletions

View File

@@ -5,6 +5,7 @@
import { InjectionToken } from '@angular/core';
import * as sqlops from 'sqlops';
import Event, { Emitter } from 'vs/base/common/event';
/**
* An instance of a model-backed component. This will be a UI element
@@ -20,6 +21,7 @@ export interface IComponent {
addToContainer?: (componentDescriptor: IComponentDescriptor, config: any) => void;
setLayout?: (layout: any) => void;
setProperties?: (properties: { [key: string]: any; }) => void;
onEvent?: Event<IComponentEventArgs>;
}
export const COMPONENT_CONFIG = new InjectionToken<IComponentConfig>('component_config');
@@ -48,6 +50,16 @@ export interface IComponentDescriptor {
id: string;
}
export interface IComponentEventArgs {
eventType: ComponentEventType;
args: any;
}
export enum ComponentEventType {
PropertiesChanged,
onDidChange
}
export interface IModelStore {
/**
* Creates and saves the reference of a component descriptor.