Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -6,15 +6,15 @@
import 'vs/css!./inputBox';
import nls = require('vs/nls');
import * as nls from 'vs/nls';
import * as Bal from 'vs/base/browser/browser';
import * as dom from 'vs/base/browser/dom';
import { RenderOptions, renderFormattedText, renderText } from 'vs/base/browser/htmlContentRenderer';
import aria = require('vs/base/browser/ui/aria/aria');
import * as aria from 'vs/base/browser/ui/aria/aria';
import { IAction } from 'vs/base/common/actions';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { IContextViewProvider, AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
import Event, { Emitter } from 'vs/base/common/event';
import { Event, Emitter } from 'vs/base/common/event';
import { Widget } from 'vs/base/browser/ui/widget';
import { Color } from 'vs/base/common/color';
import { mixin } from 'vs/base/common/objects';
@@ -112,10 +112,10 @@ export class InputBox extends Widget {
private inputValidationErrorBackground: Color;
private _onDidChange = this._register(new Emitter<string>());
public onDidChange: Event<string> = this._onDidChange.event;
public readonly onDidChange: Event<string> = this._onDidChange.event;
private _onDidHeightChange = this._register(new Emitter<number>());
public onDidHeightChange: Event<number> = this._onDidHeightChange.event;
public readonly onDidHeightChange: Event<number> = this._onDidHeightChange.event;
constructor(container: HTMLElement, contextViewProvider: IContextViewProvider, options?: IInputOptions) {
super();
@@ -351,30 +351,27 @@ export class InputBox extends Widget {
}
public validate(): boolean {
let result: IMessage = null;
let errorMsg: IMessage = null;
if (this.validation) {
result = this.validation(this.value);
errorMsg = this.validation(this.value);
// {{SQL CARBON EDIT}}
if (!result && this.options.useDefaultValidation && this.inputElement.validationMessage) {
result = {
if (!errorMsg && this.options.useDefaultValidation && this.inputElement.validationMessage) {
errorMsg = {
content: this.inputElement.validationMessage,
type: MessageType.ERROR
};
}
if (!result) {
if (!errorMsg) {
this.inputElement.removeAttribute('aria-invalid');
this.hideMessage();
} else {
this.inputElement.setAttribute('aria-invalid', 'true');
this.showMessage(result);
}
}
// {{SQL CARBON EDIT}} Canidate for addition to vscode
return result ? result.type !== MessageType.ERROR : true;
return errorMsg ? errorMsg.type !== MessageType.ERROR : true;
}
private stylesForType(type: MessageType): { border: Color; background: Color } {