mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 17:22:25 -05:00
Initial Code Layering (#3788)
* working on formatting * fixed basic lint errors; starting moving things to their appropriate location * formatting * update tslint to match the version of vscode we have * remove unused code * work in progress fixing layering * formatting * moved connection management service to platform * formatting * add missing file * moving more servies * formatting * moving more services * formatting * wip * moving more services * formatting * revert back tslint rules * move css file * add missing svgs
This commit is contained in:
@@ -8,7 +8,7 @@ import 'vs/css!./media/breadcrumb';
|
||||
import { Component, Inject, forwardRef, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { toDisposableSubscription } from 'sql/parts/common/rxjsUtils';
|
||||
import { toDisposableSubscription } from 'sql/base/node/rxjsUtils';
|
||||
import { IBreadcrumbService, MenuItem } from './interfaces';
|
||||
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { Dropdown, IDropdownOptions } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { attachEditableDropdownStyler } from 'sql/common/theme/styler';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { InputBox as vsInputBox } from 'sql/base/browser/ui/inputBox/inputBox';
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
|
||||
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
@@ -12,7 +12,7 @@ import './panelStyles';
|
||||
|
||||
import { TabComponent } from './tab.component';
|
||||
import { ScrollableDirective } from 'sql/base/browser/ui/scrollable/scrollable.directive';
|
||||
import { subscriptionToDisposable } from 'sql/base/common/lifecycle';
|
||||
import { subscriptionToDisposable } from 'sql/base/node/lifecycle';
|
||||
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Directive, Inject, forwardRef, ElementRef, Input } from '@angular/core'
|
||||
import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
import { getContentHeight, addDisposableListener, EventType, getContentWidth } from 'vs/base/browser/dom';
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
|
||||
@Directive({
|
||||
selector: '[scrollable]'
|
||||
@@ -74,7 +74,7 @@ export class ScrollableDirective extends AngularDisposable {
|
||||
private resetScrollDimensions() {
|
||||
this.scrollableElement.setScrollDimensions({
|
||||
scrollHeight: this.verticalScroll === ScrollbarVisibility.Auto ? getContentHeight(this.scrolled) : undefined,
|
||||
height: this.verticalScroll === ScrollbarVisibility.Auto ? getContentHeight(this.parent) : undefined,
|
||||
height: this.verticalScroll === ScrollbarVisibility.Auto ? getContentHeight(this.parent) : undefined,
|
||||
scrollWidth: this.horizontalScroll === ScrollbarVisibility.Auto ? this.scrolled.scrollWidth : undefined,
|
||||
width: this.horizontalScroll === ScrollbarVisibility.Auto ? this.scrolled.offsetWidth : undefined
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { SelectBox as vsSelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
|
||||
import { AngularDisposable } from 'sql/base/common/lifecycle';
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { ISelectData } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
|
||||
@@ -219,7 +219,7 @@ export class RowDetailView {
|
||||
public subscribeToOnAsyncResponse() {
|
||||
this.onAsyncResponse.subscribe((e, args) => {
|
||||
if (!args || !args.itemDetail) {
|
||||
throw 'Slick.RowDetailView plugin requires the onAsyncResponse() to supply "args.itemDetail" property.';
|
||||
throw new Error('Slick.RowDetailView plugin requires the onAsyncResponse() to supply "args.itemDetail" property.');
|
||||
}
|
||||
|
||||
// If we just want to load in a view directly we can use detailView property to do so
|
||||
@@ -278,7 +278,7 @@ export class RowDetailView {
|
||||
item._isPadding = false;
|
||||
item._parent = parent;
|
||||
item._offset = offset;
|
||||
item.name = parent.message ? parent.message : nls.localize('rowDetailView.loadError','Loading Error...');
|
||||
item.name = parent.message ? parent.message : nls.localize('rowDetailView.loadError', 'Loading Error...');
|
||||
parent._child = item;
|
||||
return item;
|
||||
}
|
||||
@@ -349,15 +349,13 @@ export class RowDetailView {
|
||||
//slick-cell to escape the cell overflow clipping.
|
||||
|
||||
//sneaky extra </div> inserted here-----------------v
|
||||
/* tslint:disable:no-unexternalized-strings */
|
||||
html.push("<div class='detailView-toggle collapse'></div></div>");
|
||||
html.push('<div class="detailView-toggle collapse"></div></div>');
|
||||
|
||||
html.push("<div id='cellDetailView_", dataContext.id, "' class='dynamic-cell-detail' "); //apply custom css to detail
|
||||
html.push("style='height:", dataContext._height, "px;"); //set total height of padding
|
||||
html.push("top:", rowHeight, "px'>"); //shift detail below 1st row
|
||||
html.push("<div id='detailViewContainer_", dataContext.id, "' class='detail-container' style='max-height:" + (dataContext._height - rowHeight + bottomMargin) + "px'>"); //sub ctr for custom styling
|
||||
html.push("<div id='innerDetailView_", dataContext.id, "'>", escape(dataContext._detailContent), "</div></div>");
|
||||
/* tslint:enable:no-unexternalized-strings */
|
||||
html.push(`<div id='cellDetailView_${dataContext.id}' class='dynamic-cell-detail' `); //apply custom css to detail
|
||||
html.push(`style=\'height:${dataContext._height}px;`); //set total height of padding
|
||||
html.push(`top:${rowHeight}px'>`); //shift detail below 1st row
|
||||
html.push(`<div id='detailViewContainer_${dataContext.id}"' class='detail-container' style='max-height:${(dataContext._height - rowHeight + bottomMargin)}px'>`); //sub ctr for custom styling
|
||||
html.push(`<div id='innerDetailView_${dataContext.id}'>${escape(dataContext._detailContent)}</div></div>`);
|
||||
//&omit a final closing detail container </div> that would come next
|
||||
|
||||
return html.join('');
|
||||
@@ -401,9 +399,9 @@ export class RowDetailView {
|
||||
this._grid.getOptions().minRowBuffer = item._sizePadding + 3;
|
||||
}
|
||||
|
||||
mainContainer.setAttribute('style', 'max-height: ' + item._height + 'px');
|
||||
mainContainer.setAttribute('style', `max-height: ${item._height}px`);
|
||||
if (cellItem) {
|
||||
cellItem.setAttribute('style', 'height: ' + item._height + 'px;top:' + rowHeight + 'px');
|
||||
cellItem.setAttribute('style', `height: ${item._height}px;top:${rowHeight}px`);
|
||||
}
|
||||
|
||||
let idxParent = this._dataView.getIdxById(item.id);
|
||||
|
||||
Reference in New Issue
Block a user