@@ -19,12 +19,6 @@ import {
19
19
SimpleChanges ,
20
20
OnDestroy ,
21
21
} from '@angular/core' ;
22
- import {
23
- BooleanInput ,
24
- NumberInput ,
25
- coerceBooleanProperty ,
26
- coerceNumberProperty ,
27
- } from '@angular/cdk/coercion' ;
28
22
import { take } from 'rxjs/operators' ;
29
23
30
24
/** Extra CSS classes that can be associated with a calendar cell. */
@@ -83,81 +77,43 @@ export class MatCalendarBody implements OnChanges, OnDestroy {
83
77
@Input ( ) rows : MatCalendarCell [ ] [ ] ;
84
78
85
79
/** The value in the table that corresponds to today. */
86
- @Input ( )
87
- get todayValue ( ) : number { return this . _todayValue ; }
88
- set todayValue ( value : number ) { this . _todayValue = coerceNumberProperty ( value ) ; }
89
- private _todayValue : number ;
80
+ @Input ( ) todayValue : number ;
90
81
91
82
/** Start value of the selected date range. */
92
- @Input ( )
93
- get startValue ( ) : number { return this . _startValue ; }
94
- set startValue ( value : number ) { this . _startValue = coerceNumberProperty ( value ) ; }
95
- private _startValue : number ;
83
+ @Input ( ) startValue : number ;
96
84
97
85
/** End value of the selected date range. */
98
- @Input ( )
99
- get endValue ( ) : number { return this . _endValue ; }
100
- set endValue ( value : number ) { this . _endValue = coerceNumberProperty ( value ) ; }
101
- private _endValue : number ;
86
+ @Input ( ) endValue : number ;
102
87
103
88
/** The minimum number of free cells needed to fit the label in the first row. */
104
- @Input ( )
105
- get labelMinRequiredCells ( ) : number { return this . _labelMinRequiredCells ; }
106
- set labelMinRequiredCells ( value : number ) {
107
- this . _labelMinRequiredCells = coerceNumberProperty ( value ) ;
108
- }
109
- private _labelMinRequiredCells : number ;
89
+ @Input ( ) labelMinRequiredCells : number ;
110
90
111
91
/** The number of columns in the table. */
112
- @Input ( )
113
- get numCols ( ) : number { return this . _numCols ; }
114
- set numCols ( value : number ) { this . _numCols = coerceNumberProperty ( value ) ; }
115
- private _numCols = 7 ;
92
+ @Input ( ) numCols : number = 7 ;
116
93
117
94
/** The cell number of the active cell in the table. */
118
- @Input ( )
119
- get activeCell ( ) : number { return this . _activeCell ; }
120
- set activeCell ( value : number ) { this . _activeCell = coerceNumberProperty ( value ) ; }
121
- private _activeCell = 0 ;
95
+ @Input ( ) activeCell : number = 0 ;
122
96
123
97
/** Whether a range is being selected. */
124
- @Input ( )
125
- get isRange ( ) : boolean { return this . _isRange ; }
126
- set isRange ( value : boolean ) { this . _isRange = coerceBooleanProperty ( value ) ; }
127
- private _isRange = false ;
98
+ @Input ( ) isRange : boolean = false ;
128
99
129
100
/**
130
101
* The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
131
102
* maintained even as the table resizes.
132
103
*/
133
- @Input ( )
134
- get cellAspectRatio ( ) : number { return this . _cellAspectRatio ; }
135
- set cellAspectRatio ( value : number ) { this . _cellAspectRatio = coerceNumberProperty ( value ) ; }
136
- private _cellAspectRatio = 1 ;
104
+ @Input ( ) cellAspectRatio : number = 1 ;
137
105
138
106
/** Start of the comparison range. */
139
- @Input ( )
140
- get comparisonStart ( ) : number | null { return this . _comparisonStart ; }
141
- set comparisonStart ( value : number | null ) { this . _comparisonStart = coerceNumberProperty ( value ) ; }
142
- private _comparisonStart : number | null ;
107
+ @Input ( ) comparisonStart : number | null ;
143
108
144
109
/** End of the comparison range. */
145
- @Input ( )
146
- get comparisonEnd ( ) : number | null { return this . _comparisonEnd ; }
147
- set comparisonEnd ( value : number | null ) { this . _comparisonEnd = coerceNumberProperty ( value ) ; }
148
- private _comparisonEnd : number | null ;
110
+ @Input ( ) comparisonEnd : number | null ;
149
111
150
112
/** Start of the preview range. */
151
- @Input ( )
152
- get previewStart ( ) : number | null { return this . _previewStart ; }
153
- set previewStart ( value : number | null ) { this . _previewStart = coerceNumberProperty ( value ) ; }
154
- private _previewStart : number | null = null ;
113
+ @Input ( ) previewStart : number | null = null ;
155
114
156
115
/** End of the preview range. */
157
- @Input ( )
158
- get previewEnd ( ) : number | null { return this . _previewEnd ; }
159
- set previewEnd ( value : number | null ) { this . _previewEnd = coerceNumberProperty ( value ) ; }
160
- private _previewEnd : number | null = null ;
116
+ @Input ( ) previewEnd : number | null = null ;
161
117
162
118
/** Emits when a new value is selected. */
163
119
@Output ( ) readonly selectedValueChange = new EventEmitter < MatCalendarUserEvent < number > > ( ) ;
@@ -402,19 +358,6 @@ export class MatCalendarBody implements OnChanges, OnDestroy {
402
358
403
359
return null ;
404
360
}
405
-
406
- static ngAcceptInputType_todayValue : NumberInput ;
407
- static ngAcceptInputType_startValue : NumberInput ;
408
- static ngAcceptInputType_endValue : NumberInput ;
409
- static ngAcceptInputType_labelMinRequiredCells : NumberInput ;
410
- static ngAcceptInputType_numCols : NumberInput ;
411
- static ngAcceptInputType_activeCell : NumberInput ;
412
- static ngAcceptInputType_isRange : BooleanInput ;
413
- static ngAcceptInputType_cellAspectRatio : NumberInput ;
414
- static ngAcceptInputType_comparisonStart : NumberInput ;
415
- static ngAcceptInputType_comparisonEnd : NumberInput ;
416
- static ngAcceptInputType_previewStart : NumberInput ;
417
- static ngAcceptInputType_previewEnd : NumberInput ;
418
361
}
419
362
420
363
/** Checks whether a node is a table cell element. */
0 commit comments