Skip to content

Commit ac840a8

Browse files
committed
fix(material/stepper): 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_STEPPER_INTL_PROVIDER` has been removed. * `MAT_STEPPER_INTL_PROVIDER_FACTORY` has been removed.
1 parent f32bf20 commit ac840a8

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

goldens/material/stepper/index.api.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,13 @@ import * as i3 from '@angular/cdk/portal';
2525
import { NgForm } from '@angular/forms';
2626
import { OnDestroy } from '@angular/core';
2727
import { OnInit } from '@angular/core';
28-
import { Optional } from '@angular/core';
2928
import { QueryList } from '@angular/core';
3029
import { StepperOrientation } from '@angular/cdk/stepper';
3130
import { StepState } from '@angular/cdk/stepper';
3231
import { Subject } from 'rxjs';
3332
import { TemplatePortal } from '@angular/cdk/portal';
3433
import { TemplateRef } from '@angular/core';
3534

36-
// @public @deprecated
37-
export const MAT_STEPPER_INTL_PROVIDER: {
38-
provide: typeof MatStepperIntl;
39-
deps: Optional[][];
40-
useFactory: typeof MAT_STEPPER_INTL_PROVIDER_FACTORY;
41-
};
42-
43-
// @public @deprecated
44-
export function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl): MatStepperIntl;
45-
4635
// @public (undocumented)
4736
export class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentInit, OnDestroy {
4837
color: ThemePalette;

src/material/stepper/stepper-intl.ts

Lines changed: 1 addition & 21 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
/** Stepper data that is required for internationalization. */
@@ -27,23 +27,3 @@ export class MatStepperIntl {
2727
/** Label that is used to indicate step as editable to screen readers. */
2828
editableLabel: string = 'Editable';
2929
}
30-
31-
/**
32-
* @docs-private
33-
* @deprecated No longer used, will be removed.
34-
* @breaking-change 21.0.0
35-
*/
36-
export function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl) {
37-
return parentIntl || new MatStepperIntl();
38-
}
39-
40-
/**
41-
* @docs-private
42-
* @deprecated No longer used, will be removed.
43-
* @breaking-change 21.0.0
44-
*/
45-
export const MAT_STEPPER_INTL_PROVIDER = {
46-
provide: MatStepperIntl,
47-
deps: [[new Optional(), new SkipSelf(), MatStepperIntl]],
48-
useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY,
49-
};

src/material/stepper/stepper-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {MatStepLabel} from './step-label';
1616
import {MatStep, MatStepper} from './stepper';
1717
import {MatStepperNext, MatStepperPrevious} from './stepper-button';
1818
import {MatStepperIcon} from './stepper-icon';
19-
import {MAT_STEPPER_INTL_PROVIDER} from './stepper-intl';
2019
import {MatStepContent} from './step-content';
2120

2221
@NgModule({
@@ -46,6 +45,6 @@ import {MatStepContent} from './step-content';
4645
MatStepperIcon,
4746
MatStepContent,
4847
],
49-
providers: [MAT_STEPPER_INTL_PROVIDER, ErrorStateMatcher],
48+
providers: [ErrorStateMatcher],
5049
})
5150
export class MatStepperModule {}

0 commit comments

Comments
 (0)