Skip to content

Commit bbb9130

Browse files
committed
fix(material/legacy-radio): deprecate all ts symbols
1 parent 36a54d3 commit bbb9130

File tree

7 files changed

+59
-8
lines changed

7 files changed

+59
-8
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,33 @@ export {
1414
} from './radio';
1515

1616
export {
17+
/**
18+
* @deprecated Use `MatRadioDefaultOptions` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
19+
* @breaking-change 17.0.0
20+
*/
1721
MatRadioDefaultOptions as MatLegacyRadioDefaultOptions,
22+
23+
/**
24+
* @deprecated Use `MatRadioChange` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
25+
* @breaking-change 17.0.0
26+
*/
1827
MatRadioChange as MatLegacyRadioChange,
28+
29+
/**
30+
* @deprecated Use `MAT_RADIO_DEFAULT_OPTIONS_FACTORY` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
31+
* @breaking-change 17.0.0
32+
*/
1933
MAT_RADIO_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_RADIO_DEFAULT_OPTIONS_FACTORY,
34+
35+
/**
36+
* @deprecated Use `MAT_RADIO_DEFAULT_OPTIONS` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
37+
* @breaking-change 17.0.0
38+
*/
2039
MAT_RADIO_DEFAULT_OPTIONS as MAT_LEGACY_RADIO_DEFAULT_OPTIONS,
40+
41+
/**
42+
* @deprecated Use `MAT_RADIO_GROUP` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
43+
* @breaking-change 17.0.0
44+
*/
2145
MAT_RADIO_GROUP as MAT_LEGACY_RADIO_GROUP,
2246
} from '@angular/material/radio';

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import {NgModule} from '@angular/core';
1010
import {MatCommonModule, MatRippleModule} from '@angular/material/core';
1111
import {MatLegacyRadioButton, MatLegacyRadioGroup} from './radio';
1212

13+
/**
14+
* @deprecated Use `MatRadioModule` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
15+
* @breaking-change 17.0.0
16+
*/
1317
@NgModule({
1418
imports: [MatRippleModule, MatCommonModule],
1519
exports: [MatLegacyRadioGroup, MatLegacyRadioButton, MatCommonModule],

src/material/legacy-radio/radio.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import {
3636
* Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
3737
* allows it to support [(ngModel)] and ngControl.
3838
* @docs-private
39+
* @deprecated Use `MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
40+
* @breaking-change 17.0.0
3941
*/
4042
export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {
4143
provide: NG_VALUE_ACCESSOR,
@@ -45,6 +47,8 @@ export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {
4547

4648
/**
4749
* A group of radio buttons. May contain one or more `<mat-radio-button>` elements.
50+
* @deprecated Use `MatRadioGroup` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
51+
* @breaking-change 17.0.0
4852
*/
4953
@Directive({
5054
selector: 'mat-radio-group',
@@ -65,6 +69,8 @@ export class MatLegacyRadioGroup extends _MatRadioGroupBase<MatLegacyRadioButton
6569

6670
/**
6771
* A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
72+
* @deprecated Use `MatRadioButton` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
73+
* @breaking-change 17.0.0
6874
*/
6975
@Component({
7076
selector: 'mat-radio-button',

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
export {MatLegacyRadioGroupHarness, MatLegacyRadioButtonHarness} from './radio-harness';
1010
export {
11+
/**
12+
* @deprecated Use `RadioButtonHarnessFilters` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
13+
* @breaking-change 17.0.0
14+
*/
1115
RadioButtonHarnessFilters as LegacyRadioButtonHarnessFilters,
16+
17+
/**
18+
* @deprecated Use `RadioGroupHarnessFilters` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
19+
* @breaking-change 17.0.0
20+
*/
1221
RadioGroupHarnessFilters as LegacyRadioGroupHarnessFilters,
1322
} from '@angular/material/radio/testing';

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
_MatRadioButtonHarnessBase,
1515
} from '@angular/material/radio/testing';
1616

17-
/** Harness for interacting with a standard mat-radio-group in tests. */
17+
/**
18+
* Harness for interacting with a standard mat-radio-group in tests
19+
* @deprecated Use `MatRadioGroupHarness` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
20+
* @breaking-change 17.0.0
21+
*/
1822
export class MatLegacyRadioGroupHarness extends _MatRadioGroupHarnessBase<
1923
typeof MatLegacyRadioButtonHarness,
2024
MatLegacyRadioButtonHarness,
@@ -41,7 +45,11 @@ export class MatLegacyRadioGroupHarness extends _MatRadioGroupHarnessBase<
4145
}
4246
}
4347

44-
/** Harness for interacting with a standard mat-radio-button in tests. */
48+
/**
49+
* Harness for interacting with a standard mat-radio-button in tests.
50+
* @deprecated Use `MatRadioButtonHarness` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
51+
* @breaking-change 17.0.0
52+
*/
4553
export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
4654
/** The selector for the host element of a `MatRadioButton` instance. */
4755
static hostSelector = '.mat-radio-button';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export { LegacyRadioButtonHarnessFilters }
1616

1717
export { LegacyRadioGroupHarnessFilters }
1818

19-
// @public
19+
// @public @deprecated
2020
export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
2121
// (undocumented)
2222
protected _clickLabel: AsyncFactoryFn<TestElement>;
@@ -26,7 +26,7 @@ export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
2626
static with(options?: LegacyRadioButtonHarnessFilters): HarnessPredicate<MatLegacyRadioButtonHarness>;
2727
}
2828

29-
// @public
29+
// @public @deprecated
3030
export class MatLegacyRadioGroupHarness extends _MatRadioGroupHarnessBase<typeof MatLegacyRadioButtonHarness, MatLegacyRadioButtonHarness, LegacyRadioButtonHarnessFilters> {
3131
// (undocumented)
3232
protected _buttonClass: typeof MatLegacyRadioButtonHarness;

tools/public_api_guard/material/legacy-radio.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export { MAT_LEGACY_RADIO_DEFAULT_OPTIONS_FACTORY }
2525

2626
export { MAT_LEGACY_RADIO_GROUP }
2727

28-
// @public
28+
// @public @deprecated
2929
export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any;
3030

31-
// @public
31+
// @public @deprecated
3232
export class MatLegacyRadioButton extends _MatRadioButtonBase {
3333
constructor(radioGroup: MatLegacyRadioGroup, elementRef: ElementRef, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor, radioDispatcher: UniqueSelectionDispatcher, animationMode?: string, providerOverride?: MatLegacyRadioDefaultOptions, tabIndex?: string);
3434
// (undocumented)
@@ -41,7 +41,7 @@ export { MatLegacyRadioChange }
4141

4242
export { MatLegacyRadioDefaultOptions }
4343

44-
// @public
44+
// @public @deprecated
4545
export class MatLegacyRadioGroup extends _MatRadioGroupBase<MatLegacyRadioButton> {
4646
// (undocumented)
4747
_radios: QueryList<MatLegacyRadioButton>;
@@ -51,7 +51,7 @@ export class MatLegacyRadioGroup extends _MatRadioGroupBase<MatLegacyRadioButton
5151
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyRadioGroup, never>;
5252
}
5353

54-
// @public (undocumented)
54+
// @public @deprecated (undocumented)
5555
export class MatLegacyRadioModule {
5656
// (undocumented)
5757
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyRadioModule, never>;

0 commit comments

Comments
 (0)