1
- /*! react-sortablejs v1.5.0 | (c) 2019 Cheton Wu <[email protected] > | MIT | https://github.com/SortableJS/react-sortablejs */
1
+ /*! react-sortablejs v1.5.1 | (c) 2019 Cheton Wu <[email protected] > | MIT | https://github.com/SortableJS/react-sortablejs */
2
2
( function webpackUniversalModuleDefinition ( root , factory ) {
3
3
if ( typeof exports === 'object' && typeof module === 'object' )
4
4
module . exports = factory ( require ( "react" ) , require ( "sortablejs" ) ) ;
@@ -148,12 +148,12 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
148
148
149
149
function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
150
150
151
+ function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
152
+
151
153
function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
152
154
153
155
function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
154
156
155
- function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
156
-
157
157
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
158
158
159
159
var store = {
@@ -179,7 +179,7 @@ function (_Component) {
179
179
180
180
_this = _possibleConstructorReturn ( this , ( _getPrototypeOf2 = _getPrototypeOf ( Sortable ) ) . call . apply ( _getPrototypeOf2 , [ this ] . concat ( args ) ) ) ;
181
181
182
- _defineProperty ( _assertThisInitialized ( _assertThisInitialized ( _this ) ) , "sortable" , null ) ;
182
+ _defineProperty ( _assertThisInitialized ( _this ) , "sortable" , null ) ;
183
183
184
184
return _this ;
185
185
}
@@ -240,6 +240,17 @@ function (_Component) {
240
240
} ) ;
241
241
this . sortable = _sortablejs . default . create ( this . node , options ) ;
242
242
}
243
+ } , {
244
+ key : "shouldComponentUpdate" ,
245
+ value : function shouldComponentUpdate ( nextProps ) {
246
+ // If onChange is null, it is an UnControlled component
247
+ // Don't let React re-render it by setting return to false
248
+ if ( ! nextProps . onChange ) {
249
+ return false ;
250
+ }
251
+
252
+ return true ;
253
+ }
243
254
} , {
244
255
key : "componentWillUnmount" ,
245
256
value : function componentWillUnmount ( ) {
@@ -297,7 +308,7 @@ exports.default = _default;
297
308
* LICENSE file in the root directory of this source tree.
298
309
*/
299
310
300
- if ( false ) { var throwOnDirectAccess , isValidElement , REACT_ELEMENT_TYPE ; } else {
311
+ if ( false ) { var throwOnDirectAccess , ReactIs ; } else {
301
312
// By explicitly using `prop-types` you are opting into new production behavior.
302
313
// http://fb.me/prop-types-in-prod
303
314
module . exports = __webpack_require__ ( 3 ) ( ) ;
@@ -321,6 +332,8 @@ if (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else
321
332
var ReactPropTypesSecret = __webpack_require__ ( 4 ) ;
322
333
323
334
function emptyFunction ( ) { }
335
+ function emptyFunctionWithReset ( ) { }
336
+ emptyFunctionWithReset . resetWarningCache = emptyFunction ;
324
337
325
338
module . exports = function ( ) {
326
339
function shim ( props , propName , componentName , location , propFullName , secret ) {
@@ -354,16 +367,19 @@ module.exports = function() {
354
367
any : shim ,
355
368
arrayOf : getShim ,
356
369
element : shim ,
370
+ elementType : shim ,
357
371
instanceOf : getShim ,
358
372
node : shim ,
359
373
objectOf : getShim ,
360
374
oneOf : getShim ,
361
375
oneOfType : getShim ,
362
376
shape : getShim ,
363
- exact : getShim
377
+ exact : getShim ,
378
+
379
+ checkPropTypes : emptyFunctionWithReset ,
380
+ resetWarningCache : emptyFunction
364
381
} ;
365
382
366
- ReactPropTypes . checkPropTypes = emptyFunction ;
367
383
ReactPropTypes . PropTypes = ReactPropTypes ;
368
384
369
385
return ReactPropTypes ;
0 commit comments