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:
Charles Gagnon
2021-06-23 14:26:14 -07:00
committed by GitHub
parent e21f56d719
commit 3a3d7f5271
73 changed files with 417 additions and 414 deletions

View File

@@ -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'

View File

@@ -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();

View File

@@ -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

View File

@@ -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) {

View File

@@ -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,