mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
withProperties -> withProps (#15876)
* withProperties -> withProps * Fix errors * remove , * fixes * Update azdata-test * Fix dacpac tests * Add required and remove added layout
This commit is contained in:
@@ -46,19 +46,19 @@ export class AddFileDialog {
|
||||
this._dialog.registerContent(async view => {
|
||||
this.view = view;
|
||||
this._fileNameInputBox = this.view.modelBuilder.inputBox()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
enabled: true,
|
||||
width: '400px'
|
||||
}).component();
|
||||
|
||||
this._titleInputBox = this.view.modelBuilder.inputBox()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
enabled: true,
|
||||
width: '400px'
|
||||
}).component();
|
||||
|
||||
this._saveLocationInputBox = this.view.modelBuilder.inputBox()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
value: this._bookItem.contextValue === BookTreeItemType.savedBook ? this._bookItem.rootContentPath : path.dirname(this._bookItem.resourceUri.fsPath),
|
||||
enabled: false,
|
||||
width: '400px'
|
||||
|
||||
@@ -75,7 +75,7 @@ export class CreateBookDialog {
|
||||
}).component();
|
||||
|
||||
const bookLabel = this.view.modelBuilder.text()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
value: loc.bookDescription,
|
||||
CSSStyles: { 'margin-bottom': '0px', 'margin-top': '0px', 'font-size': 'small' }
|
||||
}).component();
|
||||
|
||||
@@ -32,7 +32,7 @@ export class AddNewPackageTab {
|
||||
this.addNewPkgTab = azdata.window.createTab(localize('managePackages.addNewTabTitle', "Add new"));
|
||||
|
||||
this.addNewPkgTab.registerContent(async view => {
|
||||
this.newPackagesSearchBar = view.modelBuilder.inputBox().withProperties({ width: '400px' }).component();
|
||||
this.newPackagesSearchBar = view.modelBuilder.inputBox().withProps({ width: '400px' }).component();
|
||||
// Search package by name when pressing enter
|
||||
this.newPackagesSearchBar.onEnterKeyPressed(async () => {
|
||||
await this.loadNewPackageInfo();
|
||||
@@ -48,22 +48,22 @@ export class AddNewPackageTab {
|
||||
await this.loadNewPackageInfo();
|
||||
});
|
||||
|
||||
this.newPackagesName = view.modelBuilder.text().withProperties({ width: '400px' }).component();
|
||||
this.newPackagesName = view.modelBuilder.text().withProps({ width: '400px' }).component();
|
||||
this.newPackagesNameLoader = view.modelBuilder.loadingComponent()
|
||||
.withItem(this.newPackagesName)
|
||||
.component();
|
||||
|
||||
this.newPackagesVersions = view.modelBuilder.dropDown().withProperties({ width: '400px' }).component();
|
||||
this.newPackagesVersions = view.modelBuilder.dropDown().withProps({ width: '400px' }).component();
|
||||
this.newPackagesVersionsLoader = view.modelBuilder.loadingComponent()
|
||||
.withItem(this.newPackagesVersions)
|
||||
.component();
|
||||
|
||||
this.newPackagesSummary = view.modelBuilder.text().withProperties({ width: '400px' }).component();
|
||||
this.newPackagesSummary = view.modelBuilder.text().withProps({ width: '400px' }).component();
|
||||
this.newPackagesSummaryLoader = view.modelBuilder.loadingComponent()
|
||||
.withItem(this.newPackagesSummary)
|
||||
.component();
|
||||
|
||||
this.packageInstallButton = view.modelBuilder.button().withProperties({
|
||||
this.packageInstallButton = view.modelBuilder.button().withProps({
|
||||
label: localize('managePackages.installButtonText', "Install"),
|
||||
width: '200px',
|
||||
secondary: true
|
||||
|
||||
@@ -52,9 +52,9 @@ export class InstalledPackagesTab {
|
||||
};
|
||||
});
|
||||
let defaultPackageType = this.dialog.model.getDefaultPackageType();
|
||||
this.packageTypeDropdown = view.modelBuilder.dropDown().withProperties({
|
||||
this.packageTypeDropdown = view.modelBuilder.dropDown().withProps({
|
||||
values: dropdownValues,
|
||||
value: defaultPackageType
|
||||
value: defaultPackageType.providerId
|
||||
}).component();
|
||||
this.dialog.changeProvider(defaultPackageType.providerId);
|
||||
this.packageTypeDropdown.onValueChanged(async () => {
|
||||
@@ -69,12 +69,12 @@ export class InstalledPackagesTab {
|
||||
|
||||
});
|
||||
|
||||
this.installedPackageCount = view.modelBuilder.text().withProperties({
|
||||
this.installedPackageCount = view.modelBuilder.text().withProps({
|
||||
value: ''
|
||||
}).component();
|
||||
|
||||
this.installedPackagesTable = view.modelBuilder.table()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
columns: [
|
||||
{
|
||||
value: localize('managePackages.pkgNameColumn', "Name"),
|
||||
@@ -128,7 +128,7 @@ export class InstalledPackagesTab {
|
||||
|
||||
this.installedPackagesLoader = view.modelBuilder.loadingComponent()
|
||||
.withItem(this.formBuilder.component())
|
||||
.withProperties({
|
||||
.withProps({
|
||||
loading: true
|
||||
}).component();
|
||||
|
||||
@@ -167,7 +167,7 @@ export class InstalledPackagesTab {
|
||||
let location: string;
|
||||
let component: azdata.Component;
|
||||
if (locations && locations.length === 1) {
|
||||
component = view.modelBuilder.text().withProperties({
|
||||
component = view.modelBuilder.text().withProps({
|
||||
value: locations[0].displayName
|
||||
}).component();
|
||||
location = locations[0].name;
|
||||
@@ -181,7 +181,7 @@ export class InstalledPackagesTab {
|
||||
const currentLocation = await dialog.model.getCurrentLocation();
|
||||
const selectedLocation = dropdownValues.find(x => x.name === currentLocation);
|
||||
location = currentLocation || locations[0].name;
|
||||
let locationDropDown = view.modelBuilder.dropDown().withProperties({
|
||||
let locationDropDown = view.modelBuilder.dropDown().withProps({
|
||||
values: dropdownValues,
|
||||
value: selectedLocation || dropdownValues[0]
|
||||
}).component();
|
||||
@@ -197,7 +197,7 @@ export class InstalledPackagesTab {
|
||||
});
|
||||
component = locationDropDown;
|
||||
} else {
|
||||
component = view.modelBuilder.text().withProperties({
|
||||
component = view.modelBuilder.text().withProps({
|
||||
}).component();
|
||||
}
|
||||
if (location) {
|
||||
|
||||
@@ -45,7 +45,7 @@ export class RemoteBookDialog {
|
||||
this.dialog.registerContent(async view => {
|
||||
this.view = view;
|
||||
|
||||
this.remoteLocationDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
this.remoteLocationDropdown = this.view.modelBuilder.dropDown().withProps({
|
||||
values: this.remoteLocationCategories,
|
||||
value: '',
|
||||
editable: false,
|
||||
@@ -53,7 +53,7 @@ export class RemoteBookDialog {
|
||||
|
||||
this.remoteLocationDropdown.onValueChanged(e => this.onRemoteLocationChanged());
|
||||
|
||||
this.githubRepoDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
this.githubRepoDropdown = this.view.modelBuilder.dropDown().withProps({
|
||||
values: defaultRepos,
|
||||
value: '',
|
||||
editable: true,
|
||||
@@ -69,7 +69,7 @@ export class RemoteBookDialog {
|
||||
this.searchButton.onDidClick(async () => await this.validate());
|
||||
|
||||
this.releaseDropdown = this.view.modelBuilder.dropDown()
|
||||
.withProperties({
|
||||
.withProps({
|
||||
values: [],
|
||||
value: '',
|
||||
enabled: false
|
||||
@@ -77,7 +77,7 @@ export class RemoteBookDialog {
|
||||
|
||||
this.releaseDropdown.onValueChanged(async () => await this.getAssets());
|
||||
|
||||
this.bookDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
this.bookDropdown = this.view.modelBuilder.dropDown().withProps({
|
||||
values: [],
|
||||
value: '',
|
||||
editable: false,
|
||||
@@ -85,7 +85,7 @@ export class RemoteBookDialog {
|
||||
|
||||
this.bookDropdown.onValueChanged(async () => await this.fillVersionDropdown());
|
||||
|
||||
this.versionDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
this.versionDropdown = this.view.modelBuilder.dropDown().withProps({
|
||||
values: [],
|
||||
value: '',
|
||||
editable: false,
|
||||
@@ -93,7 +93,7 @@ export class RemoteBookDialog {
|
||||
|
||||
this.versionDropdown.onValueChanged(async () => await this.fillLanguageDropdown());
|
||||
|
||||
this.languageDropdown = this.view.modelBuilder.dropDown().withProperties({
|
||||
this.languageDropdown = this.view.modelBuilder.dropDown().withProps({
|
||||
values: [],
|
||||
value: '',
|
||||
editable: false,
|
||||
|
||||
Reference in New Issue
Block a user