66 * found in the LICENSE file at https://angular.io/license
77 */
88
9- import { FactoryProvider , Injectable , Optional , SkipSelf , OnDestroy , Directive } from '@angular/core' ;
9+ import { FactoryProvider , Injectable , Optional , SkipSelf , OnDestroy } from '@angular/core' ;
1010import { DateAdapter } from '@angular/material/core' ;
1111import { Observable , Subject } from 'rxjs' ;
1212
@@ -32,7 +32,10 @@ export class DateRange<D> {
3232 */
3333export type ExtractDateTypeFromSelection < T > = T extends DateRange < infer D > ? D : NonNullable < T > ;
3434
35- /** Event emitted by the date selection model when its selection changes. */
35+ /**
36+ * Event emitted by the date selection model when its selection changes.
37+ * @docs -private
38+ */
3639export interface DateSelectionModelChange < S > {
3740 /** New value for the selection. */
3841 selection : S ;
@@ -41,8 +44,11 @@ export interface DateSelectionModelChange<S> {
4144 source : unknown ;
4245}
4346
44- /** A selection model containing a date selection. */
45- @Directive ( )
47+ /**
48+ * A selection model containing a date selection.
49+ * @docs -private
50+ */
51+ @Injectable ( )
4652export abstract class MatDateSelectionModel < S , D = ExtractDateTypeFromSelection < S > >
4753 implements OnDestroy {
4854 private _selectionChanged = new Subject < DateSelectionModelChange < S > > ( ) ;
@@ -88,7 +94,10 @@ export abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSelection<
8894 abstract clone ( ) : MatDateSelectionModel < S , D > ;
8995}
9096
91- /** A selection model that contains a single date. */
97+ /**
98+ * A selection model that contains a single date.
99+ * @docs -private
100+ */
92101@Injectable ( )
93102export class MatSingleDateSelectionModel < D > extends MatDateSelectionModel < D | null , D > {
94103 constructor ( adapter : DateAdapter < D > ) {
@@ -124,7 +133,10 @@ export class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | nu
124133 }
125134}
126135
127- /** A selection model that contains a date range. */
136+ /**
137+ * A selection model that contains a date range.
138+ * @docs -private
139+ */
128140@Injectable ( )
129141export class MatRangeDateSelectionModel < D > extends MatDateSelectionModel < DateRange < D > , D > {
130142 constructor ( adapter : DateAdapter < D > ) {
@@ -193,7 +205,10 @@ export function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(
193205 return parent || new MatSingleDateSelectionModel ( adapter ) ;
194206}
195207
196- /** Used to provide a single selection model to a component. */
208+ /**
209+ * Used to provide a single selection model to a component.
210+ * @docs -private
211+ */
197212export const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER : FactoryProvider = {
198213 provide : MatDateSelectionModel ,
199214 deps : [ [ new Optional ( ) , new SkipSelf ( ) , MatDateSelectionModel ] , DateAdapter ] ,
@@ -207,7 +222,10 @@ export function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(
207222 return parent || new MatRangeDateSelectionModel ( adapter ) ;
208223}
209224
210- /** Used to provide a range selection model to a component. */
225+ /**
226+ * Used to provide a range selection model to a component.
227+ * @docs -private
228+ */
211229export const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER : FactoryProvider = {
212230 provide : MatDateSelectionModel ,
213231 deps : [ [ new Optional ( ) , new SkipSelf ( ) , MatDateSelectionModel ] , DateAdapter ] ,
0 commit comments