Skip to content

Commit 943a137

Browse files
committed
Merge branch 'master' of github.com:swimlane/ngx-datatable into release/16.1.0
2 parents 19aa585 + 2ab3909 commit 943a137

File tree

64 files changed

+116
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+116
-119
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"ci": "run-s lint prettier:ci test:ci",
1616
"lint": "ng lint",
1717
"e2e": "ng e2e",
18-
"prettier": "prettier --write \"**/*.{js,ts,html,scss,css,md,json}\"",
19-
"prettier:ci": "prettier --check \"**/*.{js,ts,html,scss,css,md,json}\"",
18+
"prettier": "prettier --write \"{src,projects}/*.{js,ts,html,scss,css,md,json}\"",
19+
"prettier:ci": "prettier --check \"{src,projects}/*.{js,ts,html,scss,css,md,json}\"",
2020
"build-docs": "cross-env NODE_ENV=production ng build --prod --base-href=\"/ngx-datatable/\"",
2121
"predeploy-docs": "npm run build-docs",
2222
"deploy-docs": "angular-cli-ghpages --dir ./dist/ngx-datatable",
@@ -48,7 +48,7 @@
4848
"@angular/cli": "~9.1.0",
4949
"@angular/compiler-cli": "~9.1.0",
5050
"@angular/language-service": "~9.1.0",
51-
"@swimlane/prettier-config-swimlane": "^3.0.1",
51+
"@swimlane/prettier-config-swimlane": "^3.0.2",
5252
"@types/jasmine": "^3.5.10",
5353
"@types/jasminewd2": "~2.0.3",
5454
"@types/node": "^12.11.1",

