redux-zero
Advanced tools
Comparing version 4.5.1 to 4.5.2
# Changelog | ||
### 4.5.2 | ||
- Fixes bug in which ownProps were not being passed as the second argument to mapToProps inside a connect HOC | ||
### 4.5.1 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "redux-zero", | ||
"version": "4.5.1", | ||
"version": "4.5.2", | ||
"description": "", | ||
@@ -12,3 +12,4 @@ "main": "dist/redux-zero.js", | ||
"format": "prettier --write --no-semi \"src/**/*.ts\" \"src/**/*.tsx\"", | ||
"check": "npm run compile && npm run format && npm run lint && npm run test", | ||
"check": | ||
"npm run compile && npm run format && npm run lint && npm run test", | ||
"clean": "rimraf dist coverage", | ||
@@ -15,0 +16,0 @@ "prebuild": "npm run check && npm run clean", |
@@ -120,3 +120,3 @@ 'use strict'; | ||
if (actions === void 0) { actions = {}; } | ||
return function (Child) { return function (props) { return (React.createElement(Connect, { mapToProps: mapToProps, actions: actions }, function (mappedProps) { return React.createElement(Child, __assign({}, mappedProps, props)); })); }; }; | ||
return function (Child) { return function (props) { return (React.createElement(Connect, __assign({}, props, { mapToProps: mapToProps, actions: actions }), function (mappedProps) { return React.createElement(Child, __assign({}, mappedProps, props)); })); }; }; | ||
} | ||
@@ -123,0 +123,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t["redux-zero"]={},t.React)}(this,function(t,e){"use strict";function n(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e){for(var n in t)if(t[n]!==e[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}function r(t,e,n){return"object"==typeof t?null:new Error("Invalid prop "+e+" supplied to "+n)}function i(t,e){t="function"==typeof t?t(e):t;var n={};for(var o in t)!function(o){n[o]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t[o].apply(t,[e.getState()].concat(n));if(null!=i){if(i.then)return i.then(e.setState);e.setState(i)}}}(o);return n}var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},p=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=e.getProps(),e.actions=e.getActions(),e.update=function(){var t=e.getProps();o(t,e.state)||e.setState(t)},e}return n(e,t),e.prototype.componentWillMount=function(){this.unsubscribe=this.context.store.subscribe(this.update)},e.prototype.componentWillUnmount=function(){this.unsubscribe(this.update)},e.prototype.getProps=function(){var t=this.props.mapToProps,e=this.context.store&&this.context.store.getState()||{};return t?t(e,this.props):e},e.prototype.getActions=function(){return i(this.props.actions,this.context.store)},e.prototype.render=function(){return this.props.children(p({store:this.context.store},this.state,this.actions))},e.contextTypes={store:r},e}(e.Component),c=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n(o,t),o.prototype.getChildContext=function(){return{store:this.props.store}},o.prototype.render=function(){var t=this.props.children;return e.Children.only(t)},o.childContextTypes={store:r},o}(e.Component);t.connect=function(t,n){return void 0===n&&(n={}),function(o){return function(r){return e.createElement(u,{mapToProps:t,actions:n},function(t){return e.createElement(o,p({},t,r))})}}},t.Provider=c,t.Connect=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t["redux-zero"]={},t.React)}(this,function(t,e){"use strict";function n(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e){for(var n in t)if(t[n]!==e[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}function r(t,e,n){return"object"==typeof t?null:new Error("Invalid prop "+e+" supplied to "+n)}function i(t,e){t="function"==typeof t?t(e):t;var n={};for(var o in t)!function(o){n[o]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t[o].apply(t,[e.getState()].concat(n));if(null!=i){if(i.then)return i.then(e.setState);e.setState(i)}}}(o);return n}var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},p=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=e.getProps(),e.actions=e.getActions(),e.update=function(){var t=e.getProps();o(t,e.state)||e.setState(t)},e}return n(e,t),e.prototype.componentWillMount=function(){this.unsubscribe=this.context.store.subscribe(this.update)},e.prototype.componentWillUnmount=function(){this.unsubscribe(this.update)},e.prototype.getProps=function(){var t=this.props.mapToProps,e=this.context.store&&this.context.store.getState()||{};return t?t(e,this.props):e},e.prototype.getActions=function(){return i(this.props.actions,this.context.store)},e.prototype.render=function(){return this.props.children(p({store:this.context.store},this.state,this.actions))},e.contextTypes={store:r},e}(e.Component),c=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n(o,t),o.prototype.getChildContext=function(){return{store:this.props.store}},o.prototype.render=function(){var t=this.props.children;return e.Children.only(t)},o.childContextTypes={store:r},o}(e.Component);t.connect=function(t,n){return void 0===n&&(n={}),function(o){return function(r){return e.createElement(u,p({},r,{mapToProps:t,actions:n}),function(t){return e.createElement(o,p({},t,r))})}}},t.Provider=c,t.Connect=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
68158