Skip to content

Commit 7bc9bfb

Browse files
authored
refactor(material/core): remove deprecated APIs for v13 (#23529)
Cleans up the APIs that were marked for removal in v13. BREAKING CHANGE: * `CanColorCtor` is no longer necessary and has been removed. * `CanDisableRippleCtor` is no longer necessary and has been removed. * `CanDisableCtor` is no longer necessary and has been removed. * `CanUpdateErrorStateCtor` is no longer necessary and has been removed. * `HasInitializedCtor` is no longer necessary and has been removed. * `HasTabIndexCtor` is no longer necessary and has been removed.
1 parent 81b6b6b commit 7bc9bfb

File tree

14 files changed

+17
-83
lines changed

14 files changed

+17
-83
lines changed

src/material-experimental/mdc-chips/chip-grid.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
} from '@angular/forms';
3737
import {
3838
CanUpdateErrorState,
39-
CanUpdateErrorStateCtor,
4039
ErrorStateMatcher,
4140
mixinErrorState,
4241
} from '@angular/material-experimental/mdc-core';
@@ -74,8 +73,7 @@ class MatChipGridBase extends MatChipSet {
7473
super(_elementRef, _changeDetectorRef, _dir);
7574
}
7675
}
77-
const _MatChipGridMixinBase: CanUpdateErrorStateCtor & typeof MatChipGridBase =
78-
mixinErrorState(MatChipGridBase);
76+
const _MatChipGridMixinBase = mixinErrorState(MatChipGridBase);
7977

8078
/**
8179
* An extension of the MatChipSet component used with MatChipRow chips and

src/material-experimental/mdc-chips/chip-icons.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import {BooleanInput, NumberInput} from '@angular/cdk/coercion';
1010
import {ChangeDetectorRef, Directive, ElementRef, InjectionToken, OnDestroy} from '@angular/core';
1111
import {
1212
CanDisable,
13-
CanDisableCtor,
1413
HasTabIndex,
15-
HasTabIndexCtor,
1614
mixinDisabled,
1715
mixinTabIndex,
1816
} from '@angular/material-experimental/mdc-core';
@@ -143,11 +141,7 @@ class MatChipRemoveBase extends MatChipTrailingIcon {
143141
}
144142
}
145143

146-
const _MatChipRemoveMixinBase:
147-
CanDisableCtor &
148-
HasTabIndexCtor &
149-
typeof MatChipRemoveBase =
150-
mixinTabIndex(mixinDisabled(MatChipRemoveBase), 0);
144+
const _MatChipRemoveMixinBase = mixinTabIndex(mixinDisabled(MatChipRemoveBase), 0);
151145

152146
/**
153147
* Directive to remove the parent chip when the trailing icon is clicked or

src/material-experimental/mdc-chips/chip-set.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
QueryList,
2323
ViewEncapsulation
2424
} from '@angular/core';
25-
import {HasTabIndex, HasTabIndexCtor, mixinTabIndex} from '@angular/material-experimental/mdc-core';
25+
import {HasTabIndex, mixinTabIndex} from '@angular/material-experimental/mdc-core';
2626
import {deprecated} from '@material/chips';
2727
import {merge, Observable, Subject, Subscription} from 'rxjs';
2828
import {startWith, takeUntil} from 'rxjs/operators';
@@ -40,8 +40,7 @@ abstract class MatChipSetBase {
4040
abstract disabled: boolean;
4141
constructor(_elementRef: ElementRef) {}
4242
}
43-
const _MatChipSetMixinBase: HasTabIndexCtor & typeof MatChipSetBase =
44-
mixinTabIndex(MatChipSetBase);
43+
const _MatChipSetMixinBase = mixinTabIndex(MatChipSetBase);
4544

4645
/**
4746
* Basic container component for the MatChip component.

src/material-experimental/mdc-core/public-api.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,15 @@ export {
1111
AnimationCurves,
1212
AnimationDurations,
1313
CanColor,
14-
CanColorCtor,
1514
CanDisable,
16-
CanDisableCtor,
1715
CanDisableRipple,
18-
CanDisableRippleCtor,
1916
CanUpdateErrorState,
20-
CanUpdateErrorStateCtor,
2117
DateAdapter,
2218
defaultRippleAnimationConfig,
2319
ErrorStateMatcher,
2420
GranularSanityChecks,
2521
HasInitialized,
26-
HasInitializedCtor,
2722
HasTabIndex,
28-
HasTabIndexCtor,
2923
MAT_DATE_FORMATS,
3024
MAT_DATE_LOCALE,
3125
MAT_DATE_LOCALE_FACTORY,

src/material/core/common-behaviors/color.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ export interface CanColor {
1818
defaultColor: ThemePalette | undefined;
1919
}
2020

21-
/**
22-
* @docs-private
23-
* @deprecated No longer necessary to apply to mixin classes. To be made private.
24-
* @breaking-change 13.0.0
25-
*/
26-
export type CanColorCtor = Constructor<CanColor> & AbstractConstructor<CanColor>;
21+
type CanColorCtor = Constructor<CanColor> & AbstractConstructor<CanColor>;
2722

