@@ -110,32 +110,16 @@ let nextUniqueId = 0;
110
110
* the trigger element.
111
111
*/
112
112
113
- /**
114
- * The max height of the select's overlay panel.
115
- * @deprecated To be turned into a private variable.
116
- * @breaking -change 12.0.0
117
- */
113
+ /** The max height of the select's overlay panel. */
118
114
export const SELECT_PANEL_MAX_HEIGHT = 256 ;
119
115
120
- /**
121
- * The panel's padding on the x-axis.
122
- * @deprecated To be turned into a private variable.
123
- * @breaking -change 12.0.0
124
- */
116
+ /** The panel's padding on the x-axis. */
125
117
export const SELECT_PANEL_PADDING_X = 16 ;
126
118
127
- /**
128
- * The panel's x axis padding if it is indented (e.g. there is an option group).
129
- * @deprecated To be turned into a private variable.
130
- * @breaking -change 12.0.0
131
- */
119
+ /** The panel's x axis padding if it is indented (e.g. there is an option group). */
132
120
export const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2 ;
133
121
134
- /**
135
- * The height of the select items in `em` units.
136
- * @deprecated To be turned into a private variable.
137
- * @breaking -change 12.0.0
138
- */
122
+ /** The height of the select items in `em` units. */
139
123
export const SELECT_ITEM_HEIGHT_EM = 3 ;
140
124
141
125
// TODO(josephperrott): Revert to a constant after 2018 spec updates are fully merged.
@@ -147,18 +131,12 @@ export const SELECT_ITEM_HEIGHT_EM = 3;
147
131
* (SELECT_PANEL_PADDING_X * 1.5) + 16 = 40
148
132
* The padding is multiplied by 1.5 because the checkbox's margin is half the padding.
149
133
* The checkbox width is 16px.
150
- *
151
- * @deprecated To be turned into a private variable.
152
- * @breaking -change 12.0.0
153
134
*/
154
135
export const SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 16 ;
155
136
156
137
/**
157
138
* The select panel will only "fit" inside the viewport if it is positioned at
158
139
* this value or more away from the viewport boundary.
159
- *
160
- * @deprecated To be turned into a private variable.
161
- * @breaking -change 12.0.0
162
140
*/
163
141
export const SELECT_PANEL_VIEWPORT_PADDING = 8 ;
164
142
@@ -331,13 +309,9 @@ export abstract class _MatSelectBase<C> extends _MatSelectMixinBase implements A
331
309
/** Panel containing the select options. */
332
310
@ViewChild ( 'panel' ) panel : ElementRef ;
333
311
334
- /**
335
- * Overlay pane containing the options.
336
- * @deprecated To be turned into a private API.
337
- * @breaking -change 10.0.0
338
- * @docs -private
339
- */
340
- @ViewChild ( CdkConnectedOverlay ) overlayDir : CdkConnectedOverlay ;
312
+ /** Overlay pane containing the options. */
313
+ @ViewChild ( CdkConnectedOverlay )
314
+ protected _overlayDir : CdkConnectedOverlay ;
341
315
342
316
/** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */
343
317
@Input ( ) panelClass : string | string [ ] | Set < string > | { [ key : string ] : any } ;
@@ -785,7 +759,7 @@ export abstract class _MatSelectBase<C> extends _MatSelectMixinBase implements A
785
759
* Callback that is invoked when the overlay panel has been attached.
786
760
*/
787
761
_onAttached ( ) : void {
788
- this . overlayDir . positionChange . pipe ( take ( 1 ) ) . subscribe ( ( ) => {
762
+ this . _overlayDir . positionChange . pipe ( take ( 1 ) ) . subscribe ( ( ) => {
789
763
this . _changeDetectorRef . detectChanges ( ) ;
790
764
this . _positioningSettled ( ) ;
791
765
} ) ;
@@ -1230,9 +1204,9 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
1230
1204
1231
1205
// Set the font size on the panel element once it exists.
1232
1206
this . _ngZone . onStable . pipe ( take ( 1 ) ) . subscribe ( ( ) => {
1233
- if ( this . _triggerFontSize && this . overlayDir . overlayRef &&
1234
- this . overlayDir . overlayRef . overlayElement ) {
1235
- this . overlayDir . overlayRef . overlayElement . style . fontSize = `${ this . _triggerFontSize } px` ;
1207
+ if ( this . _triggerFontSize && this . _overlayDir . overlayRef &&
1208
+ this . _overlayDir . overlayRef . overlayElement ) {
1209
+ this . _overlayDir . overlayRef . overlayElement . style . fontSize = `${ this . _triggerFontSize } px` ;
1236
1210
}
1237
1211
} ) ;
1238
1212
}
@@ -1260,7 +1234,7 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
1260
1234
if ( this . panelOpen ) {
1261
1235
this . _scrollTop = 0 ;
1262
1236
} else {
1263
- this . overlayDir . offsetX = 0 ;
1237
+ this . _overlayDir . offsetX = 0 ;
1264
1238
this . _changeDetectorRef . markForCheck ( ) ;
1265
1239
}
1266
1240
@@ -1279,7 +1253,7 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
1279
1253
* content width in order to constrain the panel within the viewport.
1280
1254
*/
1281
1255
private _calculateOverlayOffsetX ( ) : void {
1282
- const overlayRect = this . overlayDir . overlayRef . overlayElement . getBoundingClientRect ( ) ;
1256
+ const overlayRect = this . _overlayDir . overlayRef . overlayElement . getBoundingClientRect ( ) ;
1283
1257
const viewportSize = this . _viewportRuler . getViewportSize ( ) ;
1284
1258
const isRtl = this . _isRtl ( ) ;
1285
1259
const paddingWidth = this . multiple ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X :
@@ -1316,8 +1290,8 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
1316
1290
// Set the offset directly in order to avoid having to go through change detection and
1317
1291
// potentially triggering "changed after it was checked" errors. Round the value to avoid
1318
1292
// blurry content in some browsers.
1319
- this . overlayDir . offsetX = Math . round ( offsetX ) ;
1320
- this . overlayDir . overlayRef . updatePosition ( ) ;
1293
+ this . _overlayDir . offsetX = Math . round ( offsetX ) ;
1294
+ this . _overlayDir . overlayRef . updatePosition ( ) ;
1321
1295
}
1322
1296
1323
1297
/**
0 commit comments