Skip to content

Commit 30f88b0

Browse files
committed
fix(material/legacy-table): deprecate all ts symbols
1 parent 9fc3051 commit 30f88b0

File tree

13 files changed

+177
-40
lines changed

13 files changed

+177
-40
lines changed

src/material/legacy-table/cell.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {
2020
/**
2121
* Cell definition for the mat-table.
2222
* Captures the template of a column's data row cell as well as cell-specific properties.
23+
* @deprecated Use `MatCellDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
24+
* @breaking-change 17.0.0
2325
*/
2426
@Directive({
2527
selector: '[matCellDef]',
@@ -30,6 +32,8 @@ export class MatLegacyCellDef extends CdkCellDef {}
3032
/**
3133
* Header cell definition for the mat-table.
3234
* Captures the template of a column's header cell and as well as cell-specific properties.
35+
* @deprecated Use `MatHeaderCellDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
36+
* @breaking-change 17.0.0
3337
*/
3438
@Directive({
3539
selector: '[matHeaderCellDef]',
@@ -40,6 +44,8 @@ export class MatLegacyHeaderCellDef extends CdkHeaderCellDef {}
4044
/**
4145
* Footer cell definition for the mat-table.
4246
* Captures the template of a column's footer cell and as well as cell-specific properties.
47+
* @deprecated Use `MatFooterCellDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
48+
* @breaking-change 17.0.0
4349
*/
4450
@Directive({
4551
selector: '[matFooterCellDef]',
@@ -50,6 +56,8 @@ export class MatLegacyFooterCellDef extends CdkFooterCellDef {}
5056
/**
5157
* Column definition for the mat-table.
5258
* Defines a set of cells available for a table column.
59+
* @deprecated Use `MatColumnDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
60+
* @breaking-change 17.0.0
5361
*/
5462
@Directive({
5563
selector: '[matColumnDef]',
@@ -81,7 +89,11 @@ export class MatLegacyColumnDef extends CdkColumnDef {
8189
}
8290
}
8391

84-
/** Header cell template container that adds the right classes and role. */
92+
/**
93+
* Header cell template container that adds the right classes and role.
94+
* @deprecated Use `MatHeaderCell` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
95+
* @breaking-change 17.0.0
96+
*/
8597
@Directive({
8698
selector: 'mat-header-cell, th[mat-header-cell]',
8799
host: {
@@ -91,7 +103,11 @@ export class MatLegacyColumnDef extends CdkColumnDef {
91103
})
92104
export class MatLegacyHeaderCell extends CdkHeaderCell {}
93105

94-
/** Footer cell template container that adds the right classes and role. */
106+
/**
107+
* Footer cell template container that adds the right classes and role.
108+
* @deprecated Use `MatFooterCell` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
109+
* @breaking-change 17.0.0
110+
*/
95111
@Directive({
96112
selector: 'mat-footer-cell, td[mat-footer-cell]',
97113
host: {
@@ -101,7 +117,11 @@ export class MatLegacyHeaderCell extends CdkHeaderCell {}
101117
})
102118
export class MatLegacyFooterCell extends CdkFooterCell {}
103119

104-
/** Cell template container that adds the right classes and role. */
120+
/**
121+
* Cell template container that adds the right classes and role.
122+
* @deprecated Use `MatCell` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
123+
* @breaking-change 17.0.0
124+
*/
105125
@Directive({
106126
selector: 'mat-cell, td[mat-cell]',
107127
host: {

src/material/legacy-table/public-api.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,21 @@ export {
2929
export {MatLegacyTableDataSource} from './table-data-source';
3030
export {MatLegacyTextColumn} from './text-column';
3131
export {
32+
/**
33+
* @deprecated Use `MatTableDataSourcePageEvent` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
34+
* @breaking-change 17.0.0
35+
*/
3236
MatTableDataSourcePageEvent as MatLegacyTableDataSourcePageEvent,
37+
38+
/**
39+
* @deprecated Use `MatTableDataSourcePaginator` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
40+
* @breaking-change 17.0.0
41+
*/
3342
MatTableDataSourcePaginator as MatLegacyTableDataSourcePaginator,
43+
44+
/**
45+
* @deprecated Use `_MatTableDataSource` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
46+
* @breaking-change 17.0.0
47+
*/
3448
_MatTableDataSource as _MatLegacyTableDataSource,
3549
} from '@angular/material/table';

src/material/legacy-table/row.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {ChangeDetectionStrategy, Component, Directive, ViewEncapsulation} from '
2121
/**
2222
* Header row definition for the mat-table.
2323
* Captures the header row's template and other header properties such as the columns to display.
24+
* @deprecated Use `MatHeaderRowDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
25+
* @breaking-change 17.0.0
2426
*/
2527
@Directive({
2628
selector: '[matHeaderRowDef]',
@@ -32,6 +34,8 @@ export class MatLegacyHeaderRowDef extends CdkHeaderRowDef {}
3234
/**
3335
* Footer row definition for the mat-table.
3436
* Captures the footer row's template and other footer properties such as the columns to display.
37+
* @deprecated Use `MatFooterRowDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
38+
* @breaking-change 17.0.0
3539
*/
3640
@Directive({
3741
selector: '[matFooterRowDef]',
@@ -44,6 +48,8 @@ export class MatLegacyFooterRowDef extends CdkFooterRowDef {}
4448
* Data row definition for the mat-table.
4549
* Captures the data row's template and other properties such as the columns to display and
4650
* a when predicate that describes when this row should be used.
51+
* @deprecated Use `MatRowDef` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
52+
* @breaking-change 17.0.0
4753
*/
4854
@Directive({
4955
selector: '[matRowDef]',
@@ -52,7 +58,11 @@ export class MatLegacyFooterRowDef extends CdkFooterRowDef {}
5258
})
5359
export class MatLegacyRowDef<T> extends CdkRowDef<T> {}
5460

55-
/** Header template container that contains the cell outlet. Adds the right class and role. */
61+
/**
62+
* Header template container that contains the cell outlet. Adds the right class and role.
63+
* @deprecated Use `MatHeaderRow` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
64+
* @breaking-change 17.0.0
65+
*/
5666
@Component({
5767
selector: 'mat-header-row, tr[mat-header-row]',
5868
template: CDK_ROW_TEMPLATE,
@@ -69,7 +79,11 @@ export class MatLegacyRowDef<T> extends CdkRowDef<T> {}
6979
})
7080
export class MatLegacyHeaderRow extends CdkHeaderRow {}
7181

72-
/** Footer template container that contains the cell outlet. Adds the right class and role. */
82+
/**
83+
* Footer template container that contains the cell outlet. Adds the right class and role.
84+
* @deprecated Use `MatFooterRow` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
85+
* @breaking-change 17.0.0
86+
*/
7387
@Component({
7488
selector: 'mat-footer-row, tr[mat-footer-row]',
7589
template: CDK_ROW_TEMPLATE,
@@ -86,7 +100,11 @@ export class MatLegacyHeaderRow extends CdkHeaderRow {}
86100
})
87101
export class MatLegacyFooterRow extends CdkFooterRow {}
88102

89-
/** Data row template container that contains the cell outlet. Adds the right class and role. */
103+
/**
104+
* Data row template container that contains the cell outlet. Adds the right class and role.
105+
* @deprecated Use `MatRow` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
106+
* @breaking-change 17.0.0
107+
*/
90108
@Component({
91109
selector: 'mat-row, tr[mat-row]',
92110
template: CDK_ROW_TEMPLATE,
@@ -103,7 +121,11 @@ export class MatLegacyFooterRow extends CdkFooterRow {}
103121
})
104122
export class MatLegacyRow extends CdkRow {}
105123

106-
/** Row that can be used to display a message when no data is shown in the table. */
124+
/**
125+
* Row that can be used to display a message when no data is shown in the table.
126+
* @deprecated Use `MatNoDataRow` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
127+
* @breaking-change 17.0.0
128+
*/
107129
@Directive({
108130
selector: 'ng-template[matNoDataRow]',
109131
providers: [{provide: CdkNoDataRow, useExisting: MatLegacyNoDataRow}],

src/material/legacy-table/table-data-source.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ import {_MatTableDataSource} from '@angular/material/table';
2121
* it isn't equipped to handle some more advanced cases like robust i18n support or server-side
2222
* interactions. If your app needs to support more advanced use cases, consider implementing your
2323
* own `DataSource`.
24+
*
25+
* @deprecated Use `MatTableDataSource` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
26+
* @breaking-change 17.0.0
2427
*/
2528
export class MatLegacyTableDataSource<T> extends _MatTableDataSource<T, MatLegacyPaginator> {}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ const EXPORTED_DECLARATIONS = [
5858
MatLegacyTextColumn,
5959
];
6060

61+
/**
62+
* @deprecated Use `MatTableModule` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
63+
* @breaking-change 17.0.0
64+
*/
6165
@NgModule({
6266
imports: [CdkTableModule, MatCommonModule],
6367
exports: [MatCommonModule, EXPORTED_DECLARATIONS],

src/material/legacy-table/table.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424
/**
2525
* Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
2626
* tables that animate rows.
27+
* @deprecated Use `MatRecycleRows` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
28+
* @breaking-change 17.0.0
2729
*/
2830
@Directive({
2931
selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',
@@ -33,6 +35,8 @@ export class MatLegacyRecycleRows {}
3335

3436
/**
3537
* Wrapper for the CdkTable with Material design styles.
38+
* @deprecated Use `MatTable` from `@angular/material/table` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
39+
* @breaking-change 17.0.0
3640
*/
3741
@Component({
3842
selector: 'mat-table, table[mat-table]',

src/material/legacy-table/testing/cell-harness.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
import {HarnessPredicate} from '@angular/cdk/testing';
1010
import {_MatCellHarnessBase, CellHarnessFilters} from '@angular/material/table/testing';
1111

12-
/** Harness for interacting with a standard Angular Material table cell. */
12+
/**
13+
* Harness for interacting with a standard Angular Material table cell.
14+
* @deprecated Use `MatCellHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
15+
* @breaking-change 17.0.0
16+
*/
1317
export class MatLegacyCellHarness extends _MatCellHarnessBase {
1418
/** The selector for the host element of a `MatCellHarness` instance. */
1519
static hostSelector = '.mat-cell';
@@ -24,7 +28,11 @@ export class MatLegacyCellHarness extends _MatCellHarnessBase {
2428
}
2529
}
2630

27-
/** Harness for interacting with a standard Angular Material table header cell. */
31+
/**
32+
* Harness for interacting with a standard Angular Material table header cell.
33+
* @deprecated Use `MatHeaderCellHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
34+
* @breaking-change 17.0.0
35+
*/
2836
export class MatLegacyHeaderCellHarness extends _MatCellHarnessBase {
2937
/** The selector for the host element of a `MatHeaderCellHarness` instance. */
3038
static hostSelector = '.mat-header-cell';
@@ -40,7 +48,11 @@ export class MatLegacyHeaderCellHarness extends _MatCellHarnessBase {
4048
}
4149
}
4250

43-
/** Harness for interacting with a standard Angular Material table footer cell. */
51+
/**
52+
* Harness for interacting with a standard Angular Material table footer cell.
53+
* @deprecated Use `MatFooterCellHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
54+
* @breaking-change 17.0.0
55+
*/
4456
export class MatLegacyFooterCellHarness extends _MatCellHarnessBase {
4557
/** The selector for the host element of a `MatFooterCellHarness` instance. */
4658
static hostSelector = '.mat-footer-cell';

src/material/legacy-table/testing/public-api.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,51 @@ export {
1818
MatLegacyFooterCellHarness,
1919
} from './cell-harness';
2020
export {
21+
/**
22+
* @deprecated Use `CellHarnessFilters` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
23+
* @breaking-change 17.0.0
24+
*/
2125
CellHarnessFilters as LegacyCellHarnessFilters,
26+
27+
/**
28+
* @deprecated Use `RowHarnessFilters` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
29+
* @breaking-change 17.0.0
30+
*/
2231
RowHarnessFilters as LegacyRowHarnessFilters,
32+
33+
/**
34+
* @deprecated Use `TableHarnessFilters` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
35+
* @breaking-change 17.0.0
36+
*/
2337
TableHarnessFilters as LegacyTableHarnessFilters,
38+
39+
/**
40+
* @deprecated Use `MatRowHarnessColumnsText` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
41+
* @breaking-change 17.0.0
42+
*/
2443
MatRowHarnessColumnsText as MatLegacyRowHarnessColumnsText,
44+
45+
/**
46+
* @deprecated Use `MatTableHarnessColumnsText` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
47+
* @breaking-change 17.0.0
48+
*/
2549
MatTableHarnessColumnsText as MatLegacyTableHarnessColumnsText,
50+
51+
/**
52+
* @deprecated Use `_MatCellHarnessBase` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
53+
* @breaking-change 17.0.0
54+
*/
2655
_MatCellHarnessBase as _MatLegacyCellHarnessBase,
56+
57+
/**
58+
* @deprecated Use `_MatRowHarnessBase` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
59+
* @breaking-change 17.0.0
60+
*/
2761
_MatRowHarnessBase as _MatLegacyRowHarnessBase,
62+
63+
/**
64+
* @deprecated Use `_MatTableHarnessBase` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
65+
* @breaking-change 17.0.0
66+
*/
2867
_MatTableHarnessBase as _MatLegacyTableHarnessBase,
2968
} from '@angular/material/table/testing';

src/material/legacy-table/testing/row-harness.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from './cell-harness';
1515
import {_MatRowHarnessBase, RowHarnessFilters} from '@angular/material/table/testing';
1616

17-
/** Harness for interacting with a standard Angular Material table row. */
17+
/**
18+
* Harness for interacting with a standard Angular Material table row.
19+
* @deprecated Use `MatRowHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
20+
* @breaking-change 17.0.0
21+
*/
1822
export class MatLegacyRowHarness extends _MatRowHarnessBase<
1923
typeof MatLegacyCellHarness,
2024
MatLegacyCellHarness
@@ -33,7 +37,11 @@ export class MatLegacyRowHarness extends _MatRowHarnessBase<
3337
}
3438
}
3539

36-
/** Harness for interacting with a standard Angular Material table header row. */
40+
/**
41+
* Harness for interacting with a standard Angular Material table header row.
42+
* @deprecated Use `MatHeaderRowHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
43+
* @breaking-change 17.0.0
44+
*/
3745
export class MatLegacyHeaderRowHarness extends _MatRowHarnessBase<
3846
typeof MatLegacyHeaderCellHarness,
3947
MatLegacyHeaderCellHarness
@@ -53,7 +61,11 @@ export class MatLegacyHeaderRowHarness extends _MatRowHarnessBase<
5361
}
5462
}
5563

56-
/** Harness for interacting with a standard Angular Material table footer row. */
64+
/**
65+
* Harness for interacting with a standard Angular Material table footer row.
66+
* @deprecated Use `MatFooterRowHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
67+
* @breaking-change 17.0.0
68+
*/
5769
export class MatLegacyFooterRowHarness extends _MatRowHarnessBase<
5870
typeof MatLegacyFooterCellHarness,
5971
MatLegacyFooterCellHarness

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from './row-harness';
1515
import {_MatTableHarnessBase, TableHarnessFilters} from '@angular/material/table/testing';
1616

17-
/** Harness for interacting with a standard mat-table in tests. */
17+
/**
18+
* Harness for interacting with a standard mat-table in tests.
19+
* @deprecated Use `MatTableHarness` from `@angular/material/table/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
20+
* @breaking-change 17.0.0
21+
*/
1822
export class MatLegacyTableHarness extends _MatTableHarnessBase<
1923
typeof MatLegacyHeaderRowHarness,
2024
MatLegacyHeaderRowHarness,

0 commit comments

Comments
 (0)