mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
deprecate the card component (#8552)
* deprecate the card component * add deprecated tag
This commit is contained in:
3
src/sql/azdata.d.ts
vendored
3
src/sql/azdata.d.ts
vendored
@@ -2477,6 +2477,9 @@ declare module 'azdata' {
|
|||||||
flexContainer(): FlexBuilder;
|
flexContainer(): FlexBuilder;
|
||||||
splitViewContainer(): SplitViewBuilder;
|
splitViewContainer(): SplitViewBuilder;
|
||||||
dom(): ComponentBuilder<DomComponent>;
|
dom(): ComponentBuilder<DomComponent>;
|
||||||
|
/**
|
||||||
|
* @deprecated please use radioCardGroup component.
|
||||||
|
*/
|
||||||
card(): ComponentBuilder<CardComponent>;
|
card(): ComponentBuilder<CardComponent>;
|
||||||
inputBox(): ComponentBuilder<InputBoxComponent>;
|
inputBox(): ComponentBuilder<InputBoxComponent>;
|
||||||
checkBox(): ComponentBuilder<CheckBoxComponent>;
|
checkBox(): ComponentBuilder<CheckBoxComponent>;
|
||||||
|
|||||||
@@ -79,7 +79,12 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
|||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private cardDeprecationMessagePrinted = false;
|
||||||
card(): azdata.ComponentBuilder<azdata.CardComponent> {
|
card(): azdata.ComponentBuilder<azdata.CardComponent> {
|
||||||
|
if (!this.cardDeprecationMessagePrinted) {
|
||||||
|
console.warn(`Extension '${this._extension.identifier.value}' is using card component which has been replaced by radioCardGroup. the card component will be removed in a future release.`);
|
||||||
|
this.cardDeprecationMessagePrinted = true;
|
||||||
|
}
|
||||||
let id = this.getNextComponentId();
|
let id = this.getNextComponentId();
|
||||||
let builder: ComponentBuilderImpl<azdata.CardComponent> = this.getComponentBuilder(new CardWrapper(this._proxy, this._handle, id), id);
|
let builder: ComponentBuilderImpl<azdata.CardComponent> = this.getComponentBuilder(new CardWrapper(this._proxy, this._handle, id), id);
|
||||||
this._componentBuilders.set(id, builder);
|
this._componentBuilders.set(id, builder);
|
||||||
|
|||||||
Reference in New Issue
Block a user