mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Feature/bdc create (#4012)
* initial checkin * rename * wizard pages * target cluster radio button group * resource strings * existing cluster picker * revert changes to unwanted file * revert unwanted changes-2 * update cluster icon * settings page * fix group container * hyperlink component * address review comments * comments part 2
This commit is contained in:
@@ -164,7 +164,8 @@ export enum ModelComponentTypes {
|
||||
TreeComponent,
|
||||
FileBrowserTree,
|
||||
Editor,
|
||||
Dom
|
||||
Dom,
|
||||
Hyperlink
|
||||
}
|
||||
|
||||
export interface IComponentShape {
|
||||
@@ -262,6 +263,7 @@ export interface CardProperties {
|
||||
label: string;
|
||||
value?: string;
|
||||
actions?: ActionDescriptor[];
|
||||
descriptions?: string[];
|
||||
status?: StatusIndicator;
|
||||
selected?: boolean;
|
||||
cardType: CardType;
|
||||
@@ -300,7 +302,8 @@ export enum DeclarativeDataType {
|
||||
|
||||
export enum CardType {
|
||||
VerticalButton = 'VerticalButton',
|
||||
Details = 'Details'
|
||||
Details = 'Details',
|
||||
ListItem = 'ListItem'
|
||||
}
|
||||
|
||||
export enum Orientation {
|
||||
@@ -492,7 +495,7 @@ export class CellRange {
|
||||
}
|
||||
|
||||
constructor(start: number, end: number) {
|
||||
if (typeof(start) !== 'number' || typeof(start) !== 'number' || start < 0 || end < 0) {
|
||||
if (typeof (start) !== 'number' || typeof (start) !== 'number' || start < 0 || end < 0) {
|
||||
throw new Error('Invalid arguments');
|
||||
}
|
||||
|
||||
|
||||
@@ -198,6 +198,13 @@ class ModelBuilderImpl implements sqlops.ModelBuilder {
|
||||
return builder;
|
||||
}
|
||||
|
||||
hyperlink(): sqlops.ComponentBuilder<sqlops.HyperlinkComponent> {
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<sqlops.HyperlinkComponent> = this.getComponentBuilder(new HyperlinkComponentWrapper(this._proxy, this._handle, id), id);
|
||||
this._componentBuilders.set(id, builder);
|
||||
return builder;
|
||||
}
|
||||
|
||||
getComponentBuilder<T extends sqlops.Component>(component: ComponentWrapper, id: string): ComponentBuilderImpl<T> {
|
||||
let componentBuilder: ComponentBuilderImpl<T> = new ComponentBuilderImpl<T>(component);
|
||||
this._componentBuilders.set(id, componentBuilder);
|
||||
@@ -1248,6 +1255,28 @@ class TreeComponentWrapper<T> extends ComponentWrapper implements sqlops.TreeCom
|
||||
}
|
||||
}
|
||||
|
||||
class HyperlinkComponentWrapper extends ComponentWrapper implements sqlops.HyperlinkComponentProperties {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.Hyperlink, id);
|
||||
this.properties = {};
|
||||
}
|
||||
|
||||
public get label(): string {
|
||||
return this.properties['label'];
|
||||
}
|
||||
public set label(v: string) {
|
||||
this.setProperty('label', v);
|
||||
}
|
||||
|
||||
public get url(): string {
|
||||
return this.properties['url'];
|
||||
}
|
||||
public set url(v: string) {
|
||||
this.setProperty('url', v);
|
||||
}
|
||||
}
|
||||
|
||||
class ModelViewImpl implements sqlops.ModelView {
|
||||
|
||||
public onClosedEmitter = new Emitter<any>();
|
||||
|
||||
Reference in New Issue
Block a user