From 74824ba75da4f068ee2c6e0e70e5985c0dfedafc Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Fri, 27 Jan 2017 05:20:14 -0700 Subject: [PATCH 1/7] feat(build): add npmrc for npm publish to have credentials --- .npmrc | 2 ++ src/index.ts | 33 +++++++++++++++++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..90a8d7b --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +user = briebug +password = $npm_password \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ac90400..303ebcd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,31 +1,32 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; -import { DataTable} from './components/table.component'; -import { DataTableColumn } from './components/column.component'; -import { DataTableRow } from './components/row.component'; -import { DataTablePagination } from './components/pagination.component'; -import { DataTableHeader } from './components/header.component'; +import {DataTable} from './components/table.component'; +import {DataTableColumn} from './components/column.component'; +import {DataTableRow} from './components/row.component'; +import {DataTablePagination} from './components/pagination.component'; +import {DataTableHeader} from './components/header.component'; -import { PixelConverter } from './utils/px'; -import { Hide } from './utils/hide'; -import { MinPipe } from './utils/min'; +import {PixelConverter} from './utils/px'; +import {Hide} from './utils/hide'; +import {MinPipe} from './utils/min'; export * from './components/types'; export * from './tools/data-table-resource'; -export { DataTable, DataTableColumn, DataTableRow, DataTablePagination, DataTableHeader }; -export const DATA_TABLE_DIRECTIVES = [ DataTable, DataTableColumn ]; +export {DataTable, DataTableColumn, DataTableRow, DataTablePagination, DataTableHeader}; +export const DATA_TABLE_DIRECTIVES = [DataTable, DataTableColumn]; @NgModule({ - imports: [ CommonModule, FormsModule ], + imports: [CommonModule, FormsModule], declarations: [ DataTable, DataTableColumn, DataTableRow, DataTablePagination, DataTableHeader, PixelConverter, Hide, MinPipe ], - exports: [ DataTable, DataTableColumn ] + exports: [DataTable, DataTableColumn] }) -export class DataTableModule { } \ No newline at end of file +export class DataTableModule { +} \ No newline at end of file From 132e7a1a9901473a51da49bf80c091a8524d3bd1 Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Fri, 27 Jan 2017 05:34:17 -0700 Subject: [PATCH 2/7] feat(build): add npmrc for npm publish to have credentials --- .npmrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.npmrc b/.npmrc index 90a8d7b..7fffe18 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ -user = briebug -password = $npm_password \ No newline at end of file +username = briebug +password = ${npm_password} +email = developers@briebug.com \ No newline at end of file From 13982772cdba4c5d7320b58bcb1c13cec562b8a0 Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Fri, 27 Jan 2017 05:43:18 -0700 Subject: [PATCH 3/7] feat(build): change login to npm method to use echo and pipe then publish --- .npmrc | 3 --- circle.yml | 3 ++- package.json | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 7fffe18..0000000 --- a/.npmrc +++ /dev/null @@ -1,3 +0,0 @@ -username = briebug -password = ${npm_password} -email = developers@briebug.com \ No newline at end of file diff --git a/circle.yml b/circle.yml index 300dcd6..146bb1c 100644 --- a/circle.yml +++ b/circle.yml @@ -19,4 +19,5 @@ deployment: production: branch: master commands: - - npm publish + - echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login + - npm run publish2npm diff --git a/package.json b/package.json index 54cf4cd..5e4c242 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "scripts": { "build": "rm -rf dist/* && tsc", "serve": "rm -rf dist/ && tsc -w", - "prepublish": "npm run build" + "prepublish": "npm run build", + "publish2npm": "publish" }, "repository": { "type": "git", From 000c5f45812a8e15f6dd3408970ab1f5245d025e Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Fri, 27 Jan 2017 05:46:34 -0700 Subject: [PATCH 4/7] feat(build): change login to npm method to use echo and pipe then publish --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e4c242..b30d74e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "build": "rm -rf dist/* && tsc", "serve": "rm -rf dist/ && tsc -w", "prepublish": "npm run build", - "publish2npm": "publish" + "publish2npm": "npm publish" }, "repository": { "type": "git", From 52741af84513cecfa3ada362cb56183166cfb143 Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Fri, 27 Jan 2017 05:50:54 -0700 Subject: [PATCH 5/7] feat(publish): add publish dep to handle pushing code up --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b30d74e..a2a51fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-datatable", - "version": "2.1.2", + "version": "2.1.3", "description": "An Angular 2 datatable, with pagination, sorting, expandable rows etc.", "keywords": [ "angular", @@ -18,7 +18,7 @@ "build": "rm -rf dist/* && tsc", "serve": "rm -rf dist/ && tsc -w", "prepublish": "npm run build", - "publish2npm": "npm publish" + "publish2npm": "publish" }, "repository": { "type": "git", @@ -34,6 +34,7 @@ "@angular/core": "^2.3.1", "@angular/forms": "^2.3.1", "cz-conventional-changelog": "1.2.0", + "publish": "^0.6.0", "rxjs": "^5.0.1", "typescript": "~2.0.3", "validate-commit-msg": "2.8.2" From b76266d5a9f1e9f226471014d3e35534d607fc1c Mon Sep 17 00:00:00 2001 From: Alexei Mitskevich Date: Wed, 1 Feb 2017 11:10:57 -0700 Subject: [PATCH 6/7] feat(grid-download): download button with event --- package.json | 2 +- src/components/header.template.ts | 4 ++++ src/components/table.component.ts | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 54cf4cd..312eff7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-datatable", - "version": "2.1.2", + "version": "2.1.3", "description": "An Angular 2 datatable, with pagination, sorting, expandable rows etc.", "keywords": [ "angular", diff --git a/src/components/header.template.ts b/src/components/header.template.ts index b2d9423..76194fe 100644 --- a/src/components/header.template.ts +++ b/src/components/header.template.ts @@ -10,6 +10,10 @@ export const HEADER_TEMPLATE = ` (click)="columnSelectorOpen = !columnSelectorOpen; $event.stopPropagation()" > +
diff --git a/src/components/table.component.ts b/src/components/table.component.ts index 8865f65..2c2b616 100644 --- a/src/components/table.component.ts +++ b/src/components/table.component.ts @@ -56,6 +56,7 @@ export class DataTable implements DataTableParams, OnInit { @Input() selectOnRowClick = false; @Input() autoReload = true; @Input() showReloading = false; + @Input() showDownloadButton = false; // UI state without input: @@ -207,6 +208,13 @@ export class DataTable implements DataTableParams, OnInit { }); } + // Download + @Output() download = new EventEmitter(); + + downloadItems(){ + this.download.emit(this._getRemoteParameters()); + } + // event handlers: @Output() rowClick = new EventEmitter(); From 8df50c3aaa78473e394b6b129052b1e6449582ac Mon Sep 17 00:00:00 2001 From: Jesse Sanders Date: Thu, 2 Feb 2017 15:02:26 -0700 Subject: [PATCH 7/7] build(version): update version to 2.1.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2a51fa..56fbcbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-datatable", - "version": "2.1.3", + "version": "2.1.5", "description": "An Angular 2 datatable, with pagination, sorting, expandable rows etc.", "keywords": [ "angular",