projects/swimlane/ngx-datatable/src/lib/components/body/body.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ export class DataTableBodyComponent implements OnInit, OnDestroy {
779779
if (!expanded || !expanded.length) return -1;
780780

781781
const rowId = this.rowIdentity(row);
782-
return expanded.findIndex((r) => {
782+
return expanded.findIndex(r => {
783783
const id = this.rowIdentity(r);
784784
return id === rowId;
785785
});

projects/swimlane/ngx-datatable/src/lib/components/body/selection.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class DataTableSelectionComponent {
144144
if (!selected || !selected.length) return -1;
145145

146146
const rowId = this.rowIdentity(row);
147-
return selected.findIndex((r) => {
147+
return selected.findIndex(r => {
148148
const id = this.rowIdentity(r);
149149
return id === rowId;
150150
});

projects/swimlane/ngx-datatable/src/lib/components/body/summary/summary-row.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export interface ISummaryColumn {
99
}
1010

1111
function defaultSumFunc(cells: any[]): any {
12-
const cellsWithValues = cells.filter((cell) => !!cell);
12+
const cellsWithValues = cells.filter(cell => !!cell);
1313

1414
if (!cellsWithValues.length) {
1515
return null;
1616
}
17-
if (cellsWithValues.some((cell) => typeof cell !== 'number')) {
17+
if (cellsWithValues.some(cell => typeof cell !== 'number')) {
1818
return null;
1919
}
2020

@@ -64,7 +64,7 @@ export class DataTableSummaryRowComponent implements OnChanges {
6464
}
6565

6666
private updateInternalColumns() {
67-
this._internalColumns = this.columns.map((col) => ({
67+
this._internalColumns = this.columns.map(col => ({
6868
...col,
6969
cellTemplate: col.summaryTemplate
7070
}));
@@ -74,9 +74,9 @@ export class DataTableSummaryRowComponent implements OnChanges {
7474
this.summaryRow = {};
7575

7676
this.columns
77-
.filter((col) => !col.summaryTemplate)
78-
.forEach((col) => {
79-
const cellsFromSingleColumn = this.rows.map((row) => row[col.prop]);
77+
.filter(col => !col.summaryTemplate)
78+
.forEach(col => {
79+
const cellsFromSingleColumn = this.rows.map(row => row[col.prop]);
8080
const sumFunc = this.getSummaryFunction(col);
8181

8282
this.summaryRow[col.prop] = col.pipe

projects/swimlane/ngx-datatable/src/lib/components/datatable.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ export class DatatableComponent implements OnInit, DoCheck, AfterViewInit {
700700
* content has been fully initialized.
701701
*/
702702
ngAfterContentInit() {
703-
this.columnTemplates.changes.subscribe((v) => this.translateColumns(v));
703+
this.columnTemplates.changes.subscribe(v => this.translateColumns(v));
704704
this.listenForColumnInputChanges();
705705
}
706706

@@ -762,7 +762,7 @@ export class DatatableComponent implements OnInit, DoCheck, AfterViewInit {
762762
};
763763

764764
// convert map back to a simple array of objects
765-
return Array.from(map, (x) => addGroup(x[0], x[1]));
765+
return Array.from(map, x => addGroup(x[0], x[1]));
766766
}
767767

768768
/*
@@ -1015,7 +1015,7 @@ export class DatatableComponent implements OnInit, DoCheck, AfterViewInit {
10151015
* The header triggered a column re-order event.
10161016
*/
10171017
onColumnReorder({ column, newValue, prevValue }: any): void {
1018-
const cols = this._internalColumns.map((c) => {
1018+
const cols = this._internalColumns.map(c => {
10191019
return { ...c };
10201020
});
10211021

@@ -1128,12 +1128,12 @@ export class DatatableComponent implements OnInit, DoCheck, AfterViewInit {
11281128
onTreeAction(event: any) {
11291129
const row = event.row;
11301130
// TODO: For duplicated items this will not work
1131-
const rowIndex = this._rows.findIndex((r) => r[this.treeToRelation] === event.row[this.treeToRelation]);
1131+
const rowIndex = this._rows.findIndex(r => r[this.treeToRelation] === event.row[this.treeToRelation]);
11321132
this.treeAction.emit({ row, rowIndex });
11331133
}
11341134

11351135
ngOnDestroy() {
1136-
this._subscriptions.forEach((subscription) => subscription.unsubscribe());
1136+
this._subscriptions.forEach(subscription => subscription.unsubscribe());
11371137
}
11381138

11391139
/**

projects/swimlane/ngx-datatable/src/lib/components/header/header.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class DataTableHeaderComponent implements OnDestroy {
179179
setTimeout(() => {
180180
// datatable component creates copies from columns on reorder
181181
// set dragging to false on new objects
182-
const column = this._columns.find((c) => c.$$id === model.$$id);
182+
const column = this._columns.find(c => c.$$id === model.$$id);
183183
if (column) {
184184
column.dragging = false;
185185
}

projects/swimlane/ngx-datatable/src/lib/directives/orderable.directive.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('OrderableDirective', () => {
5656

5757
describe('when a draggable is removed', () => {
5858
function checkAllSubscriptionsForActiveObservers() {
59-
const subs = directive.draggables.map((d) => {
59+
const subs = directive.draggables.map(d => {
6060
expect(d.dragEnd.isStopped).toBe(false);
6161
expect(d.dragStart.isStopped).toBe(false);
6262

@@ -66,7 +66,7 @@ describe('OrderableDirective', () => {
6666
};
6767
});
6868

69-
subs.forEach((sub) => {
69+
subs.forEach(sub => {
7070
expect(sub.dragStart.length).toBe(1);
7171
expect(sub.dragEnd.length).toBe(1);
7272
});

projects/swimlane/ngx-datatable/src/lib/directives/orderable.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class OrderableDirective implements AfterContentInit, OnDestroy {
3535
}
3636

3737
ngOnDestroy(): void {
38-
this.draggables.forEach((d) => {
38+
this.draggables.forEach(d => {
3939
d.dragStart.unsubscribe();
4040
d.dragging.unsubscribe();
4141
d.dragEnd.unsubscribe();

projects/swimlane/ngx-datatable/src/lib/utils/camel-case.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ export function camelCase(str: string): string {
2727
* http://stackoverflow.com/questions/7225407/convert-camelcasetext-to-camel-case-text
2828
*/
2929
export function deCamelCase(str: string): string {
30-
return str.replace(/([A-Z])/g, (match) => ` ${match}`).replace(/^./, (match) => match.toUpperCase());
30+
return str.replace(/([A-Z])/g, match => ` ${match}`).replace(/^./, match => match.toUpperCase());
3131
}

0 commit comments

Comments
 (0)