1
1
'use strict' ;
2
2
3
3
Object . defineProperty ( exports , '__esModule' , {
4
- value : true ,
4
+ value : true
5
5
} ) ;
6
6
7
7
var _createClass = ( function ( ) {
@@ -52,7 +52,7 @@ function _classCallCheck(instance, Constructor) {
52
52
function _possibleConstructorReturn ( self , call ) {
53
53
if ( ! self ) {
54
54
throw new ReferenceError (
55
- "this hasn't been initialised - super() hasn't been called" ,
55
+ "this hasn't been initialised - super() hasn't been called"
56
56
) ;
57
57
}
58
58
return call && ( typeof call === 'object' || typeof call === 'function' )
@@ -64,16 +64,16 @@ function _inherits(subClass, superClass) {
64
64
if ( typeof superClass !== 'function' && superClass !== null ) {
65
65
throw new TypeError (
66
66
'Super expression must either be null or a function, not ' +
67
- typeof superClass ,
67
+ typeof superClass
68
68
) ;
69
69
}
70
70
subClass . prototype = Object . create ( superClass && superClass . prototype , {
71
71
constructor : {
72
72
value : subClass ,
73
73
enumerable : false ,
74
74
writable : true ,
75
- configurable : true ,
76
- } ,
75
+ configurable : true
76
+ }
77
77
} ) ;
78
78
if ( superClass )
79
79
Object . setPrototypeOf
@@ -91,8 +91,8 @@ var InfiniteScroll = (function(_Component) {
91
91
this ,
92
92
( InfiniteScroll . __proto__ || Object . getPrototypeOf ( InfiniteScroll ) ) . call (
93
93
this ,
94
- props ,
95
- ) ,
94
+ props
95
+ )
96
96
) ;
97
97
98
98
_this . scrollListener = _this . scrollListener . bind ( _this ) ;
@@ -105,7 +105,7 @@ var InfiniteScroll = (function(_Component) {
105
105
value : function componentDidMount ( ) {
106
106
this . pageLoaded = this . props . pageStart ;
107
107
this . attachScrollListener ( ) ;
108
- } ,
108
+ }
109
109
} ,
110
110
{
111
111
key : 'componentDidUpdate' ,
@@ -119,22 +119,22 @@ var InfiniteScroll = (function(_Component) {
119
119
this . loadMore = false ;
120
120
}
121
121
this . attachScrollListener ( ) ;
122
- } ,
122
+ }
123
123
} ,
124
124
{
125
125
key : 'componentWillUnmount' ,
126
126
value : function componentWillUnmount ( ) {
127
127
this . detachScrollListener ( ) ;
128
128
this . detachMousewheelListener ( ) ;
129
- } ,
129
+ }
130
130
131
131
// Set a defaut loader for all your `InfiniteScroll` components
132
132
} ,
133
133
{
134
134
key : 'setDefaultLoader' ,
135
135
value : function setDefaultLoader ( loader ) {
136
136
this . defaultLoader = loader ;
137
- } ,
137
+ }
138
138
} ,
139
139
{
140
140
key : 'detachMousewheelListener' ,
@@ -147,9 +147,9 @@ var InfiniteScroll = (function(_Component) {
147
147
scrollEl . removeEventListener (
148
148
'mousewheel' ,
149
149
this . mousewheelListener ,
150
- this . props . useCapture ,
150
+ this . props . useCapture
151
151
) ;
152
- } ,
152
+ }
153
153
} ,
154
154
{
155
155
key : 'detachScrollListener' ,
@@ -162,14 +162,14 @@ var InfiniteScroll = (function(_Component) {
162
162
scrollEl . removeEventListener (
163
163
'scroll' ,
164
164
this . scrollListener ,
165
- this . props . useCapture ,
165
+ this . props . useCapture
166
166
) ;
167
167
scrollEl . removeEventListener (
168
168
'resize' ,
169
169
this . scrollListener ,
170
- this . props . useCapture ,
170
+ this . props . useCapture
171
171
) ;
172
- } ,
172
+ }
173
173
} ,
174
174
{
175
175
key : 'getParentElement' ,
@@ -180,13 +180,13 @@ var InfiniteScroll = (function(_Component) {
180
180
return scrollParent ;
181
181
}
182
182
return el && el . parentNode ;
183
- } ,
183
+ }
184
184
} ,
185
185
{
186
186
key : 'filterProps' ,
187
187
value : function filterProps ( props ) {
188
188
return props ;
189
- } ,
189
+ }
190
190
} ,
191
191
{
192
192
key : 'attachScrollListener' ,
@@ -205,23 +205,23 @@ var InfiniteScroll = (function(_Component) {
205
205
scrollEl . addEventListener (
206
206
'mousewheel' ,
207
207
this . mousewheelListener ,
208
- this . props . useCapture ,
208
+ this . props . useCapture
209
209
) ;
210
210
scrollEl . addEventListener (
211
211
'scroll' ,
212
212
this . scrollListener ,
213
- this . props . useCapture ,
213
+ this . props . useCapture
214
214
) ;
215
215
scrollEl . addEventListener (
216
216
'resize' ,
217
217
this . scrollListener ,
218
- this . props . useCapture ,
218
+ this . props . useCapture
219
219
) ;
220
220
221
221
if ( this . props . initialLoad ) {
222
222
this . scrollListener ( ) ;
223
223
}
224
- } ,
224
+ }
225
225
} ,
226
226
{
227
227
key : 'mousewheelListener' ,
@@ -231,7 +231,7 @@ var InfiniteScroll = (function(_Component) {
231
231
if ( e . deltaY === 1 ) {
232
232
e . preventDefault ( ) ;
233
233
}
234
- } ,
234
+ }
235
235
} ,
236
236
{
237
237
key : 'scrollListener' ,
@@ -277,7 +277,7 @@ var InfiniteScroll = (function(_Component) {
277
277
this . loadMore = true ;
278
278
}
279
279
}
280
- } ,
280
+ }
281
281
} ,
282
282
{
283
283
key : 'calculateOffset' ,
@@ -290,7 +290,7 @@ var InfiniteScroll = (function(_Component) {
290
290
this . calculateTopPosition ( el ) +
291
291
( el . offsetHeight - scrollTop - window . innerHeight )
292
292
) ;
293
- } ,
293
+ }
294
294
} ,
295
295
{
296
296
key : 'calculateTopPosition' ,
@@ -299,7 +299,7 @@ var InfiniteScroll = (function(_Component) {
299
299
return 0 ;
300
300
}
301
301
return el . offsetTop + this . calculateTopPosition ( el . offsetParent ) ;
302
- } ,
302
+ }
303
303
} ,
304
304
{
305
305
key : 'render' ,
@@ -334,7 +334,7 @@ var InfiniteScroll = (function(_Component) {
334
334
'threshold' ,
335
335
'useCapture' ,
336
336
'useWindow' ,
337
- 'getScrollParent' ,
337
+ 'getScrollParent'
338
338
] ) ;
339
339
340
340
props . ref = function ( node ) {
@@ -357,8 +357,8 @@ var InfiniteScroll = (function(_Component) {
357
357
}
358
358
}
359
359
return _react2 . default . createElement ( element , props , childrenArray ) ;
360
- } ,
361
- } ,
360
+ }
361
+ }
362
362
] ) ;
363
363
364
364
return InfiniteScroll ;
@@ -377,7 +377,7 @@ InfiniteScroll.propTypes = {
377
377
getScrollParent : _propTypes2 . default . func ,
378
378
threshold : _propTypes2 . default . number ,
379
379
useCapture : _propTypes2 . default . bool ,
380
- useWindow : _propTypes2 . default . bool ,
380
+ useWindow : _propTypes2 . default . bool
381
381
} ;
382
382
InfiniteScroll . defaultProps = {
383
383
element : 'div' ,
@@ -390,7 +390,7 @@ InfiniteScroll.defaultProps = {
390
390
isReverse : false ,
391
391
useCapture : false ,
392
392
loader : null ,
393
- getScrollParent : null ,
393
+ getScrollParent : null
394
394
} ;
395
395
exports . default = InfiniteScroll ;
396
396
module . exports = exports [ 'default' ] ;
0 commit comments