Socket
Socket
Sign inDemoInstall

react-redux

Package Overview
Dependencies
Maintainers
2
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux - npm Package Compare versions

Comparing version 5.0.0-beta.2 to 5.0.0-beta.3

36

dist/redux.js

@@ -808,33 +808,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

var _warning = __webpack_require__(1);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
if (true) {
var stateKeys = Object.keys(stateProps);
for (var _iterator = stateKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
if (typeof ownProps[key] !== 'undefined') {
(0, _warning2.default)(false, 'Duplicate key ' + key + ' sent from both parent and state');
break;
}
}
}
return _extends({}, ownProps, stateProps, dispatchProps);

@@ -844,6 +816,6 @@ }

function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref2) {
var displayName = _ref2.displayName;
var pure = _ref2.pure;
var areMergedPropsEqual = _ref2.areMergedPropsEqual;
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName;
var pure = _ref.pure;
var areMergedPropsEqual = _ref.areMergedPropsEqual;

@@ -850,0 +822,0 @@ var hasRunOnce = false;

2

dist/redux.min.js

@@ -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(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.connect=e.connectAdvanced=e.Provider=void 0;var o=n(7),i=r(o),s=n(3),u=r(s),a=n(8),p=r(a);e.Provider=i.default,e.connectAdvanced=u.default,e.connect=p.default},function(t,e){"use strict";function n(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}e.__esModule=!0,e.default=n},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 u(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function a(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.getDisplayName,c=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,d=r.methodName,y=void 0===d?"connectAdvanced":d,b=r.renderCountProp,m=void 0===b?void 0:b,w=r.shouldHandleStateChanges,g=void 0===w||w,M=r.storeKey,_=void 0===M?"store":M,S=r.withRef,T=void 0!==S&&S,x=u(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),C=_+"Subscription",j=O++,E=(e={},e[_]=P.default,e[C]=h.PropTypes.instanceOf(v.default),e),q=(n={},n[C]=h.PropTypes.instanceOf(v.default),n);return function(e){(0,l.default)("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+e);var n=e.displayName||e.name||"Component",r=c(n),u=p({},x,{getDisplayName:c,methodName:y,renderCountProp:m,shouldHandleStateChanges:g,storeKey:_,withRef:T,displayName:r,WrappedComponent:e}),a=function(n){function a(t,e){o(this,a);var s=i(this,n.call(this,t,e));return s.version=j,s.state={},s.renderCount=0,s.store=s.props[_]||s.context[_],s.parentSub=s.props[C]||s.context[C],s.setWrappedInstance=s.setWrappedInstance.bind(s),(0,l.default)(s.store,'Could not find "'+_+'" in either the context or '+('props of "'+r+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "'+_+'" as a prop to "'+r+'".')),s.getState=s.store.getState.bind(s.store),s.initSelector(),s.initSubscription(),s}return s(a,n),a.prototype.getChildContext=function(){var t;return t={},t[C]=this.subscription,t},a.prototype.componentDidMount=function(){g&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.store=null,this.parentSub=null,this.selector.run=function(){}},a.prototype.getWrappedInstance=function(){return(0,l.default)(T,"To access the wrapped instance, you need to specify "+("{ withRef: true } in the options argument of the "+y+"() call.")),this.wrappedInstance},a.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},a.prototype.initSelector=function(){var e=this.store.dispatch,n=this.getState,r=t(e,u),o=this.selector={shouldComponentUpdate:!0,props:r(n(),this.props),run:function(t){try{var e=r(n(),t);(o.error||e!==o.props)&&(o.shouldComponentUpdate=!0,o.props=e,o.error=null)}catch(i){o.shouldComponentUpdate=!0,o.error=i}}}},a.prototype.initSubscription=function(){var t=this;g&&!function(){var e=t.subscription=new v.default(t.store,t.parentSub),n=e.notifyNestedSubs.bind(e),r={};e.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?this.setState(r,n):e.notifyNestedSubs()}.bind(t)}()},a.prototype.isSubscribed=function(){return!!this.subscription&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(t){if(!T&&!m)return t;var e=p({},t);return T&&(e.ref=this.setWrappedInstance),m&&(e[m]=this.renderCount++),e},a.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return(0,h.createElement)(e,this.addExtraProps(t.props))},a}(h.Component);return a.WrappedComponent=e,a.displayName=r,a.childContextTypes=q,a.contextTypes=E,a.propTypes=E,(0,f.default)(a,e)}}e.__esModule=!0;var p=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=a;var c=n(16),f=r(c),d=n(17),l=r(d),h=n(2),y=n(14),v=r(y),b=n(5),P=r(b),O=0},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return function(e,n){function r(){return o}var o=t(e,n);return r.dependsOnOwnProps=!1,r}}function i(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?!!t.dependsOnOwnProps:1!==t.length}function s(t,e){return function(e,n){var r=function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)};return r.dependsOnOwnProps=i(t),r.mapToProps=function(e,n){r.mapToProps=t;var o=r(e,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=i(o),o=r(e,n)),o},r}}e.__esModule=!0,e.wrapMapToPropsConstant=o,e.getDependsOnOwnProps=i,e.wrapMapToPropsFunc=s;var u=n(6);r(u)},function(t,e,n){"use strict";e.__esModule=!0;var r=n(2);e.default=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){(0,s.default)(t)||(0,a.default)(n+"() in "+e+" must return a plain object. Instead received "+t+".")}e.__esModule=!0,e.default=o;var i=n(21),s=r(i),u=n(1),a=r(u)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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)}e.__esModule=!0,e.default=void 0;var u=n(2),a=n(5),p=r(a),c=n(1),f=(r(c),function(t){function e(n,r){o(this,e);var s=i(this,t.call(this,n,r));return s.store=n.store,s}return s(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.render=function(){return u.Children.only(this.props.children)},e}(u.Component));e.default=f,f.propTypes={store:p.default.isRequired,children:u.PropTypes.element.isRequired},f.childContextTypes={store:p.default.isRequired},f.displayName="Provider"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){for(var n=e.length-1;n>=0;n--){var r=e[n](t);if(r)return r}}function s(t,e){return t===e}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?c.default:e,r=t.mapStateToPropsFactories,u=void 0===r?v.default:r,p=t.mapDispatchToPropsFactories,f=void 0===p?h.default:p,l=t.mergePropsFactories,y=void 0===l?P.default:l,b=t.selectorFactory,O=void 0===b?m.default:b;return function(t,e,r){var p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=p.pure,l=void 0===c||c,h=p.areStatesEqual,v=void 0===h?s:h,b=p.areOwnPropsEqual,P=void 0===b?d.default:b,m=p.areStatePropsEqual,w=void 0===m?d.default:m,g=p.areMergedPropsEqual,M=void 0===g?d.default:g,_=o(p,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=i(t,u),T=i(e,f),x=i(r,y);return n(O,a({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:!!t,initMapStateToProps:S,initMapDispatchToProps:T,initMergeProps:x,pure:l,areStatesEqual:v,areOwnPropsEqual:P,areStatePropsEqual:w,areMergedPropsEqual:M},_))}}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.createConnect=u;var p=n(3),c=r(p),f=n(15),d=r(f),l=n(9),h=r(l),y=n(10),v=r(y),b=n(11),P=r(b),O=n(12),m=r(O);e.default=u()},function(t,e,n){"use strict";function r(t){return"function"==typeof t?(0,u.wrapMapToPropsFunc)(t,"mapDispatchToProps"):void 0}function o(t){return t?void 0:(0,u.wrapMapToPropsConstant)(function(t){return{dispatch:t}})}function i(t){return t&&"object"==typeof t?(0,u.wrapMapToPropsConstant)(function(e){return(0,s.bindActionCreators)(t,e)}):void 0}e.__esModule=!0,e.whenMapDispatchToPropsIsFunction=r,e.whenMapDispatchToPropsIsMissing=o,e.whenMapDispatchToPropsIsObject=i;var s=n(22),u=n(4);e.default=[r,o,i]},function(t,e,n){"use strict";function r(t){return"function"==typeof t?(0,i.wrapMapToPropsFunc)(t,"mapStateToProps"):void 0}function o(t){return t?void 0:(0,i.wrapMapToPropsConstant)(function(){return{}})}e.__esModule=!0,e.whenMapStateToPropsIsFunction=r,e.whenMapStateToPropsIsMissing=o;var i=n(4);e.default=[r,o]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return a({},n,t,e)}function i(t){return function(e,n){var r=n.pure,o=n.areMergedPropsEqual,i=!1,s=void 0;return function(e,n,u){var a=t(e,n,u);return i?r&&o(a,s)||(s=a):(i=!0,s=a),s}}}function s(t){return"function"==typeof t?i(t):void 0}function u(t){return t?void 0:function(){return o}}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.defaultMergeProps=o,e.wrapMergePropsFunc=i,e.whenMergePropsIsFunction=s,e.whenMergePropsIsOmitted=u;var p=n(6),c=(r(p),n(1));r(c);e.default=[s,u]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n,r){return function(o,i){return n(t(o,i),e(r,i),i)}}function s(t,e,n,r,o){function i(o,i){return h=o,y=i,v=t(h,y),b=e(r,y),P=n(v,b,y),l=!0,P}function s(){return v=t(h,y),e.dependsOnOwnProps&&(b=e(r,y)),P=n(v,b,y)}function u(){return t.dependsOnOwnProps&&(v=t(h,y)),e.dependsOnOwnProps&&(b=e(r,y)),P=n(v,b,y)}function a(){var e=t(h,y),r=!d(e,v);return v=e,r&&(P=n(v,b,y)),P}function p(t,e){var n=!f(e,y),r=!c(t,h);return h=t,y=e,n&&r?s():n?u():r?a():P}var c=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,l=!1,h=void 0,y=void 0,v=void 0,b=void 0,P=void 0;return function(t,e){return l?p(t,e):i(t,e)}}function u(t,e){var n=e.initMapStateToProps,r=e.initMapDispatchToProps,u=e.initMergeProps,a=o(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),p=n(t,a),c=r(t,a),f=u(t,a),d=a.pure?s:i;return d(p,c,f,t,a)}e.__esModule=!0,e.impureFinalPropsSelectorFactory=i,e.pureFinalPropsSelectorFactory=s,e.default=u;var a=n(13);r(a)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){if(!t)throw Error("Unexpected value for "+e+" in "+n+".");"mapStateToProps"!==e&&"mapDispatchToProps"!==e||t.hasOwnProperty("dependsOnOwnProps")||(0,u.default)("The selector for "+e+" of "+n+" did not specify a value for dependsOnOwnProps.")}function i(t,e,n,r){o(t,"mapStateToProps",r),o(e,"mapDispatchToProps",r),o(n,"mergeProps",r)}e.__esModule=!0,e.default=i;var s=n(1),u=r(s)},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(){var t=[],e=[];return{clear:function(){e=o,t=o},notify:function(){t=e;for(var n=0;t.length>n;n++)t[n]()},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==o&&(r=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}e.__esModule=!0;var o=null,i=function(){function t(e,o){n(this,t),this.subscribe=o?o.addNestedSub.bind(o):e.subscribe.bind(e),this.unsubscribe=null,this.listeners=r()}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return!!this.unsubscribe},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.subscribe(this.onStateChange))},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.listeners.clear()),this.unsubscribe=null,this.subscribe=null,this.listeners={notify:function(){}}},t}();e.default=i},function(t,e){"use strict";function n(t,e){if(t===e)return!0;var n=0,o=0;for(var i in t){if(r.call(t,i)&&t[i]!==e[i])return!1;n++}for(var s in e)r.call(e,s)&&o++;return n===o}e.__esModule=!0,e.default=n;var r=Object.prototype.hasOwnProperty},function(t,e){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,i){if("string"!=typeof e){var s=Object.getOwnPropertyNames(e);o&&(s=s.concat(Object.getOwnPropertySymbols(e)));for(var u=0;s.length>u;++u)if(!(n[s[u]]||r[s[u]]||i&&i[s[u]]))try{t[s[u]]=e[s[u]]}catch(a){}}return t}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,s,u){if(!t){var a;if(void 0===e)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,o,i,s,u],c=0;a=Error(e.replace(/%s/g,function(){return p[c++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};t.exports=r},function(t,e,n){var r=n(19),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){if(!i(t)||d.call(t)!=s)return!1;var e=o(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&p.call(n)==f}var o=n(18),i=n(20),s="[object Object]",u=Function.prototype,a=Object.prototype,p=u.toString,c=a.hasOwnProperty,f=p.call(Object),d=a.toString;t.exports=r},function(t,n){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(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.connect=e.connectAdvanced=e.Provider=void 0;var o=n(7),i=r(o),s=n(3),u=r(s),a=n(8),p=r(a);e.Provider=i.default,e.connectAdvanced=u.default,e.connect=p.default},function(t,e){"use strict";function n(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}e.__esModule=!0,e.default=n},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 u(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function a(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.getDisplayName,c=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,d=r.methodName,y=void 0===d?"connectAdvanced":d,b=r.renderCountProp,m=void 0===b?void 0:b,w=r.shouldHandleStateChanges,g=void 0===w||w,M=r.storeKey,_=void 0===M?"store":M,S=r.withRef,T=void 0!==S&&S,x=u(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),C=_+"Subscription",j=O++,E=(e={},e[_]=P.default,e[C]=h.PropTypes.instanceOf(v.default),e),q=(n={},n[C]=h.PropTypes.instanceOf(v.default),n);return function(e){(0,l.default)("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+e);var n=e.displayName||e.name||"Component",r=c(n),u=p({},x,{getDisplayName:c,methodName:y,renderCountProp:m,shouldHandleStateChanges:g,storeKey:_,withRef:T,displayName:r,WrappedComponent:e}),a=function(n){function a(t,e){o(this,a);var s=i(this,n.call(this,t,e));return s.version=j,s.state={},s.renderCount=0,s.store=s.props[_]||s.context[_],s.parentSub=s.props[C]||s.context[C],s.setWrappedInstance=s.setWrappedInstance.bind(s),(0,l.default)(s.store,'Could not find "'+_+'" in either the context or '+('props of "'+r+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "'+_+'" as a prop to "'+r+'".')),s.getState=s.store.getState.bind(s.store),s.initSelector(),s.initSubscription(),s}return s(a,n),a.prototype.getChildContext=function(){var t;return t={},t[C]=this.subscription,t},a.prototype.componentDidMount=function(){g&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.store=null,this.parentSub=null,this.selector.run=function(){}},a.prototype.getWrappedInstance=function(){return(0,l.default)(T,"To access the wrapped instance, you need to specify "+("{ withRef: true } in the options argument of the "+y+"() call.")),this.wrappedInstance},a.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},a.prototype.initSelector=function(){var e=this.store.dispatch,n=this.getState,r=t(e,u),o=this.selector={shouldComponentUpdate:!0,props:r(n(),this.props),run:function(t){try{var e=r(n(),t);(o.error||e!==o.props)&&(o.shouldComponentUpdate=!0,o.props=e,o.error=null)}catch(i){o.shouldComponentUpdate=!0,o.error=i}}}},a.prototype.initSubscription=function(){var t=this;g&&!function(){var e=t.subscription=new v.default(t.store,t.parentSub),n=e.notifyNestedSubs.bind(e),r={};e.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?this.setState(r,n):e.notifyNestedSubs()}.bind(t)}()},a.prototype.isSubscribed=function(){return!!this.subscription&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(t){if(!T&&!m)return t;var e=p({},t);return T&&(e.ref=this.setWrappedInstance),m&&(e[m]=this.renderCount++),e},a.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return(0,h.createElement)(e,this.addExtraProps(t.props))},a}(h.Component);return a.WrappedComponent=e,a.displayName=r,a.childContextTypes=q,a.contextTypes=E,a.propTypes=E,(0,f.default)(a,e)}}e.__esModule=!0;var p=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=a;var c=n(16),f=r(c),d=n(17),l=r(d),h=n(2),y=n(14),v=r(y),b=n(5),P=r(b),O=0},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return function(e,n){function r(){return o}var o=t(e,n);return r.dependsOnOwnProps=!1,r}}function i(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?!!t.dependsOnOwnProps:1!==t.length}function s(t,e){return function(e,n){var r=function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)};return r.dependsOnOwnProps=i(t),r.mapToProps=function(e,n){r.mapToProps=t;var o=r(e,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=i(o),o=r(e,n)),o},r}}e.__esModule=!0,e.wrapMapToPropsConstant=o,e.getDependsOnOwnProps=i,e.wrapMapToPropsFunc=s;var u=n(6);r(u)},function(t,e,n){"use strict";e.__esModule=!0;var r=n(2);e.default=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){(0,s.default)(t)||(0,a.default)(n+"() in "+e+" must return a plain object. Instead received "+t+".")}e.__esModule=!0,e.default=o;var i=n(21),s=r(i),u=n(1),a=r(u)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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)}e.__esModule=!0,e.default=void 0;var u=n(2),a=n(5),p=r(a),c=n(1),f=(r(c),function(t){function e(n,r){o(this,e);var s=i(this,t.call(this,n,r));return s.store=n.store,s}return s(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.render=function(){return u.Children.only(this.props.children)},e}(u.Component));e.default=f,f.propTypes={store:p.default.isRequired,children:u.PropTypes.element.isRequired},f.childContextTypes={store:p.default.isRequired},f.displayName="Provider"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){for(var n=e.length-1;n>=0;n--){var r=e[n](t);if(r)return r}}function s(t,e){return t===e}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?c.default:e,r=t.mapStateToPropsFactories,u=void 0===r?v.default:r,p=t.mapDispatchToPropsFactories,f=void 0===p?h.default:p,l=t.mergePropsFactories,y=void 0===l?P.default:l,b=t.selectorFactory,O=void 0===b?m.default:b;return function(t,e,r){var p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=p.pure,l=void 0===c||c,h=p.areStatesEqual,v=void 0===h?s:h,b=p.areOwnPropsEqual,P=void 0===b?d.default:b,m=p.areStatePropsEqual,w=void 0===m?d.default:m,g=p.areMergedPropsEqual,M=void 0===g?d.default:g,_=o(p,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=i(t,u),T=i(e,f),x=i(r,y);return n(O,a({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:!!t,initMapStateToProps:S,initMapDispatchToProps:T,initMergeProps:x,pure:l,areStatesEqual:v,areOwnPropsEqual:P,areStatePropsEqual:w,areMergedPropsEqual:M},_))}}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.createConnect=u;var p=n(3),c=r(p),f=n(15),d=r(f),l=n(9),h=r(l),y=n(10),v=r(y),b=n(11),P=r(b),O=n(12),m=r(O);e.default=u()},function(t,e,n){"use strict";function r(t){return"function"==typeof t?(0,u.wrapMapToPropsFunc)(t,"mapDispatchToProps"):void 0}function o(t){return t?void 0:(0,u.wrapMapToPropsConstant)(function(t){return{dispatch:t}})}function i(t){return t&&"object"==typeof t?(0,u.wrapMapToPropsConstant)(function(e){return(0,s.bindActionCreators)(t,e)}):void 0}e.__esModule=!0,e.whenMapDispatchToPropsIsFunction=r,e.whenMapDispatchToPropsIsMissing=o,e.whenMapDispatchToPropsIsObject=i;var s=n(22),u=n(4);e.default=[r,o,i]},function(t,e,n){"use strict";function r(t){return"function"==typeof t?(0,i.wrapMapToPropsFunc)(t,"mapStateToProps"):void 0}function o(t){return t?void 0:(0,i.wrapMapToPropsConstant)(function(){return{}})}e.__esModule=!0,e.whenMapStateToPropsIsFunction=r,e.whenMapStateToPropsIsMissing=o;var i=n(4);e.default=[r,o]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return a({},n,t,e)}function i(t){return function(e,n){var r=n.pure,o=n.areMergedPropsEqual,i=!1,s=void 0;return function(e,n,u){var a=t(e,n,u);return i?r&&o(a,s)||(s=a):(i=!0,s=a),s}}}function s(t){return"function"==typeof t?i(t):void 0}function u(t){return t?void 0:function(){return o}}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.defaultMergeProps=o,e.wrapMergePropsFunc=i,e.whenMergePropsIsFunction=s,e.whenMergePropsIsOmitted=u;var p=n(6);r(p);e.default=[s,u]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)<0&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n,r){return function(o,i){return n(t(o,i),e(r,i),i)}}function s(t,e,n,r,o){function i(o,i){return h=o,y=i,v=t(h,y),b=e(r,y),P=n(v,b,y),l=!0,P}function s(){return v=t(h,y),e.dependsOnOwnProps&&(b=e(r,y)),P=n(v,b,y)}function u(){return t.dependsOnOwnProps&&(v=t(h,y)),e.dependsOnOwnProps&&(b=e(r,y)),P=n(v,b,y)}function a(){var e=t(h,y),r=!d(e,v);return v=e,r&&(P=n(v,b,y)),P}function p(t,e){var n=!f(e,y),r=!c(t,h);return h=t,y=e,n&&r?s():n?u():r?a():P}var c=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,l=!1,h=void 0,y=void 0,v=void 0,b=void 0,P=void 0;return function(t,e){return l?p(t,e):i(t,e)}}function u(t,e){var n=e.initMapStateToProps,r=e.initMapDispatchToProps,u=e.initMergeProps,a=o(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),p=n(t,a),c=r(t,a),f=u(t,a),d=a.pure?s:i;return d(p,c,f,t,a)}e.__esModule=!0,e.impureFinalPropsSelectorFactory=i,e.pureFinalPropsSelectorFactory=s,e.default=u;var a=n(13);r(a)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){if(!t)throw Error("Unexpected value for "+e+" in "+n+".");"mapStateToProps"!==e&&"mapDispatchToProps"!==e||t.hasOwnProperty("dependsOnOwnProps")||(0,u.default)("The selector for "+e+" of "+n+" did not specify a value for dependsOnOwnProps.")}function i(t,e,n,r){o(t,"mapStateToProps",r),o(e,"mapDispatchToProps",r),o(n,"mergeProps",r)}e.__esModule=!0,e.default=i;var s=n(1),u=r(s)},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(){var t=[],e=[];return{clear:function(){e=o,t=o},notify:function(){t=e;for(var n=0;t.length>n;n++)t[n]()},subscribe:function(n){var r=!0;return e===t&&(e=t.slice()),e.push(n),function(){r&&t!==o&&(r=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}e.__esModule=!0;var o=null,i=function(){function t(e,o){n(this,t),this.subscribe=o?o.addNestedSub.bind(o):e.subscribe.bind(e),this.unsubscribe=null,this.listeners=r()}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return!!this.unsubscribe},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.subscribe(this.onStateChange))},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.listeners.clear()),this.unsubscribe=null,this.subscribe=null,this.listeners={notify:function(){}}},t}();e.default=i},function(t,e){"use strict";function n(t,e){if(t===e)return!0;var n=0,o=0;for(var i in t){if(r.call(t,i)&&t[i]!==e[i])return!1;n++}for(var s in e)r.call(e,s)&&o++;return n===o}e.__esModule=!0,e.default=n;var r=Object.prototype.hasOwnProperty},function(t,e){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,i){if("string"!=typeof e){var s=Object.getOwnPropertyNames(e);o&&(s=s.concat(Object.getOwnPropertySymbols(e)));for(var u=0;s.length>u;++u)if(!(n[s[u]]||r[s[u]]||i&&i[s[u]]))try{t[s[u]]=e[s[u]]}catch(a){}}return t}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,s,u){if(!t){var a;if(void 0===e)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,o,i,s,u],c=0;a=Error(e.replace(/%s/g,function(){return p[c++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};t.exports=r},function(t,e,n){var r=n(19),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){if(!i(t)||d.call(t)!=s)return!1;var e=o(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&p.call(n)==f}var o=n(18),i=n(20),s="[object Object]",u=Function.prototype,a=Object.prototype,p=u.toString,c=a.hasOwnProperty,f=p.call(Object),d=a.toString;t.exports=r},function(t,n){t.exports=e}])});
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; };
import verifyPlainObject from '../utils/verifyPlainObject';
import warning from '../utils/warning';
export function defaultMergeProps(stateProps, dispatchProps, ownProps) {
if (process.env.NODE_ENV !== 'production') {
var stateKeys = Object.keys(stateProps);
for (var _iterator = stateKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
if (typeof ownProps[key] !== 'undefined') {
warning(false, 'Duplicate key ' + key + ' sent from both parent and state');
break;
}
}
}
return _extends({}, ownProps, stateProps, dispatchProps);

@@ -35,6 +10,6 @@ }

