Skip to content

Commit 2c7dfcf

Browse files
authored
Merge pull request #9156 from IgniteUI/dTsvetkov/fix-cell-styling-warnings
fix(lint): cell styling and pipes warnings
2 parents e64adbe + 6e35259 commit 2c7dfcf

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

projects/igniteui-angular/src/lib/grids/common/pipes.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-unused-vars */
12
import { Pipe, PipeTransform, Inject } from '@angular/core';
23
import { GridBaseAPIService } from '../api.service';
34
import { IgxGridBaseDirective } from '../grid-base.directive';
@@ -17,7 +18,7 @@ import { IgxColumnActionsComponent } from '../column-actions/column-actions.comp
1718
})
1819
export class IgxGridCellStyleClassesPipe implements PipeTransform {
1920

20-
transform(cssClasses: { [prop: string]: any }, _: any, data: any, field: string, index: number, __: number): string {
21+
public transform(cssClasses: { [prop: string]: any }, _: any, data: any, field: string, index: number, __: number): string {
2122
if (!cssClasses) {
2223
return '';
2324
}
@@ -46,7 +47,8 @@ export class IgxGridCellStyleClassesPipe implements PipeTransform {
4647
})
4748
export class IgxGridCellStylesPipe implements PipeTransform {
4849

49-
transform(styles: { [prop: string]: any }, _: any, data: any, field: string, index: number, __: number): { [prop: string]: any } {
50+
public transform(styles: { [prop: string]: any }, _: any, data: any, field: string, index: number, __: number):
51+
{ [prop: string]: any } {
5052
const css = {};
5153
if (!styles) {
5254
return css;
@@ -70,7 +72,7 @@ export class IgxGridCellStylesPipe implements PipeTransform {
7072
})
7173
export class IgxGridNotGroupedPipe implements PipeTransform {
7274

73-
transform(value: any[]): any[] {
75+
public transform(value: any[]): any[] {
7476
return value.filter(item => !item.columnGroup);
7577
}
7678
}
@@ -84,7 +86,7 @@ export class IgxGridNotGroupedPipe implements PipeTransform {
8486
})
8587
export class IgxGridTopLevelColumns implements PipeTransform {
8688

87-
transform(value: any[]): any[] {
89+
public transform(value: any[]): any[] {
8890
return value.filter(item => item.level === 0);
8991
}
9092
}
@@ -116,7 +118,7 @@ export class IgxGridTransactionPipe implements PipeTransform {
116118

117119
constructor(private gridAPI: GridBaseAPIService<IgxGridBaseDirective & GridType>) { }
118120

119-
transform(collection: any[], id: string, pipeTrigger: number) {
121+
public transform(collection: any[], id: string, pipeTrigger: number) {
120122
const grid: IgxGridBaseDirective = this.gridAPI.grid;
121123

122124
if (grid.transactions.enabled) {
@@ -153,7 +155,7 @@ export class IgxGridPaginatorOptionsPipe implements PipeTransform {
153155
pure: true
154156
})
155157
export class IgxHasVisibleColumnsPipe implements PipeTransform {
156-
transform(values: any[], hasVisibleColumns) {
158+
public transform(values: any[], hasVisibleColumns) {
157159
if (!(values && values.length)) {
158160
return values;
159161
}
@@ -268,23 +270,23 @@ export class IgxSortActionColumnsPipe implements PipeTransform {
268270
@Pipe({ name: 'dataMapper' })
269271
export class IgxGridDataMapperPipe implements PipeTransform {
270272

271-
transform(data: any[], field: string, _: number, val: any, isNestedPath: boolean) {
273+
public transform(data: any[], field: string, _: number, val: any, isNestedPath: boolean) {
272274
return isNestedPath ? resolveNestedPath(data, field) : val;
273275
}
274276
}
275277

276278
@Pipe({ name: 'igxStringReplace' })
277279
export class IgxStringReplacePipe implements PipeTransform {
278280

279-
transform(value: string, search: string | RegExp, replacement: string): string {
281+
public transform(value: string, search: string | RegExp, replacement: string): string {
280282
return value.replace(search, replacement);
281283
}
282284
}
283285

284286
@Pipe({ name: 'transactionState' })
285287
export class IgxGridTransactionStatePipe implements PipeTransform {
286288

287-
transform(row_id: any, field: string, rowEditable: boolean, transactions: any, _: any, __: any, ___: any) {
289+
public transform(row_id: any, field: string, rowEditable: boolean, transactions: any, _: any, __: any, ___: any) {
288290
if (rowEditable) {
289291
const rowCurrentState = transactions.getAggregatedValue(row_id, false);
290292
if (rowCurrentState) {
@@ -302,7 +304,7 @@ export class IgxGridTransactionStatePipe implements PipeTransform {
302304
@Pipe({ name: 'columnFormatter' })
303305
export class IgxColumnFormatterPipe implements PipeTransform {
304306

305-
transform(value: any, formatter: (v: any) => any) {
307+
public transform(value: any, formatter: (v: any) => any) {
306308
return formatter(value);
307309
}
308310
}
@@ -315,7 +317,7 @@ export class IgxGridAddRowPipe implements PipeTransform {
315317

316318
constructor(private gridAPI: GridBaseAPIService<IgxGridBaseDirective & GridType>) { }
317319

318-
transform(collection: any, isPinned = false, pipeTrigger: number) {
320+
public transform(collection: any, isPinned = false, pipeTrigger: number) {
319321
const grid = this.gridAPI.grid;
320322
if (!grid.rowEditable || !grid.addRowParent || grid.cancelAddMode || isPinned !== grid.addRowParent.isPinned) {
321323
return collection;

src/app/grid-events/grid-events.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export class GridEventsComponent {
8888
this.logAnEvent('=> columnVisibilityChanging', event.cancel);
8989
}
9090
public onColumnVisibilityChanged(event: IColumnVisibilityChangedEventArgs) {
91+
console.log('event' + event);
9192
this.logAnEvent(`=> onColumnVisibilityChanged`);
9293
}
9394

0 commit comments

Comments
 (0)