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 */ 22( function webpackUniversalModuleDefinition ( root , factory ) {
33 if ( typeof exports === 'object' && typeof module === 'object' )
44 module . exports = factory ( require ( "react" ) , require ( "sortablejs" ) ) ;
@@ -148,12 +148,12 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
148148
149149function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
150150
151+ function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
152+
151153function _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 ) ; }
152154
153155function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
154156
155- function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
156-
157157function _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 ; }
158158
159159var store = {
@@ -179,7 +179,7 @@ function (_Component) {
179179
180180 _this = _possibleConstructorReturn ( this , ( _getPrototypeOf2 = _getPrototypeOf ( Sortable ) ) . call . apply ( _getPrototypeOf2 , [ this ] . concat ( args ) ) ) ;
181181
182- _defineProperty ( _assertThisInitialized ( _assertThisInitialized ( _this ) ) , "sortable" , null ) ;
182+ _defineProperty ( _assertThisInitialized ( _this ) , "sortable" , null ) ;
183183
184184 return _this ;
185185 }
@@ -240,6 +240,17 @@ function (_Component) {
240240 } ) ;
241241 this . sortable = _sortablejs . default . create ( this . node , options ) ;
242242 }
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+ }
243254 } , {
244255 key : "componentWillUnmount" ,
245256 value : function componentWillUnmount ( ) {
@@ -297,7 +308,7 @@ exports.default = _default;
297308 * LICENSE file in the root directory of this source tree.
298309 */
299310
300- if ( false ) { var throwOnDirectAccess , isValidElement , REACT_ELEMENT_TYPE ; } else {
311+ if ( false ) { var throwOnDirectAccess , ReactIs ; } else {
301312 // By explicitly using `prop-types` you are opting into new production behavior.
302313 // http://fb.me/prop-types-in-prod
303314 module . exports = __webpack_require__ ( 3 ) ( ) ;
@@ -321,6 +332,8 @@ if (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else
321332var ReactPropTypesSecret = __webpack_require__ ( 4 ) ;
322333
323334function emptyFunction ( ) { }
335+ function emptyFunctionWithReset ( ) { }
336+ emptyFunctionWithReset . resetWarningCache = emptyFunction ;
324337
325338module . exports = function ( ) {
326339 function shim ( props , propName , componentName , location , propFullName , secret ) {
@@ -354,16 +367,19 @@ module.exports = function() {
354367 any : shim ,
355368 arrayOf : getShim ,
356369 element : shim ,
370+ elementType : shim ,
357371 instanceOf : getShim ,
358372 node : shim ,
359373 objectOf : getShim ,
360374 oneOf : getShim ,
361375 oneOfType : getShim ,
362376 shape : getShim ,
363- exact : getShim
377+ exact : getShim ,
378+
379+ checkPropTypes : emptyFunctionWithReset ,
380+ resetWarningCache : emptyFunction
364381 } ;
365382
366- ReactPropTypes . checkPropTypes = emptyFunction ;
367383 ReactPropTypes . PropTypes = ReactPropTypes ;
368384
369385 return ReactPropTypes ;
0 commit comments