react-redux
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -220,5 +220,5 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var defaultMapStateToProps = function defaultMapStateToProps() { | ||
var defaultMapStateToProps = function defaultMapStateToProps(state) { | ||
return {}; | ||
}; | ||
}; // eslint-disable-line no-unused-vars | ||
var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { | ||
@@ -225,0 +225,0 @@ return { dispatch: dispatch }; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],t):"object"==typeof exports?exports.ReactRedux=t(require("react"),require("redux")):e.ReactRedux=t(e.React,e.Redux)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=r(3),s=n(o),i=r(4),u=n(i);t.Provider=s.default,t.connect=u.default},function(t,r){t.exports=e},function(e,t,r){"use strict";t.__esModule=!0;var n=r(1);t.default=n.PropTypes.shape({subscribe:n.PropTypes.func.isRequired,dispatch:n.PropTypes.func.isRequired,getState:n.PropTypes.func.isRequired})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){f||(f=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}t.__esModule=!0,t.default=void 0;var a=r(1),c=r(2),p=n(c),f=!1,d=function(e){function t(r,n){o(this,t);var i=s(this,e.call(this,r,n));return i.store=r.store,i}return i(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.componentWillReceiveProps=function(e){var t=this.store,r=e.store;t!==r&&u()},t.prototype.render=function(){var e=this.props.children;return a.Children.only(e)},t}(a.Component);t.default=d,d.propTypes={store:p.default.isRequired,children:a.PropTypes.element.isRequired},d.childContextTypes={store:p.default.isRequired}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function a(e,t,r){function n(e,t){var r=e.getState(),n=j?m(r,t):m(r);return(0,w.default)((0,b.default)(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function a(e,t){var r=e.dispatch,n=R?g(r,t):g(r);return(0,w.default)((0,b.default)(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function f(e,t,r){var n=x(e,t,r);return(0,w.default)((0,b.default)(n),"`mergeProps` must return an object. Instead received %s.",n),n}var l=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],y=Boolean(e),m=e||C,g=(0,b.default)(t)?(0,v.default)(t):t||S,x=r||O,j=1!==m.length,R=1!==g.length,T=l.pure,E=void 0===T?!0:T,M=l.withRef,I=void 0===M?!1:M,q=_++;return function(e){var t=function(t){function r(e,n){o(this,r);var i=s(this,t.call(this,e,n));i.version=q,i.store=e.store||n.store,(0,w.default)(i.store,'Could not find "store" in either the context or '+('props of "'+i.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+i.constructor.displayName+'".'));var u=i.store.getState();return i.state={storeState:u},i.clearCache(),i}return i(r,t),r.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},r.prototype.updateStatePropsIfNeeded=function(){var e=n(this.store,this.props);return this.stateProps&&(0,h.default)(e,this.stateProps)?!1:(this.stateProps=e,!0)},r.prototype.updateDispatchPropsIfNeeded=function(){var e=a(this.store,this.props);return this.dispatchProps&&(0,h.default)(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},r.prototype.updateMergedProps=function(){this.mergedProps=f(this.stateProps,this.dispatchProps,this.props)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){y&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},r.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},r.prototype.componentDidMount=function(){this.trySubscribe()},r.prototype.componentWillReceiveProps=function(e){E&&(0,h.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},r.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},r.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null},r.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();E&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},r.prototype.getWrappedInstance=function(){return(0,w.default)(I,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},r.prototype.render=function(){var t=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,n=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var o=!0,s=!0;E&&n&&(o=r||t&&j,s=t&&R);var i=!1,u=!1;o&&(i=this.updateStatePropsIfNeeded()),s&&(u=this.updateDispatchPropsIfNeeded());var a=!0;return i||u||t?this.updateMergedProps():a=!1,!a&&n?n:(I?this.renderedElement=(0,p.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},r}(p.Component);return t.displayName="Connect("+u(e)+")",t.WrappedComponent=e,t.contextTypes={store:d.default},t.propTypes={store:d.default},(0,P.default)(t,e)}}var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.__esModule=!0,t.default=a;var p=r(1),f=r(2),d=n(f),l=r(6),h=n(l),y=r(5),b=n(y),m=r(7),v=n(m),g=r(8),P=n(g),x=r(9),w=n(x),C=function(){return{}},S=function(e){return{dispatch:e}},O=function(e,t,r){return c({},r,e,t)},_=0},function(e,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function n(e){if(!e||"object"!==("undefined"==typeof e?"undefined":r(e)))return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&o(n)===o(Object)}t.__esModule=!0,t.default=n;var o=function(e){return Function.prototype.toString.call(e)}},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!o.call(t,r[s])||e[r[s]]!==t[r[s]])return!1;return!0}t.__esModule=!0,t.default=r},function(e,t,r){"use strict";function n(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=n;var o=r(10)},function(e,t){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var o=Object.getOwnPropertyNames(t),s=0;s<o.length;++s)r[o[s]]||n[o[s]]||(e[o[s]]=t[o[s]]);return e}},function(e,t,r){"use strict";var n=function(e,t,r,n,o,s,i,u){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,s,i,u],p=0;a=new Error(t.replace(/%s/g,function(){return c[p++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};e.exports=n},function(e,r){e.exports=t}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],t):"object"==typeof exports?exports.ReactRedux=t(require("react"),require("redux")):e.ReactRedux=t(e.React,e.Redux)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=r(3),s=n(o),i=r(4),u=n(i);t.Provider=s.default,t.connect=u.default},function(t,r){t.exports=e},function(e,t,r){"use strict";t.__esModule=!0;var n=r(1);t.default=n.PropTypes.shape({subscribe:n.PropTypes.func.isRequired,dispatch:n.PropTypes.func.isRequired,getState:n.PropTypes.func.isRequired})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){f||(f=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}t.__esModule=!0,t.default=void 0;var a=r(1),c=r(2),p=n(c),f=!1,d=function(e){function t(r,n){o(this,t);var i=s(this,e.call(this,r,n));return i.store=r.store,i}return i(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.componentWillReceiveProps=function(e){var t=this.store,r=e.store;t!==r&&u()},t.prototype.render=function(){var e=this.props.children;return a.Children.only(e)},t}(a.Component);t.default=d,d.propTypes={store:p.default.isRequired,children:a.PropTypes.element.isRequired},d.childContextTypes={store:p.default.isRequired}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function a(e,t,r){function n(e,t){var r=e.getState(),n=j?m(r,t):m(r);return(0,w.default)((0,b.default)(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function a(e,t){var r=e.dispatch,n=R?g(r,t):g(r);return(0,w.default)((0,b.default)(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function f(e,t,r){var n=x(e,t,r);return(0,w.default)((0,b.default)(n),"`mergeProps` must return an object. Instead received %s.",n),n}var l=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],y=Boolean(e),m=e||C,g=(0,b.default)(t)?(0,v.default)(t):t||S,x=r||O,j=1!==m.length,R=1!==g.length,T=l.pure,E=void 0===T?!0:T,M=l.withRef,I=void 0===M?!1:M,q=_++;return function(e){var t=function(t){function r(e,n){o(this,r);var i=s(this,t.call(this,e,n));i.version=q,i.store=e.store||n.store,(0,w.default)(i.store,'Could not find "store" in either the context or '+('props of "'+i.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+i.constructor.displayName+'".'));var u=i.store.getState();return i.state={storeState:u},i.clearCache(),i}return i(r,t),r.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},r.prototype.updateStatePropsIfNeeded=function(){var e=n(this.store,this.props);return this.stateProps&&(0,h.default)(e,this.stateProps)?!1:(this.stateProps=e,!0)},r.prototype.updateDispatchPropsIfNeeded=function(){var e=a(this.store,this.props);return this.dispatchProps&&(0,h.default)(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},r.prototype.updateMergedProps=function(){this.mergedProps=f(this.stateProps,this.dispatchProps,this.props)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){y&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},r.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},r.prototype.componentDidMount=function(){this.trySubscribe()},r.prototype.componentWillReceiveProps=function(e){E&&(0,h.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},r.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},r.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null},r.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();E&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},r.prototype.getWrappedInstance=function(){return(0,w.default)(I,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},r.prototype.render=function(){var t=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,n=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var o=!0,s=!0;E&&n&&(o=r||t&&j,s=t&&R);var i=!1,u=!1;o&&(i=this.updateStatePropsIfNeeded()),s&&(u=this.updateDispatchPropsIfNeeded());var a=!0;return i||u||t?this.updateMergedProps():a=!1,!a&&n?n:(I?this.renderedElement=(0,p.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},r}(p.Component);return t.displayName="Connect("+u(e)+")",t.WrappedComponent=e,t.contextTypes={store:d.default},t.propTypes={store:d.default},(0,P.default)(t,e)}}var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.__esModule=!0,t.default=a;var p=r(1),f=r(2),d=n(f),l=r(6),h=n(l),y=r(5),b=n(y),m=r(7),v=n(m),g=r(8),P=n(g),x=r(9),w=n(x),C=function(e){return{}},S=function(e){return{dispatch:e}},O=function(e,t,r){return c({},r,e,t)},_=0},function(e,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function n(e){if(!e||"object"!==("undefined"==typeof e?"undefined":r(e)))return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&o(n)===o(Object)}t.__esModule=!0,t.default=n;var o=function(e){return Function.prototype.toString.call(e)}},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!o.call(t,r[s])||e[r[s]]!==t[r[s]])return!1;return!0}t.__esModule=!0,t.default=r},function(e,t,r){"use strict";function n(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=n;var o=r(10)},function(e,t){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var o=Object.getOwnPropertyNames(t),s=0;s<o.length;++s)r[o[s]]||n[o[s]]||(e[o[s]]=t[o[s]]);return e}},function(e,t,r){"use strict";var n=function(e,t,r,n,o,s,i,u){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,s,i,u],p=0;a=new Error(t.replace(/%s/g,function(){return c[p++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};e.exports=n},function(e,r){e.exports=t}])}); |
@@ -42,5 +42,5 @@ 'use strict'; | ||
var defaultMapStateToProps = function defaultMapStateToProps() { | ||
var defaultMapStateToProps = function defaultMapStateToProps(state) { | ||
return {}; | ||
}; | ||
}; // eslint-disable-line no-unused-vars | ||
var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { | ||
@@ -47,0 +47,0 @@ return { dispatch: dispatch }; |
{ | ||
"name": "react-redux", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Official React bindings for Redux", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -9,3 +9,3 @@ import { Component, createElement } from 'react' | ||
const defaultMapStateToProps = () => ({}) | ||
const defaultMapStateToProps = state => ({}) // eslint-disable-line no-unused-vars | ||
const defaultMapDispatchToProps = dispatch => ({ dispatch }) | ||
@@ -12,0 +12,0 @@ const defaultMergeProps = (stateProps, dispatchProps, parentProps) => ({ |
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
63486