mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 01:25:39 -05:00
Clean up Loading Component typings (#13785)
* Clean up Loading Component typings * add properties to impl
This commit is contained in:
15
src/sql/azdata.d.ts
vendored
15
src/sql/azdata.d.ts
vendored
@@ -3400,9 +3400,22 @@ declare module 'azdata' {
|
||||
}
|
||||
|
||||
export interface LoadingComponentProperties extends ComponentProperties {
|
||||
/**
|
||||
* Whether to show the loading spinner instead of the contained component. True by default
|
||||
*/
|
||||
loading?: boolean;
|
||||
/**
|
||||
* Whether to show the loading text next to the spinner
|
||||
*/
|
||||
showText?: boolean;
|
||||
/**
|
||||
* The text to display while loading is set to true
|
||||
*/
|
||||
loadingText?: string;
|
||||
/**
|
||||
* The text to display while loading is set to false. Will also be announced through screen readers
|
||||
* once loading is completed.
|
||||
*/
|
||||
loadingCompletedText?: string;
|
||||
}
|
||||
|
||||
@@ -3595,7 +3608,7 @@ declare module 'azdata' {
|
||||
* Component used to wrap another component that needs to be loaded, and show a loading spinner
|
||||
* while the contained component is loading
|
||||
*/
|
||||
export interface LoadingComponent extends Component {
|
||||
export interface LoadingComponent extends Component, LoadingComponentProperties {
|
||||
/**
|
||||
* Whether to show the loading spinner instead of the contained component. True by default
|
||||
*/
|
||||
|
||||
1
src/sql/azdata.proposed.d.ts
vendored
1
src/sql/azdata.proposed.d.ts
vendored
@@ -6,7 +6,6 @@
|
||||
// This is the place for API experiments and proposal.
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { LoadingComponentProperties } from 'azdata';
|
||||
|
||||
declare module 'azdata' {
|
||||
/**
|
||||
|
||||
@@ -1673,6 +1673,30 @@ class LoadingComponentWrapper extends ComponentWrapper implements azdata.Loading
|
||||
this.setProperty('loading', value);
|
||||
}
|
||||
|
||||
public get showText(): boolean {
|
||||
return this.properties['showText'];
|
||||
}
|
||||
|
||||
public set showText(value: boolean) {
|
||||
this.setProperty('showText', value);
|
||||
}
|
||||
|
||||
public get loadingText(): string {
|
||||
return this.properties['loadingText'];
|
||||
}
|
||||
|
||||
public set loadingText(value: string) {
|
||||
this.setProperty('loadingText', value);
|
||||
}
|
||||
|
||||
public get loadingCompletedText(): string {
|
||||
return this.properties['loadingCompletedText'];
|
||||
}
|
||||
|
||||
public set loadingCompletedText(value: string) {
|
||||
this.setProperty('loadingCompletedText', value);
|
||||
}
|
||||
|
||||
public get component(): azdata.Component {
|
||||
return this.items[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user