Skip to content

Commit de0b396

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 9e5fbd8 commit de0b396

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
@@ -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 interface GranularSanityChecks {
@@ -116,18 +108,10 @@ export interface HasTabIndex {
116108

117109
export declare type HasTabIndexCtor = Constructor<HasTabIndex>;
118110

119-
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;
120-
121-
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;
122-
123-
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;
124-
125111
export interface LabelOptions {
126112
float?: FloatLabelType;
127113
}
128114

129-
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;
130-
131115
export declare const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;
132116

133117
export declare const MAT_DATE_LOCALE: InjectionToken<string>;
@@ -289,8 +273,6 @@ export declare class MatRippleModule {
289273
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatRippleModule, [typeof i1.MatRipple], [typeof i2.MatCommonModule, typeof i3.PlatformModule], [typeof i1.MatRipple, typeof i2.MatCommonModule]>;
290274
}
291275

292-
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;
293-
294276
export declare function mixinColor<T extends Constructor<HasElementRef>>(base: T, defaultColor?: ThemePalette): CanColorCtor & T;
295277

296278
export declare function mixinDisabled<T extends Constructor<{}>>(base: T): CanDisableCtor & T;
@@ -338,10 +320,6 @@ export declare class NativeDateModule {
338320
static ɵmod: i0.ɵɵNgModuleDefWithMeta<NativeDateModule, never, [typeof i1.PlatformModule], never>;
339321
}
340322

341-
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;
342-
343-
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;
344-
345323
export interface RippleAnimationConfig {
346324
enterDuration?: number;
347325
exitDuration?: number;
@@ -396,8 +374,6 @@ export interface RippleTarget {
396374

397375
export declare type SanityChecks = boolean | GranularSanityChecks;
398376

399-
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;
400-
401377
export declare function setLines(lines: QueryList<unknown>, element: ElementRef<HTMLElement>, prefix?: string): void;
402378

403379
export declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {

0 commit comments

Comments
 (0)