react-redux
Advanced tools
Comparing version 7.2.2 to 7.2.3
All notable changes are described on the [Releases](https://github.com/reduxjs/react-redux/releases) page. |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","redux","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRedux={},e.React,e.Redux,e.ReactDOM)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(t);function a(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}function i(){}function c(){}c.resetWarningCache=i;a((function(e){e.exports=function(){function e(e,t,r,n,o,u){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==u){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:i};return r.PropTypes=r,r}()}));var s=u.default.createContext(null);var f=function(e){e()},p=function(){return f},l={notify:function(){}};var d=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return!!this.unsubscribe},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=p(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();function y(){return(y=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function v(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;u.length>n;n++)0>t.indexOf(r=u[n])&&(o[r]=e[r]);return o} | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","redux","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRedux={},e.React,e.Redux,e.ReactDOM)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(t);function a(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}function i(){}function c(){}c.resetWarningCache=i;a((function(e){e.exports=function(){function e(e,t,r,n,o,u){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==u){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:i};return r.PropTypes=r,r}()}));var s=u.default.createContext(null);var f=function(e){e()},p=function(){return f},l={notify:function(){}};var d=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return!!this.unsubscribe},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=p(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}(),y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function v(){return(v=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;u.length>n;n++)0>t.indexOf(r=u[n])&&(o[r]=e[r]);return o} | ||
/** @license React v16.13.1 | ||
@@ -9,2 +9,2 @@ * react-is.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var m="function"==typeof Symbol&&Symbol.for,b=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,S=m?Symbol.for("react.fragment"):60107,P=m?Symbol.for("react.strict_mode"):60108,g=m?Symbol.for("react.profiler"):60114,O=m?Symbol.for("react.provider"):60109,w=m?Symbol.for("react.context"):60110,C=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,E=m?Symbol.for("react.forward_ref"):60112,T=m?Symbol.for("react.suspense"):60113,M=m?Symbol.for("react.suspense_list"):60120,R=m?Symbol.for("react.memo"):60115,$=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,N=m?Symbol.for("react.fundamental"):60117,q=m?Symbol.for("react.responder"):60118,D=m?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case b:switch(e=e.type){case C:case x:case S:case g:case P:case T:return e;default:switch(e=e&&e.$$typeof){case w:case E:case $:case R:case O:return e;default:return t}}case h:return t}}}function F(e){return _(e)===x}var k={AsyncMode:C,ConcurrentMode:x,ContextConsumer:w,ContextProvider:O,Element:b,ForwardRef:E,Fragment:S,Lazy:$,Memo:R,Portal:h,Profiler:g,StrictMode:P,Suspense:T,isAsyncMode:function(e){return F(e)||_(e)===C},isConcurrentMode:F,isContextConsumer:function(e){return _(e)===w},isContextProvider:function(e){return _(e)===O},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},isForwardRef:function(e){return _(e)===E},isFragment:function(e){return _(e)===S},isLazy:function(e){return _(e)===$},isMemo:function(e){return _(e)===R},isPortal:function(e){return _(e)===h},isProfiler:function(e){return _(e)===g},isStrictMode:function(e){return _(e)===P},isSuspense:function(e){return _(e)===T},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===S||e===x||e===g||e===P||e===T||e===M||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===R||e.$$typeof===O||e.$$typeof===w||e.$$typeof===E||e.$$typeof===N||e.$$typeof===q||e.$$typeof===D||e.$$typeof===j)},typeOf:_},W=a((function(e){e.exports=k})),H={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},U={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},I={};function L(e){return W.isMemo(e)?A:I[e.$$typeof]||H}I[W.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I[W.Memo]=A;var z=Object.defineProperty,K=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,G=Object.prototype;var J=function e(t,r,n){if("string"!=typeof r){if(G){var o=Y(r);o&&o!==G&&e(t,o,n)}var u=K(r);V&&(u=u.concat(V(r)));for(var a=L(t),i=L(r),c=0;u.length>c;++c){var s=u[c];if(!(U[s]||n&&n[s]||i&&i[s]||a&&a[s])){var f=B(r,s);try{z(t,s,f)}catch(e){}}}}return t},Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,X=[],Z=[null,null];function ee(e,t){return[t.payload,e[1]+1]}function te(e,t,r){Q((function(){return e.apply(void 0,t)}),r)}function re(e,t,r,n,o,u,a){e.current=n,t.current=o,r.current=!1,u.current&&(u.current=null,a())}function ne(e,t,r,n,o,u,a,i,c,s){if(e){var f=!1,p=null,l=function(){if(!f){var e,r,l=t.getState();try{e=n(l,o.current)}catch(e){r=e,p=e}r||(p=null),e===u.current?a.current||c():(u.current=e,i.current=e,a.current=!0,s({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=l,r.trySubscribe(),l();return function(){if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}}var oe=function(){return[null,0]};function ue(e,r){void 0===r&&(r={});var n=r.getDisplayName,o=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,a=r.methodName,i=void 0===a?"connectAdvanced":a,c=r.renderCountProp,f=void 0===c?void 0:c,p=r.shouldHandleStateChanges,l=void 0===p||p,m=r.storeKey,b=void 0===m?"store":m,h=r.forwardRef,S=void 0!==h&&h,P=r.context,g=void 0===P?s:P,O=v(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),w=g;return function(r){var n=r.displayName||r.name||"Component",a=o(n),c=y({},O,{getDisplayName:o,methodName:i,renderCountProp:f,shouldHandleStateChanges:l,storeKey:b,displayName:a,wrappedComponentName:n,WrappedComponent:r}),s=O.pure;var p=s?t.useMemo:function(e){return e()};function m(n){var o=t.useMemo((function(){var e=n.reactReduxForwardedRef,t=v(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),a=o[0],i=o[1],s=o[2],f=t.useMemo((function(){return a&&a.Consumer&&W.isContextConsumer(u.default.createElement(a.Consumer,null))?a:w}),[a,w]),m=t.useContext(f),b=!!n.store&&!!n.store.getState&&!!n.store.dispatch,h=b?n.store:m.store,S=t.useMemo((function(){return function(t){return e(t.dispatch,c)}(h)}),[h]),P=t.useMemo((function(){if(!l)return Z;var e=new d(h,b?null:m.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[h,b,m]),g=P[0],O=P[1],C=t.useMemo((function(){return b?m:y({},m,{subscription:g})}),[b,m,g]),x=t.useReducer(ee,X,oe),E=x[0][0],T=x[1];if(E&&E.error)throw E.error;var M=t.useRef(),R=t.useRef(s),$=t.useRef(),j=t.useRef(!1),N=p((function(){return $.current&&s===R.current?$.current:S(h.getState(),s)}),[h,E,s]);te(re,[R,M,j,s,N,$,O]),te(ne,[l,h,g,S,R,M,j,$,O,T],[h,g,S]);var q=t.useMemo((function(){return u.default.createElement(r,y({},N,{ref:i}))}),[i,r,N]);return t.useMemo((function(){return l?u.default.createElement(f.Provider,{value:C},q):q}),[f,q,C])}var h=s?u.default.memo(m):m;if(h.WrappedComponent=r,h.displayName=a,S){var P=u.default.forwardRef((function(e,t){return u.default.createElement(h,y({},e,{reactReduxForwardedRef:t}))}));return P.displayName=a,P.WrappedComponent=r,J(P,r)}return J(h,r)}}function ae(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ie(e,t){if(ae(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!ae(e[r[n]],t[r[n]]))return!1;return!0}function ce(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function se(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function fe(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=se(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=se(o),o=n(t,r)),o},n}}var pe=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?ce((function(t){return r.bindActionCreators(e,t)})):void 0}];var le=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(){return{}}))}];function de(e,t,r){return y({},r,e,t)}var ye=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,u=r.areMergedPropsEqual,a=!1;return function(t,r,i){var c=e(t,r,i);return a?o&&u(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return de}}];function ve(e,t,r,n){return function(o,u){return r(e(o,u),t(n,u),u)}}function me(e,t,r,n,o){var u,a,i,c,s,f=o.areStatesEqual,p=o.areOwnPropsEqual,l=o.areStatePropsEqual,d=!1;function y(o,d){var y,v,m=!p(d,a),b=!f(o,u);return u=o,a=d,m&&b?(i=e(u,a),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):m?(e.dependsOnOwnProps&&(i=e(u,a)),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):b?(y=e(u,a),v=!l(y,i),i=y,v&&(s=r(i,c,a)),s):s}return function(o,f){return d?y(o,f):(i=e(u=o,a=f),c=t(n,a),s=r(i,c,a),d=!0,s)}}function be(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,u=v(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,u),i=n(e,u),c=o(e,u);return(u.pure?me:ve)(a,i,c,e,u)}function he(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function Se(e,t){return e===t}function Pe(e){var t=void 0===e?{}:e,r=t.connectHOC,n=void 0===r?ue:r,o=t.mapStateToPropsFactories,u=void 0===o?le:o,a=t.mapDispatchToPropsFactories,i=void 0===a?pe:a,c=t.mergePropsFactories,s=void 0===c?ye:c,f=t.selectorFactory,p=void 0===f?be:f;return function(e,t,r,o){void 0===o&&(o={});var a=o.pure,c=void 0===a||a,f=o.areStatesEqual,l=void 0===f?Se:f,d=o.areOwnPropsEqual,m=void 0===d?ie:d,b=o.areStatePropsEqual,h=void 0===b?ie:b,S=o.areMergedPropsEqual,P=void 0===S?ie:S,g=v(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=he(e,u,"mapStateToProps"),w=he(t,i,"mapDispatchToProps"),C=he(r,s,"mergeProps");return n(p,y({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:O,initMapDispatchToProps:w,initMergeProps:C,pure:c,areStatesEqual:l,areOwnPropsEqual:m,areStatePropsEqual:h,areMergedPropsEqual:P},g))}}var ge=Pe();function Oe(){return t.useContext(s)}function we(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(){return r().store}}var Ce=we();function xe(e){void 0===e&&(e=s);var t=e===s?Ce:we(e);return function(){return t().dispatch}}var Ee=xe(),Te=function(e,t){return e===t};function Me(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(e,n){void 0===n&&(n=Te);var o=r(),u=function(e,r,n,o){var u,a=t.useReducer((function(e){return e+1}),0)[1],i=t.useMemo((function(){return new d(n,o)}),[n,o]),c=t.useRef(),s=t.useRef(),f=t.useRef(),p=t.useRef(),l=n.getState();try{u=e!==s.current||l!==f.current||c.current?e(l):p.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return Q((function(){s.current=e,f.current=l,p.current=u,c.current=void 0})),Q((function(){function e(){try{var e=s.current(n.getState());if(r(e,p.current))return;p.current=e}catch(e){c.current=e}a()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}}),[n,i]),u}(e,n,o.store,o.subscription);return t.useDebugValue(u),u}}var Re=Me();f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=function(e){var r=e.store,n=e.context,o=e.children,a=t.useMemo((function(){var e=new d(r);return e.onStateChange=e.notifyNestedSubs,{store:r,subscription:e}}),[r]),i=t.useMemo((function(){return r.getState()}),[r]);return t.useEffect((function(){var e=a.subscription;return e.trySubscribe(),i!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,i]),u.default.createElement((n||s).Provider,{value:a},o)},e.ReactReduxContext=s,e.connect=ge,e.connectAdvanced=ue,e.createDispatchHook=xe,e.createSelectorHook=Me,e.createStoreHook=we,e.shallowEqual=ie,e.useDispatch=Ee,e.useSelector=Re,e.useStore=Ce,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
*/var b="function"==typeof Symbol&&Symbol.for,h=b?Symbol.for("react.element"):60103,S=b?Symbol.for("react.portal"):60106,P=b?Symbol.for("react.fragment"):60107,g=b?Symbol.for("react.strict_mode"):60108,O=b?Symbol.for("react.profiler"):60114,w=b?Symbol.for("react.provider"):60109,C=b?Symbol.for("react.context"):60110,x=b?Symbol.for("react.async_mode"):60111,E=b?Symbol.for("react.concurrent_mode"):60111,T=b?Symbol.for("react.forward_ref"):60112,M=b?Symbol.for("react.suspense"):60113,R=b?Symbol.for("react.suspense_list"):60120,$=b?Symbol.for("react.memo"):60115,j=b?Symbol.for("react.lazy"):60116,N=b?Symbol.for("react.block"):60121,q=b?Symbol.for("react.fundamental"):60117,D=b?Symbol.for("react.responder"):60118,_=b?Symbol.for("react.scope"):60119;function F(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case h:switch(e=e.type){case x:case E:case P:case O:case g:case M:return e;default:switch(e=e&&e.$$typeof){case C:case T:case j:case $:case w:return e;default:return t}}case S:return t}}}function k(e){return F(e)===E}var W={AsyncMode:x,ConcurrentMode:E,ContextConsumer:C,ContextProvider:w,Element:h,ForwardRef:T,Fragment:P,Lazy:j,Memo:$,Portal:S,Profiler:O,StrictMode:g,Suspense:M,isAsyncMode:function(e){return k(e)||F(e)===x},isConcurrentMode:k,isContextConsumer:function(e){return F(e)===C},isContextProvider:function(e){return F(e)===w},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===h},isForwardRef:function(e){return F(e)===T},isFragment:function(e){return F(e)===P},isLazy:function(e){return F(e)===j},isMemo:function(e){return F(e)===$},isPortal:function(e){return F(e)===S},isProfiler:function(e){return F(e)===O},isStrictMode:function(e){return F(e)===g},isSuspense:function(e){return F(e)===M},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===P||e===E||e===O||e===g||e===M||e===R||"object"==typeof e&&null!==e&&(e.$$typeof===j||e.$$typeof===$||e.$$typeof===w||e.$$typeof===C||e.$$typeof===T||e.$$typeof===q||e.$$typeof===D||e.$$typeof===_||e.$$typeof===N)},typeOf:F},H=a((function(e){e.exports=W})),U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},A={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L={};function z(e){return H.isMemo(e)?I:L[e.$$typeof]||U}L[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[H.Memo]=I;var K=Object.defineProperty,V=Object.getOwnPropertyNames,B=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,G=Object.getPrototypeOf,J=Object.prototype;var Q=function e(t,r,n){if("string"!=typeof r){if(J){var o=G(r);o&&o!==J&&e(t,o,n)}var u=V(r);B&&(u=u.concat(B(r)));for(var a=z(t),i=z(r),c=0;u.length>c;++c){var s=u[c];if(!(A[s]||n&&n[s]||i&&i[s]||a&&a[s])){var f=Y(r,s);try{K(t,s,f)}catch(e){}}}}return t},X=[],Z=[null,null];function ee(e,t){return[t.payload,e[1]+1]}function te(e,t,r){y((function(){return e.apply(void 0,t)}),r)}function re(e,t,r,n,o,u,a){e.current=n,t.current=o,r.current=!1,u.current&&(u.current=null,a())}function ne(e,t,r,n,o,u,a,i,c,s){if(e){var f=!1,p=null,l=function(){if(!f){var e,r,l=t.getState();try{e=n(l,o.current)}catch(e){r=e,p=e}r||(p=null),e===u.current?a.current||c():(u.current=e,i.current=e,a.current=!0,s({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=l,r.trySubscribe(),l();return function(){if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}}var oe=function(){return[null,0]};function ue(e,r){void 0===r&&(r={});var n=r.getDisplayName,o=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,a=r.methodName,i=void 0===a?"connectAdvanced":a,c=r.renderCountProp,f=void 0===c?void 0:c,p=r.shouldHandleStateChanges,l=void 0===p||p,y=r.storeKey,b=void 0===y?"store":y,h=r.forwardRef,S=void 0!==h&&h,P=r.context,g=void 0===P?s:P,O=m(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),w=g;return function(r){var n=r.displayName||r.name||"Component",a=o(n),c=v({},O,{getDisplayName:o,methodName:i,renderCountProp:f,shouldHandleStateChanges:l,storeKey:b,displayName:a,wrappedComponentName:n,WrappedComponent:r}),s=O.pure;var p=s?t.useMemo:function(e){return e()};function y(n){var o=t.useMemo((function(){var e=n.reactReduxForwardedRef,t=m(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),a=o[0],i=o[1],s=o[2],f=t.useMemo((function(){return a&&a.Consumer&&H.isContextConsumer(u.default.createElement(a.Consumer,null))?a:w}),[a,w]),y=t.useContext(f),b=!!n.store&&!!n.store.getState&&!!n.store.dispatch,h=b?n.store:y.store,S=t.useMemo((function(){return function(t){return e(t.dispatch,c)}(h)}),[h]),P=t.useMemo((function(){if(!l)return Z;var e=new d(h,b?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[h,b,y]),g=P[0],O=P[1],C=t.useMemo((function(){return b?y:v({},y,{subscription:g})}),[b,y,g]),x=t.useReducer(ee,X,oe),E=x[0][0],T=x[1];if(E&&E.error)throw E.error;var M=t.useRef(),R=t.useRef(s),$=t.useRef(),j=t.useRef(!1),N=p((function(){return $.current&&s===R.current?$.current:S(h.getState(),s)}),[h,E,s]);te(re,[R,M,j,s,N,$,O]),te(ne,[l,h,g,S,R,M,j,$,O,T],[h,g,S]);var q=t.useMemo((function(){return u.default.createElement(r,v({},N,{ref:i}))}),[i,r,N]);return t.useMemo((function(){return l?u.default.createElement(f.Provider,{value:C},q):q}),[f,q,C])}var h=s?u.default.memo(y):y;if(h.WrappedComponent=r,h.displayName=a,S){var P=u.default.forwardRef((function(e,t){return u.default.createElement(h,v({},e,{reactReduxForwardedRef:t}))}));return P.displayName=a,P.WrappedComponent=r,Q(P,r)}return Q(h,r)}}function ae(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ie(e,t){if(ae(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!ae(e[r[n]],t[r[n]]))return!1;return!0}function ce(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function se(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function fe(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=se(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=se(o),o=n(t,r)),o},n}}var pe=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?ce((function(t){return r.bindActionCreators(e,t)})):void 0}];var le=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(){return{}}))}];function de(e,t,r){return v({},r,e,t)}var ye=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,u=r.areMergedPropsEqual,a=!1;return function(t,r,i){var c=e(t,r,i);return a?o&&u(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return de}}];function ve(e,t,r,n){return function(o,u){return r(e(o,u),t(n,u),u)}}function me(e,t,r,n,o){var u,a,i,c,s,f=o.areStatesEqual,p=o.areOwnPropsEqual,l=o.areStatePropsEqual,d=!1;function y(o,d){var y,v,m=!p(d,a),b=!f(o,u);return u=o,a=d,m&&b?(i=e(u,a),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):m?(e.dependsOnOwnProps&&(i=e(u,a)),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):b?(y=e(u,a),v=!l(y,i),i=y,v&&(s=r(i,c,a)),s):s}return function(o,f){return d?y(o,f):(i=e(u=o,a=f),c=t(n,a),s=r(i,c,a),d=!0,s)}}function be(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,u=m(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,u),i=n(e,u),c=o(e,u);return(u.pure?me:ve)(a,i,c,e,u)}function he(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function Se(e,t){return e===t}function Pe(e){var t=void 0===e?{}:e,r=t.connectHOC,n=void 0===r?ue:r,o=t.mapStateToPropsFactories,u=void 0===o?le:o,a=t.mapDispatchToPropsFactories,i=void 0===a?pe:a,c=t.mergePropsFactories,s=void 0===c?ye:c,f=t.selectorFactory,p=void 0===f?be:f;return function(e,t,r,o){void 0===o&&(o={});var a=o.pure,c=void 0===a||a,f=o.areStatesEqual,l=void 0===f?Se:f,d=o.areOwnPropsEqual,y=void 0===d?ie:d,b=o.areStatePropsEqual,h=void 0===b?ie:b,S=o.areMergedPropsEqual,P=void 0===S?ie:S,g=m(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=he(e,u,"mapStateToProps"),w=he(t,i,"mapDispatchToProps"),C=he(r,s,"mergeProps");return n(p,v({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:O,initMapDispatchToProps:w,initMergeProps:C,pure:c,areStatesEqual:l,areOwnPropsEqual:y,areStatePropsEqual:h,areMergedPropsEqual:P},g))}}var ge=Pe();function Oe(){return t.useContext(s)}function we(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(){return r().store}}var Ce=we();function xe(e){void 0===e&&(e=s);var t=e===s?Ce:we(e);return function(){return t().dispatch}}var Ee=xe(),Te=function(e,t){return e===t};function Me(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(e,n){void 0===n&&(n=Te);var o=r(),u=function(e,r,n,o){var u,a=t.useReducer((function(e){return e+1}),0)[1],i=t.useMemo((function(){return new d(n,o)}),[n,o]),c=t.useRef(),s=t.useRef(),f=t.useRef(),p=t.useRef(),l=n.getState();try{if(e!==s.current||l!==f.current||c.current){var v=e(l);u=void 0!==p.current&&r(v,p.current)?p.current:v}else u=p.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return y((function(){s.current=e,f.current=l,p.current=u,c.current=void 0})),y((function(){function e(){try{var e=s.current(n.getState());if(r(e,p.current))return;p.current=e}catch(e){c.current=e}a()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}}),[n,i]),u}(e,n,o.store,o.subscription);return t.useDebugValue(u),u}}var Re=Me();f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=function(e){var r=e.store,n=e.context,o=e.children,a=t.useMemo((function(){var e=new d(r);return e.onStateChange=e.notifyNestedSubs,{store:r,subscription:e}}),[r]),i=t.useMemo((function(){return r.getState()}),[r]);return y((function(){var e=a.subscription;return e.trySubscribe(),i!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,i]),u.default.createElement((n||s).Provider,{value:a},o)},e.ReactReduxContext=s,e.connect=ge,e.connectAdvanced=ue,e.createDispatchHook=xe,e.createSelectorHook=Me,e.createStoreHook=we,e.shallowEqual=ie,e.useDispatch=Ee,e.useSelector=Re,e.useStore=Ce,Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -130,10 +130,10 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
compute new props from state, props, and dispatch. For example: | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
thing: state.things[props.thingId], | ||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), | ||
}))(YourComponent) | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to | ||
the selectorFactory, along with displayName and WrappedComponent, as the second argument. | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
props. Do not use connectAdvanced directly without memoizing results between calls to your | ||
@@ -140,0 +140,0 @@ selector, otherwise the Connect component will re-render on every state or props change. |
@@ -1,5 +0,6 @@ | ||
import React, { useMemo, useEffect } from 'react'; | ||
import React, { useMemo } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { ReactReduxContext } from './Context'; | ||
import Subscription from '../utils/Subscription'; | ||
import { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'; | ||
@@ -21,3 +22,3 @@ function Provider(_ref) { | ||
}, [store]); | ||
useEffect(function () { | ||
useIsomorphicLayoutEffect(function () { | ||
var subscription = contextValue.subscription; | ||
@@ -24,0 +25,0 @@ subscription.trySubscribe(); |
@@ -0,0 +0,0 @@ import _extends from "@babel/runtime/helpers/esm/extends"; |
@@ -0,0 +0,0 @@ import { ReactReduxContext } from '../components/Context'; |
@@ -0,0 +0,0 @@ import { useContext } from 'react'; |
@@ -29,3 +29,9 @@ import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react'; | ||
if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { | ||
selectedState = selector(storeState); | ||
var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references | ||
if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) { | ||
selectedState = newSelectedState; | ||
} else { | ||
selectedState = latestSelectedState.current; | ||
} | ||
} else { | ||
@@ -51,9 +57,9 @@ selectedState = latestSelectedState.current; | ||
try { | ||
var newSelectedState = latestSelector.current(store.getState()); | ||
var _newSelectedState = latestSelector.current(store.getState()); | ||
if (equalityFn(newSelectedState, latestSelectedState.current)) { | ||
if (equalityFn(_newSelectedState, latestSelectedState.current)) { | ||
return; | ||
} | ||
latestSelectedState.current = newSelectedState; | ||
latestSelectedState.current = _newSelectedState; | ||
} catch (err) { | ||
@@ -60,0 +66,0 @@ // we ignore all errors here, since when the component |
@@ -0,0 +0,0 @@ import { useContext } from 'react'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -147,10 +147,10 @@ "use strict"; | ||
compute new props from state, props, and dispatch. For example: | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
thing: state.things[props.thingId], | ||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), | ||
}))(YourComponent) | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to | ||
the selectorFactory, along with displayName and WrappedComponent, as the second argument. | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
props. Do not use connectAdvanced directly without memoizing results between calls to your | ||
@@ -157,0 +157,0 @@ selector, otherwise the Connect component will re-render on every state or props change. |
@@ -18,2 +18,4 @@ "use strict"; | ||
var _useIsomorphicLayoutEffect = require("../utils/useIsomorphicLayoutEffect"); | ||
function Provider(_ref) { | ||
@@ -34,3 +36,3 @@ var store = _ref.store, | ||
}, [store]); | ||
(0, _react.useEffect)(function () { | ||
(0, _useIsomorphicLayoutEffect.useIsomorphicLayoutEffect)(function () { | ||
var subscription = contextValue.subscription; | ||
@@ -37,0 +39,0 @@ subscription.trySubscribe(); |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -41,3 +41,9 @@ "use strict"; | ||
if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { | ||
selectedState = selector(storeState); | ||
var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references | ||
if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) { | ||
selectedState = newSelectedState; | ||
} else { | ||
selectedState = latestSelectedState.current; | ||
} | ||
} else { | ||
@@ -63,9 +69,9 @@ selectedState = latestSelectedState.current; | ||
try { | ||
var newSelectedState = latestSelector.current(store.getState()); | ||
var _newSelectedState = latestSelector.current(store.getState()); | ||
if (equalityFn(newSelectedState, latestSelectedState.current)) { | ||
if (equalityFn(_newSelectedState, latestSelectedState.current)) { | ||
return; | ||
} | ||
latestSelectedState.current = newSelectedState; | ||
latestSelectedState.current = _newSelectedState; | ||
} catch (err) { | ||
@@ -72,0 +78,0 @@ // we ignore all errors here, since when the component |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "react-redux", | ||
"version": "7.2.2", | ||
"version": "7.2.3", | ||
"description": "Official React bindings for Redux", | ||
@@ -52,2 +52,3 @@ "keywords": [ | ||
"@babel/runtime": "^7.12.1", | ||
"@types/react-redux": "^7.1.16", | ||
"hoist-non-react-statics": "^3.3.2", | ||
@@ -54,0 +55,0 @@ "loose-envify": "^1.4.0", |
@@ -0,0 +0,0 @@ React Redux |
@@ -0,0 +0,0 @@ import Provider from './components/Provider' |
@@ -0,0 +0,0 @@ import hoistStatics from 'hoist-non-react-statics' |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -1,5 +0,6 @@ | ||
import React, { useMemo, useEffect } from 'react' | ||
import React, { useMemo } from 'react' | ||
import PropTypes from 'prop-types' | ||
import { ReactReduxContext } from './Context' | ||
import Subscription from '../utils/Subscription' | ||
import { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect' | ||
@@ -18,3 +19,3 @@ function Provider({ store, context, children }) { | ||
useEffect(() => { | ||
useIsomorphicLayoutEffect(() => { | ||
const { subscription } = contextValue | ||
@@ -21,0 +22,0 @@ subscription.trySubscribe() |
@@ -0,0 +0,0 @@ import connectAdvanced from '../components/connectAdvanced' |
@@ -0,0 +0,0 @@ import { bindActionCreators } from 'redux' |
@@ -0,0 +0,0 @@ import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps' |
@@ -0,0 +0,0 @@ import verifyPlainObject from '../utils/verifyPlainObject' |
@@ -0,0 +0,0 @@ import verifySubselectors from './verifySubselectors' |
@@ -0,0 +0,0 @@ import warning from '../utils/warning' |
@@ -0,0 +0,0 @@ import verifyPlainObject from '../utils/verifyPlainObject' |
@@ -0,0 +0,0 @@ import { ReactReduxContext } from '../components/Context' |
@@ -0,0 +0,0 @@ import { useContext } from 'react' |
@@ -36,3 +36,12 @@ import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react' | ||
) { | ||
selectedState = selector(storeState) | ||
const newSelectedState = selector(storeState) | ||
// ensure latest selected state is reused so that a custom equality function can result in identical references | ||
if ( | ||
latestSelectedState.current === undefined || | ||
!equalityFn(newSelectedState, latestSelectedState.current) | ||
) { | ||
selectedState = newSelectedState | ||
} else { | ||
selectedState = latestSelectedState.current | ||
} | ||
} else { | ||
@@ -39,0 +48,0 @@ selectedState = latestSelectedState.current |
@@ -0,0 +0,0 @@ import { useContext } from 'react' |
@@ -0,0 +0,0 @@ import Provider from './components/Provider' |
@@ -0,0 +0,0 @@ // Default to a dummy "batch" implementation that just runs the callback |
@@ -0,0 +0,0 @@ /** |
/* eslint-disable import/no-unresolved */ | ||
export { unstable_batchedUpdates } from 'react-dom' |
@@ -0,0 +0,0 @@ /* eslint-disable import/named */ |
@@ -0,0 +0,0 @@ function is(x, y) { |
@@ -0,0 +0,0 @@ import { getBatch } from './batch' |
@@ -0,0 +0,0 @@ import { useEffect, useLayoutEffect } from 'react' |
@@ -0,0 +0,0 @@ import { useLayoutEffect } from 'react' |
@@ -0,0 +0,0 @@ import isPlainObject from './isPlainObject' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { bindActionCreators } from 'redux' |
Sorry, the diff of this file is too big to display
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
274603
5704
8
+ Added@types/react-redux@^7.1.16
+ Added@types/hoist-non-react-statics@3.3.5(transitive)
+ Added@types/prop-types@15.7.12(transitive)
+ Added@types/react@18.3.4(transitive)
+ Added@types/react-redux@7.1.33(transitive)
+ Addedcsstype@3.1.3(transitive)