Skip to content

Commit 4d90fbd

Browse files
committed
refactor(material): remove month constants from core
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 09dc459 commit 4d90fbd

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
@@ -18,6 +18,3 @@ export * from './option/index';
1818
export * from './label/label-options';
1919
export * from './ripple/index';
2020
export * from './selection/index';
21-
22-
// TODO(devversion): remove this with v8
23-
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
@@ -15,10 +15,6 @@ export declare class AnimationDurations {
1515
static EXITING: string;
1616
}
1717

18-
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;
19-
20-
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;
21-
2218
export interface CanColor {
2319
color: ThemePalette;
2420
}
@@ -79,8 +75,6 @@ export declare abstract class DateAdapter<D> {
7975
abstract today(): D;
8076
}
8177

82-
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;
83-
8478
export declare const defaultRippleAnimationConfig: {
8579
enterDuration: number;
8680
exitDuration: number;
@@ -92,8 +86,6 @@ export declare class ErrorStateMatcher {
9286
static ɵprov: i0.ɵɵInjectableDef<ErrorStateMatcher>;
9387
}
9488

95-
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;
96-
9789
export declare type FloatLabelType = 'always' | 'never' | 'auto';
9890

9991
export declare class GestureConfig extends HammerGestureConfig {
@@ -167,18 +159,10 @@ export interface HasTabIndex {
167159

168160
export declare type HasTabIndexCtor = Constructor<HasTabIndex>;
169161

170-
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;
171-
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-
174-
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;
175-
176162
export interface LabelOptions {
177163
float?: FloatLabelType;
178164
}
179165

180-
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;
181-
182166
export declare const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;
183167

184168
export declare const MAT_DATE_LOCALE: InjectionToken<string>;
@@ -337,8 +321,6 @@ export declare class MatRippleModule {
337321
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatRippleModule, [typeof i1.MatRipple], [typeof i2.MatCommonModule, typeof i3.PlatformModule], [typeof i1.MatRipple, typeof i2.MatCommonModule]>;
338322
}
339323

340-
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;
341-
342324
export declare function mixinColor<T extends Constructor<HasElementRef>>(base: T, defaultColor?: ThemePalette): CanColorCtor & T;
343325

344326
export declare function mixinDisabled<T extends Constructor<{}>>(base: T): CanDisableCtor & T;
@@ -386,10 +368,6 @@ export declare class NativeDateModule {
386368
static ɵmod: i0.ɵɵNgModuleDefWithMeta<NativeDateModule, never, [typeof i1.PlatformModule], never>;
387369
}
388370

389-
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;
390-
391-
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;
392-
393371
export interface Recognizer {
394372
new (options?: any): Recognizer;
395373
recognizeWith(otherRecognizer: Recognizer | string): Recognizer;
@@ -452,8 +430,6 @@ export interface RippleTarget {
452430

453431
export declare type SanityChecks = boolean | GranularSanityChecks;
454432

455-
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;
456-
457433
export declare function setLines(lines: QueryList<MatLine>, element: ElementRef<HTMLElement>): void;
458434

459435
export declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {

0 commit comments

Comments
 (0)