1
1
'use strict' ;
2
2
3
+ var _reactTransformHmr2 = require ( 'react-transform-hmr' ) ;
4
+
5
+ var _reactTransformHmr3 = _interopRequireDefault ( _reactTransformHmr2 ) ;
6
+
7
+ var _react = require ( 'react' ) ;
8
+
3
9
Object . defineProperty ( exports , '__esModule' , {
4
10
value : true
5
11
} ) ;
@@ -8,29 +14,46 @@ var _createClass = (function () { function defineProperties(target, props) { for
8
14
9
15
var _get = function get ( _x , _x2 , _x3 ) { var _again = true ; _function: while ( _again ) { var object = _x , property = _x2 , receiver = _x3 ; _again = false ; if ( object === null ) object = Function . prototype ; var desc = Object . getOwnPropertyDescriptor ( object , property ) ; if ( desc === undefined ) { var parent = Object . getPrototypeOf ( object ) ; if ( parent === null ) { return undefined ; } else { _x = parent ; _x2 = property ; _x3 = receiver ; _again = true ; desc = parent = undefined ; continue _function; } } else if ( 'value' in desc ) { return desc . value ; } else { var getter = desc . get ; if ( getter === undefined ) { return undefined ; } return getter . call ( receiver ) ; } } } ;
10
16
11
- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
12
-
13
17
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
14
18
15
19
function _inherits ( subClass , superClass ) { if ( typeof superClass !== 'function' && superClass !== null ) { throw new TypeError ( 'Super expression must either be null or a function, not ' + typeof superClass ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , enumerable : false , writable : true , configurable : true } } ) ; if ( superClass ) Object . setPrototypeOf ? Object . setPrototypeOf ( subClass , superClass ) : subClass . __proto__ = superClass ; }
16
20
17
- var _react = require ( 'react' ) ;
18
-
19
21
var _react2 = _interopRequireDefault ( _react ) ;
20
22
21
23
var _classnames = require ( 'classnames' ) ;
22
24
23
25
var _classnames2 = _interopRequireDefault ( _classnames ) ;
24
26
27
+ var _components = {
28
+ _$ProgressBar : {
29
+ displayName : 'ProgressBar'
30
+ }
31
+ } ;
32
+
33
+ var _reactComponentWrapper = ( 0 , _reactTransformHmr3 [ 'default' ] ) ( {
34
+ filename : '/home/dmitry/projects/react-progress-bar-plus/src/ProgressBar.js' ,
35
+ components : _components ,
36
+ locals : [ module ] ,
37
+ imports : [ _react ]
38
+ } ) ;
39
+
40
+ function _wrapComponent ( uniqueId ) {
41
+ return function ( ReactClass ) {
42
+ return _reactComponentWrapper ( ReactClass , uniqueId ) ;
43
+ } ;
44
+ }
45
+
46
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
47
+
25
48
var ProgressBar = ( function ( _React$Component ) {
26
49
_inherits ( ProgressBar , _React$Component ) ;
27
50
28
51
function ProgressBar ( ) {
29
52
var _this = this ;
30
53
31
- _classCallCheck ( this , ProgressBar ) ;
54
+ _classCallCheck ( this , _ProgressBar ) ;
32
55
33
- _get ( Object . getPrototypeOf ( ProgressBar . prototype ) , 'constructor' , this ) . apply ( this , arguments ) ;
56
+ _get ( Object . getPrototypeOf ( _ProgressBar . prototype ) , 'constructor' , this ) . apply ( this , arguments ) ;
34
57
35
58
this . state = {
36
59
percent : this . props . percent
@@ -103,11 +126,11 @@ var ProgressBar = (function (_React$Component) {
103
126
'div' ,
104
127
{ className : className } ,
105
128
_react2 [ 'default' ] . createElement ( 'div' , { className : 'react-progress-bar-percent' , style : style } ) ,
106
- _react2 [ 'default' ] . createElement (
129
+ this . props . showSpinner ? _react2 [ 'default' ] . createElement (
107
130
'div' ,
108
131
{ className : 'react-progress-bar-spinner' } ,
109
132
_react2 [ 'default' ] . createElement ( 'div' , { className : 'react-progress-bar-spinner-icon' } )
110
- )
133
+ ) : null
111
134
) ;
112
135
}
113
136
} ] , [ {
@@ -116,7 +139,8 @@ var ProgressBar = (function (_React$Component) {
116
139
percent : _react2 [ 'default' ] . PropTypes . number . isRequired ,
117
140
onTop : _react2 [ 'default' ] . PropTypes . bool ,
118
141
autoIncrement : _react2 [ 'default' ] . PropTypes . bool ,
119
- intervalTime : _react2 [ 'default' ] . PropTypes . number
142
+ intervalTime : _react2 [ 'default' ] . PropTypes . number ,
143
+ showSpinner : _react2 [ 'default' ] . PropTypes . bool
120
144
} ,
121
145
enumerable : true
122
146
} , {
@@ -125,11 +149,14 @@ var ProgressBar = (function (_React$Component) {
125
149
percent : - 1 ,
126
150
onTop : false ,
127
151
autoIncrement : false ,
128
- intervalTime : 200
152
+ intervalTime : 200 ,
153
+ showSpinner : true
129
154
} ,
130
155
enumerable : true
131
156
} ] ) ;
132
157
158
+ var _ProgressBar = ProgressBar ;
159
+ ProgressBar = _wrapComponent ( '_$ProgressBar' ) ( ProgressBar ) || ProgressBar ;
133
160
return ProgressBar ;
134
161
} ) ( _react2 [ 'default' ] . Component ) ;
135
162
0 commit comments