Skip to content

Commit a5a12b9

Browse files
committed
fix(material/legacy-card): deprecate all ts symbols
1 parent b101898 commit a5a12b9

File tree

6 files changed

+66
-21
lines changed

6 files changed

+66
-21
lines changed

src/material/legacy-card/card-module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import {
2525
MatLegacyCardXlImage,
2626
} from './card';
2727

28+
/**
29+
* @deprecated Use `MatCardModule` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
30+
* @breaking-change 17.0.0
31+
*/
2832
@NgModule({
2933
imports: [MatCommonModule],
3034
exports: [

src/material/legacy-card/card.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';
2020
/**
2121
* Content of a card, needed as it's used as a selector in the API.
2222
* @docs-private
23+
* @deprecated Use `MatCardContent` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
24+
* @breaking-change 17.0.0
2325
*/
2426
@Directive({
2527
selector: 'mat-card-content, [mat-card-content], [matCardContent]',
@@ -30,6 +32,8 @@ export class MatLegacyCardContent {}
3032
/**
3133
* Title of a card, needed as it's used as a selector in the API.
3234
* @docs-private
35+
* @deprecated Use `MatCardTitle` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
36+
* @breaking-change 17.0.0
3337
*/
3438
@Directive({
3539
selector: `mat-card-title, [mat-card-title], [matCardTitle]`,
@@ -42,6 +46,8 @@ export class MatLegacyCardTitle {}
4246
/**
4347
* Sub-title of a card, needed as it's used as a selector in the API.
4448
* @docs-private
49+
* @deprecated Use `MatCardSubtitle` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
50+
* @breaking-change 17.0.0
4551
*/
4652
@Directive({
4753
selector: `mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]`,
@@ -54,6 +60,8 @@ export class MatLegacyCardSubtitle {}
5460
/**
5561
* Action section of a card, needed as it's used as a selector in the API.
5662
* @docs-private
63+
* @deprecated Use `MatCardActions` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
64+
* @breaking-change 17.0.0
5765
*/
5866
@Directive({
5967
selector: 'mat-card-actions',
@@ -71,6 +79,8 @@ export class MatLegacyCardActions {
7179
/**
7280
* Footer of a card, needed as it's used as a selector in the API.
7381
* @docs-private
82+
* @deprecated Use `MatCardFooter` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
83+
* @breaking-change 17.0.0
7484
*/
7585
@Directive({
7686
selector: 'mat-card-footer',
@@ -81,6 +91,8 @@ export class MatLegacyCardFooter {}
8191
/**
8292
* Image used in a card, needed to add the mat- CSS styling.
8393
* @docs-private
94+
* @deprecated Use `MatCardImage` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
95+
* @breaking-change 17.0.0
8496
*/
8597
@Directive({
8698
selector: '[mat-card-image], [matCardImage]',
@@ -91,6 +103,8 @@ export class MatLegacyCardImage {}
91103
/**
92104
* Image used in a card, needed to add the mat- CSS styling.
93105
* @docs-private
106+
* @deprecated Use `MatCardSmImage` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
107+
* @breaking-change 17.0.0
94108
*/
95109
@Directive({
96110
selector: '[mat-card-sm-image], [matCardImageSmall]',
@@ -101,6 +115,8 @@ export class MatLegacyCardSmImage {}
101115
/**
102116
* Image used in a card, needed to add the mat- CSS styling.
103117
* @docs-private
118+
* @deprecated Use `MatCardMdImage` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
119+
* @breaking-change 17.0.0
104120
*/
105121
@Directive({
106122
selector: '[mat-card-md-image], [matCardImageMedium]',
@@ -111,6 +127,8 @@ export class MatLegacyCardMdImage {}
111127
/**
112128
* Image used in a card, needed to add the mat- CSS styling.
113129
* @docs-private
130+
* @deprecated Use `MatCardLgImage` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
131+
* @breaking-change 17.0.0
114132
*/
115133
@Directive({
116134
selector: '[mat-card-lg-image], [matCardImageLarge]',
@@ -121,6 +139,8 @@ export class MatLegacyCardLgImage {}
121139
/**
122140
* Large image used in a card, needed to add the mat- CSS styling.
123141
* @docs-private
142+
* @deprecated Use `MatCardXlImage` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
143+
* @breaking-change 17.0.0
124144
*/
125145
@Directive({
126146
selector: '[mat-card-xl-image], [matCardImageXLarge]',
@@ -131,6 +151,8 @@ export class MatLegacyCardXlImage {}
131151
/**
132152
* Avatar image used in a card, needed to add the mat- CSS styling.
133153
* @docs-private
154+
* @deprecated Use `MatCardAvatar` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
155+
* @breaking-change 17.0.0
134156
*/
135157
@Directive({
136158
selector: '[mat-card-avatar], [matCardAvatar]',
@@ -148,6 +170,9 @@ export class MatLegacyCardAvatar {}
148170
* - mat-card-content
149171
* - mat-card-actions
150172
* - mat-card-footer
173+
*
174+
* @deprecated Use `MatCard` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
175+
* @breaking-change 17.0.0
151176
*/
152177
@Component({
153178
selector: 'mat-card',
@@ -170,6 +195,8 @@ export class MatLegacyCard {
170195
* Component intended to be used within the `<mat-card>` component. It adds styles for a
171196
* preset header section (i.e. a title, subtitle, and avatar layout).
172197
* @docs-private
198+
* @deprecated Use `MatCardHeader` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
199+
* @breaking-change 17.0.0
173200
*/
174201
@Component({
175202
selector: 'mat-card-header',
@@ -184,6 +211,8 @@ export class MatLegacyCardHeader {}
184211
* Component intended to be used within the `<mat-card>` component. It adds styles for a preset
185212
* layout that groups an image with a title section.
186213
* @docs-private
214+
* @deprecated Use `MatCardTitleGroup` from `@angular/material/card` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
215+
* @breaking-change 17.0.0
187216
*/
188217
@Component({
189218
selector: 'mat-card-title-group',

src/material/legacy-card/testing/card-harness-filters.ts

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

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

11-
/** A set of criteria that can be used to filter a list of `MatCardHarness` instances. */
11+
/**
12+
* A set of criteria that can be used to filter a list of `MatCardHarness` instances.
13+
* @deprecated Use `CardHarnessFilters` from `@angular/material/card/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
14+
* @breaking-change 17.0.0
15+
*/
1216
export interface LegacyCardHarnessFilters extends BaseHarnessFilters {
1317
/** Only find instances whose text matches the given value. */
1418
text?: string | RegExp;

src/material/legacy-card/testing/card-harness.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,23 @@
99
import {HarnessPredicate, ContentContainerComponentHarness} from '@angular/cdk/testing';
1010
import {LegacyCardHarnessFilters} from './card-harness-filters';
1111

12-
/** Selectors for different sections of the mat-card that can container user content. */
12+
/**
13+
* Selectors for different sections of the mat-card that can container user content.
14+
* @deprecated Use `MatCardSection` from `@angular/material/card/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
15+
* @breaking-change 17.0.0
16+
*/
1317
export const enum MatLegacyCardSection {
1418
HEADER = '.mat-card-header',
1519
CONTENT = '.mat-card-content',
1620
ACTIONS = '.mat-card-actions',
1721
FOOTER = '.mat-card-footer',
1822
}
1923

20-
/** Harness for interacting with a standard mat-card in tests. */
24+
/**
25+
* Harness for interacting with a standard mat-card in tests.
26+
* @deprecated Use `MatCardHarness` from `@angular/material/card/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
27+
* @breaking-change 17.0.0
28+
*/
2129
export class MatLegacyCardHarness extends ContentContainerComponentHarness<MatLegacyCardSection> {
2230
/** The selector for the host element of a `MatCard` instance. */
2331
static hostSelector = '.mat-card';

tools/public_api_guard/material/legacy-card-testing.md

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

11-
// @public
11+
// @public @deprecated
1212
export interface LegacyCardHarnessFilters extends BaseHarnessFilters {
1313
subtitle?: string | RegExp;
1414
text?: string | RegExp;
1515
title?: string | RegExp;
1616
}
1717

18-
// @public
18+
// @public @deprecated
1919
export class MatLegacyCardHarness extends ContentContainerComponentHarness<MatLegacyCardSection> {
2020
getSubtitleText(): Promise<string>;
2121
getText(): Promise<string>;
@@ -24,7 +24,7 @@ export class MatLegacyCardHarness extends ContentContainerComponentHarness<MatLe
2424
static with(options?: LegacyCardHarnessFilters): HarnessPredicate<MatLegacyCardHarness>;
2525
}
2626

27-
// @public
27+
// @public @deprecated
2828
export const enum MatLegacyCardSection {
2929
// (undocumented)
3030
ACTIONS = ".mat-card-actions",

tools/public_api_guard/material/legacy-card.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import * as i0 from '@angular/core';
88
import * as i2 from '@angular/material/core';
99

10-
// @public
10+
// @public @deprecated
1111
export class MatLegacyCard {
1212
constructor(_animationMode?: string | undefined);
1313
// (undocumented)
@@ -18,7 +18,7 @@ export class MatLegacyCard {
1818
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCard, [{ optional: true; }]>;
1919
}
2020

21-
// @public
21+
// @public @deprecated
2222
export class MatLegacyCardActions {
2323
align: 'start' | 'end';
2424
// (undocumented)
@@ -27,63 +27,63 @@ export class MatLegacyCardActions {
2727
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardActions, never>;
2828
}
2929

30-
// @public
30+
// @public @deprecated
3131
export class MatLegacyCardAvatar {
3232
// (undocumented)
3333
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardAvatar, "[mat-card-avatar], [matCardAvatar]", never, {}, {}, never, never, false>;
3434
// (undocumented)
3535
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardAvatar, never>;
3636
}
3737

38-
// @public
38+
// @public @deprecated
3939
export class MatLegacyCardContent {
4040
// (undocumented)
4141
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardContent, "mat-card-content, [mat-card-content], [matCardContent]", never, {}, {}, never, never, false>;
4242
// (undocumented)
4343
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardContent, never>;
4444
}
4545

46-
// @public
46+
// @public @deprecated
4747
export class MatLegacyCardFooter {
4848
// (undocumented)
4949
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardFooter, "mat-card-footer", never, {}, {}, never, never, false>;
5050
// (undocumented)
5151
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardFooter, never>;
5252
}
5353

54-
// @public
54+
// @public @deprecated
5555
export class MatLegacyCardHeader {
5656
// (undocumented)
5757
static ɵcmp: i0.ɵɵComponentDeclaration<MatLegacyCardHeader, "mat-card-header", never, {}, {}, never, ["[mat-card-avatar], [matCardAvatar]", "mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]", "*"], false>;
5858
// (undocumented)
5959
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardHeader, never>;
6060
}
6161

62-
// @public
62+
// @public @deprecated
6363
export class MatLegacyCardImage {
6464
// (undocumented)
6565
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardImage, "[mat-card-image], [matCardImage]", never, {}, {}, never, never, false>;
6666
// (undocumented)
6767
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardImage, never>;
6868
}
6969

70-
// @public
70+
// @public @deprecated
7171
export class MatLegacyCardLgImage {
7272
// (undocumented)
7373
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardLgImage, "[mat-card-lg-image], [matCardImageLarge]", never, {}, {}, never, never, false>;
7474
// (undocumented)
7575
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardLgImage, never>;
7676
}
7777

78-
// @public
78+
// @public @deprecated
7979
export class MatLegacyCardMdImage {
8080
// (undocumented)
8181
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardMdImage, "[mat-card-md-image], [matCardImageMedium]", never, {}, {}, never, never, false>;
8282
// (undocumented)
8383
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardMdImage, never>;
8484
}
8585

86-
// @public (undocumented)
86+
// @public @deprecated (undocumented)
8787
export class MatLegacyCardModule {
8888
// (undocumented)
8989
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardModule, never>;
@@ -93,39 +93,39 @@ export class MatLegacyCardModule {
9393
static ɵmod: i0.ɵɵNgModuleDeclaration<MatLegacyCardModule, [typeof i1.MatLegacyCard, typeof i1.MatLegacyCardHeader, typeof i1.MatLegacyCardTitleGroup, typeof i1.MatLegacyCardContent, typeof i1.MatLegacyCardTitle, typeof i1.MatLegacyCardSubtitle, typeof i1.MatLegacyCardActions, typeof i1.MatLegacyCardFooter, typeof i1.MatLegacyCardSmImage, typeof i1.MatLegacyCardMdImage, typeof i1.MatLegacyCardLgImage, typeof i1.MatLegacyCardImage, typeof i1.MatLegacyCardXlImage, typeof i1.MatLegacyCardAvatar], [typeof i2.MatCommonModule], [typeof i1.MatLegacyCard, typeof i1.MatLegacyCardHeader, typeof i1.MatLegacyCardTitleGroup, typeof i1.MatLegacyCardContent, typeof i1.MatLegacyCardTitle, typeof i1.MatLegacyCardSubtitle, typeof i1.MatLegacyCardActions, typeof i1.MatLegacyCardFooter, typeof i1.MatLegacyCardSmImage, typeof i1.MatLegacyCardMdImage, typeof i1.MatLegacyCardLgImage, typeof i1.MatLegacyCardImage, typeof i1.MatLegacyCardXlImage, typeof i1.MatLegacyCardAvatar, typeof i2.MatCommonModule]>;
9494
}
9595

96-
// @public
96+
// @public @deprecated
9797
export class MatLegacyCardSmImage {
9898
// (undocumented)
9999
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardSmImage, "[mat-card-sm-image], [matCardImageSmall]", never, {}, {}, never, never, false>;
100100
// (undocumented)
101101
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardSmImage, never>;
102102
}
103103

104-
// @public
104+
// @public @deprecated
105105
export class MatLegacyCardSubtitle {
106106
// (undocumented)
107107
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardSubtitle, "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]", never, {}, {}, never, never, false>;
108108
// (undocumented)
109109
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardSubtitle, never>;
110110
}
111111

112-
// @public
112+
// @public @deprecated
113113
export class MatLegacyCardTitle {
114114
// (undocumented)
115115
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardTitle, "mat-card-title, [mat-card-title], [matCardTitle]", never, {}, {}, never, never, false>;
116116
// (undocumented)
117117
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardTitle, never>;
118118
}
119119

120-
// @public
120+
// @public @deprecated
121121
export class MatLegacyCardTitleGroup {
122122
// (undocumented)
123123
static ɵcmp: i0.ɵɵComponentDeclaration<MatLegacyCardTitleGroup, "mat-card-title-group", never, {}, {}, never, ["mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]", "img", "*"], false>;
124124
// (undocumented)
125125
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCardTitleGroup, never>;
126126
}
127127

128-
// @public
128+
// @public @deprecated
129129
export class MatLegacyCardXlImage {
130130
// (undocumented)
131131
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyCardXlImage, "[mat-card-xl-image], [matCardImageXLarge]", never, {}, {}, never, never, false>;

0 commit comments

Comments
 (0)