88 exports [ "ReactSortable" ] = factory ( require ( "react" ) , require ( "react-dom" ) , require ( "sortablejs" ) ) ;
99 else
1010 root [ "ReactSortable" ] = factory ( root [ "React" ] , root [ "ReactDOM" ] , root [ "Sortable" ] ) ;
11- } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_1__ , __WEBPACK_EXTERNAL_MODULE_2__ , __WEBPACK_EXTERNAL_MODULE_3__ ) {
11+ } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_0__ , __WEBPACK_EXTERNAL_MODULE_1__ , __WEBPACK_EXTERNAL_MODULE_2__ ) {
1212return /******/ ( function ( modules ) { // webpackBootstrap
1313/******/ // The module cache
1414/******/ var installedModules = { } ;
@@ -22,16 +22,16 @@ return /******/ (function(modules) { // webpackBootstrap
2222
2323/******/ // Create a new module (and put it into the cache)
2424/******/ var module = installedModules [ moduleId ] = {
25- /******/ exports : { } ,
26- /******/ id : moduleId ,
27- /******/ loaded : false
25+ /******/ i : moduleId ,
26+ /******/ l : false ,
27+ /******/ exports : { }
2828/******/ } ;
2929
3030/******/ // Execute the module function
3131/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
3232
3333/******/ // Flag the module as loaded
34- /******/ module . loaded = true ;
34+ /******/ module . l = true ;
3535
3636/******/ // Return the exports of the module
3737/******/ return module . exports ;
@@ -44,179 +44,205 @@ return /******/ (function(modules) { // webpackBootstrap
4444/******/ // expose the module cache
4545/******/ __webpack_require__ . c = installedModules ;
4646
47+ /******/ // identity function for calling harmony imports with the correct context
48+ /******/ __webpack_require__ . i = function ( value ) { return value ; } ;
49+
50+ /******/ // define getter function for harmony exports
51+ /******/ __webpack_require__ . d = function ( exports , name , getter ) {
52+ /******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
53+ /******/ Object . defineProperty ( exports , name , {
54+ /******/ configurable : false ,
55+ /******/ enumerable : true ,
56+ /******/ get : getter
57+ /******/ } ) ;
58+ /******/ }
59+ /******/ } ;
60+
61+ /******/ // getDefaultExport function for compatibility with non-harmony modules
62+ /******/ __webpack_require__ . n = function ( module ) {
63+ /******/ var getter = module && module . __esModule ?
64+ /******/ function getDefault ( ) { return module [ 'default' ] ; } :
65+ /******/ function getModuleExports ( ) { return module ; } ;
66+ /******/ __webpack_require__ . d ( getter , 'a' , getter ) ;
67+ /******/ return getter ;
68+ /******/ } ;
69+
70+ /******/ // Object.prototype.hasOwnProperty.call
71+ /******/ __webpack_require__ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
72+
4773/******/ // __webpack_public_path__
4874/******/ __webpack_require__ . p = "" ;
4975
5076/******/ // Load entry module and return exports
51- /******/ return __webpack_require__ ( 0 ) ;
77+ /******/ return __webpack_require__ ( __webpack_require__ . s = 3 ) ;
5278/******/ } )
5379/************************************************************************/
5480/******/ ( [
5581/* 0 */
56- /***/ function ( module , exports , __webpack_require__ ) {
82+ /***/ ( function ( module , exports ) {
83+
84+ module . exports = __WEBPACK_EXTERNAL_MODULE_0__ ;
5785
58- 'use strict' ;
86+ /***/ } ) ,
87+ /* 1 */
88+ /***/ ( function ( module , exports ) {
5989
60- var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
90+ module . exports = __WEBPACK_EXTERNAL_MODULE_1__ ;
6191
62- var _extends = Object . assign || function ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] ; for ( var key in source ) { if ( Object . prototype . hasOwnProperty . call ( source , key ) ) { target [ key ] = source [ key ] ; } } } return target ; } ;
92+ /***/ } ) ,
93+ /* 2 */
94+ /***/ ( function ( module , exports ) {
6395
64- var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
96+ module . exports = __WEBPACK_EXTERNAL_MODULE_2__ ;
6597
66- var _class , _temp2 ;
98+ /***/ } ) ,
99+ /* 3 */
100+ /***/ ( function ( module , exports , __webpack_require__ ) {
67101
68- var _react = __webpack_require__ ( 1 ) ;
102+ "use strict" ;
69103
70- var _react2 = _interopRequireDefault ( _react ) ;
71104
72- var _reactDom = __webpack_require__ ( 2 ) ;
105+ var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
73106
74- var _reactDom2 = _interopRequireDefault ( _reactDom ) ;
107+ var _extends = Object . assign || function ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] ; for ( var key in source ) { if ( Object . prototype . hasOwnProperty . call ( source , key ) ) { target [ key ] = source [ key ] ; } } } return target ; } ;
75108
76- var _sortablejs = __webpack_require__ ( 3 ) ;
109+ var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
77110
78- var _sortablejs2 = _interopRequireDefault ( _sortablejs ) ;
111+ var _class , _temp2 ;
79112
80- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
113+ var _react = __webpack_require__ ( 0 ) ;
81114
82- function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
115+ var _react2 = _interopRequireDefault ( _react ) ;
83116
84- function _possibleConstructorReturn ( self , call ) { if ( ! self ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return call && ( typeof call === "object" || typeof call === "function" ) ? call : self ; }
117+ var _reactDom = __webpack_require__ ( 1 ) ;
85118
86- 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 ; }
119+ var _reactDom2 = _interopRequireDefault ( _reactDom ) ;
87120
88- var store = {
89- nextSibling : null ,
90- activeComponent : null
91- } ;
121+ var _sortablejs = __webpack_require__ ( 2 ) ;
92122
93- module . exports = ( _temp2 = _class = function ( _React$Component ) {
94- _inherits ( _class , _React$Component ) ;
123+ var _sortablejs2 = _interopRequireDefault ( _sortablejs ) ;
95124
96- function _class ( ) {
97- var _ref ;
125+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
98126
99- var _temp , _this , _ret ;
127+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
100128
101- _classCallCheck ( this , _class ) ;
129+ function _possibleConstructorReturn ( self , call ) { if ( ! self ) { throw new ReferenceError ( " this hasn't been initialised - super() hasn't been called" ) ; } return call && ( typeof call === "object" || typeof call === "function" ) ? call : self ; }
102130
103- for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
104- args [ _key ] = arguments [ _key ] ;
105- }
131+ 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 ; }
106132
107- return _ret = ( _temp = ( _this = _possibleConstructorReturn ( this , ( _ref = _class . __proto__ || Object . getPrototypeOf ( _class ) ) . call . apply ( _ref , [ this ] . concat ( args ) ) ) , _this ) , _this . sortable = null , _temp ) , _possibleConstructorReturn ( _this , _ret ) ;
108- }
133+ var store = {
134+ nextSibling : null ,
135+ activeComponent : null
136+ } ;
109137
110- _createClass ( _class , [ {
111- key : 'componentDidMount' ,
112- value : function componentDidMount ( ) {
113- var _this2 = this ;
138+ module . exports = ( _temp2 = _class = function ( _React$Component ) {
139+ _inherits ( _class , _React$Component ) ;
114140
115- var options = _extends ( { } , this . props . options ) ;
141+ function _class ( ) {
142+ var _ref ;
116143
117- [ 'onChoose' , 'onStart' , 'onEnd' , 'onAdd' , 'onUpdate' , 'onSort' , 'onRemove' , 'onFilter' , 'onMove' , 'onClone' ] . forEach ( function ( name ) {
118- var eventHandler = options [ name ] ;
144+ var _temp , _this , _ret ;
119145
120- options [ name ] = function ( ) {
121- for ( var _len2 = arguments . length , params = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
122- params [ _key2 ] = arguments [ _key2 ] ;
123- }
146+ _classCallCheck ( this , _class ) ;
124147
125- var evt = params [ 0 ] ;
148+ for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
149+ args [ _key ] = arguments [ _key ] ;
150+ }
126151
152+ return _ret = ( _temp = ( _this = _possibleConstructorReturn ( this , ( _ref = _class . __proto__ || Object . getPrototypeOf ( _class ) ) . call . apply ( _ref , [ this ] . concat ( args ) ) ) , _this ) , _this . sortable = null , _temp ) , _possibleConstructorReturn ( _this , _ret ) ;
153+ }
127154
128- if ( name === 'onChoose' ) {
129- store . nextSibling = evt . item . nextElementSibling ;
130- store . activeComponent = _this2 ;
131- } else if ( ( name === 'onAdd' || name === 'onUpdate' ) && _this2 . props . onChange ) {
132- var items = _this2 . sortable . toArray ( ) ;
133- var remote = store . activeComponent ;
134- var remoteItems = remote . sortable . toArray ( ) ;
155+ _createClass ( _class , [ {
156+ key : 'componentDidMount' ,
157+ value : function componentDidMount ( ) {
158+ var _this2 = this ;
135159
136- evt . from . insertBefore ( evt . item , store . nextSibling ) ;
160+ var options = _extends ( { } , this . props . options ) ;
137161
138- if ( remote !== _this2 ) {
139- var remoteOptions = remote . props . options || { } ;
162+ [ 'onChoose' , 'onStart' , 'onEnd' , 'onAdd' , 'onUpdate' , 'onSort' , 'onRemove' , 'onFilter' , 'onMove' , 'onClone' ] . forEach ( function ( name ) {
163+ var eventHandler = options [ name ] ;
140164
141- if ( _typeof ( remoteOptions . group ) === 'object' && remoteOptions . group . pull === 'clone' ) {
142- // Remove the node with the same data-reactid
143- evt . item . parentNode . removeChild ( evt . item ) ;
144- }
165+ options [ name ] = function ( ) {
166+ for ( var _len2 = arguments . length , params = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
167+ params [ _key2 ] = arguments [ _key2 ] ;
168+ }
145169
146- remote . props . onChange && remote . props . onChange ( remoteItems , remote . sortable , evt ) ;
147- }
170+ var evt = params [ 0 ] ;
148171
149- _this2 . props . onChange && _this2 . props . onChange ( items , _this2 . sortable , evt ) ;
150- }
151172
152- if ( evt . type === 'move' ) {
153- var _evt = params [ 0 ] ,
154- originalEvent = params [ 1 ] ;
173+ if ( name === 'onChoose' ) {
174+ store . nextSibling = evt . item . nextElementSibling ;
175+ store . activeComponent = _this2 ;
176+ } else if ( ( name === 'onAdd' || name === 'onUpdate' ) && _this2 . props . onChange ) {
177+ var items = _this2 . sortable . toArray ( ) ;
178+ var remote = store . activeComponent ;
179+ var remoteItems = remote . sortable . toArray ( ) ;
155180
156- var canMove = eventHandler ? eventHandler ( _evt , originalEvent ) : true ;
157- return canMove ;
158- }
181+ evt . from . insertBefore ( evt . item , store . nextSibling ) ;
159182
160- setTimeout ( function ( ) {
161- eventHandler && eventHandler ( evt ) ;
162- } , 0 ) ;
163- } ;
164- } ) ;
183+ if ( remote !== _this2 ) {
184+ var remoteOptions = remote . props . options || { } ;
165185
166- this . sortable = _sortablejs2 . default . create ( _reactDom2 . default . findDOMNode ( this ) , options ) ;
167- }
168- } , {
169- key : 'componentWillUnmount' ,
170- value : function componentWillUnmount ( ) {
171- if ( this . sortable ) {
172- this . sortable . destroy ( ) ;
173- this . sortable = null ;
174- }
175- }
176- } , {
177- key : 'render' ,
178- value : function render ( ) {
179- var _props = this . props ,
180- children = _props . children ,
181- className = _props . className ,
182- tag = _props . tag ,
183- style = _props . style ;
184-
185- return _react2 . default . DOM [ tag ] ( { className : className , style : style } , children ) ;
186- }
187- } ] ) ;
188-
189- return _class ;
190- } ( _react2 . default . Component ) , _class . propTypes = {
191- options : _react2 . default . PropTypes . object ,
192- onChange : _react2 . default . PropTypes . func ,
193- tag : _react2 . default . PropTypes . string ,
194- style : _react2 . default . PropTypes . object
195- } , _class . defaultProps = {
196- options : { } ,
197- tag : 'div' ,
198- style : { }
199- } , _temp2 ) ;
200-
201- /***/ } ,
202- /* 1 */
203- /***/ function ( module , exports ) {
186+ if ( _typeof ( remoteOptions . group ) === 'object' && remoteOptions . group . pull === 'clone' ) {
187+ // Remove the node with the same data-reactid
188+ evt . item . parentNode . removeChild ( evt . item ) ;
189+ }
204190
205- module . exports = __WEBPACK_EXTERNAL_MODULE_1__ ;
191+ remote . props . onChange && remote . props . onChange ( remoteItems , remote . sortable , evt ) ;
192+ }
206193
207- /***/ } ,
208- /* 2 */
209- /***/ function ( module , exports ) {
194+ _this2 . props . onChange && _this2 . props . onChange ( items , _this2 . sortable , evt ) ;
195+ }
210196
211- module . exports = __WEBPACK_EXTERNAL_MODULE_2__ ;
197+ if ( evt . type === 'move' ) {
198+ var _evt = params [ 0 ] ,
199+ originalEvent = params [ 1 ] ;
212200
213- /***/ } ,
214- /* 3 */
215- /***/ function ( module , exports ) {
201+ var canMove = eventHandler ? eventHandler ( _evt , originalEvent ) : true ;
202+ return canMove ;
203+ }
216204
217- module . exports = __WEBPACK_EXTERNAL_MODULE_3__ ;
205+ setTimeout ( function ( ) {
206+ eventHandler && eventHandler ( evt ) ;
207+ } , 0 ) ;
208+ } ;
209+ } ) ;
218210
219- /***/ }
220- /******/ ] )
221- } ) ;
222- ;
211+ this . sortable = _sortablejs2 . default . create ( _reactDom2 . default . findDOMNode ( this ) , options ) ;
212+ }
213+ } , {
214+ key : 'componentWillUnmount' ,
215+ value : function componentWillUnmount ( ) {
216+ if ( this . sortable ) {
217+ this . sortable . destroy ( ) ;
218+ this . sortable = null ;
219+ }
220+ }
221+ } , {
222+ key : 'render' ,
223+ value : function render ( ) {
224+ var _props = this . props ,
225+ children = _props . children ,
226+ className = _props . className ,
227+ tag = _props . tag ,
228+ style = _props . style ;
229+
230+ return _react2 . default . DOM [ tag ] ( { className : className , style : style } , children ) ;
231+ }
232+ } ] ) ;
233+
234+ return _class ;
235+ } ( _react2 . default . Component ) , _class . propTypes = {
236+ options : _react2 . default . PropTypes . object ,
237+ onChange : _react2 . default . PropTypes . func ,
238+ tag : _react2 . default . PropTypes . string ,
239+ style : _react2 . default . PropTypes . object
240+ } , _class . defaultProps = {
241+ options : { } ,
242+ tag : 'div' ,
243+ style : { }
244+ } , _temp2 ) ;
245+
246+ /***/ } )
247+ /******/ ] ) ;
248+ } ) ;
0 commit comments