Skip to content

Commit

Permalink
fix(material/legacy-radio): 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 36a54d3 commit bbb9130
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 8 deletions.
24 changes: 24 additions & 0 deletions src/material/legacy-radio/public-api.ts
Expand Up @@ -14,9 +14,33 @@ export {
} from './radio';

export {
/**
* @deprecated Use `MatRadioDefaultOptions` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatRadioDefaultOptions as MatLegacyRadioDefaultOptions,

/**
* @deprecated Use `MatRadioChange` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatRadioChange as MatLegacyRadioChange,

/**
* @deprecated Use `MAT_RADIO_DEFAULT_OPTIONS_FACTORY` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_RADIO_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_RADIO_DEFAULT_OPTIONS_FACTORY,

/**
* @deprecated Use `MAT_RADIO_DEFAULT_OPTIONS` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_RADIO_DEFAULT_OPTIONS as MAT_LEGACY_RADIO_DEFAULT_OPTIONS,

/**
* @deprecated Use `MAT_RADIO_GROUP` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_RADIO_GROUP as MAT_LEGACY_RADIO_GROUP,
} from '@angular/material/radio';
4 changes: 4 additions & 0 deletions src/material/legacy-radio/radio-module.ts
Expand Up @@ -10,6 +10,10 @@ import {NgModule} from '@angular/core';
import {MatCommonModule, MatRippleModule} from '@angular/material/core';
import {MatLegacyRadioButton, MatLegacyRadioGroup} from './radio';

/**
* @deprecated Use `MatRadioModule` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@NgModule({
imports: [MatRippleModule, MatCommonModule],
exports: [MatLegacyRadioGroup, MatLegacyRadioButton, MatCommonModule],
Expand Down
6 changes: 6 additions & 0 deletions src/material/legacy-radio/radio.ts
Expand Up @@ -36,6 +36,8 @@ import {
* Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
* allows it to support [(ngModel)] and ngControl.
* @docs-private
* @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.
* @breaking-change 17.0.0
*/
export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR,
Expand All @@ -45,6 +47,8 @@ export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {

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

/**
* A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
* @deprecated Use `MatRadioButton` from `@angular/material/radio` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Component({
selector: 'mat-radio-button',
Expand Down
9 changes: 9 additions & 0 deletions src/material/legacy-radio/testing/public-api.ts
Expand Up @@ -8,6 +8,15 @@

export {MatLegacyRadioGroupHarness, MatLegacyRadioButtonHarness} from './radio-harness';
export {
/**
* @deprecated Use `RadioButtonHarnessFilters` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
RadioButtonHarnessFilters as LegacyRadioButtonHarnessFilters,

/**
* @deprecated Use `RadioGroupHarnessFilters` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
RadioGroupHarnessFilters as LegacyRadioGroupHarnessFilters,
} from '@angular/material/radio/testing';
12 changes: 10 additions & 2 deletions src/material/legacy-radio/testing/radio-harness.ts
Expand Up @@ -14,7 +14,11 @@ import {
_MatRadioButtonHarnessBase,
} from '@angular/material/radio/testing';

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

/** Harness for interacting with a standard mat-radio-button in tests. */
/**
* Harness for interacting with a standard mat-radio-button in tests.
* @deprecated Use `MatRadioButtonHarness` from `@angular/material/radio/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
/** The selector for the host element of a `MatRadioButton` instance. */
static hostSelector = '.mat-radio-button';
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/material/legacy-radio-testing.md
Expand Up @@ -16,7 +16,7 @@ export { LegacyRadioButtonHarnessFilters }

export { LegacyRadioGroupHarnessFilters }

// @public
// @public @deprecated
export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
// (undocumented)
protected _clickLabel: AsyncFactoryFn<TestElement>;
Expand All @@ -26,7 +26,7 @@ export class MatLegacyRadioButtonHarness extends _MatRadioButtonHarnessBase {
static with(options?: LegacyRadioButtonHarnessFilters): HarnessPredicate<MatLegacyRadioButtonHarness>;
}

// @public
// @public @deprecated
export class MatLegacyRadioGroupHarness extends _MatRadioGroupHarnessBase<typeof MatLegacyRadioButtonHarness, MatLegacyRadioButtonHarness, LegacyRadioButtonHarnessFilters> {
// (undocumented)
protected _buttonClass: typeof MatLegacyRadioButtonHarness;
Expand Down
8 changes: 4 additions & 4 deletions tools/public_api_guard/material/legacy-radio.md
Expand Up @@ -25,10 +25,10 @@ export { MAT_LEGACY_RADIO_DEFAULT_OPTIONS_FACTORY }

export { MAT_LEGACY_RADIO_GROUP }

// @public
// @public @deprecated
export const MAT_LEGACY_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any;

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

export { MatLegacyRadioDefaultOptions }

// @public
// @public @deprecated
export class MatLegacyRadioGroup extends _MatRadioGroupBase<MatLegacyRadioButton> {
// (undocumented)
_radios: QueryList<MatLegacyRadioButton>;
Expand All @@ -51,7 +51,7 @@ export class MatLegacyRadioGroup extends _MatRadioGroupBase<MatLegacyRadioButton
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyRadioGroup, never>;
}

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

0 comments on commit bbb9130

Please sign in to comment.