4
4
module . exports = require ( './components/AltContainer.js' ) ;
5
5
6
6
} , { "./components/AltContainer.js" :2 } ] , 2 :[ function ( require , module , exports ) {
7
- ( function ( global ) {
8
7
/**
9
8
* AltContainer.
10
9
*
@@ -63,7 +62,7 @@ module.exports = require('./components/AltContainer.js');
63
62
*/
64
63
'use strict' ;
65
64
66
- var React = ( typeof window !== "undefined" ? window . React : typeof global !== "undefined" ? global . React : null ) ;
65
+ var React = ( window . React ) ;
67
66
var mixinContainer = require ( './mixinContainer' ) ;
68
67
var assign = require ( '../utils/functions' ) . assign ;
69
68
@@ -77,7 +76,6 @@ var AltContainer = React.createClass(assign({
77
76
78
77
module . exports = AltContainer ;
79
78
80
- } ) . call ( this , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } )
81
79
} , { "../utils/functions" :27 , "./mixinContainer" :3 } ] , 3 :[ function ( require , module , exports ) {
82
80
'use strict' ;
83
81
@@ -1593,11 +1591,12 @@ var StoreMixin = {
1593
1591
return x ;
1594
1592
} ;
1595
1593
1596
- var makeActionHandler = function makeActionHandler ( action ) {
1594
+ var makeActionHandler = function makeActionHandler ( action , isError ) {
1597
1595
return function ( x ) {
1598
1596
var fire = function fire ( ) {
1599
1597
loadCounter -= 1 ;
1600
1598
action ( intercept ( x , action , args ) ) ;
1599
+ if ( isError ) throw x ;
1601
1600
} ;
1602
1601
return typeof window === 'undefined' ? function ( ) {
1603
1602
return fire ( ) ;
@@ -1610,7 +1609,7 @@ var StoreMixin = {
1610
1609
loadCounter += 1 ;
1611
1610
/* istanbul ignore else */
1612
1611
if ( spec . loading ) spec . loading ( intercept ( null , spec . loading , args ) ) ;
1613
- return spec . remote . apply ( spec , [ state ] . concat ( args ) ) . then ( makeActionHandler ( spec . success ) ) [ 'catch' ] ( makeActionHandler ( spec . error ) ) ;
1612
+ return spec . remote . apply ( spec , [ state ] . concat ( args ) ) [ 'catch' ] ( makeActionHandler ( spec . error , 1 ) ) . then ( makeActionHandler ( spec . success ) ) ;
1614
1613
} else {
1615
1614
// otherwise emit the change now
1616
1615
_this . emitChange ( ) ;
@@ -1959,6 +1958,7 @@ var STATE_CONTAINER = (0, _esSymbol2['default'])();
1959
1958
exports . STATE_CONTAINER = STATE_CONTAINER ;
1960
1959
1961
1960
} , { "es-symbol" :5 } ] , 16 :[ function ( require , module , exports ) {
1961
+ /* istanbul ignore next */
1962
1962
'use strict' ;
1963
1963
1964
1964
Object . defineProperty ( exports , '__esModule' , {
@@ -1969,7 +1969,6 @@ exports.warn = warn;
1969
1969
exports . uid = uid ;
1970
1970
exports . formatAsConstant = formatAsConstant ;
1971
1971
exports . dispatchIdentity = dispatchIdentity ;
1972
- /* istanbul ignore next */
1973
1972
function NoopClass ( ) { }
1974
1973
1975
1974
var builtIns = Object . getOwnPropertyNames ( NoopClass ) ;
@@ -2163,16 +2162,6 @@ exports['default'] = ActionListeners;
2163
2162
module . exports = exports [ 'default' ] ;
2164
2163
2165
2164
} , { "es-symbol" :5 } ] , 19 :[ function ( require , module , exports ) {
2166
- 'use strict' ;
2167
-
2168
- Object . defineProperty ( exports , '__esModule' , {
2169
- value : true
2170
- } ) ;
2171
-
2172
- 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 ; } ; } ) ( ) ;
2173
-
2174
- function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
2175
-
2176
2165
/**
2177
2166
* AltManager(Alt: AltClass): undefined
2178
2167
*
@@ -2199,6 +2188,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
2199
2188
* ```
2200
2189
*/
2201
2190
2191
+ 'use strict' ;
2192
+
2193
+ Object . defineProperty ( exports , '__esModule' , {
2194
+ value : true
2195
+ } ) ;
2196
+
2197
+ 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 ; } ; } ) ( ) ;
2198
+
2199
+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
2200
+
2202
2201
var AltManager = ( function ( ) {
2203
2202
function AltManager ( Alt ) {
2204
2203
_classCallCheck ( this , AltManager ) ;
@@ -2494,12 +2493,12 @@ function atomic(alt) {
2494
2493
module . exports = exports [ 'default' ] ;
2495
2494
2496
2495
} , { "./functions" :24 , "./makeFinalStore" :25 } ] , 22 :[ function ( require , module , exports ) {
2496
+ /*global window*/
2497
2497
'use strict' ;
2498
2498
2499
2499
Object . defineProperty ( exports , '__esModule' , {
2500
2500
value : true
2501
2501
} ) ;
2502
- /*global window*/
2503
2502
exports [ 'default' ] = chromeDebug ;
2504
2503
2505
2504
function chromeDebug ( alt ) {
@@ -2510,7 +2509,6 @@ function chromeDebug(alt) {
2510
2509
module . exports = exports [ 'default' ] ;
2511
2510
2512
2511
} , { } ] , 23 :[ function ( require , module , exports ) {
2513
- ( function ( global ) {
2514
2512
/**
2515
2513
* 'Higher Order Component' that controls the props of a wrapped
2516
2514
* component via stores.
@@ -2564,7 +2562,7 @@ Object.defineProperty(exports, '__esModule', {
2564
2562
2565
2563
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
2566
2564
2567
- var _react = ( typeof window !== "undefined" ? window . React : typeof global !== "undefined" ? global . React : null ) ;
2565
+ var _react = ( window . React ) ;
2568
2566
2569
2567
var _react2 = _interopRequireDefault ( _react ) ;
2570
2568
@@ -2594,6 +2592,10 @@ function connectToStores(Component) {
2594
2592
stores . forEach ( function ( store ) {
2595
2593
store . listen ( _this . onChange ) ;
2596
2594
} ) ;
2595
+ var component = this . refs [ 'connectToStores-component' ] ;
2596
+ if ( typeof component . componentDidConnect === 'function' ) {
2597
+ component . componentDidConnect ( ) ;
2598
+ }
2597
2599
} ,
2598
2600
2599
2601
componentWillUnmount : function componentWillUnmount ( ) {
@@ -2610,7 +2612,9 @@ function connectToStores(Component) {
2610
2612
} ,
2611
2613
2612
2614
render : function render ( ) {
2613
- return _react2 [ 'default' ] . createElement ( Component , ( 0 , _functions . assign ) ( { } , this . props , this . state ) ) ;
2615
+ return _react2 [ 'default' ] . createElement ( Component , ( 0 , _functions . assign ) ( {
2616
+ ref : 'connectToStores-component'
2617
+ } , this . props , this . state ) ) ;
2614
2618
}
2615
2619
} ) ;
2616
2620
@@ -2620,7 +2624,6 @@ function connectToStores(Component) {
2620
2624
exports [ 'default' ] = connectToStores ;
2621
2625
module . exports = exports [ 'default' ] ;
2622
2626
2623
- } ) . call ( this , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } )
2624
2627
} , { "./functions" :24 } ] , 24 :[ function ( require , module , exports ) {
2625
2628
'use strict' ;
2626
2629
@@ -2655,12 +2658,6 @@ function assign(target) {
2655
2658
}
2656
2659
2657
2660
} , { } ] , 25 :[ function ( require , module , exports ) {
2658
- "use strict" ;
2659
-
2660
- Object . defineProperty ( exports , "__esModule" , {
2661
- value : true
2662
- } ) ;
2663
- exports [ "default" ] = makeFinalStore ;
2664
2661
/**
2665
2662
* makeFinalStore(alt: AltInstance): AltStore
2666
2663
*
@@ -2685,6 +2682,12 @@ exports["default"] = makeFinalStore;
2685
2682
* ```
2686
2683
*/
2687
2684
2685
+ "use strict" ;
2686
+
2687
+ Object . defineProperty ( exports , "__esModule" , {
2688
+ value : true
2689
+ } ) ;
2690
+ exports [ "default" ] = makeFinalStore ;
2688
2691
function FinalStore ( ) {
2689
2692
var _this = this ;
2690
2693
@@ -2707,7 +2710,6 @@ function makeFinalStore(alt) {
2707
2710
module . exports = exports [ "default" ] ;
2708
2711
2709
2712
} , { } ] , 26 :[ function ( require , module , exports ) {
2710
- ( function ( global ) {
2711
2713
'use strict' ;
2712
2714
2713
2715
Object . defineProperty ( exports , '__esModule' , {
@@ -2717,7 +2719,7 @@ exports['default'] = withAltContext;
2717
2719
2718
2720
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
2719
2721
2720
- var _react = ( typeof window !== "undefined" ? window . React : typeof global !== "undefined" ? global . React : null ) ;
2722
+ var _react = ( window . React ) ;
2721
2723
2722
2724
var _react2 = _interopRequireDefault ( _react ) ;
2723
2725
@@ -2741,7 +2743,6 @@ function withAltContext(flux) {
2741
2743
2742
2744
module . exports = exports [ 'default' ] ;
2743
2745
2744
- } ) . call ( this , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } )
2745
2746
} , { } ] , 27 :[ function ( require , module , exports ) {
2746
2747
'use strict' ;
2747
2748
0 commit comments