Skip to content

Commit

Permalink
chore(*): upgrades and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed May 25, 2017
1 parent 89dbad5 commit a466d26
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 29 deletions.
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@
"rxjs": "^5.0.0"
},
"devDependencies": {
"@angular/animations": "^4.0.3",
"@angular/common": "^4.0.3",
"@angular/compiler": "^4.0.3",
"@angular/compiler-cli": "^4.0.3",
"@angular/core": "^4.0.3",
"@angular/platform-browser": "^4.0.3",
"@angular/platform-browser-dynamic": "^4.0.3",
"@angular/platform-server": "^4.0.3",
"@angular/animations": "^4.1.3",
"@angular/common": "^4.1.3",
"@angular/compiler": "^4.1.3",
"@angular/compiler-cli": "^4.1.3",
"@angular/core": "^4.1.3",
"@angular/platform-browser": "^4.1.3",
"@angular/platform-browser-dynamic": "^4.1.3",
"@angular/platform-server": "^4.1.3",
"@types/jasmine": "^2.5.47",
"@types/node": "^7.0.13",
"@types/node": "^7.0.22",
"angular2-template-loader": "^0.6.2",
"autoprefixer": "^6.7.7",
"awesome-typescript-loader": "^3.1.2",
"awesome-typescript-loader": "^3.1.3",
"clean-webpack-plugin": "^0.1.16",
"copy-webpack-plugin": "^4.0.0",
"core-js": "^2.4.0",
Expand Down Expand Up @@ -115,24 +115,24 @@
"protractor": "^5.1.1",
"replace": "^0.3.0",
"rimraf": "^2.6.1",
"rxjs": "^5.3.0",
"rxjs": "^5.4.0",
"sass-loader": "^6.0.3",
"source-map-loader": "^0.2.1",
"style-loader": "^0.16.1",
"to-string-loader": "^1.1.5",
"ts-helpers": "^1.1.2",
"ts-node": "^3.0.2",
"tslint": "^5.1.0",
"tslint-config-swimlane": "^3.0.0",
"ts-node": "^3.0.4",
"tslint": "^5.3.2",
"tslint-config-swimlane": "^3.0.1",
"tslint-loader": "^3.5.3",
"typescript": "^2.2.2",
"typescript": "^2.3.3",
"uglifyjs": "^2.4.10",
"url-loader": "^0.5.8",
"webpack": "^2.4.1",
"webpack": "^2.6.1",
"webpack-combine-loaders": "^2.0.3",
"webpack-dev-server": "^2.4.4",
"webpack-dev-server": "^2.4.5",
"webpack-merge": "^4.1.0",
"webpack-notifier": "^1.5.0",
"zone.js": "^0.8.9"
"zone.js": "^0.8.11"
}
}
8 changes: 4 additions & 4 deletions src/components/datatable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ export class DatatableComponent implements OnInit, AfterViewInit, DoCheck {
* @memberOf DatatableComponent
*/
onColumnContextmenu({ event, column }: any): void {
this.tableContextmenu.emit({ event: event, type: ContextmenuType.header, content: column });
this.tableContextmenu.emit({ event, type: ContextmenuType.header, content: column });
}

/**
Expand All @@ -951,7 +951,7 @@ export class DatatableComponent implements OnInit, AfterViewInit, DoCheck {
* @memberOf DatatableComponent
*/
onRowContextmenu({ event, row }: any): void {
this.tableContextmenu.emit({ event: event, type: ContextmenuType.body, content: row });
this.tableContextmenu.emit({ event, type: ContextmenuType.body, content: row });
}

/**
Expand All @@ -969,7 +969,7 @@ export class DatatableComponent implements OnInit, AfterViewInit, DoCheck {

let idx: number;
const cols = this.columns.map((c, i) => {
c = Object.assign({}, c);
c = { ...c };

if (c.$$id === column.$$id) {
idx = i;
Expand Down Expand Up @@ -1001,7 +1001,7 @@ export class DatatableComponent implements OnInit, AfterViewInit, DoCheck {
*/
onColumnReorder({column, newValue, prevValue}: any): void {
const cols = this.columns.map(c => {
return Object.assign({}, c);
return { ...c };
});

const prevCol = cols[newValue];
Expand Down
10 changes: 5 additions & 5 deletions src/components/header/header-cell.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ export class DataTableHeaderCellComponent {
return this.column.width;
}

@HostListener('contextmenu', ['$event'])
onContextmenu($event: MouseEvent): void {
this.columnContextmenu.emit({ event: $event, column: this.column });
}

get isCheckboxable(): boolean {
return this.column.checkboxable &&
this.column.headerCheckboxable &&
Expand All @@ -146,6 +141,11 @@ export class DataTableHeaderCellComponent {
_sorts: any[];
selectFn = this.select.emit.bind(this.select);

@HostListener('contextmenu', ['$event'])
onContextmenu($event: MouseEvent): void {
this.columnContextmenu.emit({ event: $event, column: this.column });
}

calcSortDir(sorts: any[]): any {
if(sorts && this.column) {
const sort = sorts.find((s: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class DataTableHeaderComponent {
let idx = 0;

const sorts = this.sorts.map((s, i) => {
s = Object.assign({}, s);
s = { ...s };
if (s.prop === column.prop) idx = i;
return s;
});
Expand Down
5 changes: 4 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "tslint-config-swimlane/base",
"rulesDirectory": []
"rulesDirectory": [],
"rules": {
"prefer-conditional-expression": false
}
}

0 comments on commit a466d26

Please sign in to comment.