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

@@ -25,7 +25,6 @@ import { ISerializationService } from 'sql/platform/serialization/common/seriali
import { IFileBrowserService } from 'sql/workbench/services/fileBrowser/common/interfaces';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { assign } from 'vs/base/common/objects';
import { serializableToMap } from 'sql/base/common/map';
import { IAssessmentService } from 'sql/workbench/services/assessment/common/interfaces';
import { IDataGridProviderService } from 'sql/workbench/services/dataGridProvider/common/dataGridProviderService';
@@ -570,7 +569,7 @@ export class MainThreadDataProtocol extends Disposable implements MainThreadData
}
public $onObjectExplorerNodeExpanded(providerId: string, expandResponse: azdata.ObjectExplorerExpandInfo): void {
let expandInfo: NodeExpandInfoWithProviderId = assign({ providerId: providerId }, expandResponse);
let expandInfo: NodeExpandInfoWithProviderId = Object.assign({ providerId: providerId }, expandResponse);
this._objectExplorerService.onNodeExpanded(expandInfo);
}

View File

@@ -16,7 +16,6 @@ import { ModelViewInput, ModelViewInputModel, ModeViewSaveHandler } from 'sql/wo
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { assign } from 'vs/base/common/objects';
import { TelemetryView, TelemetryAction } from 'sql/platform/telemetry/common/telemetryKeys';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
@@ -92,7 +91,7 @@ export class MainThreadModelViewDialog extends Disposable implements MainThreadM
public $openDialog(handle: number, dialogName?: string): Thenable<void> {
let dialog = this.getDialog(handle);
const options = assign({}, DefaultDialogOptions);
const options = Object.assign({}, DefaultDialogOptions);
options.width = dialog.width;
options.dialogStyle = dialog.dialogStyle;
options.dialogPosition = dialog.dialogPosition;
@@ -247,7 +246,7 @@ export class MainThreadModelViewDialog extends Disposable implements MainThreadM
public $openWizard(handle: number, source?: string): Thenable<void> {
let wizard = this.getWizard(handle);
const options = assign({}, DefaultWizardOptions);
const options = Object.assign({}, DefaultWizardOptions);
options.width = wizard.width;
this._dialogService.showWizard(wizard, options, source);
return Promise.resolve();

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

View File

@@ -26,7 +26,7 @@ class ModelViewPanelImpl implements azdata.window.ModelViewPanel {
public handle: number;
protected _modelViewId: string;
protected _valid: boolean = true;
protected _onValidityChanged: vscode.Event<boolean>;
protected _onValidityChanged: Event<boolean>;
constructor(private _viewType: string,
protected _extHostModelViewDialog: ExtHostModelViewDialog,

View File

@@ -14,7 +14,6 @@ import * as azdata from 'azdata';
import * as vsTreeExt from 'vs/workbench/api/common/extHostTreeViews';
import { Emitter } from 'vs/base/common/event';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { assign } from 'vs/base/common/objects';
import { ILogService } from 'vs/platform/log/common/log';
import { TreeDataTransferDTO } from 'vs/workbench/api/common/shared/treeDataTransfer';
@@ -166,7 +165,7 @@ export class ExtHostTreeView<T> extends vsTreeExt.ExtHostTreeView<T> {
protected override createTreeNode(element: T, extensionTreeItem: azdata.TreeComponentItem, parent?: vsTreeExt.TreeNode | vsTreeExt.Root): vsTreeExt.TreeNode {
let node = super.createTreeNode(element, extensionTreeItem, parent);
if (node.item) {
node.item = assign(node.item, { checked: extensionTreeItem.checked, enabled: extensionTreeItem.enabled });
node.item = Object.assign(node.item, { checked: extensionTreeItem.checked, enabled: extensionTreeItem.enabled });
}
return node;
}