diff --git a/src/material/legacy-progress-bar/progress-bar-module.ts b/src/material/legacy-progress-bar/progress-bar-module.ts index 7801bf1a7d24..2b34b841061f 100644 --- a/src/material/legacy-progress-bar/progress-bar-module.ts +++ b/src/material/legacy-progress-bar/progress-bar-module.ts @@ -11,6 +11,10 @@ import {CommonModule} from '@angular/common'; import {MatCommonModule} from '@angular/material/core'; import {MatLegacyProgressBar} from './progress-bar'; +/** + * @deprecated Use `MatProgressBarModule` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ @NgModule({ imports: [CommonModule, MatCommonModule], exports: [MatLegacyProgressBar, MatCommonModule], diff --git a/src/material/legacy-progress-bar/progress-bar.ts b/src/material/legacy-progress-bar/progress-bar.ts index 49ddc8290ce5..5f9cf9f4bd43 100644 --- a/src/material/legacy-progress-bar/progress-bar.ts +++ b/src/material/legacy-progress-bar/progress-bar.ts @@ -30,10 +30,13 @@ import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations'; import {fromEvent, Observable, Subscription} from 'rxjs'; import {filter} from 'rxjs/operators'; -// TODO(josephperrott): Benchpress tests. // TODO(josephperrott): Add ARIA attributes for progress bar "for". -/** Last animation end data. */ +/** + * Last animation end data. + * @deprecated Use `ProgressAnimationEnd` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ export interface LegacyProgressAnimationEnd { value: number; } @@ -51,6 +54,8 @@ const _MatProgressBarBase = mixinColor( * Injection token used to provide the current location to `MatProgressBar`. * Used to handle server-side rendering and to stub out during unit tests. * @docs-private + * @deprecated Use `MAT_PROGRESS_BAR_LOCATION` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 */ export const MAT_LEGACY_PROGRESS_BAR_LOCATION = new InjectionToken( 'mat-progress-bar-location', @@ -60,12 +65,18 @@ export const MAT_LEGACY_PROGRESS_BAR_LOCATION = new InjectionToken string; } -/** @docs-private */ +/** + * @docs-private + * @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. + * @breaking-change 17.0.0 + */ export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBarLocation { const _document = inject(DOCUMENT); const _location = _document ? _document.location : null; @@ -77,9 +88,17 @@ export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBar }; } +/** + * @deprecated Use `ProgressBarMode` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ export type LegacyProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query'; -/** Default `mat-progress-bar` options that can be overridden. */ +/** + * Default `mat-progress-bar` options that can be overridden. + * @deprecated Use `MatProgressBarDefaultOptions` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ export interface MatLegacyProgressBarDefaultOptions { /** Default color of the progress bar. */ color?: ThemePalette; @@ -88,7 +107,11 @@ export interface MatLegacyProgressBarDefaultOptions { mode?: LegacyProgressBarMode; } -/** Injection token to be used to override the default options for `mat-progress-bar`. */ +/** + * Injection token to be used to override the default options for `mat-progress-bar`. + * @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. + * @breaking-change 17.0.0 + */ export const MAT_LEGACY_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken('MAT_PROGRESS_BAR_DEFAULT_OPTIONS'); @@ -97,6 +120,8 @@ let progressbarId = 0; /** * `` component. + * @deprecated Use `MatProgressBar` from `@angular/material/progress-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 */ @Component({ selector: 'mat-progress-bar', diff --git a/src/material/legacy-progress-bar/testing/progress-bar-harness-filters.ts b/src/material/legacy-progress-bar/testing/progress-bar-harness-filters.ts index 8350b362e8e5..f6cf7f18e119 100644 --- a/src/material/legacy-progress-bar/testing/progress-bar-harness-filters.ts +++ b/src/material/legacy-progress-bar/testing/progress-bar-harness-filters.ts @@ -8,5 +8,9 @@ import {BaseHarnessFilters} from '@angular/cdk/testing'; -/** A set of criteria that can be used to filter a list of `MatProgressBarHarness` instances. */ +/** + * A set of criteria that can be used to filter a list of `MatProgressBarHarness` instances. + * @deprecated Use `ProgressBarHarnessFilters` from `@angular/material/progress-bar/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ export interface LegacyProgressBarHarnessFilters extends BaseHarnessFilters {} diff --git a/src/material/legacy-progress-bar/testing/progress-bar-harness.ts b/src/material/legacy-progress-bar/testing/progress-bar-harness.ts index 14e0cfc95c1c..50bd7153b150 100644 --- a/src/material/legacy-progress-bar/testing/progress-bar-harness.ts +++ b/src/material/legacy-progress-bar/testing/progress-bar-harness.ts @@ -10,7 +10,11 @@ import {coerceNumberProperty} from '@angular/cdk/coercion'; import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing'; import {LegacyProgressBarHarnessFilters} from './progress-bar-harness-filters'; -/** Harness for interacting with a standard mat-progress-bar in tests. */ +/** + * Harness for interacting with a standard mat-progress-bar in tests. + * @deprecated Use `MatProgressBarHarness` from `@angular/material/progress-bar/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. + * @breaking-change 17.0.0 + */ export class MatLegacyProgressBarHarness extends ComponentHarness { /** The selector for the host element of a `MatProgressBar` instance. */ static hostSelector = '.mat-progress-bar'; diff --git a/tools/public_api_guard/material/legacy-progress-bar-testing.md b/tools/public_api_guard/material/legacy-progress-bar-testing.md index f6363beee8e3..9bcdb69061ad 100644 --- a/tools/public_api_guard/material/legacy-progress-bar-testing.md +++ b/tools/public_api_guard/material/legacy-progress-bar-testing.md @@ -8,11 +8,11 @@ import { BaseHarnessFilters } from '@angular/cdk/testing'; import { ComponentHarness } from '@angular/cdk/testing'; import { HarnessPredicate } from '@angular/cdk/testing'; -// @public +// @public @deprecated export interface LegacyProgressBarHarnessFilters extends BaseHarnessFilters { } -// @public +// @public @deprecated export class MatLegacyProgressBarHarness extends ComponentHarness { getMode(): Promise; getValue(): Promise; diff --git a/tools/public_api_guard/material/legacy-progress-bar.md b/tools/public_api_guard/material/legacy-progress-bar.md index 02edbed70644..e20d07418f75 100644 --- a/tools/public_api_guard/material/legacy-progress-bar.md +++ b/tools/public_api_guard/material/legacy-progress-bar.md @@ -20,25 +20,25 @@ import { NumberInput } from '@angular/cdk/coercion'; import { OnDestroy } from '@angular/core'; import { ThemePalette } from '@angular/material/core'; -// @public +// @public @deprecated export interface LegacyProgressAnimationEnd { // (undocumented) value: number; } -// @public (undocumented) +// @public @deprecated (undocumented) export type LegacyProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query'; -// @public +// @public @deprecated export const MAT_LEGACY_PROGRESS_BAR_DEFAULT_OPTIONS: InjectionToken; -// @public +// @public @deprecated export const MAT_LEGACY_PROGRESS_BAR_LOCATION: InjectionToken; -// @public +// @public @deprecated export function MAT_LEGACY_PROGRESS_BAR_LOCATION_FACTORY(): MatLegacyProgressBarLocation; -// @public +// @public @deprecated export class MatLegacyProgressBar extends _MatProgressBarBase implements CanColor, AfterViewInit, OnDestroy { constructor(elementRef: ElementRef, _ngZone: NgZone, _animationMode?: string | undefined, location?: MatLegacyProgressBarLocation, defaults?: MatLegacyProgressBarDefaultOptions, @@ -72,19 +72,19 @@ export class MatLegacyProgressBar extends _MatProgressBarBase implements CanColo static ɵfac: i0.ɵɵFactoryDeclaration; } -// @public +// @public @deprecated export interface MatLegacyProgressBarDefaultOptions { color?: ThemePalette; mode?: LegacyProgressBarMode; } -// @public +// @public @deprecated export interface MatLegacyProgressBarLocation { // (undocumented) getPathname: () => string; } -// @public (undocumented) +// @public @deprecated (undocumented) export class MatLegacyProgressBarModule { // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration;