Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -7,7 +7,7 @@
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { deepClone, assign } from 'vs/base/common/objects';
import { deepClone } from 'vs/base/common/objects';
import { URI } from 'vs/base/common/uri';
import * as nls from 'vs/nls';
@@ -323,17 +323,17 @@ class ComponentBuilderImpl<T extends azdata.Component, TPropertyBag extends azda
withProperties<U>(properties: U): azdata.ComponentBuilder<T, TPropertyBag> {
// Keep any properties that may have been set during initial object construction
this._component.properties = assign({}, this._component.properties, properties);
this._component.properties = Object.assign({}, this._component.properties, properties);
return this;
}
withProps(properties: TPropertyBag): azdata.ComponentBuilder<T, TPropertyBag> {
this._component.properties = assign({}, this._component.properties, properties);
this._component.properties = Object.assign({}, this._component.properties, properties);
return this;
}
withValidation(validation: (component: T) => boolean | Thenable<boolean>): azdata.ComponentBuilder<T, TPropertyBag> {
this._component.customValidations.push(validation);
this._component.customValidations.push(validation as (component: ThisType<ComponentWrapper>) => boolean | Thenable<boolean>); // Use specific type to avoid type assertion error
return this;
}
@@ -406,7 +406,7 @@ class FormContainerBuilder extends GenericContainerBuilder<azdata.FormContainer,
});
}
return new InternalItemConfig(componentWrapper, assign({}, itemLayout || {}, {
return new InternalItemConfig(componentWrapper, Object.assign({}, itemLayout || {}, {
title: formComponent.title,
actions: actions,
isFormComponent: true,
@@ -794,7 +794,7 @@ class ComponentWrapper implements azdata.Component {
}
public updateProperties(properties: { [key: string]: any }): Thenable<void> {
this.properties = assign(this.properties, properties);
this.properties = Object.assign(this.properties, properties);
return this.notifyPropertyChanged();
}
@@ -803,7 +803,7 @@ class ComponentWrapper implements azdata.Component {
}
public updateCssStyles(cssStyles: { [key: string]: string }): Thenable<void> {
this.properties.CSSStyles = assign(this.properties.CSSStyles || {}, cssStyles);
this.properties.CSSStyles = Object.assign(this.properties.CSSStyles || {}, cssStyles);
return this.notifyPropertyChanged();
}
@@ -1648,7 +1648,7 @@ class DeclarativeTableWrapper extends ComponentWrapper implements azdata.Declara
// and so map them into their IDs instead. We don't want to update the actual
// data property though since the caller would still expect that to contain
// the Component objects they created
const properties = assign({}, this.properties);
const properties = Object.assign({}, this.properties);
const componentsToAdd: ComponentWrapper[] = [];
if (properties.data?.length > 0) {