react-redux
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -119,3 +119,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var Provider = function (_Component) { | ||
var Provider = (function (_Component) { | ||
_inherits(Provider, _Component); | ||
@@ -152,3 +152,3 @@ | ||
return Provider; | ||
}(Component); | ||
})(Component); | ||
@@ -250,3 +250,3 @@ Provider.propTypes = { | ||
return function wrapWithConnect(WrappedComponent) { | ||
var Connect = function (_Component) { | ||
var Connect = (function (_Component) { | ||
_inherits(Connect, _Component); | ||
@@ -407,3 +407,3 @@ | ||
return Connect; | ||
}(Component); | ||
})(Component); | ||
@@ -444,3 +444,3 @@ Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
@@ -447,0 +447,0 @@ var fnToString = function fnToString(fn) { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],e):"object"==typeof exports?exports.ReactRedux=e(require("react"),require("redux")):t.ReactRedux=e(t.React,t.Redux)}(this,function(t,e){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(3),o=r(4);t.exports={Provider:n,connect:o}},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(1),o=n.PropTypes,s=o.shape({subscribe:o.func.isRequired,dispatch:o.func.isRequired,getState:o.func.isRequired});t.exports=s},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(){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."))}var u=r(1),a=u.Component,p=u.PropTypes,c=u.Children,h=r(2),f=!1,d=function(t){function e(r,s){n(this,e);var i=o(this,t.call(this,r,s));return i.store=r.store,i}return s(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&i()},e.prototype.render=function(){var t=this.props.children;return c.only(t)},e}(a);d.propTypes={store:h.isRequired,children:p.element.isRequired},d.childContextTypes={store:h.isRequired},t.exports=d},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function u(t,e,r){function u(t,e){var r=t.getState(),n=T?O(r,e):O(r);return m(l(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function p(t,e){var r=t.dispatch,n=E?j(r,e):j(r);return m(l(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function w(t,e,r){var n=R(t,e,r);return m(l(n),"`mergeProps` must return an object. Instead received %s.",n),n}var S=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],C=Boolean(t),O=t||v,j=l(e)?y(e):e||g,R=r||P,T=1!==O.length,E=1!==j.length,I=S.pure,q=void 0===I?!0:I,N=S.withRef,_=void 0===N?!1:N,D=x++;return function(t){var e=function(e){function r(t,s){n(this,r);var i=o(this,e.call(this,t,s));i.version=D,i.store=t.store||s.store,m(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 s(r,e),r.prototype.shouldComponentUpdate=function(){return!q||this.haveOwnPropsChanged||this.hasStoreStateChanged},r.prototype.updateStatePropsIfNeeded=function(){var t=u(this.store,this.props);return this.stateProps&&d(t,this.stateProps)?!1:(this.stateProps=t,!0)},r.prototype.updateDispatchPropsIfNeeded=function(){var t=p(this.store,this.props);return this.dispatchProps&&d(t,this.dispatchProps)?!1:(this.dispatchProps=t,!0)},r.prototype.updateMergedProps=function(){this.mergedProps=w(this.stateProps,this.dispatchProps,this.props)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){C&&!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(t){q&&d(t,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 t=this.state.storeState,e=this.store.getState();q&&t===e||(this.hasStoreStateChanged=!0,this.setState({storeState:e}))}},r.prototype.getWrappedInstance=function(){return m(_,"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 e=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,n=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var o=!0,s=!0;q&&n&&(o=r||e&&T,s=e&&E);var i=!1,u=!1;o&&(i=this.updateStatePropsIfNeeded()),s&&(u=this.updateDispatchPropsIfNeeded());var p=!0;return i||u||e?this.updateMergedProps():p=!1,!p&&n?n:(_?this.renderedElement=h(t,a({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=h(t,this.mergedProps),this.renderedElement)},r}(c);return e.displayName="Connect("+i(t)+")",e.WrappedComponent=t,e.contextTypes={store:f},e.propTypes={store:f},b(e,t)}}var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p=r(1),c=p.Component,h=p.createElement,f=r(2),d=r(6),l=r(5),y=r(7),b=r(8),m=r(9),v=function(t){return{}},g=function(t){return{dispatch:t}},P=function(t,e,r){return a({},r,t,e)},x=0;t.exports=u},function(t,e){"use strict";function r(t){if(!t||"object"!==("undefined"==typeof t?"undefined":n(t)))return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&o(r)===o(Object)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=function(t){return Function.prototype.toString.call(t)};t.exports=r},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!o.call(e,r[s])||t[r[s]]!==e[r[s]])return!1;return!0}t.exports=r},function(t,e,r){"use strict";function n(t){return function(e){return(0,o.bindActionCreators)(t,e)}}var o=r(10);t.exports=n},function(t,e){"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};t.exports=function(t,e){for(var o=Object.getOwnPropertyNames(e),s=0;s<o.length;++s)r[o[s]]||n[o[s]]||(t[o[s]]=e[o[s]]);return t}},function(t,e,r){"use strict";var n=function(t,e,r,n,o,s,i,u){if(!t){var a;if(void 0===e)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,n,o,s,i,u],c=0;a=new Error(e.replace(/%s/g,function(){return p[c++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};t.exports=n},function(t,r){t.exports=e}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],e):"object"==typeof exports?exports.ReactRedux=e(require("react"),require("redux")):t.ReactRedux=e(t.React,t.Redux)}(this,function(t,e){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(3),o=r(4);t.exports={Provider:n,connect:o}},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(1),o=n.PropTypes,s=o.shape({subscribe:o.func.isRequired,dispatch:o.func.isRequired,getState:o.func.isRequired});t.exports=s},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(){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."))}var u=r(1),a=u.Component,p=u.PropTypes,c=u.Children,h=r(2),f=!1,d=function(t){function e(r,s){n(this,e);var i=o(this,t.call(this,r,s));return i.store=r.store,i}return s(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&i()},e.prototype.render=function(){var t=this.props.children;return c.only(t)},e}(a);d.propTypes={store:h.isRequired,children:p.element.isRequired},d.childContextTypes={store:h.isRequired},t.exports=d},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function u(t,e,r){function u(t,e){var r=t.getState(),n=T?O(r,e):O(r);return m(l(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function p(t,e){var r=t.dispatch,n=E?j(r,e):j(r);return m(l(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function w(t,e,r){var n=R(t,e,r);return m(l(n),"`mergeProps` must return an object. Instead received %s.",n),n}var C=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],S=Boolean(t),O=t||v,j=l(e)?y(e):e||g,R=r||P,T=1!==O.length,E=1!==j.length,I=C.pure,q=void 0===I?!0:I,N=C.withRef,_=void 0===N?!1:N,D=x++;return function(t){var e=function(e){function r(t,s){n(this,r);var i=o(this,e.call(this,t,s));i.version=D,i.store=t.store||s.store,m(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 s(r,e),r.prototype.shouldComponentUpdate=function(){return!q||this.haveOwnPropsChanged||this.hasStoreStateChanged},r.prototype.updateStatePropsIfNeeded=function(){var t=u(this.store,this.props);return this.stateProps&&d(t,this.stateProps)?!1:(this.stateProps=t,!0)},r.prototype.updateDispatchPropsIfNeeded=function(){var t=p(this.store,this.props);return this.dispatchProps&&d(t,this.dispatchProps)?!1:(this.dispatchProps=t,!0)},r.prototype.updateMergedProps=function(){this.mergedProps=w(this.stateProps,this.dispatchProps,this.props)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){S&&!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(t){q&&d(t,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 t=this.state.storeState,e=this.store.getState();q&&t===e||(this.hasStoreStateChanged=!0,this.setState({storeState:e}))}},r.prototype.getWrappedInstance=function(){return m(_,"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 e=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,n=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var o=!0,s=!0;q&&n&&(o=r||e&&T,s=e&&E);var i=!1,u=!1;o&&(i=this.updateStatePropsIfNeeded()),s&&(u=this.updateDispatchPropsIfNeeded());var p=!0;return i||u||e?this.updateMergedProps():p=!1,!p&&n?n:(_?this.renderedElement=h(t,a({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=h(t,this.mergedProps),this.renderedElement)},r}(c);return e.displayName="Connect("+i(t)+")",e.WrappedComponent=t,e.contextTypes={store:f},e.propTypes={store:f},b(e,t)}}var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p=r(1),c=p.Component,h=p.createElement,f=r(2),d=r(6),l=r(5),y=r(7),b=r(8),m=r(9),v=function(t){return{}},g=function(t){return{dispatch:t}},P=function(t,e,r){return a({},r,t,e)},x=0;t.exports=u},function(t,e){"use strict";function r(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function n(t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t)))return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var n=e.constructor;return"function"==typeof n&&n instanceof n&&o(n)===o(Object)}var o=function(t){return Function.prototype.toString.call(t)};t.exports=n},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!o.call(e,r[s])||t[r[s]]!==e[r[s]])return!1;return!0}t.exports=r},function(t,e,r){"use strict";function n(t){return function(e){return(0,o.bindActionCreators)(t,e)}}var o=r(10);t.exports=n},function(t,e){"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};t.exports=function(t,e){for(var o=Object.getOwnPropertyNames(e),s=0;s<o.length;++s)r[o[s]]||n[o[s]]||(t[o[s]]=e[o[s]]);return t}},function(t,e,r){"use strict";var n=function(t,e,r,n,o,s,i,u){if(!t){var a;if(void 0===e)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,n,o,s,i,u],c=0;a=new Error(e.replace(/%s/g,function(){return p[c++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};t.exports=n},function(t,r){t.exports=e}])}); |
@@ -82,3 +82,3 @@ 'use strict'; | ||
return function wrapWithConnect(WrappedComponent) { | ||
var Connect = function (_Component) { | ||
var Connect = (function (_Component) { | ||
_inherits(Connect, _Component); | ||
@@ -239,3 +239,3 @@ | ||
return Connect; | ||
}(Component); | ||
})(Component); | ||
@@ -242,0 +242,0 @@ Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; |
@@ -28,3 +28,3 @@ 'use strict'; | ||
var Provider = function (_Component) { | ||
var Provider = (function (_Component) { | ||
_inherits(Provider, _Component); | ||
@@ -61,3 +61,3 @@ | ||
return Provider; | ||
}(Component); | ||
})(Component); | ||
@@ -64,0 +64,0 @@ Provider.propTypes = { |
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
@@ -5,0 +5,0 @@ var fnToString = function fnToString(fn) { |
{ | ||
"name": "react-redux", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Official React bindings for Redux", | ||
@@ -71,3 +71,4 @@ "main": "./lib/index.js", | ||
"hoist-non-react-statics": "^1.0.3", | ||
"invariant": "^2.0.0" | ||
"invariant": "^2.0.0", | ||
"loose-envify": "^1.1.0" | ||
}, | ||
@@ -74,0 +75,0 @@ "peerDependencies": { |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
60682
5
+ Addedloose-envify@^1.1.0