redux-router-kit
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -62,3 +62,3 @@ 'use strict'; | ||
}, | ||
componentWillMount: function componentWillMount() { | ||
UNSAFE_componentWillMount: function UNSAFE_componentWillMount() { | ||
var _this = this; | ||
@@ -145,3 +145,3 @@ | ||
}, | ||
componentWillReceiveProps: function componentWillReceiveProps(_ref3) { | ||
UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(_ref3) { | ||
var url = _ref3.url, | ||
@@ -148,0 +148,0 @@ state = _ref3.state, |
@@ -223,6 +223,8 @@ 'use strict'; | ||
var normalizeRoute = function normalizeRoute(pathPattern, value) { | ||
var isComponent = typeof value === 'function' || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.hasOwnProperty('$$typeof'); | ||
var route = { | ||
path: pathPattern | ||
}; | ||
if (typeof value === 'function') { | ||
if (isComponent) { | ||
return _extends({}, route, { | ||
@@ -314,3 +316,5 @@ component: value | ||
if (typeof component !== 'function' && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) { | ||
var isComponent = typeof component === 'function' || (typeof component === 'undefined' ? 'undefined' : _typeof(component)) === 'object' && component.hasOwnProperty('$$typeof'); | ||
if (!isComponent && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) { | ||
return childElement; | ||
@@ -733,3 +737,3 @@ } | ||
}, | ||
componentWillMount: function componentWillMount() { | ||
UNSAFE_componentWillMount: function UNSAFE_componentWillMount() { | ||
var _this = this; | ||
@@ -816,3 +820,3 @@ | ||
}, | ||
componentWillReceiveProps: function componentWillReceiveProps(_ref3) { | ||
UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(_ref3) { | ||
var url = _ref3.url, | ||
@@ -819,0 +823,0 @@ state = _ref3.state, |
@@ -38,3 +38,5 @@ 'use strict'; | ||
if (typeof component !== 'function' && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) { | ||
var isComponent = typeof component === 'function' || (typeof component === 'undefined' ? 'undefined' : _typeof(component)) === 'object' && component.hasOwnProperty('$$typeof'); | ||
if (!isComponent && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) { | ||
return childElement; | ||
@@ -41,0 +43,0 @@ } |
@@ -7,6 +7,6 @@ 'use strict'; | ||
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; }; | ||
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; }; | ||
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; }; | ||
/** | ||
@@ -18,6 +18,8 @@ * "Normalizes" routes to be an object with a `path`. If a route points directly | ||
var normalizeRoute = function normalizeRoute(pathPattern, value) { | ||
var isComponent = typeof value === 'function' || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.hasOwnProperty('$$typeof'); | ||
var route = { | ||
path: pathPattern | ||
}; | ||
if (typeof value === 'function') { | ||
if (isComponent) { | ||
return _extends({}, route, { | ||
@@ -24,0 +26,0 @@ component: value |
{ | ||
"name": "redux-router-kit", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Routing tools for React+Redux", | ||
@@ -39,10 +39,9 @@ "main": "lib/index.js", | ||
"babel-register": "^6.7.2", | ||
"create-react-class": "^15.6.2", | ||
"eslint": "^2.5.3", | ||
"eslint-plugin-react": "^4.2.3", | ||
"jsdom": "^8.2.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react-redux": "^4.4.1", | ||
"redux": "^3.3.1", | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"react-redux": "^7.2.0", | ||
"redux": "^4.0.5", | ||
"rollup": "^0.41.6", | ||
@@ -53,2 +52,3 @@ "rollup-plugin-babel": "^2.7.1", | ||
"dependencies": { | ||
"create-react-class": "15.6.3", | ||
"history": "^2.0.1", | ||
@@ -61,4 +61,6 @@ "path-to-regexp": "^1.2.1", | ||
"peerDependencies": { | ||
"react": ">= 16.0.0", | ||
"react-dom": ">= 16.0.0" | ||
"react": ">= 16.9.0", | ||
"react-dom": ">= 16.9.0", | ||
"react-redux": ">= 7.0.0", | ||
"redux": ">= 4.0.0" | ||
}, | ||
@@ -65,0 +67,0 @@ "ava": { |
@@ -305,3 +305,3 @@ # Redux Router Kit | ||
(dispatch) => { | ||
routeTo(..args) { | ||
routeTo(...args) { | ||
dispatch(routeTo(...args)); | ||
@@ -308,0 +308,0 @@ } |
@@ -51,3 +51,3 @@ /** | ||
componentWillMount() { | ||
UNSAFE_componentWillMount() { | ||
const { shouldEmitCrossOriginLinks } = this.props; | ||
@@ -130,3 +130,3 @@ this.history = this.props.history || createHistory(); | ||
componentWillReceiveProps({url, state, isWaiting}) { | ||
UNSAFE_componentWillReceiveProps({url, state, isWaiting}) { | ||
// Cancel synchronously. | ||
@@ -133,0 +133,0 @@ if (this.waitingUrl != null && !isWaiting) { |
@@ -18,3 +18,6 @@ /** | ||
const { component, components } = route; | ||
if (typeof component !== 'function' && (!component || typeof components !== 'object')) { | ||
const isComponent = typeof component === 'function' || | ||
(typeof component === 'object' && component.hasOwnProperty('$$typeof')); | ||
if (!isComponent && (!component || typeof components !== 'object')) { | ||
return childElement; | ||
@@ -21,0 +24,0 @@ } |
@@ -7,9 +7,12 @@ /** | ||
const normalizeRoute = (pathPattern, value) => { | ||
const isComponent = typeof value === 'function' || | ||
(typeof value === 'object' && value.hasOwnProperty('$$typeof')); | ||
const route = { | ||
path: pathPattern | ||
path: pathPattern, | ||
}; | ||
if (typeof value === 'function') { | ||
if (isComponent) { | ||
return { | ||
...route, | ||
component: value | ||
component: value, | ||
}; | ||
@@ -23,3 +26,3 @@ } | ||
...value, | ||
...route | ||
...route, | ||
}; | ||
@@ -30,3 +33,3 @@ } | ||
...route, | ||
name: value | ||
name: value, | ||
}; | ||
@@ -36,3 +39,3 @@ } | ||
...route, | ||
value | ||
value, | ||
}; | ||
@@ -39,0 +42,0 @@ }; |
Sorry, the diff of this file is not supported yet
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
19
70
4788
206247
10
+ Addedcreate-react-class@15.6.3
+ Added@types/use-sync-external-store@0.0.3(transitive)
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedcreate-react-class@15.6.3(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfbjs@0.8.18(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedreact-redux@9.1.2(transitive)
+ Addedredux@5.0.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedua-parser-js@0.7.39(transitive)
+ Addeduse-sync-external-store@1.2.2(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)