Skip to content

Commit

Permalink
refactor(material): remove month constants from core (angular#18111)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
devversion authored and mmalerba committed Sep 5, 2020
1 parent fabf278 commit 7c78a97
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 43 deletions.
16 changes: 0 additions & 16 deletions src/material/core/month-constants.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/material/core/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ export * from './option/index';
export * from './label/label-options';
export * from './ripple/index';
export * from './selection/index';

// TODO(devversion): remove this with v8
export * from './month-constants';
24 changes: 0 additions & 24 deletions tools/public_api_guard/material/core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ export declare class AnimationDurations {
static EXITING: string;
}

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;

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;

export interface CanColor {
color: ThemePalette;
defaultColor: ThemePalette | undefined;
Expand Down Expand Up @@ -121,8 +117,6 @@ export declare abstract class DateAdapter<D> {
abstract today(): D;
}

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;

export declare const defaultRippleAnimationConfig: {
enterDuration: number;
exitDuration: number;
Expand All @@ -134,8 +128,6 @@ export declare class ErrorStateMatcher {
static ɵprov: i0.ɵɵInjectableDef<ErrorStateMatcher>;
}

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;

export declare type FloatLabelType = 'always' | 'never' | 'auto';

export interface GranularSanityChecks {
Expand All @@ -159,18 +151,10 @@ export interface HasTabIndex {

export declare type HasTabIndexCtor = Constructor<HasTabIndex>;

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;

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;

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;

export interface LabelOptions {
float?: FloatLabelType;
}

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;

export declare const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;

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

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;

export declare function mixinColor<T extends Constructor<HasElementRef>>(base: T, defaultColor?: ThemePalette): CanColorCtor & T;

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

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;

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;

export interface RippleAnimationConfig {
enterDuration?: number;
exitDuration?: number;
Expand Down Expand Up @@ -414,8 +392,6 @@ export interface RippleTarget {

export declare type SanityChecks = boolean | GranularSanityChecks;

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;

export declare function setLines(lines: QueryList<unknown>, element: ElementRef<HTMLElement>, prefix?: string): void;

export declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
Expand Down

0 comments on commit 7c78a97

Please sign in to comment.