Skip to content

Commit 98d4799

Browse files
authored
refactor(material): remove month constants from core (#18111)
In the past, we accidentally published the month constants in `@angular/material/core`. These were never intended for public consumption but were only needed for testing. In v7, we deprecated the constants (with the assumption that consumers might have used constants). Now, we can remove the constants. There is no replacement for these variables. Instead, use the zero-based month index on your own. BREAKING CHANGE: Deprecated month constants from `@angular/material/core` have been removed. These have been accidentally published in the past while they were only intended for internal consumption in tests.
1 parent 3c2334c commit 98d4799

File tree

3 files changed

+0
-43
lines changed

3 files changed

+0
-43
lines changed

src/material/core/month-constants.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/material/core/public-api.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@ export * from './option/index';
1616
export * from './label/label-options';
1717
export * from './ripple/index';
1818
export * from './selection/index';
19-
20-
// TODO(devversion): remove this with v8
21-
export * from './month-constants';

tools/public_api_guard/material/core.d.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ export declare class AnimationDurations {
5555
static EXITING: string;
5656
}
5757

58-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
59-
60-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
61-
6258
export interface CanColor {
6359
color: ThemePalette;
6460
defaultColor: ThemePalette | undefined;
@@ -121,8 +117,6 @@ export declare abstract class DateAdapter<D> {
121117
abstract today(): D;
122118
}
123119

124-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
125-
126120
export declare const defaultRippleAnimationConfig: {
127121
enterDuration: number;
128122
exitDuration: number;
@@ -134,8 +128,6 @@ export declare class ErrorStateMatcher {
134128
static ɵprov: i0.ɵɵInjectableDef<ErrorStateMatcher>;
135129
}
136130

137-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
138-
139131
export declare type FloatLabelType = 'always' | 'never' | 'auto';
140132

141133
export interface GranularSanityChecks {
@@ -159,18 +151,10 @@ export interface HasTabIndex {
159151

160152
export declare type HasTabIndexCtor = Constructor<HasTabIndex>;
161153

162-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
163-
164-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
165-
166-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
167-
168154
export interface LabelOptions {
169155
float?: FloatLabelType;
170156
}
171157

172-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
173-
174158
export declare const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;
175159

176160
export declare const MAT_DATE_LOCALE: InjectionToken<string>;
@@ -305,8 +289,6 @@ export declare class MatRippleModule {
305289
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatRippleModule, [typeof i1.MatRipple], [typeof i2.MatCommonModule, typeof i3.PlatformModule], [typeof i1.MatRipple, typeof i2.MatCommonModule]>;
306290
}
307291

308-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
309-
310292
export declare function mixinColor<T extends Constructor<HasElementRef>>(base: T, defaultColor?: ThemePalette): CanColorCtor & T;
311293

312294
export declare function mixinDisabled<T extends Constructor<{}>>(base: T): CanDisableCtor & T;
@@ -354,10 +336,6 @@ export declare class NativeDateModule {
354336
static ɵmod: i0.ɵɵNgModuleDefWithMeta<NativeDateModule, never, [typeof i1.PlatformModule], never>;
355337
}
356338

357-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
358-
359-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
360-
361339
export interface RippleAnimationConfig {
362340
enterDuration?: number;
363341
exitDuration?: number;
@@ -414,8 +392,6 @@ export interface RippleTarget {
414392

415393
export declare type SanityChecks = boolean | GranularSanityChecks;
416394

417-
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
418-
419395
export declare function setLines(lines: QueryList<unknown>, element: ElementRef<HTMLElement>, prefix?: string): void;
420396

421397
export declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {

0 commit comments

Comments
 (0)