Skip to content

Commit ab22cab

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

File tree

7 files changed

+67
-10
lines changed

7 files changed

+67
-10
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import {MatCommonModule, MatRippleModule} from '@angular/material/core';
1212
import {MatLegacyCheckbox} from './checkbox';
1313
import {_MatCheckboxRequiredValidatorModule} from '@angular/material/checkbox';
1414

15+
/**
16+
* @deprecated Use `MatCheckboxModule` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
17+
* @breaking-change 17.0.0
18+
*/
1519
@NgModule({
1620
imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule],
1721
exports: [MatLegacyCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],

src/material/legacy-checkbox/checkbox.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ import {
2929
MatCheckboxDefaultOptions,
3030
} from '@angular/material/checkbox';
3131

32-
/** Change event object emitted by a checkbox. */
32+
/**
33+
* Change event object emitted by a checkbox.
34+
* @deprecated Use `MatCheckboxChange` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
35+
* @breaking-change 17.0.0
36+
*/
3337
export class MatLegacyCheckboxChange {
3438
/** The source checkbox of the event. */
3539
source: MatLegacyCheckbox;
@@ -40,6 +44,8 @@ export class MatLegacyCheckboxChange {
4044
* Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.
4145
* This allows it to support [(ngModel)].
4246
* @docs-private
47+
* @deprecated Use `MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
48+
* @breaking-change 17.0.0
4349
*/
4450
export const MAT_LEGACY_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {
4551
provide: NG_VALUE_ACCESSOR,
@@ -54,6 +60,8 @@ export const MAT_LEGACY_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {
5460
* so there is no need to provide them yourself. However, if you want to omit a label and still
5561
* have the checkbox be accessible, you may supply an [aria-label] input.
5662
* See: https://material.io/design/components/selection-controls.html
63+
* @deprecated Use `MatCheckbox` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
64+
* @breaking-change 17.0.0
5765
*/
5866
@Component({
5967
selector: 'mat-checkbox',

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

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,51 @@ export {
1414
export {MatLegacyCheckboxModule} from './checkbox-module';
1515

1616
export {
17+
/**
18+
* @deprecated Use `MAT_CHECKBOX_REQUIRED_VALIDATOR` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
19+
* @breaking-change 17.0.0
20+
*/
1721
MAT_CHECKBOX_REQUIRED_VALIDATOR as MAT_LEGACY_CHECKBOX_REQUIRED_VALIDATOR,
22+
23+
/**
24+
* @deprecated Use `MatCheckboxClickAction` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
25+
* @breaking-change 17.0.0
26+
*/
1827
MatCheckboxClickAction as MatLegacyCheckboxClickAction,
28+
29+
/**
30+
* @deprecated Use `MatCheckboxRequiredValidator` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
31+
* @breaking-change 17.0.0
32+
*/
1933
MatCheckboxRequiredValidator as MatLegacyCheckboxRequiredValidator,
34+
35+
/**
36+
* @deprecated Use `_MatCheckboxRequiredValidatorModule` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
37+
* @breaking-change 17.0.0
38+
*/
2039
_MatCheckboxRequiredValidatorModule as _MatLegacyCheckboxRequiredValidatorModule,
40+
2141
/**
22-
* @deprecated
23-
* @breaking-change 9.0.0
42+
* @deprecated Use `TransitionCheckState` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
43+
* @breaking-change 17.0.0
2444
*/
2545
TransitionCheckState as LegacyTransitionCheckState,
46+
47+
/**
48+
* @deprecated Use `MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
49+
* @breaking-change 17.0.0
50+
*/
2651
MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_CHECKBOX_DEFAULT_OPTIONS_FACTORY,
52+
53+
/**
54+
* @deprecated Use `MatCheckboxDefaultOptions` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
55+
* @breaking-change 17.0.0
56+
*/
2757
MatCheckboxDefaultOptions as MatLegacyCheckboxDefaultOptions,
58+
59+
/**
60+
* @deprecated Use `MAT_CHECKBOX_DEFAULT_OPTIONS` from `@angular/material/checkbox` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
61+
* @breaking-change 17.0.0
62+
*/
2863
MAT_CHECKBOX_DEFAULT_OPTIONS as MAT_LEGACY_CHECKBOX_DEFAULT_OPTIONS,
2964
} from '@angular/material/checkbox';

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
import {HarnessPredicate} from '@angular/cdk/testing';
1010
import {_MatCheckboxHarnessBase, CheckboxHarnessFilters} from '@angular/material/checkbox/testing';
1111

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

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@
77
*/
88

99
export {MatLegacyCheckboxHarness} from './checkbox-harness';
10-
export {CheckboxHarnessFilters as LegacyCheckboxHarnessFilters} from '@angular/material/checkbox/testing';
10+
export {
11+
/**
12+
* @deprecated Use `CheckboxHarnessFilters` from `@angular/material/checkbox/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
13+
* @breaking-change 17.0.0
14+
*/
15+
CheckboxHarnessFilters as LegacyCheckboxHarnessFilters,
16+
} from '@angular/material/checkbox/testing';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { TestElement } from '@angular/cdk/testing';
1212

1313
export { LegacyCheckboxHarnessFilters }
1414

15-
// @public
15+
// @public @deprecated
1616
export class MatLegacyCheckboxHarness extends _MatCheckboxHarnessBase {
1717
static hostSelector: string;
1818
// (undocumented)

tools/public_api_guard/material/legacy-checkbox.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { OnDestroy } from '@angular/core';
2727

2828
export { LegacyTransitionCheckState }
2929

30-
// @public
30+
// @public @deprecated
3131
export const MAT_LEGACY_CHECKBOX_CONTROL_VALUE_ACCESSOR: any;
3232

3333
export { MAT_LEGACY_CHECKBOX_DEFAULT_OPTIONS }
@@ -36,7 +36,7 @@ export { MAT_LEGACY_CHECKBOX_DEFAULT_OPTIONS_FACTORY }
3636

3737
export { MAT_LEGACY_CHECKBOX_REQUIRED_VALIDATOR }
3838

39-
// @public
39+
// @public @deprecated
4040
export class MatLegacyCheckbox extends _MatCheckboxBase<MatLegacyCheckboxChange> implements AfterViewInit, OnDestroy {
4141
constructor(elementRef: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, _focusMonitor: FocusMonitor, ngZone: NgZone, tabIndex: string, animationMode?: string, options?: MatLegacyCheckboxDefaultOptions);
4242
// (undocumented)
@@ -64,7 +64,7 @@ export class MatLegacyCheckbox extends _MatCheckboxBase<MatLegacyCheckboxChange>
6464
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCheckbox, [null, null, null, null, { attribute: "tabindex"; }, { optional: true; }, { optional: true; }]>;
6565
}
6666

67-
// @public
67+
// @public @deprecated
6868
export class MatLegacyCheckboxChange {
6969
checked: boolean;
7070
source: MatLegacyCheckbox;
@@ -74,7 +74,7 @@ export { MatLegacyCheckboxClickAction }
7474

7575
export { MatLegacyCheckboxDefaultOptions }
7676

77-
// @public (undocumented)
77+
// @public @deprecated (undocumented)
7878
export class MatLegacyCheckboxModule {
7979
// (undocumented)
8080
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyCheckboxModule, never>;

0 commit comments

Comments
 (0)