@@ -38,8 +38,7 @@ export type FlexBasisAlias = 'grow' | 'initial' | 'auto' | 'none' | 'nogrow' | '
38
38
*
39
39
* @see https://css-tricks.com/snippets/css/a-guide-to-flexbox/
40
40
*/
41
- @Directive ( {
42
- selector : `
41
+ @Directive ( { selector : `
43
42
[fxFlex],
44
43
[fxFlex.xs],
45
44
[fxFlex.gt-xs],
@@ -55,13 +54,13 @@ export type FlexBasisAlias = 'grow' | 'initial' | 'auto' | 'none' | 'nogrow' | '
55
54
export class FlexDirective extends BaseFxDirective implements OnInit , OnChanges , OnDestroy {
56
55
57
56
/** The flex-direction of this element's flex container. Defaults to 'row'. */
58
- private _layout = 'row' ;
57
+ protected _layout = 'row' ;
59
58
60
59
/**
61
60
* Subscription to the parent flex container's layout changes.
62
61
* Stored so we can unsubscribe when this directive is destroyed.
63
62
*/
64
- private _layoutWatcher : Subscription ;
63
+ protected _layoutWatcher : Subscription ;
65
64
66
65
@Input ( 'fxFlex' ) set flex ( val ) {
67
66
this . _cacheInput ( "flex" , val ) ;
@@ -117,8 +116,8 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
117
116
constructor ( monitor : MediaMonitor ,
118
117
elRef : ElementRef ,
119
118
renderer : Renderer ,
120
- @Optional ( ) @SkipSelf ( ) private _container : LayoutDirective ,
121
- @Optional ( ) @SkipSelf ( ) private _wrap : LayoutWrapDirective ) {
119
+ @Optional ( ) @SkipSelf ( ) protected _container : LayoutDirective ,
120
+ @Optional ( ) @SkipSelf ( ) protected _wrap : LayoutWrapDirective ) {
122
121
123
122
super ( monitor , elRef , renderer ) ;
124
123
@@ -168,12 +167,12 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
168
167
* Caches the parent container's 'flex-direction' and updates the element's style.
169
168
* Used as a handler for layout change events from the parent flex container.
170
169
*/
171
- private _onLayoutChange ( direction ?: string ) {
170
+ protected _onLayoutChange ( direction ?: string ) {
172
171
this . _layout = direction || this . _layout || "row" ;
173
172
this . _updateStyle ( ) ;
174
173
}
175
174
176
- private _updateStyle ( value ?: string | number ) {
175
+ protected _updateStyle ( value ?: string | number ) {
177
176
let flexBasis = value || this . _queryInput ( "flex" ) || '' ;
178
177
if ( this . _mqActivation ) {
179
178
flexBasis = this . _mqActivation . activatedInput ;
@@ -186,7 +185,7 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
186
185
/**
187
186
* If the used the short-form `fxFlex="1 0 37%"`, then parse the parts
188
187
*/
189
- private _parseFlexParts ( basis : string ) {
188
+ protected _parseFlexParts ( basis : string ) {
190
189
basis = basis . replace ( ";" , "" ) ;
191
190
192
191
let hasCalc = basis && basis . indexOf ( "calc" ) > - 1 ;
@@ -200,7 +199,7 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
200
199
* e.g.
201
200
* fxFlex="3 3 calc(15em + 20px)"
202
201
*/
203
- private _getPartsWithCalc ( value : string ) {
202
+ protected _getPartsWithCalc ( value : string ) {
204
203
let parts = [ this . _queryInput ( "grow" ) , this . _queryInput ( "shrink" ) , value ] ;
205
204
let j = value . indexOf ( 'calc' ) ;
206
205
@@ -219,7 +218,7 @@ export class FlexDirective extends BaseFxDirective implements OnInit, OnChanges,
219
218
* Validate the value to be one of the acceptable value options
220
219
* Use default fallback of "row"
221
220
*/
222
- private _validateValue ( grow : number | string ,
221
+ protected _validateValue ( grow : number | string ,
223
222
shrink : number | string ,
224
223
basis : string | number | FlexBasisAlias ) {
225
224
let css , isValue ;
0 commit comments