Skip to content

Commit 6d26c0f

Browse files
committed
fix(material/paginator): remove deprecated factory functions
Removes factory functions that we had marked as deprecated for v21. These functions aren't necessary since we switched to standalone. BREAKING CHANGE: * `MAT_PAGINATOR_INTL_PROVIDER` has been removed. * `MAT_PAGINATOR_INTL_PROVIDER_FACTORY` has been removed.
1 parent 4b06a1a commit 6d26c0f

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

goldens/material/paginator/index.api.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { Observable } from 'rxjs';
3939
import { OnChanges } from '@angular/core';
4040
import { OnDestroy } from '@angular/core';
4141
import { OnInit } from '@angular/core';
42-
import { Optional } from '@angular/core';
4342
import { OriginConnectionPosition } from '@angular/cdk/overlay';
4443
import { OverlayConnectionPosition } from '@angular/cdk/overlay';
4544
import { OverlayRef } from '@angular/cdk/overlay';
@@ -53,16 +52,6 @@ import { ViewportRuler } from '@angular/cdk/scrolling';
5352
// @public
5453
export const MAT_PAGINATOR_DEFAULT_OPTIONS: InjectionToken<MatPaginatorDefaultOptions>;
5554

56-
// @public @deprecated
57-
export const MAT_PAGINATOR_INTL_PROVIDER: {
58-
provide: typeof MatPaginatorIntl;
59-
deps: Optional[][];
60-
useFactory: typeof MAT_PAGINATOR_INTL_PROVIDER_FACTORY;
61-
};
62-
63-
// @public @deprecated
64-
export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl): MatPaginatorIntl;
65-
6655
// @public
6756
export class MatPaginator implements OnInit, OnDestroy {
6857
constructor(...args: unknown[]);

src/material/paginator/paginator-intl.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {Injectable, Optional, SkipSelf} from '@angular/core';
9+
import {Injectable} from '@angular/core';
1010
import {Subject} from 'rxjs';
1111

1212
/**
@@ -57,24 +57,3 @@ export class MatPaginatorIntl {
5757
return `${startIndex + 1}${endIndex} of ${length}`;
5858
};
5959
}
60-
61-
/**
62-
* @docs-private
63-
* @deprecated No longer used, will be removed.
64-
* @breaking-change 21.0.0
65-
*/
66-
export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl) {
67-
return parentIntl || new MatPaginatorIntl();
68-
}
69-
70-
/**
71-
* @docs-private
72-
* @deprecated No longer used, will be removed.
73-
* @breaking-change 21.0.0
74-
*/
75-
export const MAT_PAGINATOR_INTL_PROVIDER = {
76-
// If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.
77-
provide: MatPaginatorIntl,
78-
deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],
79-
useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY,
80-
};

src/material/paginator/paginator-module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import {NgModule} from '@angular/core';
10-
import {MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl';
1110
import {MatButtonModule} from '../button';
1211
import {MatSelectModule} from '../select';
1312
import {MatTooltipModule} from '../tooltip';
@@ -16,6 +15,5 @@ import {MatPaginator} from './paginator';
1615
@NgModule({
1716
imports: [MatButtonModule, MatSelectModule, MatTooltipModule, MatPaginator],
1817
exports: [MatPaginator],
19-
providers: [MAT_PAGINATOR_INTL_PROVIDER],
2018
})
2119
export class MatPaginatorModule {}

0 commit comments

Comments
 (0)