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 > > ( ) ;
@@ -98,7 +104,10 @@ export abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSelection<
98104 }
99105}
100106
101- /** A selection model that contains a single date. */
107+ /**
108+ * A selection model that contains a single date.
109+ * @docs -private
110+ */
102111@Injectable ( )
103112export class MatSingleDateSelectionModel < D > extends MatDateSelectionModel < D | null , D > {
104113 constructor ( adapter : DateAdapter < D > ) {
@@ -134,7 +143,10 @@ export class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | nu
134143 }
135144}
136145
137- /** A selection model that contains a date range. */
146+ /**
147+ * A selection model that contains a date range.
148+ * @docs -private
149+ */
138150@Injectable ( )
139151export class MatRangeDateSelectionModel < D > extends MatDateSelectionModel < DateRange < D > , D > {
140152 constructor ( adapter : DateAdapter < D > ) {
@@ -203,7 +215,10 @@ export function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(
203215 return parent || new MatSingleDateSelectionModel ( adapter ) ;
204216}
205217
206- /** Used to provide a single selection model to a component. */
218+ /**
219+ * Used to provide a single selection model to a component.
220+ * @docs -private
221+ */
207222export const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER : FactoryProvider = {
208223 provide : MatDateSelectionModel ,
209224 deps : [ [ new Optional ( ) , new SkipSelf ( ) , MatDateSelectionModel ] , DateAdapter ] ,
@@ -217,7 +232,10 @@ export function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(
217232 return parent || new MatRangeDateSelectionModel ( adapter ) ;
218233}
219234
220- /** Used to provide a range selection model to a component. */
235+ /**
236+ * Used to provide a range selection model to a component.
237+ * @docs -private
238+ */
221239export const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER : FactoryProvider = {
222240 provide : MatDateSelectionModel ,
223241 deps : [ [ new Optional ( ) , new SkipSelf ( ) , MatDateSelectionModel ] , DateAdapter ] ,
0 commit comments