Fixing the layering in the base folder (#5308)

* removes more builder references

* remove builder from profiler

* formatting

* fix profiler dailog

* remove builder from oatuhdialog

* remove the rest of builder references

* formatting

* add more strict null checks to base

* enable strict tslint rules

* code layering of base

* wip

* working through changes to table data view

* fix tests

* update editabledropdown to not use layout service

* wip

* fix imports

* fix import

* fix compile error

* add more localization

* add comments to changes to import patterns

* add more import comments
This commit is contained in:
Anthony Dresser
2019-05-03 14:49:18 -07:00
committed by GitHub
parent 354ed22706
commit db387eb770
61 changed files with 198 additions and 112 deletions

View File

@@ -1,7 +1,5 @@
// Adopted and converted to typescript from https://github.com/6pac/SlickGrid/blob/master/plugins/slick.checkboxselectcolumn.js
import 'vs/css!vs/base/browser/ui/checkbox/checkbox';
import { mixin } from 'vs/base/common/objects';
import * as nls from 'vs/nls';
import { ICheckboxStyles } from 'vs/base/browser/ui/checkbox/checkbox';

View File

@@ -2,10 +2,11 @@
// heavily modified
import { mixin } from 'vs/base/common/objects';
import { Button } from '../../button/button';
import { attachButtonStyler } from 'sql/platform/theme/common/styler';
import { IButtonStyles } from 'vs/base/browser/ui/button/button';
import { localize } from 'vs/nls';
import { Button } from 'sql/base/browser/ui/button/button';
import { escape } from 'sql/base/common/strings';
import { IThemeService } from 'vs/platform/theme/common/themeService';
export class HeaderFilter {
@@ -28,7 +29,7 @@ export class HeaderFilter {
private workingFilters: any;
private columnDef: any;
constructor(options: any, private _themeService: IThemeService) {
constructor(options: any) {
this.options = mixin(options, this.defaults, false);
}
@@ -191,8 +192,8 @@ export class HeaderFilter {
.appendTo(this.$menu);
this.okButton = new Button(this.$menu.get(0));
this.okButton.label = 'OK';
this.okButton.title = 'OK';
this.okButton.label = localize('headerFilter.ok', "OK");
this.okButton.title = localize('headerFilter.ok', "OK");
this.okButton.element.id = 'filter-ok-button';
const okElement = jQuery('#filter-ok-button');
okElement.bind('click', (ev) => {
@@ -202,8 +203,8 @@ export class HeaderFilter {
});
this.clearButton = new Button(this.$menu.get(0));
this.clearButton.label = 'Clear';
this.clearButton.title = 'Clear';
this.clearButton.label = localize('headerFilter.clear', "Clear");
this.clearButton.title = localize('headerFilter.clear', "Clear");
this.clearButton.element.id = 'filter-clear-button';
const clearElement = jQuery('#filter-clear-button');
clearElement.bind('click', (ev) => {
@@ -213,14 +214,11 @@ export class HeaderFilter {
});
this.cancelButton = new Button(this.$menu.get(0));
this.cancelButton.label = 'Cancel';
this.cancelButton.title = 'Cancel';
this.cancelButton.label = localize('headerFilter.cancel', "Cancel");
this.cancelButton.title = localize('headerFilter.cancel', "Cancel");
this.cancelButton.element.id = 'filter-cancel-button';
const cancelElement = jQuery('#filter-cancel-button');
cancelElement.bind('click', () => this.hideMenu());
attachButtonStyler(this.okButton, this._themeService);
attachButtonStyler(this.clearButton, this._themeService);
attachButtonStyler(this.cancelButton, this._themeService);
jQuery(':checkbox', $filter).bind('click', (e) => {
this.workingFilters = this.changeWorkingFilter(filterItems, this.workingFilters, jQuery(e.target));
@@ -238,6 +236,12 @@ export class HeaderFilter {
.css('left', (left > 0 ? left : 0));
}
public style(styles: IButtonStyles): void {
this.okButton.style(styles);
this.clearButton.style(styles);
this.cancelButton.style(styles);
}
private columnsResized() {
this.hideMenu();
}

View File

@@ -11,7 +11,6 @@ import 'vs/css!./media/slickGrid';
import { TableDataView } from './tableDataView';
import { IDisposableDataProvider, ITableSorter, ITableMouseEvent, ITableConfiguration, ITableStyles } from 'sql/base/browser/ui/table/interfaces';
import { IThemable } from 'vs/platform/theme/common/styler';
import * as DOM from 'vs/base/browser/dom';
import { mixin } from 'vs/base/common/objects';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -29,7 +28,7 @@ function getDefaultOptions<T>(): Slick.GridOptions<T> {
};
}
export class Table<T extends Slick.SlickData> extends Widget implements IThemable, IDisposable {
export class Table<T extends Slick.SlickData> extends Widget implements IDisposable {
private styleElement: HTMLStyleElement;
private idPrefix: string;