Skip to content

Commit

Permalink
fix(material/legacy-button): deprecate all ts symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Sep 7, 2022
1 parent 29ed93a commit b101898
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/material/legacy-button/button-module.ts
Expand Up @@ -10,6 +10,10 @@ import {NgModule} from '@angular/core';
import {MatCommonModule, MatRippleModule} from '@angular/material/core';
import {MatLegacyAnchor, MatLegacyButton} from './button';

/**
* @deprecated Use `MatButtonModule` from `@angular/material/button` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@NgModule({
imports: [MatRippleModule, MatCommonModule],
exports: [MatLegacyButton, MatLegacyAnchor, MatCommonModule],
Expand Down
4 changes: 4 additions & 0 deletions src/material/legacy-button/button.ts
Expand Up @@ -61,6 +61,8 @@ const _MatButtonBase = mixinColor(

/**
* Material design button.
* @deprecated Use `MatButton` from `@angular/material/button` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Component({
selector: `button[mat-button], button[mat-raised-button], button[mat-icon-button],
Expand Down Expand Up @@ -153,6 +155,8 @@ export class MatLegacyButton

/**
* Material design anchor button.
* @deprecated Use `MatAnchor` from `@angular/material/button` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Component({
selector: `a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],
Expand Down
6 changes: 5 additions & 1 deletion src/material/legacy-button/testing/button-harness-filters.ts
Expand Up @@ -8,7 +8,11 @@

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

/** A set of criteria that can be used to filter a list of button harness instances. */
/**
* A set of criteria that can be used to filter a list of button harness instances.
* @deprecated Use `ButtonHarnessFilters` from `@angular/material/button/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export interface LegacyButtonHarnessFilters extends BaseHarnessFilters {
/** Only find instances whose text matches the given value. */
text?: string | RegExp;
Expand Down
6 changes: 5 additions & 1 deletion src/material/legacy-button/testing/button-harness.ts
Expand Up @@ -10,7 +10,11 @@ import {ContentContainerComponentHarness, HarnessPredicate} from '@angular/cdk/t
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {LegacyButtonHarnessFilters} from './button-harness-filters';

/** Harness for interacting with a standard mat-button in tests. */
/**
* Harness for interacting with a standard mat-button in tests.
* @deprecated Use `MatButtonHarness` from `@angular/material/button/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyButtonHarness extends ContentContainerComponentHarness {
// TODO(jelbourn) use a single class, like `.mat-button-base`
/** The selector for the host element of a button instance. */
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/material/legacy-button-testing.md
Expand Up @@ -8,12 +8,12 @@ import { BaseHarnessFilters } from '@angular/cdk/testing';
import { ContentContainerComponentHarness } from '@angular/cdk/testing';
import { HarnessPredicate } from '@angular/cdk/testing';

// @public
// @public @deprecated
export interface LegacyButtonHarnessFilters extends BaseHarnessFilters {
text?: string | RegExp;
}

// @public
// @public @deprecated
export class MatLegacyButtonHarness extends ContentContainerComponentHarness {
blur(): Promise<void>;
click(relativeX: number, relativeY: number): Promise<void>;
Expand Down
6 changes: 3 additions & 3 deletions tools/public_api_guard/material/legacy-button.md
Expand Up @@ -20,7 +20,7 @@ import { MatRipple } from '@angular/material/core';
import { NgZone } from '@angular/core';
import { OnDestroy } from '@angular/core';

// @public
// @public @deprecated
export class MatLegacyAnchor extends MatLegacyButton implements AfterViewInit, OnDestroy {
constructor(focusMonitor: FocusMonitor, elementRef: ElementRef, animationMode: string,
_ngZone?: NgZone | undefined);
Expand All @@ -37,7 +37,7 @@ export class MatLegacyAnchor extends MatLegacyButton implements AfterViewInit, O
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyAnchor, [null, null, { optional: true; }, { optional: true; }]>;
}

// @public
// @public @deprecated
export class MatLegacyButton extends _MatButtonBase implements AfterViewInit, OnDestroy, CanDisable, CanColor, CanDisableRipple, FocusableOption {
constructor(elementRef: ElementRef, _focusMonitor: FocusMonitor, _animationMode: string);
// (undocumented)
Expand All @@ -61,7 +61,7 @@ export class MatLegacyButton extends _MatButtonBase implements AfterViewInit, On
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyButton, [null, null, { optional: true; }]>;
}

// @public (undocumented)
// @public @deprecated (undocumented)
export class MatLegacyButtonModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyButtonModule, never>;
Expand Down

0 comments on commit b101898

Please sign in to comment.