mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -45,7 +45,7 @@ export class ManageAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: ManageActionContext): Promise<void> {
|
||||
override async run(actionContext: ManageActionContext): Promise<void> {
|
||||
if (actionContext.profile) {
|
||||
await this._connectionManagementService.connect(actionContext.profile, actionContext.uri, { showDashboard: true, saveTheConnection: false, params: undefined, showConnectionDialogOnError: false, showFirewallRuleOnError: true });
|
||||
this._angularEventingService.sendAngularEvent(actionContext.uri, AngularEventType.NAV_DATABASE);
|
||||
@@ -64,7 +64,7 @@ export class InsightAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: InsightActionContext): Promise<void> {
|
||||
override async run(actionContext: InsightActionContext): Promise<void> {
|
||||
if (actionContext.profile) {
|
||||
await this._insightsDialogService.show(actionContext.insight, actionContext.profile);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export abstract class ToggleViewAction extends Action {
|
||||
super(id, label, cssClass);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
const focusedViewId = FocusedViewContext.getValue(this.contextKeyService);
|
||||
|
||||
if (focusedViewId === this.viewId) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { EditorInput, EncodingMode, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { EditorInput, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IConnectionManagementService, IConnectableInput, INewConnectionParams } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
@@ -17,6 +17,7 @@ import { IEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
|
||||
import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverService';
|
||||
import { IUntitledTextEditorModel, UntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel';
|
||||
import { EncodingMode } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
/**
|
||||
* Input for the EditDataEditor.
|
||||
@@ -112,9 +113,9 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
public get rowLimit(): number | undefined { return this._rowLimit; }
|
||||
public get objectType(): string { return this._objectType; }
|
||||
public showResultsEditor(): void { this._showResultsEditor.fire(undefined); }
|
||||
public isDirty(): boolean { return false; }
|
||||
public save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
|
||||
public getTypeId(): string { return EditDataInput.ID; }
|
||||
public override isDirty(): boolean { return false; }
|
||||
public override save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
|
||||
public override get typeId(): string { return EditDataInput.ID; }
|
||||
public setBootstrappedTrue(): void { this._hasBootstrapped = true; }
|
||||
public get resource(): URI { return this._uri; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
@@ -193,7 +194,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
}
|
||||
|
||||
// Boiler Plate Functions
|
||||
public matches(otherInput: any): boolean {
|
||||
public override matches(otherInput: any): boolean {
|
||||
if (otherInput instanceof EditDataInput) {
|
||||
return this._sql.matches(otherInput.sql);
|
||||
}
|
||||
@@ -201,7 +202,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
return this._sql.matches(otherInput);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
// Dispose our edit session then disconnect our input
|
||||
this._queryModelService.disposeEdit(this.uri).then(() => {
|
||||
return this._connectionManagementService.disconnectEditor(this, true);
|
||||
@@ -217,9 +218,9 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
return this._connectionManagementService.getTabColorForUri(this.uri);
|
||||
}
|
||||
|
||||
public resolve(refresh?: boolean): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> { return this._sql.resolve(); }
|
||||
public override resolve(refresh?: boolean): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> { return this._sql.resolve(); }
|
||||
public getEncoding(): string | undefined { return this._sql.getEncoding(); }
|
||||
public getName(): string { return this._sql.getName(); }
|
||||
public override getName(): string { return this._sql.getName(); }
|
||||
public get hasAssociatedFilePath(): boolean { return this._sql.model.hasAssociatedFilePath; }
|
||||
|
||||
public setEncoding(encoding: string, mode: EncodingMode /* ignored, we only have Encode */): void {
|
||||
|
||||
@@ -45,11 +45,11 @@ export class EditDataResultsInput extends EditorInput {
|
||||
this._editDataGridPanel = gridPanel;
|
||||
}
|
||||
|
||||
getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return EditDataResultsInput.ID;
|
||||
}
|
||||
|
||||
matches(other: any): boolean {
|
||||
override matches(other: any): boolean {
|
||||
if (other instanceof EditDataResultsInput) {
|
||||
return (other._uri === this._uri);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export class EditDataResultsInput extends EditorInput {
|
||||
return false;
|
||||
}
|
||||
|
||||
resolve(refresh?: boolean): Promise<any> {
|
||||
override resolve(refresh?: boolean): Promise<any> {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export class EditDataResultsInput extends EditorInput {
|
||||
this._hasBootstrapped = true;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._disposeContainer();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export class DashboardInput extends EditorInput {
|
||||
this._uniqueSelector = uniqueSelector;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return DashboardInput.ID;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class DashboardInput extends EditorInput {
|
||||
});
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
if (!this.connectionProfile) {
|
||||
return '';
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export class DashboardInput extends EditorInput {
|
||||
return this._uri;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._disposeContainer();
|
||||
if (this._onConnectionChanged) {
|
||||
this._onConnectionChanged.dispose();
|
||||
@@ -147,7 +147,7 @@ export class DashboardInput extends EditorInput {
|
||||
return this._uniqueSelector;
|
||||
}
|
||||
|
||||
public matches(otherinput: any): boolean {
|
||||
public override matches(otherinput: any): boolean {
|
||||
return otherinput instanceof DashboardInput
|
||||
&& DashboardInput.profileMatches(this.connectionProfile, otherinput.connectionProfile);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
return this._sessionName;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return ProfilerInput.ID;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
let name: string = nls.localize('profilerInput.profiler', "Profiler");
|
||||
if (!this.connection) {
|
||||
return name;
|
||||
@@ -277,7 +277,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
this.data.clearFilter();
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
super.dispose();
|
||||
this._profilerService.disconnectSession(this.id);
|
||||
}
|
||||
|
||||
@@ -49,11 +49,11 @@ export class ResourceViewerInput extends EditorInput {
|
||||
this.refresh().catch(err => onUnexpectedError(err));
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return ResourceViewerInput.ID;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
return this._dataGridProvider.title || nls.localize('resourceViewerInput.resourceViewer', "Resource Viewer");
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ResourceViewerInput extends EditorInput {
|
||||
return this._columns;
|
||||
}
|
||||
|
||||
isDirty(): boolean {
|
||||
override isDirty(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ export abstract class CalloutDialog<T> extends Modal {
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract renderBody(container: HTMLElement): void;
|
||||
|
||||
public abstract open(): Promise<T>;
|
||||
|
||||
public cancel(): void {
|
||||
|
||||
@@ -753,7 +753,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
super.dispose();
|
||||
this._footerButtons = [];
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class OptionsDialog extends Modal {
|
||||
super(title, name, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, options);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
if (this.backButton) {
|
||||
@@ -163,12 +163,12 @@ export class OptionsDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.close();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.ok();
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ export class OptionsDialog extends Modal {
|
||||
protected layout(height?: number): void {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._optionElements = {};
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
}));
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this._currentButtonType !== this.buttonType) {
|
||||
this.initButton();
|
||||
@@ -168,11 +168,11 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._button.focus();
|
||||
}
|
||||
|
||||
protected updateIcon() {
|
||||
protected override updateIcon() {
|
||||
if (this.iconPath) {
|
||||
if (!this._iconClass) {
|
||||
super.updateIcon();
|
||||
@@ -200,11 +200,11 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
}
|
||||
}
|
||||
|
||||
protected get defaultIconHeight(): number {
|
||||
protected override get defaultIconHeight(): number {
|
||||
return 15;
|
||||
}
|
||||
|
||||
protected get defaultIconWidth(): number {
|
||||
protected override get defaultIconWidth(): number {
|
||||
return 15;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
if (this.cardDiv) {
|
||||
this.cardDiv.nativeElement.focus();
|
||||
}
|
||||
@@ -136,12 +136,12 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateIcon();
|
||||
}
|
||||
|
||||
public get iconClass(): string {
|
||||
public override get iconClass(): string {
|
||||
if (this.isListItemCard) {
|
||||
return this._iconClass + ' icon' + ' list-item-icon';
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.checked = this.checked;
|
||||
this._input.label = this.label;
|
||||
@@ -124,11 +124,11 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.setPropertyFromUI<boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'display': this.display
|
||||
});
|
||||
|
||||
@@ -351,7 +351,7 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
this.validate().catch(onUnexpectedError);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.items.forEach(item => {
|
||||
let component = this.modelStore.getComponent(item.descriptor.id);
|
||||
@@ -362,7 +362,7 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
});
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
if (this._componentWrappers) {
|
||||
this._componentWrappers.forEach(wrapper => {
|
||||
@@ -371,8 +371,6 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
}
|
||||
}
|
||||
|
||||
abstract setLayout(layout: any): void;
|
||||
|
||||
public setItemLayout(componentDescriptor: IComponentDescriptor, config: any): void {
|
||||
if (!componentDescriptor) {
|
||||
return;
|
||||
|
||||
@@ -77,7 +77,7 @@ export abstract class ComponentWithIconBase<T extends azdata.ComponentWithIconPr
|
||||
this.setPropertyFromUI<string>((properties, title) => { properties.title = title; }, newTitle);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
if (this._iconClass) {
|
||||
removeCSSRulesContainingSelector(this._iconClass);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
}
|
||||
|
||||
private static ACCEPTABLE_VALUES = new Set<string>(['number', 'string', 'boolean']);
|
||||
public setProperties(properties: azdata.DeclarativeTableProperties): void {
|
||||
public override setProperties(properties: azdata.DeclarativeTableProperties): void {
|
||||
const basicData: any[][] = properties.data ?? [];
|
||||
const complexData: azdata.DeclarativeTableCellValue[][] = properties.dataValues ?? [];
|
||||
let finalData: azdata.DeclarativeTableCellValue[][];
|
||||
@@ -311,7 +311,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
super.setProperties(properties);
|
||||
}
|
||||
|
||||
public clearContainer(): void {
|
||||
public override clearContainer(): void {
|
||||
super.clearContainer();
|
||||
this.selectedRow = -1;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
}
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
if (action === ModelViewAction.Filter) {
|
||||
this._filteredRowIndexes = args[0];
|
||||
}
|
||||
@@ -375,7 +375,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
return this._filteredRowIndexes.includes(rowIndex) ? false : true;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -121,13 +121,13 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
|
||||
return uri;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
let width: number = convertSizeToNumber(this.width);
|
||||
let height: number = convertSizeToNumber(this.height);
|
||||
if (this._isAutoResizable) {
|
||||
@@ -167,7 +167,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
|
||||
// TODO allow configuring the look and feel
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.contentLeft !== this._renderedContentLeft || this.contentRight !== this._renderedContentRight) {
|
||||
this.updateModel();
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.overflowY !== this._overflowY) {
|
||||
this.updateOverflowY();
|
||||
@@ -115,11 +115,11 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
}
|
||||
|
||||
// CSS-bound properties
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
|
||||
if (this.ariaLabel !== '') {
|
||||
@@ -263,7 +263,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.setPropertyFromUI<boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
if (this.editable && !this._isInAccessibilityMode) {
|
||||
this._editableDropdown.focus();
|
||||
} else {
|
||||
@@ -291,7 +291,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
return this.loading ? this.loadingText : this.loadingCompletedText;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth()
|
||||
});
|
||||
|
||||
@@ -106,13 +106,13 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
|
||||
return uri;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
let width: number = convertSizeToNumber(this.width);
|
||||
|
||||
let height: number = convertSizeToNumber(this.height);
|
||||
@@ -149,7 +149,7 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.content !== this._renderedContent) {
|
||||
this.updateModel();
|
||||
|
||||
@@ -91,7 +91,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
this._treeView.layout(700);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.ownerUri) {
|
||||
this.initialize();
|
||||
@@ -122,7 +122,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
this.setPropertyFromUI<string>((props, value) => props.ownerUri = value, newValue);
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -58,7 +58,7 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -92,11 +92,11 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
return this._alignItems;
|
||||
}
|
||||
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
public get position(): string {
|
||||
public override get position(): string {
|
||||
return this._position;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
super(changeRef, el, logService);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
return item && item.config && !item.config.horizontal;
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'padding': this.getFormPadding(),
|
||||
'width': this.getFormWidth(),
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout, GroupCont
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout, GroupCont
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'display': this.getContainerDisplayStyle(),
|
||||
'width': this.getContainerWidth(),
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class HyperlinkComponent extends TitledComponent<azdata.Hyperlink
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -46,13 +46,13 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateIcon();
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
protected updateIcon() {
|
||||
protected override updateIcon() {
|
||||
if (this.iconPath) {
|
||||
if (!this._iconClass) {
|
||||
super.updateIcon();
|
||||
@@ -70,7 +70,7 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
return `${this.getIconWidth()} ${this.getIconHeight()}`;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'background-size': this.getImageSize(),
|
||||
'width': this.getWidth(),
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class InfoBoxComponent extends ComponentBase<azdata.InfoBoxCompon
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export default class InfoBoxComponent extends ComponentBase<azdata.InfoBoxCompon
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateInfoBox();
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return this.multiline ? '' : 'none';
|
||||
}
|
||||
|
||||
public async validate(): Promise<boolean> {
|
||||
public override async validate(): Promise<boolean> {
|
||||
await super.validate();
|
||||
// Let the input validate handle showing/hiding the error message
|
||||
const valid = this.inputElement.validate() === undefined;
|
||||
@@ -174,13 +174,13 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return valid;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
this.layoutInputBox();
|
||||
}
|
||||
@@ -199,7 +199,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.setInputProperties(this.inputElement);
|
||||
this.validate().catch(onUnexpectedError);
|
||||
@@ -352,7 +352,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return this.getPropertyOrDefault<number | undefined>((props) => props.maxLength, undefined);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this.inputElement.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -84,11 +84,11 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
return this.getProperties().options ?? [];
|
||||
}
|
||||
|
||||
public get width(): string | number | undefined {
|
||||
public override get width(): string | number | undefined {
|
||||
return this.getProperties().width ?? undefined;
|
||||
}
|
||||
|
||||
public get height(): string | number | undefined {
|
||||
public override get height(): string | number | undefined {
|
||||
return this.getProperties().height ?? undefined;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
return this.getProperties().selectedOptionId ?? undefined;
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any }) {
|
||||
public override setProperties(properties: { [key: string]: any }) {
|
||||
super.setProperties(properties);
|
||||
if (this.options) {
|
||||
this._optionsList!.splice(0, this._optionsList!.length, this.options);
|
||||
@@ -131,7 +131,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
});
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
super.focus();
|
||||
if (this._selectedElementIdx !== undefined) {
|
||||
this._optionsList.domFocus();
|
||||
@@ -140,7 +140,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -80,7 +80,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.setOptions(this.values.map(value => { return { text: value }; }), this.selectedRow);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
}
|
||||
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': '100%'
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class LoadingComponent extends ComponentBase<azdata.LoadingCompon
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class LoadingComponent extends ComponentBase<azdata.LoadingCompon
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
const wasLoading = this.loading;
|
||||
super.setProperties(properties);
|
||||
if (wasLoading && !this.loading) {
|
||||
|
||||
@@ -50,7 +50,7 @@ export class ModelViewContent extends ViewBase implements OnInit, IModelView {
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
override ngOnDestroy() {
|
||||
this._onDestroy.fire();
|
||||
super.ngOnDestroy();
|
||||
}
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
|
||||
import { EditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
import { ModelViewInput } from 'sql/workbench/browser/modelComponents/modelViewInput';
|
||||
import { ModelViewEditor } from 'sql/workbench/browser/modelComponents/modelViewEditor';
|
||||
import { EditorExtensions } from 'vs/workbench/common/editor';
|
||||
|
||||
// Model View editor registration
|
||||
const viewModelEditorDescriptor = EditorDescriptor.create(
|
||||
|
||||
@@ -41,10 +41,10 @@ export class ModelViewEditor extends EditorPane {
|
||||
/**
|
||||
* Sets focus on this editor. Specifically, it sets the focus on the hosted text editor.
|
||||
*/
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
}
|
||||
|
||||
public clearInput() {
|
||||
public override clearInput() {
|
||||
this.hideOrRemoveModelViewContainer();
|
||||
super.clearInput();
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export class ModelViewEditor extends EditorPane {
|
||||
}
|
||||
}
|
||||
|
||||
async setInput(input: ModelViewInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
|
||||
override async setInput(input: ModelViewInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
|
||||
if (this.input && this.input.matches(input)) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ export class ModelViewInput extends EditorInput {
|
||||
return this._model.modelViewId;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return 'ModelViewEditorInput';
|
||||
}
|
||||
|
||||
public resolve(refresh?: boolean): Promise<IEditorModel> {
|
||||
public override resolve(refresh?: boolean): Promise<IEditorModel> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
return this._title;
|
||||
}
|
||||
|
||||
@@ -132,18 +132,18 @@ export class ModelViewInput extends EditorInput {
|
||||
/**
|
||||
* An editor that is dirty will be asked to be saved once it closes.
|
||||
*/
|
||||
isDirty(): boolean {
|
||||
override isDirty(): boolean {
|
||||
return this._model.isDirty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation.
|
||||
*/
|
||||
save(): Promise<IEditorInput | undefined> {
|
||||
override save(): Promise<IEditorInput | undefined> {
|
||||
return this._model.save().then(saved => saved ? this : undefined);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._dialogPane) {
|
||||
this._dialogPane.dispose();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBa
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
|
||||
import { PropertiesContainer, PropertyItem } from 'sql/base/browser/ui/propertiesContainer/propertiesContainer.component';
|
||||
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'vs/workbench/common/theme';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'sql/workbench/common/theme';
|
||||
|
||||
@Component({
|
||||
selector: `modelview-properties-container`,
|
||||
@@ -44,7 +44,7 @@ export default class PropertiesContainerComponent extends ComponentBase<azdata.P
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._propertiesContainer.propertyItems = this.propertyItems;
|
||||
}
|
||||
|
||||
@@ -44,18 +44,18 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IEditorService protected editorService: IEditorService
|
||||
@IEditorService editorService: IEditorService
|
||||
) {
|
||||
super(
|
||||
QueryTextEditor.ID, telemetryService, instantiationService, storageService,
|
||||
configurationService, themeService, editorService, editorGroupService);
|
||||
}
|
||||
|
||||
public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
public override createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
return this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, {});
|
||||
}
|
||||
|
||||
protected getConfigurationOverrides(): IEditorOptions {
|
||||
protected override getConfigurationOverrides(): IEditorOptions {
|
||||
const options = super.getConfigurationOverrides();
|
||||
if (this.input) {
|
||||
options.inDiffEditor = false;
|
||||
@@ -85,18 +85,18 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
return options;
|
||||
}
|
||||
|
||||
setInput(input: UntitledTextEditorInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
return super.setInput(input, options, context, CancellationToken.None)
|
||||
.then(() => this.input.resolve()
|
||||
.then(editorModel => editorModel.load())
|
||||
.then(editorModel => this.getControl().setModel((<ResourceEditorModel>editorModel).textEditorModel)));
|
||||
override async setInput(input: UntitledTextEditorInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
await super.setInput(input, options, context, CancellationToken.None);
|
||||
const editorModel = await this.input.resolve() as ResourceEditorModel;
|
||||
await editorModel.resolve();
|
||||
this.getControl().setModel(editorModel.textEditorModel);
|
||||
}
|
||||
|
||||
protected getAriaLabel(): string {
|
||||
return nls.localize('queryTextEditorAriaLabel', "modelview code editor for view model.");
|
||||
}
|
||||
|
||||
public layout(dimension?: DOM.Dimension) {
|
||||
public override layout(dimension?: DOM.Dimension) {
|
||||
if (dimension) {
|
||||
this._dimension = dimension;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.name = this.name;
|
||||
this._input.value = this.value;
|
||||
@@ -121,7 +121,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.setPropertyFromUI<string>((properties, label) => { properties.name = label; }, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
this.layout();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
Object.keys(this.iconClasses).forEach((key) => {
|
||||
DOM.removeCSSRulesContainingSelector(this.iconClasses[key]);
|
||||
});
|
||||
@@ -162,7 +162,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
return this.iconClasses[cardId];
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any }) {
|
||||
public override setProperties(properties: { [key: string]: any }) {
|
||||
super.setProperties(properties);
|
||||
// This is the entry point for the extension to set the selectedCardId
|
||||
if (this.selectedCardId) {
|
||||
@@ -227,7 +227,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
this.focusedCardId = undefined;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -67,7 +67,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
return this._slider;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.setSliderProperties(this.sliderElement);
|
||||
this.validate().catch(onUnexpectedError);
|
||||
@@ -136,7 +136,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
this.setPropertyFromUI<boolean | undefined>((props, value) => props.showTicks = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this.sliderElement.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
||||
@Inject(ILogService) readonly logService: ILogService
|
||||
@Inject(ILogService) logService: ILogService
|
||||
) {
|
||||
super(changeRef, el, logService);
|
||||
this._flexFlow = ''; // default
|
||||
@@ -72,7 +72,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
this._orientation = Orientation.VERTICAL; // default
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -136,11 +136,11 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return this._alignItems;
|
||||
}
|
||||
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
public get position(): string {
|
||||
public override get position(): string {
|
||||
return this._position;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return item.config && item.config.CSSStyles ? item.config.CSSStyles : {};
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight(),
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
return this._tabs;
|
||||
}
|
||||
|
||||
onItemsUpdated(): void {
|
||||
override onItemsUpdated(): void {
|
||||
if (this.items.length === 0) {
|
||||
this._itemIndexToProcess = 0;
|
||||
this._tabs = [];
|
||||
@@ -121,11 +121,11 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
}
|
||||
}
|
||||
|
||||
onItemLayoutUpdated(item: ItemDescriptor<TabConfig>): void {
|
||||
override onItemLayoutUpdated(item: ItemDescriptor<TabConfig>): void {
|
||||
this._panel.updateTab(item.config.id, { title: item.config.title, iconClass: item.config.icon ? createIconCssClass(item.config.icon) : undefined });
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
switch (action) {
|
||||
case ModelViewAction.SelectTab:
|
||||
if (typeof args?.[0] !== 'string') {
|
||||
|
||||
@@ -285,13 +285,13 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
this.layoutTable();
|
||||
super.layout();
|
||||
}
|
||||
@@ -340,7 +340,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._tableData.clear();
|
||||
this._tableData.push(this.transformData(this.data, this.columns));
|
||||
@@ -529,7 +529,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this._table.registerPlugin(filterPlugin);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
if (this._table.grid.getDataLength() > 0) {
|
||||
if (!this._table.grid.getActiveCell()) {
|
||||
this._table.grid.setActiveCell(0, 0);
|
||||
@@ -604,7 +604,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
return this.getPropertyOrDefault<boolean>((props) => props.headerFilter, false);
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
switch (action) {
|
||||
case ModelViewAction.AppendData:
|
||||
this.appendData(args[0]);
|
||||
@@ -628,7 +628,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': '100%',
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
|
||||
return this.getPropertyOrDefault<boolean>((props) => props.requiredIndicator, false);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateText();
|
||||
this._changeRef.detectChanges();
|
||||
|
||||
@@ -15,8 +15,8 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
export abstract class TitledComponent<T extends azdata.TitledComponentProperties> extends ComponentBase<T> implements ITitledComponent {
|
||||
|
||||
constructor(
|
||||
protected _changeRef: ChangeDetectorRef,
|
||||
protected _el: ElementRef,
|
||||
_changeRef: ChangeDetectorRef,
|
||||
_el: ElementRef,
|
||||
logService: ILogService) {
|
||||
super(_changeRef, _el, logService);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export default class ToolbarContainer extends ContainerBase<ToolbarItemConfig> i
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -73,16 +73,16 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
public setDataProvider(handle: number, componentId: string, context: any): any {
|
||||
public override setDataProvider(handle: number, componentId: string, context: any): any {
|
||||
this._dataProvider = new TreeViewDataProvider(handle, componentId, context, this._notificationService);
|
||||
this.createTreeControl();
|
||||
}
|
||||
|
||||
public refreshDataProvider(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeComponentItem }): void {
|
||||
public override refreshDataProvider(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeComponentItem }): void {
|
||||
if (this._dataProvider) {
|
||||
this._dataProvider.getItemsToRefresh(itemsToRefreshByHandle);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
if (this._tree) {
|
||||
this.layoutTree();
|
||||
this._tree.refresh();
|
||||
@@ -157,7 +157,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this._treeRenderer) {
|
||||
this._treeRenderer.options.withCheckbox = this.withCheckbox;
|
||||
@@ -172,7 +172,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.setPropertyFromUI<boolean>((properties, value) => { properties.withCheckbox = value; }, newValue);
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': '100%',
|
||||
'height': '100%'
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
|
||||
checked?: boolean;
|
||||
enabled?: boolean;
|
||||
onCheckedChanged?: (checked: boolean) => void;
|
||||
children?: ITreeComponentItem[];
|
||||
override children?: ITreeComponentItem[];
|
||||
|
||||
constructor(treeItem: ITreeComponentItem, resolve?: (() => Promise<ITreeComponentItem | undefined>)) {
|
||||
super(treeItem, resolve);
|
||||
@@ -29,7 +29,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
|
||||
this.children = deepClone(treeItem.children);
|
||||
}
|
||||
|
||||
asTreeItem(): ITreeComponentItem {
|
||||
override asTreeItem(): ITreeComponentItem {
|
||||
const item = super.asTreeItem() as ITreeComponentItem;
|
||||
item.checked = this.checked;
|
||||
item.enabled = this.enabled;
|
||||
@@ -63,7 +63,7 @@ export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implem
|
||||
* @override
|
||||
* @param elements The elements to map
|
||||
*/
|
||||
protected async postGetChildren(elements: ITreeComponentItem[]): Promise<ResolvableTreeComponentItem[]> {
|
||||
protected override async postGetChildren(elements: ITreeComponentItem[]): Promise<ResolvableTreeComponentItem[]> {
|
||||
const result: ResolvableTreeComponentItem[] = [];
|
||||
const hasResolve = await this.hasResolve;
|
||||
if (elements) {
|
||||
|
||||
@@ -10,22 +10,29 @@ import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IMenuService } from 'vs/platform/actions/common/actions';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ActivityAction, ActivityActionViewItem, ICompositeBarColors } from 'vs/workbench/browser/parts/compositeBarActions';
|
||||
import { ActivityAction, ActivityActionViewItem, IActivityHoverOptions, ICompositeBarColors } from 'vs/workbench/browser/parts/compositeBarActions';
|
||||
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
|
||||
import { IHoverService } from 'vs/workbench/services/hover/browser/hover';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
export class AccountsActionViewItem extends ActivityActionViewItem {
|
||||
constructor(
|
||||
action: ActivityAction,
|
||||
colors: (theme: IColorTheme) => ICompositeBarColors,
|
||||
hoverOptions: IActivityHoverOptions,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextMenuService protected contextMenuService: IContextMenuService,
|
||||
@IMenuService protected menuService: IMenuService,
|
||||
@IAccountManagementService private readonly accountManagementService: IAccountManagementService
|
||||
@IAccountManagementService private readonly accountManagementService: IAccountManagementService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
) {
|
||||
super(action, { draggable: false, colors, icon: true }, themeService);
|
||||
super(action, { draggable: false, colors, icon: true, hoverOptions: hoverOptions }, themeService, hoverService, configurationService, keybindingService);
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
|
||||
// Context menus are triggered on mouse down so that an item can be picked
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IModeSupport, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { getCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
@@ -12,6 +12,7 @@ import { localize } from 'vs/nls';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
import { ILanguageAssociationRegistry, Extensions as LanguageAssociationExtensions } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
|
||||
import { IModeSupport } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export class ScriptSelectAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await scriptSelect(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -51,7 +51,7 @@ export class ScriptExecuteAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -78,7 +78,7 @@ export class ScriptAlterAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -104,7 +104,7 @@ export class EditDataAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await scriptEditSelect(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -129,7 +129,7 @@ export class ScriptCreateAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -156,7 +156,7 @@ export class ScriptDeleteAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
|
||||
Reference in New Issue
Block a user