Skip to content

Commit f32bf20

Browse files
committed
fix(material/sort): 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_SORT_HEADER_INTL_PROVIDER` has been removed. * `MAT_SORT_HEADER_INTL_PROVIDER_FACTORY` has been removed.
1 parent 54aad6e commit f32bf20

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

goldens/material/sort/index.api.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { Observable } from 'rxjs';
1313
import { OnChanges } from '@angular/core';
1414
import { OnDestroy } from '@angular/core';
1515
import { OnInit } from '@angular/core';
16-
import { Optional } from '@angular/core';
1716
import { Subject } from 'rxjs';
1817

1918
// @public @deprecated
@@ -30,16 +29,6 @@ export interface ArrowViewStateTransition {
3029
// @public
3130
export const MAT_SORT_DEFAULT_OPTIONS: InjectionToken<MatSortDefaultOptions>;
3231

33-
// @public @deprecated
34-
export const MAT_SORT_HEADER_INTL_PROVIDER: {
35-
provide: typeof MatSortHeaderIntl;
36-
deps: Optional[][];
37-
useFactory: typeof MAT_SORT_HEADER_INTL_PROVIDER_FACTORY;
38-
};
39-
40-
// @public @deprecated
41-
export function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: MatSortHeaderIntl): MatSortHeaderIntl;
42-
4332
// @public
4433
export class MatSort implements OnChanges, OnDestroy, OnInit {
4534
constructor(_defaultOptions?: MatSortDefaultOptions | undefined);

src/material/sort/sort-header-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, SkipSelf, Optional} from '@angular/core';
9+
import {Injectable} from '@angular/core';
1010
import {Subject} from 'rxjs';
1111

1212
/**
@@ -21,24 +21,3 @@ export class MatSortHeaderIntl {
2121
*/
2222
readonly changes: Subject<void> = new Subject<void>();
2323
}
24-
25-
/**
26-
* @docs-private
27-
* @deprecated No longer used, will be removed.
28-
* @breaking-change 21.0.0
29-
*/
30-
export function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: MatSortHeaderIntl) {
31-
return parentIntl || new MatSortHeaderIntl();
32-
}
33-
34-
/**
35-
* @docs-private
36-
* @deprecated No longer used, will be removed.
37-
* @breaking-change 21.0.0
38-
*/
39-
export const MAT_SORT_HEADER_INTL_PROVIDER = {
40-
// If there is already an MatSortHeaderIntl available, use that. Otherwise, provide a new one.
41-
provide: MatSortHeaderIntl,
42-
deps: [[new Optional(), new SkipSelf(), MatSortHeaderIntl]],
43-
useFactory: MAT_SORT_HEADER_INTL_PROVIDER_FACTORY,
44-
};

src/material/sort/sort-module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
import {NgModule} from '@angular/core';
1010
import {MatSortHeader} from './sort-header';
1111
import {MatSort} from './sort';
12-
import {MAT_SORT_HEADER_INTL_PROVIDER} from './sort-header-intl';
1312
import {MatCommonModule} from '../core';
1413

1514
@NgModule({
1615
imports: [MatCommonModule, MatSort, MatSortHeader],
1716
exports: [MatSort, MatSortHeader],
18-
providers: [MAT_SORT_HEADER_INTL_PROVIDER],
1917
})
2018
export class MatSortModule {}

0 commit comments

Comments
 (0)