3
3
Object . defineProperty ( exports , "__esModule" , {
4
4
value : true
5
5
} ) ;
6
- exports . default = FontAwesomeIcon ;
6
+ exports [ " default" ] = FontAwesomeIcon ;
7
7
exports . DEFAULT_COLOR = exports . DEFAULT_SIZE = void 0 ;
8
8
9
9
var _react = _interopRequireDefault ( require ( "react" ) ) ;
@@ -18,13 +18,15 @@ var _fontawesomeSvgCore = require("@fortawesome/fontawesome-svg-core");
18
18
19
19
var _logger = _interopRequireDefault ( require ( "../logger" ) ) ;
20
20
21
- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
21
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { " default" : obj } ; }
22
22
23
23
function _objectWithoutProperties ( source , excluded ) { if ( source == null ) return { } ; var target = _objectWithoutPropertiesLoose ( source , excluded ) ; var key , i ; if ( Object . getOwnPropertySymbols ) { var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ; for ( i = 0 ; i < sourceSymbolKeys . length ; i ++ ) { key = sourceSymbolKeys [ i ] ; if ( excluded . indexOf ( key ) >= 0 ) continue ; if ( ! Object . prototype . propertyIsEnumerable . call ( source , key ) ) continue ; target [ key ] = source [ key ] ; } } return target ; }
24
24
25
25
function _objectWithoutPropertiesLoose ( source , excluded ) { if ( source == null ) return { } ; var target = { } ; var sourceKeys = Object . keys ( source ) ; var key , i ; for ( i = 0 ; i < sourceKeys . length ; i ++ ) { key = sourceKeys [ i ] ; if ( excluded . indexOf ( key ) >= 0 ) continue ; target [ key ] = source [ key ] ; } return target ; }
26
26
27
- function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
27
+ function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
28
+
29
+ function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
28
30
29
31
function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
30
32
@@ -80,14 +82,14 @@ function FontAwesomeIcon(props) {
80
82
var iconLookup = normalizeIconArgs ( iconArgs ) ;
81
83
var transform = objectWithKey ( 'transform' , typeof props . transform === 'string' ? _fontawesomeSvgCore . parse . transform ( props . transform ) : props . transform ) ;
82
84
var mask = objectWithKey ( 'mask' , normalizeIconArgs ( maskArgs ) ) ;
83
- var renderedIcon = ( 0 , _fontawesomeSvgCore . icon ) ( iconLookup , _objectSpread ( { } , transform , mask ) ) ;
85
+ var renderedIcon = ( 0 , _fontawesomeSvgCore . icon ) ( iconLookup , _objectSpread ( { } , transform , { } , mask ) ) ;
84
86
85
87
if ( ! renderedIcon ) {
86
- ( 0 , _logger . default ) ( "ERROR: icon not found for icon = " , iconArgs ) ;
88
+ ( 0 , _logger [ " default" ] ) ( "ERROR: icon not found for icon = " , iconArgs ) ;
87
89
return null ;
88
90
}
89
91
90
- var abstract = renderedIcon . abstract ; // This is the color that will be passed to the "fill" prop of the Svg element
92
+ var _abstract = renderedIcon [ " abstract" ] ; // This is the color that will be passed to the "fill" prop of the Svg element
91
93
92
94
var color = props . color || style . color || DEFAULT_COLOR ; // To avoid confusion down the line, we'll remove properties from the StyleSheet, like color, that are being overridden
93
95
// or resolved in other ways, to avoid ambiguity as to which inputs cause which outputs in the underlying rendering process.
@@ -122,19 +124,19 @@ function FontAwesomeIcon(props) {
122
124
extraProps [ key ] = props [ key ] ;
123
125
}
124
126
} ) ;
125
- return convertCurry ( abstract [ 0 ] , extraProps ) ;
127
+ return convertCurry ( _abstract [ 0 ] , extraProps ) ;
126
128
}
127
129
128
130
FontAwesomeIcon . displayName = 'FontAwesomeIcon' ;
129
131
FontAwesomeIcon . propTypes = {
130
- height : _propTypes . default . number ,
131
- width : _propTypes . default . number ,
132
- size : _propTypes . default . number ,
133
- color : _propTypes . default . string ,
134
- style : _propTypes . default . shape ( _objectSpread ( { } , _reactNative . ViewPropTypes . style ) ) ,
135
- icon : _propTypes . default . oneOfType ( [ _propTypes . default . object , _propTypes . default . array , _propTypes . default . string ] ) ,
136
- mask : _propTypes . default . oneOfType ( [ _propTypes . default . object , _propTypes . default . array , _propTypes . default . string ] ) ,
137
- transform : _propTypes . default . oneOfType ( [ _propTypes . default . string , _propTypes . default . object ] )
132
+ height : _propTypes [ " default" ] . number ,
133
+ width : _propTypes [ " default" ] . number ,
134
+ size : _propTypes [ " default" ] . number ,
135
+ color : _propTypes [ " default" ] . string ,
136
+ style : _propTypes [ " default" ] . shape ( _objectSpread ( { } , _reactNative . ViewPropTypes . style ) ) ,
137
+ icon : _propTypes [ " default" ] . oneOfType ( [ _propTypes [ " default" ] . object , _propTypes [ " default" ] . array , _propTypes [ " default" ] . string ] ) ,
138
+ mask : _propTypes [ " default" ] . oneOfType ( [ _propTypes [ " default" ] . object , _propTypes [ " default" ] . array , _propTypes [ " default" ] . string ] ) ,
139
+ transform : _propTypes [ " default" ] . oneOfType ( [ _propTypes [ " default" ] . string , _propTypes [ " default" ] . object ] )
138
140
} ;
139
141
FontAwesomeIcon . defaultProps = {
140
142
icon : null ,
@@ -148,4 +150,4 @@ FontAwesomeIcon.defaultProps = {
148
150
149
151
} ;
150
152
151
- var convertCurry = _converter . default . bind ( null , _react . default . createElement ) ;
153
+ var convertCurry = _converter [ " default" ] . bind ( null , _react [ " default" ] . createElement ) ;
0 commit comments