diff --git a/karma.conf.js b/karma.conf.js index f7d18105f7..3e445776b6 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -8,6 +8,7 @@ module.exports = function (config) { plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), + require('karma-firefox-launcher'), require('karma-remap-istanbul'), require('angular-cli/plugins/karma') ], @@ -39,11 +40,11 @@ module.exports = function (config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['Chrome'], + browsers: ['Firefox'], singleRun: false }; if (process.env.TRAVIS) { - configuration.browsers = ['Chrome_travis_ci']; + //configuration.browsers = ['Chrome_travis_ci']; } config.set(configuration); }; diff --git a/package.json b/package.json index 2e1f66a4d5..4dcf95873a 100644 --- a/package.json +++ b/package.json @@ -49,26 +49,26 @@ "Jeremy Smartt " ], "dependencies": { - "@angular/common": "^2.2.1", - "@angular/compiler": "^2.2.1", - "@angular/core": "^2.2.1", - "@angular/forms": "^2.2.1", - "@angular/http": "^2.2.1", - "@angular/material": "2.0.0-alpha.10", - "@angular/platform-browser": "^2.2.1", - "@angular/platform-browser-dynamic": "^2.2.1", - "@angular/platform-server": "^2.2.1", - "@angular/router": "^3.2.1", + "@angular/common": "^2.3.0", + "@angular/compiler": "^2.3.0", + "@angular/core": "^2.3.0", + "@angular/forms": "^2.3.0", + "@angular/http": "^2.3.0", + "@angular/material": "2.0.0-alpha.11-3", + "@angular/platform-browser": "^2.3.0", + "@angular/platform-browser-dynamic": "^2.3.0", + "@angular/platform-server": "^2.3.0", + "@angular/router": "^3.3.0", "core-js": "^2.4.1", "hammerjs": "^2.0.8", "highlight.js": "9.6.0", - "rxjs": "5.0.0-beta.12", + "rxjs": "5.0.0-rc.4", "showdown": "1.4.2", - "zone.js": "^0.6.25", + "zone.js": "^0.7.2", "d3": "^4.2.1" }, "devDependencies": { - "@angular/compiler-cli": "^2.2.1", + "@angular/compiler-cli": "^2.3.0", "@types/hammerjs": "^2.0.30", "@types/jasmine": "^2.2.31", "@types/node": "^6.0.34", @@ -107,6 +107,6 @@ "semver": "5.2.0", "ts-node": "1.2.1", "tslint": "^3.15.1", - "typescript": "2.0.2" + "typescript": "2.0.10" } } diff --git a/src/app/app.component.scss b/src/app/app.component.scss index c3e100c3a0..494047a124 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -3,8 +3,4 @@ // :host /deep/ lets you travel down the Shadow DOM tree to change web component styles :host /deep/ { - // md-divider has a bug in angular-material that doesn't apply color - md-divider { - border-top-color: rgba(black, 0.12); - } } \ No newline at end of file diff --git a/src/app/components/components/data-table/data-table.component.html b/src/app/components/components/data-table/data-table.component.html index b30455c5f8..80af8ca1fe 100644 --- a/src/app/components/components/data-table/data-table.component.html +++ b/src/app/components/components/data-table/data-table.component.html @@ -6,7 +6,7 @@

Custom Data Table

with custom headings, columns, and inline editing

- +
@@ -61,7 +61,6 @@

with custom headings, columns, and inline editing

with custom headings, columns, and inline editing { name: 'price', label 'Price (US$)', numeric: true, format: v => v.toFixed(2) }, ]; - constructor(private _dialogService: TdDialogService, - private _viewContainerRef: ViewContainerRef) {} + constructor(private _dialogService: TdDialogService) {} openPrompt(row: any, name: string): void { this._dialogService.openPrompt({ message: 'Enter comment?', value: row[name], - viewContainerRef: this._viewContainerRef, }).afterClosed().subscribe((value: any) => { if (value !== undefined) { row[name] = value; @@ -101,7 +98,7 @@

with custom headings, columns, and inline editing

Basic Data Table

- + Basic Data Table

Data Table with components

Paging Bar / Search Box / Sortable components

- +
diff --git a/src/app/components/components/data-table/data-table.component.ts b/src/app/components/components/data-table/data-table.component.ts index 0512e85065..9ae1dd5838 100644 --- a/src/app/components/components/data-table/data-table.component.ts +++ b/src/app/components/components/data-table/data-table.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewContainerRef } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { TdDataTableSortingOrder, TdDataTableService, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '../../../../platform/data-table'; @@ -256,14 +256,12 @@ export class DataTableDemoComponent implements OnInit { sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Descending; constructor(private _dataTableService: TdDataTableService, - private _dialogService: TdDialogService, - private _viewContainerRef: ViewContainerRef) {} + private _dialogService: TdDialogService) {} openPrompt(row: any, name: string): void { this._dialogService.openPrompt({ message: 'Enter comment?', value: row[name], - viewContainerRef: this._viewContainerRef, }).afterClosed().subscribe((value: any) => { if (value !== undefined) { row[name] = value; diff --git a/src/app/components/components/material-components/material-components.component.html b/src/app/components/components/material-components/material-components.component.html index d126c68776..552622b885 100644 --- a/src/app/components/components/material-components/material-components.component.html +++ b/src/app/components/components/material-components/material-components.component.html @@ -852,7 +852,7 @@

Dynamic Radios

Tabs - +

First tab content

@@ -867,7 +867,7 @@

Second tab content

+

First content

@@ -982,7 +982,7 @@

Usage within Forms

Grid list with images and headers or footers - + @@ -1213,21 +1213,15 @@

{ { dog.name } }

= this._snackBarService.open('Message', 'Action', this._snackBarConfig); - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); + let snackBarRef: MdSnackBarRef = this._snackBarService.open('Message', 'Action', { duration: 3000 }); } ]]> @@ -1242,27 +1236,21 @@

{ { dog.name } }

= - this._dialogService.open(CustomAlertDialogComponent, this._dialogConfig); + this._dialogService.open(CustomAlertDialogComponent); } showConfirmDialog(): void { let dialogRef: MdDialogRef = - this._dialogService.open(CustomConfirmDialogComponent, this._dialogConfig); + this._dialogService.open(CustomConfirmDialogComponent); dialogRef.afterClosed().subscribe((data: boolean) => { if (data) { // clicked yes diff --git a/src/app/components/components/material-components/material-components.component.ts b/src/app/components/components/material-components/material-components.component.ts index 1f63393e4a..06fa209f0c 100644 --- a/src/app/components/components/material-components/material-components.component.ts +++ b/src/app/components/components/material-components/material-components.component.ts @@ -1,6 +1,5 @@ -import { Component, ViewContainerRef } from '@angular/core'; -import { MdSnackBar, MdSnackBarConfig, MdDialog, MdSnackBarRef, - MdDialogConfig, MdDialogRef } from '@angular/material'; +import { Component } from '@angular/core'; +import { MdSnackBar, MdDialog, MdDialogRef } from '@angular/material'; import { TdAlertDialogComponent } from '../../../../platform/core'; import { TdConfirmDialogComponent } from '../../../../platform/core'; @@ -106,47 +105,32 @@ export class MaterialComponentsComponent { lockHouse: false, }; - _snackBarConfig: MdSnackBarConfig; - _dialogConfig: MdDialogConfig; - constructor(private _snackBarService: MdSnackBar, - private _dialogService: MdDialog, - viewContainerRef: ViewContainerRef) { - this._snackBarConfig = new MdSnackBarConfig(); - this._snackBarConfig.viewContainerRef = viewContainerRef; - this._dialogConfig = new MdDialogConfig(); - this._dialogConfig.viewContainerRef = viewContainerRef; + private _dialogService: MdDialog) { } showSnackBar(): void { - let snackBarRef: MdSnackBarRef = this._snackBarService.open('Message', 'Action', this._snackBarConfig); - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); + this._snackBarService.open('Message', 'Action', { duration: 3000 }); } showAlertDialog(): void { let dialogRef: MdDialogRef = - this._dialogService.open(TdAlertDialogComponent, this._dialogConfig); + this._dialogService.open(TdAlertDialogComponent); dialogRef.componentInstance.title = 'Alert Title'; dialogRef.componentInstance.message = 'This is an alert dialog with a custom message.'; } showConfirmDialog(): void { let dialogRef: MdDialogRef = - this._dialogService.open(TdConfirmDialogComponent, this._dialogConfig); + this._dialogService.open(TdConfirmDialogComponent); dialogRef.componentInstance.title = 'Confirmation Title'; dialogRef.componentInstance.message = 'This is a confirmation dialog. Like what you see in covalent?'; dialogRef.afterClosed().subscribe((data: any) => { - let snackBarRef: MdSnackBarRef; if (data) { - snackBarRef = this._snackBarService.open('You clicked Yes :D', 'Ok', this._snackBarConfig); + this._snackBarService.open('You clicked Yes :D', 'Ok', { duration: 3000 }); } else { - snackBarRef = this._snackBarService.open('You clicked No :(', 'Ok', this._snackBarConfig); + this._snackBarService.open('You clicked No :(', 'Ok', { duration: 3000 }); } - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); }); } } diff --git a/src/app/components/style-guide/colors/colors.component.html b/src/app/components/style-guide/colors/colors.component.html index 8c7bced839..9e5e1d4043 100644 --- a/src/app/components/style-guide/colors/colors.component.html +++ b/src/app/components/style-guide/colors/colors.component.html @@ -209,7 +209,7 @@

View title

CSS Background Colors - +

To manually color a background, use our simple bgc utility class:

diff --git a/src/app/components/style-guide/dialogs/dialogs.component.html b/src/app/components/style-guide/dialogs/dialogs.component.html index c1e8ef697e..1f58ede5d3 100644 --- a/src/app/components/style-guide/dialogs/dialogs.component.html +++ b/src/app/components/style-guide/dialogs/dialogs.component.html @@ -44,13 +44,11 @@

Important: we recommend using fu Important: we recommend using fu openConfirm(): void { this._dialogService.openConfirm({ message: 'Are you sure you want to delete this item? It\'s used on other items.', - viewContainerRef: this._viewContainerRef, title: 'Confirm', cancelButton: 'No, Cancel', acceptButton: 'Yes, Delete', @@ -93,20 +90,13 @@

Important: we recommend using fu

Typescript:

= this._snackBarService - .open('Direct message sent!', 'Dismiss', this._snackBarConfig); - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); + this._snackBarService.open('Direct message sent!', 'Dismiss', { duration: 3000 }); } } ]]> diff --git a/src/app/components/style-guide/dialogs/dialogs.component.ts b/src/app/components/style-guide/dialogs/dialogs.component.ts index b0dacfbe57..6b53bc8cea 100644 --- a/src/app/components/style-guide/dialogs/dialogs.component.ts +++ b/src/app/components/style-guide/dialogs/dialogs.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { TdDialogService } from '../../../../platform/core'; -import { MdSnackBar, MdSnackBarRef } from '@angular/material'; +import { MdSnackBar } from '@angular/material'; @Component({ selector: 'design-patterns-dialogs', @@ -15,11 +15,8 @@ export class DialogsToastsComponent { private _snackBarService: MdSnackBar) {} showSnackBar(): void { - let snackBarRef: MdSnackBarRef = this._snackBarService - .open('Direct message sent!', 'Dismiss'); - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); + this._snackBarService + .open('Direct message sent!', 'Dismiss', { duration: 3000 }); } openAlert(): void { this._dialogService.openAlert({ @@ -44,10 +41,7 @@ export class DialogsToastsComponent { }); } confirmDelete(): void { - let snackBarRef: MdSnackBarRef = this._snackBarService.open('Item deleted!', 'Ok'); - setTimeout(() => { - snackBarRef.dismiss(); - }, 3000); + this._snackBarService.open('Item deleted!', 'Ok', { duration: 3000 }); } openPrompt(): void { this._dialogService.openPrompt({ diff --git a/src/app/components/style-guide/iconography/iconography.component.html b/src/app/components/style-guide/iconography/iconography.component.html index 9d4f509d73..aafcf82881 100644 --- a/src/app/components/style-guide/iconography/iconography.component.html +++ b/src/app/components/style-guide/iconography/iconography.component.html @@ -33,7 +33,7 @@

Usage

CSS Icon (Font or SVG) Colors - +

To manually color a fill or font color (depending if you're using a font icon or SVV icon), use our simple tc utility class:

diff --git a/src/app/components/style-guide/typography/typography.component.html b/src/app/components/style-guide/typography/typography.component.html index 5e7e8d0520..9ed6969e2c 100644 --- a/src/app/components/style-guide/typography/typography.component.html +++ b/src/app/components/style-guide/typography/typography.component.html @@ -116,7 +116,7 @@

Usage

CSS Font Colors - +

To manually color a font color, use our simple tc utility class:

diff --git a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss index fe91306563..4e0edf4c76 100644 --- a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss +++ b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.scss @@ -15,7 +15,6 @@ font-size: 14px; } md-sidenav-layout.td-layout-manage-list { - top: 64px; & > .md-sidenav-content { margin-left: 0 !important; } diff --git a/src/platform/http/http-rest.service.ts b/src/platform/http/http-rest.service.ts index ce7bf18a83..3cf8dddd51 100644 --- a/src/platform/http/http-rest.service.ts +++ b/src/platform/http/http-rest.service.ts @@ -49,9 +49,9 @@ export abstract class RESTService { public query(query?: IRestQuery): Observable> { let request: Observable = this.http.get(this.buildUrl(undefined, query), this.buildRequestOptions()); - return request.map>((res: Response) => { + return request.map((res: Response) => { return >this.transform(res); - }).catch((error: Response) => { + }).catch((error: Response) => { return new Observable((subscriber: Subscriber) => { try { subscriber.error(this.transform(error)); @@ -64,9 +64,9 @@ export abstract class RESTService { public get(id: string | number): Observable { let request: Observable = this.http.get(this.buildUrl(id), this.buildRequestOptions()); - return request.map((res: Response) => { + return request.map((res: Response) => { return this.transform(res); - }).catch((error: Response) => { + }).catch((error: Response) => { return new Observable((subscriber: Subscriber) => { try { subscriber.error(this.transform(error)); @@ -86,7 +86,7 @@ export abstract class RESTService { } else { return res; } - }).catch((error: Response) => { + }).catch((error: Response) => { return new Observable((subscriber: Subscriber) => { try { subscriber.error(this.transform(error)); @@ -100,13 +100,13 @@ export abstract class RESTService { public update(id: string | number, obj: T): Observable { let requestOptions: RequestOptionsArgs = this.buildRequestOptions(); let request: Observable = this.http.patch(this.buildUrl(id), obj, requestOptions); - return request.map((res: Response) => { + return request.map((res: Response) => { if (res.status === 200) { - return this.transform(res); + return this.transform(res); } else { return res; } - }).catch((error: Response) => { + }).catch((error: Response) => { return new Observable((subscriber: Subscriber) => { try { subscriber.error(this.transform(error)); @@ -117,15 +117,15 @@ export abstract class RESTService { }); } - public delete(id: string | number): Observable { + public delete(id: string | number): Observable { let request: Observable = this.http.delete(this.buildUrl(id), this.buildRequestOptions()); return request.map((res: Response) => { if (res.status === 200) { - return this.transform(res); + return this.transform(res); } else { return res; } - }).catch((error: Response) => { + }).catch((error: Response) => { return new Observable((subscriber: Subscriber) => { try { subscriber.error(this.transform(error)); diff --git a/src/styles.scss b/src/styles.scss index 81b5a470ec..0e4c680ffd 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -18,8 +18,3 @@ md-nav-list { a[md-icon-button] { line-height: 36px; } - -// Stretch tab labels until there is an attribute for it -.md-tab-label { - flex-grow: 1; -} \ No newline at end of file diff --git a/src/tsconfig.json b/src/tsconfig.json index 1506dd9d1e..5f6445eeaf 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": ".", "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, @@ -16,6 +17,9 @@ ], "types": [ "jasmine", "hammerjs" - ] + ], + "paths": { + "@covalent/*": ["./platform/*"] + } } }