2823
/** @docs-private */
2924
export interface HasElementRef {

src/material/core/common-behaviors/disable-ripple.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ export interface CanDisableRipple {
1515
disableRipple: boolean;
1616
}
1717

18-
/**
19-
* @docs-private
20-
* @deprecated No longer necessary to apply to mixin classes. To be made private.
21-
* @breaking-change 13.0.0
22-
*/
23-
export type CanDisableRippleCtor = Constructor<CanDisableRipple> &
24-
AbstractConstructor<CanDisableRipple>;
18+
type CanDisableRippleCtor = Constructor<CanDisableRipple> & AbstractConstructor<CanDisableRipple>;
2519

2620
/** Mixin to augment a directive with a `disableRipple` property. */
2721
export function mixinDisableRipple<T extends AbstractConstructor<{}>>(base: T):

src/material/core/common-behaviors/disabled.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ export interface CanDisable {
1515
disabled: boolean;
1616
}
1717

18-
/**
19-
* @docs-private
20-
* @deprecated No longer necessary to apply to mixin classes. To be made private.
21-
* @breaking-change 13.0.0
22-
*/
23-
export type CanDisableCtor = Constructor<CanDisable> & AbstractConstructor<CanDisable>;
18+
type CanDisableCtor = Constructor<CanDisable> & AbstractConstructor<CanDisable>;
2419

2520
/** Mixin to augment a directive with a `disabled` property. */
2621
export function mixinDisabled<T extends AbstractConstructor<{}>>(base: T): CanDisableCtor & T;

src/material/core/common-behaviors/error-state.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ export interface CanUpdateErrorState {
2424
errorStateMatcher: ErrorStateMatcher;
2525
}
2626

27-
/**
28-
* @docs-private
29-
* @deprecated No longer necessary to apply to mixin classes. To be made private.
30-
* @breaking-change 13.0.0
31-
*/
32-
export type CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &
33-
AbstractConstructor<CanUpdateErrorState>;
27+
type CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &
28+
AbstractConstructor<CanUpdateErrorState>;
3429

3530
/** @docs-private */
3631
export interface HasErrorState {

src/material/core/common-behaviors/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export {
1212
SanityChecks,
1313
GranularSanityChecks,
1414
} from './common-module';
15-
export {CanDisable, CanDisableCtor, mixinDisabled} from './disabled';
16-
export {CanColor, CanColorCtor, mixinColor, ThemePalette} from './color';
17-
export {CanDisableRipple, CanDisableRippleCtor, mixinDisableRipple} from './disable-ripple';
18-
export {HasTabIndex, HasTabIndexCtor, mixinTabIndex} from './tabindex';
19-
export {CanUpdateErrorState, CanUpdateErrorStateCtor, mixinErrorState} from './error-state';
20-
export {HasInitialized, HasInitializedCtor, mixinInitialized} from './initialized';
15+
export {CanDisable, mixinDisabled} from './disabled';
16+
export {CanColor, mixinColor, ThemePalette} from './color';
17+
export {CanDisableRipple, mixinDisableRipple} from './disable-ripple';
18+
export {HasTabIndex, mixinTabIndex} from './tabindex';
19+
export {CanUpdateErrorState, mixinErrorState} from './error-state';
20+
export {HasInitialized, mixinInitialized} from './initialized';

src/material/core/common-behaviors/initialized.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ export interface HasInitialized {
2929
_markInitialized: () => void;
3030
}
3131

32-
/**
33-
* @docs-private
34-
* @deprecated No longer necessary to apply to mixin classes. To be made private.
35-
* @breaking-change 13.0.0
36-
*/
37-
export type HasInitializedCtor = Constructor<HasInitialized>;
32+
type HasInitializedCtor = Constructor<HasInitialized>;
3833

3934
/** Mixin to augment a directive with an initialized property that will emits when ngOnInit ends. */
4035
export function mixinInitialized<T extends Constructor<{}>>(base: T):

0 commit comments

Comments
 (0)