react-isomorphic-tools
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.loadOnServer = exports.AsyncLoader = exports.Auth = exports.fetchToState = exports.setBaseUrl = exports.fetcher = exports.preload = undefined; | ||
exports.closeModal = exports.openModal = exports.loadOnServer = exports.AsyncLoader = exports.Auth = exports.fetchToState = exports.setBaseUrl = exports.fetcher = exports.preload = undefined; | ||
@@ -39,2 +39,17 @@ var _Preload = require('../Preload'); | ||
var _modals = require('../actions/modals'); | ||
Object.defineProperty(exports, 'openModal', { | ||
enumerable: true, | ||
get: function get() { | ||
return _modals.openModal; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'closeModal', { | ||
enumerable: true, | ||
get: function get() { | ||
return _modals.closeModal; | ||
} | ||
}); | ||
var _Auth2 = require('./Auth'); | ||
@@ -41,0 +56,0 @@ |
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -75,2 +75,37 @@ 'use strict'; | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function () { | ||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(nextProps) { | ||
return _regenerator2.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
if (!this.props.reloadOnPropsChange(this.props, nextProps)) { | ||
_context.next = 4; | ||
break; | ||
} | ||
_context.next = 3; | ||
return (0, _preload.loadData)(this.context.store, nextProps); | ||
case 3: | ||
this.setState({ | ||
props: nextProps | ||
}); | ||
case 4: | ||
case 'end': | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
function componentWillReceiveProps(_x) { | ||
return _ref.apply(this, arguments); | ||
} | ||
return componentWillReceiveProps; | ||
}() | ||
}, { | ||
key: 'shouldComponentUpdate', | ||
@@ -103,36 +138,4 @@ value: function shouldComponentUpdate(nextProps, nextState) { | ||
}; | ||
this.componentWillReceiveProps = function () { | ||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(nextProps) { | ||
return _regenerator2.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
if (!_this2.props.reloadOnPropsChange(_this2.props, nextProps)) { | ||
_context.next = 4; | ||
break; | ||
} | ||
_context.next = 3; | ||
return (0, _preload.loadData)(_this2.context.store, nextProps); | ||
case 3: | ||
_this2.setState({ | ||
props: nextProps | ||
}); | ||
case 4: | ||
case 'end': | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, _this2); | ||
})); | ||
return function (_x) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
}, _temp); | ||
exports.default = AsyncLoader; | ||
module.exports = exports['default']; |
@@ -6,4 +6,11 @@ 'use strict'; | ||
}); | ||
exports.ImmutableAuthentication = undefined; | ||
exports.default = function () { | ||
var _immutable = require('immutable'); | ||
var _immutable2 = _interopRequireDefault(_immutable); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var ImmutableAuthentication = function ImmutableAuthentication() { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _immutable2.default.Map({}); | ||
@@ -24,8 +31,2 @@ var action = arguments[1]; | ||
var _immutable = require('immutable'); | ||
var _immutable2 = _interopRequireDefault(_immutable); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
module.exports = exports['default']; | ||
exports.ImmutableAuthentication = ImmutableAuthentication; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.ImmutablePreloadReducer = exports.preloadReducer = exports.fetchData = exports.authentication = undefined; | ||
exports.ImmutableRoutingReducer = exports.ImmutableModals = exports.ImmutablePreloadReducer = exports.preloadReducer = exports.fetchData = exports.authentication = undefined; | ||
@@ -24,2 +24,20 @@ var _preload = require('./preload'); | ||
var _modals = require('./modals'); | ||
Object.defineProperty(exports, 'ImmutableModals', { | ||
enumerable: true, | ||
get: function get() { | ||
return _modals.ImmutableModals; | ||
} | ||
}); | ||
var _routing = require('./routing'); | ||
Object.defineProperty(exports, 'ImmutableRoutingReducer', { | ||
enumerable: true, | ||
get: function get() { | ||
return _routing.ImmutableRoutingReducer; | ||
} | ||
}); | ||
var _authentication2 = require('./authentication'); | ||
@@ -26,0 +44,0 @@ |
@@ -5,2 +5,3 @@ export {preload} from '../Preload' | ||
export AsyncLoader from '../Preload/AsyncLoader' | ||
export loadOnServer from '../helpers/loadOnServer' | ||
export loadOnServer from '../helpers/loadOnServer' | ||
export {openModal, closeModal} from '../actions/modals' |
@@ -39,3 +39,3 @@ import React from 'react' | ||
componentWillReceiveProps = async(nextProps) => { | ||
async componentWillReceiveProps(nextProps) { | ||
if (this.props.reloadOnPropsChange(this.props, nextProps)) { | ||
@@ -42,0 +42,0 @@ await loadData(this.context.store, nextProps) |
import Immutable from 'immutable' | ||
export default function (state = Immutable.Map({}), action) { | ||
switch (action.type){ | ||
const ImmutableAuthentication = (state = Immutable.Map({}), action) => { | ||
switch (action.type) { | ||
case 'LOGIN_SUCCESS': | ||
@@ -14,2 +14,4 @@ return state.set('user', Immutable.fromJS(action.payload)) | ||
} | ||
} | ||
} | ||
export {ImmutableAuthentication} |
export authentication from './authentication' | ||
export fetchData from './fetchData' | ||
export {preload as preloadReducer, ImmutablePreloadReducer} from './preload' | ||
export {preload as preloadReducer, ImmutablePreloadReducer} from './preload' | ||
export {ImmutableModals} from './modals' | ||
export {ImmutableRoutingReducer} from './routing' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66227
40
1687