@@ -52,23 +52,31 @@ return /******/ (function(modules) { // webpackBootstrap
52
52
/************************************************************************/
53
53
/******/ ( [
54
54
/* 0 */
55
- /***/ function ( module , exports , __webpack_require__ ) {
55
+ /***/ ( function ( module , exports , __webpack_require__ ) {
56
56
57
57
module . exports = __webpack_require__ ( 1 ) ;
58
58
59
59
60
- /***/ } ,
60
+ /***/ } ) ,
61
61
/* 1 */
62
- /***/ function ( module , exports , __webpack_require__ ) {
62
+ /***/ ( function ( module , exports , __webpack_require__ ) {
63
63
64
64
'use strict' ;
65
65
66
66
Object . defineProperty ( exports , '__esModule' , {
67
67
value : true
68
68
} ) ;
69
69
70
+ 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 ; } ; } ) ( ) ;
71
+
72
+ var _get = function get ( _x2 , _x3 , _x4 ) { var _again = true ; _function: while ( _again ) { var object = _x2 , property = _x3 , receiver = _x4 ; desc = parent = getter = undefined ; _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 { _x2 = parent ; _x3 = property ; _x4 = receiver ; _again = true ; continue _function; } } else if ( 'value' in desc ) { return desc . value ; } else { var getter = desc . get ; if ( getter === undefined ) { return undefined ; } return getter . call ( receiver ) ; } } } ;
73
+
70
74
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
71
75
76
+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
77
+
78
+ 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 ) subClass . __proto__ = superClass ; }
79
+
72
80
var _react = __webpack_require__ ( 2 ) ;
73
81
74
82
var _react2 = _interopRequireDefault ( _react ) ;
@@ -106,43 +114,59 @@ return /******/ (function(modules) { // webpackBootstrap
106
114
throw new Error ( 'connectToStores() expects the wrapped component to have a static getPropsFromStores() method' ) ;
107
115
}
108
116
109
- var StoreConnection = _react2 [ 'default' ] . createClass ( {
110
- displayName : 'StoreConnection' ,
117
+ var StoreConnection = ( function ( _React$Component ) {
118
+ function StoreConnection ( ) {
119
+ _classCallCheck ( this , StoreConnection ) ;
111
120
112
- getInitialState : function getInitialState ( ) {
113
- return Spec . getPropsFromStores ( this . props , this . context ) ;
114
- } ,
115
-
116
- componentWillReceiveProps : function componentWillReceiveProps ( nextProps ) {
117
- this . setState ( Spec . getPropsFromStores ( nextProps , this . context ) ) ;
118
- } ,
121
+ _get ( Object . getPrototypeOf ( StoreConnection . prototype ) , 'constructor' , this ) . apply ( this , arguments ) ;
122
+ }
119
123
120
- componentDidMount : function componentDidMount ( ) {
121
- var _this = this ;
124
+ _inherits ( StoreConnection , _React$Component ) ;
122
125
123
- var stores = Spec . getStores ( this . props , this . context ) ;
124
- this . storeListeners = stores . map ( function ( store ) {
125
- return store . listen ( _this . onChange ) ;
126
- } ) ;
127
- if ( Spec . componentDidConnect ) {
128
- Spec . componentDidConnect ( this . props , this . context ) ;
126
+ _createClass ( StoreConnection , [ {
127
+ key : 'getInitialState' ,
128
+ value : function getInitialState ( ) {
129
+ return Spec . getPropsFromStores ( this . props , this . context ) ;
129
130
}
130
- } ,
131
-
132
- componentWillUnmount : function componentWillUnmount ( ) {
133
- this . storeListeners . forEach ( function ( unlisten ) {
134
- return unlisten ( ) ;
135
- } ) ;
136
- } ,
137
-
138
- onChange : function onChange ( ) {
139
- this . setState ( Spec . getPropsFromStores ( this . props , this . context ) ) ;
140
- } ,
131
+ } , {
132
+ key : 'componentWillReceiveProps' ,
133
+ value : function componentWillReceiveProps ( nextProps ) {
134
+ this . setState ( Spec . getPropsFromStores ( nextProps , this . context ) ) ;
135
+ }
136
+ } , {
137
+ key : 'componentDidMount' ,
138
+ value : function componentDidMount ( ) {
139
+ var _this = this ;
140
+
141
+ var stores = Spec . getStores ( this . props , this . context ) ;
142
+ this . storeListeners = stores . map ( function ( store ) {
143
+ return store . listen ( _this . onChange ) ;
144
+ } ) ;
145
+ if ( Spec . componentDidConnect ) {
146
+ Spec . componentDidConnect ( this . props , this . context ) ;
147
+ }
148
+ }
149
+ } , {
150
+ key : 'componentWillUnmount' ,
151
+ value : function componentWillUnmount ( ) {
152
+ this . storeListeners . forEach ( function ( unlisten ) {
153
+ return unlisten ( ) ;
154
+ } ) ;
155
+ }
156
+ } , {
157
+ key : 'onChange' ,
158
+ value : function onChange ( ) {
159
+ this . setState ( Spec . getPropsFromStores ( this . props , this . context ) ) ;
160
+ }
161
+ } , {
162
+ key : 'render' ,
163
+ value : function render ( ) {
164
+ return _react2 [ 'default' ] . createElement ( Component , assign ( { } , this . props , this . state ) ) ;
165
+ }
166
+ } ] ) ;
141
167
142
- render : function render ( ) {
143
- return _react2 [ 'default' ] . createElement ( Component , assign ( { } , this . props , this . state ) ) ;
144
- }
145
- } ) ;
168
+ return StoreConnection ;
169
+ } ) ( _react2 [ 'default' ] . Component ) ;
146
170
147
171
return StoreConnection ;
148
172
} ) ( ) ;
@@ -151,13 +175,13 @@ return /******/ (function(modules) { // webpackBootstrap
151
175
exports [ 'default' ] = connectToStores ;
152
176
module . exports = exports [ 'default' ] ;
153
177
154
- /***/ } ,
178
+ /***/ } ) ,
155
179
/* 2 */
156
- /***/ function ( module , exports ) {
180
+ /***/ ( function ( module , exports ) {
157
181
158
182
module . exports = __WEBPACK_EXTERNAL_MODULE_2__ ;
159
183
160
- /***/ }
184
+ /***/ } )
161
185
/******/ ] )
162
186
} ) ;
163
187
;
0 commit comments