Skip to content

Commit c3684db

Browse files
committed
fix(material/legacy-progress-bar): deprecate all ts symbols
1 parent b6f9d66 commit c3684db

File tree

6 files changed

+55
-18
lines changed

6 files changed

+55
-18
lines changed

src/material/legacy-progress-bar/progress-bar-module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import {CommonModule} from '@angular/common';
1111
import {MatCommonModule} from '@angular/material/core';
1212
import {MatLegacyProgressBar} from './progress-bar';
1313

14+
/**
15+
* @deprecated Use `MatProgressBarModule` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
16+
* @breaking-change 17.0.0
17+
*/
1418
@NgModule({
1519
imports: [CommonModule, MatCommonModule],
1620
exports: [MatLegacyProgressBar, MatCommonModule],

src/material/legacy-progress-bar/progress-bar.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';
3030
import {fromEvent, Observable, Subscription} from 'rxjs';
3131
import {filter} from 'rxjs/operators';
3232

33-
// TODO(josephperrott): Benchpress tests.
3433
// TODO(josephperrott): Add ARIA attributes for progress bar "for".
3534

36-
/** Last animation end data. */
35+
/**
36+
* Last animation end data.
37+
* @deprecated Use `ProgressAnimationEnd` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
38+
* @breaking-change 17.0.0
39+
*/
3740
export interface LegacyProgressAnimationEnd {
3841
value: number;
3942
}
@@ -51,6 +54,8 @@ const _MatProgressBarBase = mixinColor(
5154
* Injection token used to provide the current location to `MatProgressBar`.
5255
* Used to handle server-side rendering and to stub out during unit tests.
5356
* @docs-private
57+
* @deprecated Use `MAT_PROGRESS_BAR_LOCATION` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
58+
* @breaking-change 17.0.0
5459
*/
5560
export const MAT_LEGACY_PROGRESS_BAR_LOCATION = new InjectionToken<MatLegacyProgressBarLocation>(
5661
'mat-progress-bar-location',
@@ -60,12 +65,18 @@ export const MAT_LEGACY_PROGRESS_BAR_LOCATION = new InjectionToken<MatLegacyProg
6065
/**
6166
* Stubbed out location for `MatProgressBar`.
6267
* @docs-private
68+
* @deprecated Use `MatProgressBarLocation` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
69+
* @breaking-change 17.0.0
6370
*/
6471
export interface MatLegacyProgressBarLocation {
6572
getPathname: () => string;
6673
}
6774

68-
/** @docs-private */
75+
/**
76+
* @docs-private
77+
* @deprecated Use `MAT_PROGRESS_BAR_LOCATION_FACTORY` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
78+
* @breaking-change 17.0.0
79+
*/
6980
export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBarLocation {
7081
const _document = inject(DOCUMENT);
7182
const _location = _document ? _document.location : null;
@@ -77,9 +88,17 @@ export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBar
7788
};
7889
}
7990

91+
/**
92+
* @deprecated Use `ProgressBarMode` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
93+
* @breaking-change 17.0.0
94+
*/
8095
export type LegacyProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';
8196

82-
/** Default `mat-progress-bar` options that can be overridden. */
97+
/**
98+
* Default `mat-progress-bar` options that can be overridden.
99+
* @deprecated Use `MatProgressBarDefaultOptions` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
100+
* @breaking-change 17.0.0
101+
*/
83102
export interface MatLegacyProgressBarDefaultOptions {
84103
/** Default color of the progress bar. */
85104
color?: ThemePalette;
@@ -88,7 +107,11 @@ export interface MatLegacyProgressBarDefaultOptions {
88107
mode?: LegacyProgressBarMode;
89108
}
90109

91-
/** Injection token to be used to override the default options for `mat-progress-bar`. */
110+
/**
111+
* Injection token to be used to override the default options for `mat-progress-bar`.
112+
* @deprecated Use `MAT_PROGRESS_BAR_DEFAULT_OPTIONS` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
113+
* @breaking-change 17.0.0
114+
*/
92115
export const MAT_LEGACY_PROGRESS_BAR_DEFAULT_OPTIONS =
93116
new InjectionToken<MatLegacyProgressBarDefaultOptions>('MAT_PROGRESS_BAR_DEFAULT_OPTIONS');
94117

@@ -97,6 +120,8 @@ let progressbarId = 0;
97120

98121
/**
99122
* `<mat-progress-bar>` component.
123+
* @deprecated Use `MatProgressBar` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
124+
* @breaking-change 17.0.0
100125
*/
101126
@Component({
102127
selector: 'mat-progress-bar',

src/material/legacy-progress-bar/testing/progress-bar-harness-filters.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@
88

99
import {BaseHarnessFilters} from '@angular/cdk/testing';
1010

11-
/** A set of criteria that can be used to filter a list of `MatProgressBarHarness` instances. */
11+
/**
12+
* A set of criteria that can be used to filter a list of `MatProgressBarHarness` instances.
13+
* @deprecated Use `ProgressBarHarnessFilters` from `@angular/material/progress-bar/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
14+
* @breaking-change 17.0.0
15+
*/
1216
export interface LegacyProgressBarHarnessFilters extends BaseHarnessFilters {}

src/material/legacy-progress-bar/testing/progress-bar-harness.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {coerceNumberProperty} from '@angular/cdk/coercion';
1010
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
1111
import {LegacyProgressBarHarnessFilters} from './progress-bar-harness-filters';
1212

13-
/** Harness for interacting with a standard mat-progress-bar in tests. */
13+
/**
14+
* Harness for interacting with a standard mat-progress-bar in tests.
15+
* @deprecated Use `MatProgressBarHarness` from `@angular/material/progress-bar/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
16+
* @breaking-change 17.0.0
17+
*/
1418
export class MatLegacyProgressBarHarness extends ComponentHarness {
1519
/** The selector for the host element of a `MatProgressBar` instance. */
1620
static hostSelector = '.mat-progress-bar';

tools/public_api_guard/material/legacy-progress-bar-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { BaseHarnessFilters } from '@angular/cdk/testing';
88
import { ComponentHarness } from '@angular/cdk/testing';
99
import { HarnessPredicate } from '@angular/cdk/testing';
1010

11-
// @public
11+
// @public @deprecated
1212
export interface LegacyProgressBarHarnessFilters extends BaseHarnessFilters {
1313
}
1414

15-
// @public
15+
// @public @deprecated
1616
export class MatLegacyProgressBarHarness extends ComponentHarness {
1717
getMode(): Promise<string | null>;
1818
getValue(): Promise<number | null>;

tools/public_api_guard/material/legacy-progress-bar.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ import { NumberInput } from '@angular/cdk/coercion';
2020
import { OnDestroy } from '@angular/core';
2121
import { ThemePalette } from '@angular/material/core';
2222

23-
// @public
23+
// @public @deprecated
2424
export interface LegacyProgressAnimationEnd {
2525
// (undocumented)
2626
value: number;
2727
}
2828

29-
// @public (undocumented)
29+
// @public @deprecated (undocumented)
3030
export type LegacyProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';
3131

32-
// @public
32+
// @public @deprecated
3333
export const MAT_LEGACY_PROGRESS_BAR_DEFAULT_OPTIONS: InjectionToken<MatLegacyProgressBarDefaultOptions>;
3434

35-
// @public
35+
// @public @deprecated
3636
export const MAT_LEGACY_PROGRESS_BAR_LOCATION: InjectionToken<MatLegacyProgressBarLocation>;
3737

38-
// @public
38+
// @public @deprecated
3939
export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBarLocation;
4040

41-
// @public
41+
// @public @deprecated
4242
export class MatLegacyProgressBar extends _MatProgressBarBase implements CanColor, AfterViewInit, OnDestroy {
4343
constructor(elementRef: ElementRef, _ngZone: NgZone, _animationMode?: string | undefined,
4444
location?: MatLegacyProgressBarLocation, defaults?: MatLegacyProgressBarDefaultOptions,
@@ -72,19 +72,19 @@ export class MatLegacyProgressBar extends _MatProgressBarBase implements CanColo
7272
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyProgressBar, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, null]>;
7373
}
7474

75-
// @public
75+
// @public @deprecated
7676
export interface MatLegacyProgressBarDefaultOptions {
7777
color?: ThemePalette;
7878
mode?: LegacyProgressBarMode;
7979
}
8080

81-
// @public
81+
// @public @deprecated
8282
export interface MatLegacyProgressBarLocation {
8383
// (undocumented)
8484
getPathname: () => string;
8585
}
8686

87-
// @public (undocumented)
87+
// @public @deprecated (undocumented)
8888
export class MatLegacyProgressBarModule {
8989
// (undocumented)
9090
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyProgressBarModule, never>;

0 commit comments

Comments
 (0)