Skip to content

Commit 2ee3aa6

Browse files
authored
Merge branch 'master' into mevtimov/feat-8040
2 parents a4de69e + 81fad37 commit 2ee3aa6

File tree

1 file changed

+49
-20
lines changed

1 file changed

+49
-20
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

+49-20
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const MIN_ROW_EDITING_COUNT_THRESHOLD = 2;
168168

169169
export const IgxGridTransaction = new InjectionToken<string>('IgxGridTransaction');
170170

171+
171172
@Directive()
172173
export abstract class IgxGridBaseDirective extends DisplayDensityBase implements GridType,
173174
OnInit, DoCheck, OnDestroy, AfterContentInit, AfterViewInit {
@@ -289,10 +290,13 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
289290
@Output()
290291
public onScroll = new EventEmitter<IGridScrollEventArgs>();
291292

293+
/* eslint-disable max-len */
292294
/**
293-
* @deprecated Use `IgxPaginator` corresponding output instead.
294295
* Emitted after the current page is changed.
295296
*
297+
* @deprecated `pageChange` is deprecated. Use the `pageChange` output exposed by the `IgxPaginator`.
298+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
299+
*
296300
* @example
297301
* ```html
298302
* <igx-grid (pageChange)="onPageChange($event)"></igx-grid>
@@ -303,14 +307,16 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
303307
* }
304308
* ```
305309
*/
306-
@DeprecateProperty('Use the corresponding output exposed by the `igx-paginator`.')
310+
@DeprecateProperty('`pageChange` is deprecated. Use the `pageChange` output exposed by the `IgxPaginator`.')
307311
@Output()
308312
public pageChange = new EventEmitter<number>();
309313

310314
/**
311-
* @deprecated Use `IgxPaginator` corresponding output instead.
312315
* Emitted when `perPage` property value of the grid is changed.
313316
*
317+
* @deprecated `perPageChange` is deprecated. Use the `perPageChange` output exposed by the `IgxPaginator`.
318+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
319+
*
314320
* @example
315321
* ```html
316322
* <igx-grid #grid (perPageChange)="onPerPageChange($event)" [autoGenerate]="true"></igx-grid>
@@ -321,9 +327,10 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
321327
* }
322328
* ```
323329
*/
324-
@DeprecateProperty('Use the corresponding output exposed by the `igx-paginator`.')
330+
@DeprecateProperty('`perPageChange` is deprecated. Use the `perPageChange` output exposed by the `IgxPaginator`.')
325331
@Output()
326332
public perPageChange = new EventEmitter<number>();
333+
/* eslint-enable max-len */
327334

328335
/**
329336
* Gets/Sets a custom `ng-template` for the pagination UI of the grid.
@@ -1421,18 +1428,21 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
14211428
this.notifyChanges(true);
14221429
}
14231430

1431+
/* eslint-disable max-len */
14241432
/**
1425-
* @deprecated Use `IgxPaginator` corresponding method instead.
14261433
* Gets/Sets the current page index.
14271434
*
1435+
* @deprecated `page` is deprecated. Use the `page` input exposed by the `IgxPaginator`.
1436+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
1437+
*
14281438
* @example
14291439
* ```html
14301440
* <igx-grid #grid [data]="Data" [paging]="true" [(page)]="model.page" [autoGenerate]="true"></igx-grid>
14311441
* ```
14321442
* @remarks
14331443
* Supports two-way binding.
14341444
*/
1435-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
1445+
@DeprecateProperty('`page` is deprecated. Use the `page` input exposed by the `IgxPaginator`.')
14361446
@Input()
14371447
public get page(): number {
14381448
return this._page;
@@ -1450,17 +1460,20 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
14501460
}
14511461

14521462
/**
1453-
* @deprecated Use `IgxPaginator` corresponding method instead.
14541463
* Gets/Sets the number of visible items per page.
14551464
*
1465+
* @deprecated `perPage` is deprecated. Use the `perPage` input exposed by the `IgxPaginator`.
1466+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
1467+
*
14561468
* @remarks
14571469
* The default is 15.
14581470
* @example
14591471
* ```html
14601472
* <igx-grid #grid [data]="Data" [paging]="true" [(perPage)]="model.perPage" [autoGenerate]="true"></igx-grid>
14611473
* ```
14621474
*/
1463-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
1475+
/* eslint-enable max-len */
1476+
@DeprecateProperty('`perPage` is deprecated. Use the `perPage` input exposed by the `IgxPaginator`.')
14641477
@Input()
14651478
public get perPage(): number {
14661479
return this._perPage;
@@ -3086,17 +3099,20 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
30863099
this.cdr.detach();
30873100
}
30883101

3102+
/* eslint-disable max-len */
30893103
/**
3090-
* @deprecated Use `IgxPaginator` corresponding method instead.
30913104
* Goes to the desired page index.
30923105
*
3106+
* @deprecated `paginate` is deprecated. Use the `paginate` method exposed by the `IgxPaginator`.
3107+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
3108+
*
30933109
* @example
30943110
* ```typescript
30953111
* this.grid1.paginate(1);
30963112
* ```
30973113
* @param val
30983114
*/
3099-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
3115+
@DeprecateProperty('`paginate` is deprecated. Use the `paginate` method exposed by the `IgxPaginator`.')
31003116
public paginate(val: number): void {
31013117
if (val < 0 || val > this.totalPages - 1) {
31023118
return;
@@ -3106,31 +3122,36 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
31063122
}
31073123

31083124
/**
3109-
* @deprecated Use `IgxPaginator` corresponding method instead.
31103125
* Goes to the next page, if the grid is not already at the last page.
31113126
*
3127+
* @deprecated `nextPage` is deprecated. Use the `nextPage` method exposed by the `IgxPaginator`.
3128+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
3129+
*
31123130
* @example
31133131
* ```typescript
31143132
* this.grid1.nextPage();
31153133
* ```
31163134
*/
3117-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
3135+
@DeprecateProperty('`nextPage` is deprecated. Use the `nextPage` method exposed by the `IgxPaginator`.')
31183136
public nextPage(): void {
31193137
if (!this.isLastPage) {
31203138
this.page += 1;
31213139
}
31223140
}
31233141

31243142
/**
3125-
* @deprecated Use `IgxPaginator` corresponding method instead.
31263143
* Goes to the previous page, if the grid is not already at the first page.
31273144
*
3145+
* @deprecated `previousPage` is deprecated. Use the `previousPage` method exposed by the `IgxPaginator`.
3146+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
3147+
*
31283148
* @example
31293149
* ```typescript
31303150
* this.grid1.previousPage();
31313151
* ```
31323152
*/
3133-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
3153+
/* eslint-enable max-len */
3154+
@DeprecateProperty('`previousPage` is deprecated. Use the `previousPage` method exposed by the `IgxPaginator`.')
31343155
public previousPage(): void {
31353156
if (!this.isFirstPage) {
31363157
this.page -= 1;
@@ -4167,16 +4188,19 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
41674188
return this.gridAPI.get_cell_by_key(rowSelector, columnField);
41684189
}
41694190

4191+
/* eslint-disable max-len */
41704192
/**
4171-
* @deprecated Use `IgxPaginator` corresponding method instead.
41724193
* Gets the total number of pages.
41734194
*
4195+
* @deprecated `totalPages` is deprecated. Use the `totalPages` getter exposed by the `IgxPaginator`.
4196+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
4197+
*
41744198
* @example
41754199
* ```typescript
41764200
* const totalPages = this.grid.totalPages;
41774201
* ```
41784202
*/
4179-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
4203+
@DeprecateProperty('`totalPages` is deprecated. Use the `totalPages` getter exposed by the `IgxPaginator`.')
41804204
public get totalPages(): number {
41814205
if (this.pagingState) {
41824206
return this.pagingState.metadata.countPages;
@@ -4185,15 +4209,17 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
41854209
}
41864210

41874211
/**
4188-
* @deprecated Use `IgxPaginator` corresponding method instead.
41894212
* Gets if the current page is the first page.
41904213
*
4214+
* @deprecated `isFirstPage` is deprecated. Use the `isFirstPage` getter exposed by the `IgxPaginator`.
4215+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
4216+
*
41914217
* @example
41924218
* ```typescript
41934219
* const firstPage = this.grid.isFirstPage;
41944220
* ```
41954221
*/
4196-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
4222+
@DeprecateProperty('`isFirstPage` is deprecated. Use the `isFirstPage` getter exposed by the `IgxPaginator`.')
41974223
public get isFirstPage(): boolean {
41984224
return this.page === 0;
41994225
}
@@ -4222,15 +4248,18 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
42224248
}
42234249

42244250
/**
4225-
* @deprecated Use `IgxPaginator` corresponding method instead.
42264251
* Returns if the current page is the last page.
42274252
*
4253+
* @deprecated `isLastPage` is deprecated. Use the `isLastPage` output exposed by the `IgxPaginator`.
4254+
* See [Paging with custom template](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/remote-data-operations#remote-paging-with-custom-template) for more info.
4255+
*
42284256
* @example
42294257
* ```typescript
42304258
* const lastPage = this.grid.isLastPage;
42314259
* ```
42324260
*/
4233-
@DeprecateProperty('Use the corresponding method exposed by the `igx-paginator`.')
4261+
/* eslint-enable max-len */
4262+
@DeprecateProperty('`isLastPage` is deprecated. Use the `isLastPage` getter exposed by the `IgxPaginator`.')
42344263
public get isLastPage(): boolean {
42354264
return this.page + 1 >= this.totalPages;
42364265
}

0 commit comments

Comments
 (0)