export function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref2) {
var displayName = _ref2.displayName;
var pure = _ref2.pure;
var areMergedPropsEqual = _ref2.areMergedPropsEqual;
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName;
var pure = _ref.pure;
var areMergedPropsEqual = _ref.areMergedPropsEqual;

@@ -41,0 +16,0 @@ var hasRunOnce = false;

@@ -16,33 +16,5 @@ 'use strict';

var _warning = require('../utils/warning');
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
if (process.env.NODE_ENV !== 'production') {
var stateKeys = Object.keys(stateProps);
for (var _iterator = stateKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
if (typeof ownProps[key] !== 'undefined') {
(0, _warning2.default)(false, 'Duplicate key ' + key + ' sent from both parent and state');
break;
}
}
}
return _extends({}, ownProps, stateProps, dispatchProps);

@@ -52,6 +24,6 @@ }

function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref2) {
var displayName = _ref2.displayName;
var pure = _ref2.pure;
var areMergedPropsEqual = _ref2.areMergedPropsEqual;
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName;
var pure = _ref.pure;
var areMergedPropsEqual = _ref.areMergedPropsEqual;

@@ -58,0 +30,0 @@ var hasRunOnce = false;

{
"name": "react-redux",
"version": "5.0.0-beta.2",
"version": "5.0.0-beta.3",
"description": "Official React bindings for Redux",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

import verifyPlainObject from '../utils/verifyPlainObject'
import warning from '../utils/warning'
export function defaultMergeProps(stateProps, dispatchProps, ownProps) {
if (process.env.NODE_ENV !== 'production') {
const stateKeys = Object.keys(stateProps)
for ( let key of stateKeys ) {
if (typeof ownProps[key] !== 'undefined') {
warning(false, `Duplicate key ${key} sent from both parent and state`)
break
}
}
}
return {
...ownProps,
...stateProps,
...dispatchProps
}
return { ...ownProps, ...stateProps, ...dispatchProps }
}

@@ -22,0 +6,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc