redux-zero
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,3 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e["redux-zero"]=e["redux-zero"]||{})}(this,function(e){"use strict";function t(e,t){function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function n(e){void 0===e&&(e={});var t=[];return{setState:function(n){e=S({},e,n),t.forEach(function(t){return t(e)})},subscribe:function(e){t.push(e)},unsubscribe:function(e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},getState:function(){return e}}}function r(e,t){return t={exports:{}},e(t,t.exports),t.exports}function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function i(e,t,n,r,o,i,u,a){if(I(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,u,a],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}function u(e){return function(){return e}}function a(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function c(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||U}function l(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||U}function f(){}function s(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||U}function p(e,t,n,r,o,i,u){return{$$typeof:W,type:e,key:t,ref:n,props:u,_owner:i}}function y(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function d(e,t,n,r){if(J.length){var o=J.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function v(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>J.length&&J.push(e)}function m(e,t,n,r){var o=typeof e;if("undefined"!==o&&"boolean"!==o||(e=null),null===e||"string"===o||"number"===o||"object"===o&&e.$$typeof===z)return n(r,e,""===t?"."+h(e,0):t),1;var i=0;if(t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){o=e[u];var c=t+h(o,u);i+=m(o,c,n,r)}else if("function"==typeof(c=B&&e[B]||e["@@iterator"]))for(e=c.call(e),u=0;!(o=e.next()).done;)o=o.value,c=t+h(o,u++),i+=m(o,c,n,r);else"object"===o&&(n=""+e,a("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return i}function h(e,t){return"object"==typeof e&&null!==e&&null!=e.key?y(e.key):t.toString(36)}function b(e,t){e.func.call(e.context,t,e.count++)}function g(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?_(e,r,n,T.thatReturnsArgument):null!=e&&(p.isValidElement(e)&&(e=p.cloneAndReplaceKey(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(Y,"$&/")+"/")+n)),r.push(e))}function _(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(Y,"$&/")+"/"),t=d(t,i,r,o),null==e||m(e,"",g,t),v(t)}function E(e,t,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(e.hasOwnProperty(i)){var u;try{ee("function"==typeof e[i],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",r||"React class",n,i,typeof e[i]),u=e[i](t,i,r,n,null,ne)}catch(e){u=e}if(te(!u||u instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,i,typeof u),u instanceof Error&&!(u.message in re)){re[u.message]=!0;var a=o?o():"";te(!1,"Failed %s type: %s%s",n,u.message,null!=a?a:"")}}}function O(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function w(e){return function(n){return r=function(r){function o(){var e=null!==r&&r.apply(this,arguments)||this;return e.state=e.getProps(),e.update=function(){var t=e.getProps();O(t,e.state)||e.setState(t)},e}return t(o,r),o.prototype.componentWillMount=function(){this.context.store.subscribe(this.update)},o.prototype.componentWillUnmount=function(){this.context.store.unsubscribe(this.update)},o.prototype.getProps=function(){var t=this.context.store&&this.context.store.getState()||{};return e(t,this.props)},o.prototype.render=function(){return(void 0)(n,S({store:this.context.store},this.props,this.state))},o}(void 0),r.contextTypes={store:void 0},r;var r}}var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},j=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,R=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=o(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var a in n)x.call(n,a)&&(i[a]=n[a]);if(j){r=j(n);for(var c=0;c<r.length;c++)P.call(n,r[c])&&(i[r[c]]=n[r[c]])}}return i},C={};"production"!==process.env.NODE_ENV&&Object.freeze(C);var A=C,I=function(e){};"production"!==process.env.NODE_ENV&&(I=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")});var N=i,D=function(){};D.thatReturns=u,D.thatReturnsFalse=u(!1),D.thatReturnsTrue=u(!0),D.thatReturnsNull=u(null),D.thatReturnsThis=function(){return this},D.thatReturnsArgument=function(e){return e};var T=D,U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};c.prototype.isReactComponent={},c.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&a("85"),this.updater.enqueueSetState(this,e,t,"setState")},c.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},f.prototype=c.prototype;var M=l.prototype=new f;M.constructor=l,R(M,c.prototype),M.isPureReactComponent=!0;var V=s.prototype=new f;V.constructor=s,R(V,c.prototype),V.unstable_isAsyncReactComponent=!0,V.render=function(){return this.props.children};var $={Component:c,PureComponent:l,AsyncComponent:s},F={current:null},q=Object.prototype.hasOwnProperty,W="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,L={key:!0,ref:!0,__self:!0,__source:!0};p.createElement=function(e,t,n){var r,o={},i=null,u=null,a=null,c=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(i=""+t.key),a=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source,t)q.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var f=Array(l),s=0;s<l;s++)f[s]=arguments[s+2];o.children=f}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return p(e,i,u,a,c,F.current,o)},p.createFactory=function(e){var t=p.createElement.bind(null,e);return t.type=e,t},p.cloneAndReplaceKey=function(e,t){return p(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},p.cloneElement=function(e,t,n){var r=R({},e.props),o=e.key,i=e.ref,u=e._self,a=e._source,c=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,c=F.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(f in t)q.call(t,f)&&!L.hasOwnProperty(f)&&(r[f]=void 0===t[f]&&void 0!==l?l[f]:t[f])}var f=arguments.length-2;if(1===f)r.children=n;else if(1<f){l=Array(f);for(var s=0;s<f;s++)l[s]=arguments[s+2];r.children=l}return p(e.type,o,i,u,a,c,r)},p.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===W};var B="function"==typeof Symbol&&Symbol.iterator,z="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Y=/\/+/g,J=[],K={forEach:function(e,t,n){if(null==e)return e;t=d(null,null,t,n),null==e||m(e,"",b,t),v(t)},map:function(e,t,n){if(null==e)return e;var r=[];return _(e,r,null,t,n),r},count:function(e){return null==e?0:m(e,"",T.thatReturnsNull,null)},toArray:function(e){var t=[];return _(e,t,null,T.thatReturnsArgument),t}},H={Children:{map:K.map,forEach:K.forEach,count:K.count,toArray:K.toArray,only:function(e){return p.isValidElement(e)||a("143"),e}},Component:$.Component,PureComponent:$.PureComponent,unstable_AsyncComponent:$.AsyncComponent,createElement:p.createElement,cloneElement:p.cloneElement,isValidElement:p.isValidElement,createFactory:p.createFactory,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:F,assign:R}},G=T;if("production"!==process.env.NODE_ENV){var Q=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};G=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Q.apply(void 0,[t].concat(r))}}}var X=G,Z="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";if("production"!==process.env.NODE_ENV)var ee=N,te=X,ne=Z,re={};var oe=E,ie=r(function(e){"production"!==process.env.NODE_ENV&&function(){function t(e,t){var n=e.constructor;z(!1,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op.\n\nPlease check the code for the %s component.",t,t,n&&(n.displayName||n.name)||"ReactClass")}function n(e,t,n){this.props=e,this.context=t,this.refs=q,this.updater=n||J}function r(e,t,n){this.props=e,this.context=t,this.refs=q,this.updater=n||J}function o(){}function i(e,t,n){this.props=e,this.context=t,this.refs=q,this.updater=n||J}function u(e){if(ce.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function a(e){if(ce.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}function c(e,t){var n=function(){ne||(ne=!0,le(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(e,t){var n=function(){re||(re=!0,le(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}function f(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function s(e){return(""+e).replace(Ie,"$&/")}function p(e,t,n,r){if(De.length){var o=De.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function y(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,De.length<Ne&&De.push(e)}function d(e,t,n,r){var o=typeof e;if("undefined"!==o&&"boolean"!==o||(e=null),null===e||"string"===o||"number"===o||"object"===o&&e.$$typeof===Pe)return n(r,e,""===t?Re+m(e,0):t),1;var i,u,a=0,c=""===t?Re:t+Ce;if(Array.isArray(e))for(var l=0;l<e.length;l++)i=e[l],u=c+m(i,l),a+=d(i,u,n,r);else{var f=je&&e[je]||e[xe];if("function"==typeof f){f===e.entries&&(we(Ae,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead.%s",Se()),Ae=!0);for(var s,p=f.call(e),y=0;!(s=p.next()).done;)i=s.value,u=c+m(i,y++),a+=d(i,u,n,r)}else if("object"===o){var v="";v=" If you meant to render a collection of children, use an array instead."+Se();var h=""+e;W(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===h?"object with keys {"+Object.keys(e).join(", ")+"}":h,v)}}return a}function v(e,t,n){return null==e?0:d(e,"",t,n)}function m(e,t){return"object"==typeof e&&null!==e&&null!=e.key?f(e.key):t.toString(36)}function h(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function b(e,t,n){if(null==e)return e;var r=p(null,null,t,n);v(e,h,r),y(r)}function g(e,t,n){var r=e.result,o=e.keyPrefix,i=e.func,u=e.context,a=i.call(u,t,e.count++);Array.isArray(a)?_(a,r,n,L.thatReturnsArgument):null!=a&&(ye.isValidElement(a)&&(a=ye.cloneAndReplaceKey(a,o+(!a.key||t&&t.key===a.key?"":s(a.key)+"/")+n)),r.push(a))}function _(e,t,n,r,o){var i="";null!=n&&(i=s(n)+"/");var u=p(t,i,r,o);v(e,g,u),y(u)}function E(e,t,n){if(null==e)return e;var r=[];return _(e,r,null,t,n),r}function O(e,t){return v(e,L.thatReturnsNull,null)}function w(e){var t=[];return _(e,t,null,L.thatReturnsArgument),t}function k(e){return ye.isValidElement(e)||W(!1,"React.Children.only expected to receive a single React element child."),e}function S(e){if("function"==typeof e.getName){return e.getName()}if("number"==typeof e.tag){var t=e,n=t.type;if("string"==typeof n)return n;if("function"==typeof n)return n.displayName||n.name}return null}function j(){if(ae.current){var e=ze(ae.current);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}function x(e){if(null!==e&&void 0!==e&&void 0!==e.__source){var t=e.__source;return"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+"."}return""}function P(e){var t=j();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}function R(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=P(t);if(!Qe[n]){Qe[n]=!0;var r="";e&&e._owner&&e._owner!==ae.current&&(r=" It was passed a child from "+ze(e._owner)+"."),Ye=e,Le(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.%s',n,r,Ke()),Ye=null}}}function C(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];ye.isValidElement(r)&&R(r,t)}else if(ye.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var o=He&&e[He]||e[Ge];if("function"==typeof o&&o!==e.entries)for(var i,u=o.call(e);!(i=u.next()).done;)ye.isValidElement(i.value)&&R(i.value,t)}}function I(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name,r=t.propTypes;r&&(Ye=e,Fe(r,e.props,"prop",n,Ke),Ye=null),"function"==typeof t.getDefaultProps&&Le(t.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function D(e){var t=Function.prototype.toString,n=RegExp("^"+t.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var r=t.call(e);return n.test(r)}catch(e){return!1}}function U(e){var t=me(e);if(t){var n=t.childIDs;he(e),n.forEach(U)}}function M(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function V(e){var t=lt.getDisplayName(e),n=lt.getElement(e),r=lt.getOwnerID(e),o=void 0;return r&&(o=lt.getDisplayName(r)),et(n,"ReactComponentTreeHook: Missing React element for debugID %s when building stack",e),Ve(t||"",n&&n._source,o||"")}var $=F,F=X,q=A,W=N,L=T,B=oe,z=F,Y={isMounted:function(e){return!1},enqueueForceUpdate:function(e,n,r){t(e,"forceUpdate")},enqueueReplaceState:function(e,n,r,o){t(e,"replaceState")},enqueueSetState:function(e,n,r,o){t(e,"setState")}},J=Y,K=function(){},H=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}};K=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];H.apply(void 0,[t].concat(r))}};var G=K;n.prototype.isReactComponent={},n.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&W(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."),this.updater.enqueueSetState(this,e,t,"setState")},n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var Q={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(var Z in Q)Q.hasOwnProperty(Z)&&function(e,t){Object.defineProperty(n.prototype,e,{get:function(){G(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(Z,Q[Z]);o.prototype=n.prototype;var ee=r.prototype=new o;ee.constructor=r,$(ee,n.prototype),ee.isPureReactComponent=!0;var te=i.prototype=new o;te.constructor=i,$(te,n.prototype),te.unstable_isAsyncReactComponent=!0,te.render=function(){return this.props.children};var ne,re,ie={Component:n,PureComponent:r,AsyncComponent:i},ue={current:null},ae=ue,ce=Object.prototype.hasOwnProperty,le=F,fe="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,se={key:!0,ref:!0,__self:!0,__source:!0},pe=function(e,t,n,r,o,i,u){var a={$$typeof:fe,type:e,key:t,ref:n,props:u,_owner:i};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};pe.createElement=function(e,t,n){var r,o={},i=null,f=null,s=null,p=null;if(null!=t){u(t)&&(f=t.ref),a(t)&&(i=""+t.key),s=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(r in t)ce.call(t,r)&&!se.hasOwnProperty(r)&&(o[r]=t[r])}var y=arguments.length-2;if(1===y)o.children=n;else if(y>1){for(var d=Array(y),v=0;v<y;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),o.children=d}if(e&&e.defaultProps){var m=e.defaultProps;for(r in m)void 0===o[r]&&(o[r]=m[r])}if((i||f)&&(void 0===o.$$typeof||o.$$typeof!==fe)){var h="function"==typeof e?e.displayName||e.name||"Unknown":e;i&&c(o,h),f&&l(o,h)}return pe(e,i,f,s,p,ae.current,o)},pe.createFactory=function(e){var t=pe.createElement.bind(null,e);return t.type=e,t},pe.cloneAndReplaceKey=function(e,t){return pe(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},pe.cloneElement=function(e,t,n){var r,o=$({},e.props),i=e.key,c=e.ref,l=e._self,f=e._source,s=e._owner;if(null!=t){u(t)&&(c=t.ref,s=ae.current),a(t)&&(i=""+t.key);var p;e.type&&e.type.defaultProps&&(p=e.type.defaultProps);for(r in t)ce.call(t,r)&&!se.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==p?o[r]=p[r]:o[r]=t[r])}var y=arguments.length-2;if(1===y)o.children=n;else if(y>1){for(var d=Array(y),v=0;v<y;v++)d[v]=arguments[v+2];o.children=d}return pe(e.type,i,c,l,f,s,o)},pe.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===fe};var ye=pe,de={};de.getCurrentStack=null,de.getStackAddendum=function(){var e=de.getCurrentStack;return e?e():null};var ve,me,he,be,ge,_e,Ee,Oe=de,we=F,ke=Oe,Se=ke.getStackAddendum,je="function"==typeof Symbol&&Symbol.iterator,xe="@@iterator",Pe="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Re=".",Ce=":",Ae=!1,Ie=/\/+/g,Ne=10,De=[],Te={forEach:b,map:E,count:O,toArray:w},Ue=Te,Me=k,Ve=function(e,t,n){return"\n in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")},$e=S,Fe=B,qe=G,We=Oe,Le=F,Be=Ve,ze=$e,Ye=null,Je=function(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"},Ke=function(){var e="";if(Ye){var t=Je(Ye),n=Ye._owner;e+=Be(t,Ye._source,n&&ze(n))}return e+=We.getStackAddendum()||""},He="function"==typeof Symbol&&Symbol.iterator,Ge="@@iterator",Qe={},Xe={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e;if(!r){var o="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(o+=" You likely forgot to export your component from the file it's defined in.");var i=x(t);o+=i||j(),o+=We.getStackAddendum()||"",Le(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",null==e?e:typeof e,o)}var u=ye.createElement.apply(this,arguments);if(null==u)return u;if(r)for(var a=2;a<arguments.length;a++)C(arguments[a],e);return I(u),u},createFactory:function(e){var t=Xe.createElement.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return qe(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},cloneElement:function(e,t,n){for(var r=ye.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)C(arguments[o],r.type);return I(r),r}},Ze=Xe,et=F,tt="function"==typeof Array.from&&"function"==typeof Map&&D(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&D(Map.prototype.keys)&&"function"==typeof Set&&D(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&D(Set.prototype.keys);if(tt){var nt=new Map,rt=new Set;ve=function(e,t){nt.set(e,t)},me=function(e){return nt.get(e)},he=function(e){nt.delete(e)},be=function(){return Array.from(nt.keys())},ge=function(e){rt.add(e)},_e=function(e){rt.delete(e)},Ee=function(){return Array.from(rt.keys())}}else{var ot={},it={},ut=function(e){return"."+e},at=function(e){return parseInt(e.substr(1),10)};ve=function(e,t){var n=ut(e);ot[n]=t},me=function(e){var t=ut(e);return ot[t]},he=function(e){var t=ut(e);delete ot[t]},be=function(){return Object.keys(ot).map(at)},ge=function(e){var t=ut(e);it[t]=!0},_e=function(e){var t=ut(e);delete it[t]},Ee=function(){return Object.keys(it).map(at)}}var ct=[],lt={onSetChildren:function(e,t){var n=me(e);n||W(!1,"Item must have been set"),n.childIDs=t;for(var r=0;r<t.length;r++){var o=t[r],i=me(o);i||W(!1,"Expected hook events to fire for the child before its parent includes it in onSetChildren()."),null==i.childIDs&&"object"==typeof i.element&&null!=i.element&&W(!1,"Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren()."),i.isMounted||W(!1,"Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren()."),null==i.parentID&&(i.parentID=e),i.parentID!==e&&W(!1,"Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).",o,i.parentID,e)}},onBeforeMountComponent:function(e,t,n){ve(e,{element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0})},onBeforeUpdateComponent:function(e,t){var n=me(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=me(e);t||W(!1,"Item must have been set"),t.isMounted=!0,0===t.parentID&&ge(e)},onUpdateComponent:function(e){var t=me(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=me(e);if(t){t.isMounted=!1;0===t.parentID&&_e(e)}ct.push(e)},purgeUnmountedComponents:function(){if(!lt._preventPurging){for(var e=0;e<ct.length;e++){U(ct[e])}ct.length=0}},isMounted:function(e){var t=me(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(){var e="",t=ae.current;return t&&("number"==typeof t.tag&&W(!1,"Fiber owners should not show up in Stack stack traces."),"number"==typeof t._debugID&&(e+=lt.getStackAddendumByID(t._debugID))),e},getStackAddendumByID:function(e){for(var t="";e;)t+=V(e),e=lt.getParentID(e);return t},getChildIDs:function(e){var t=me(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=lt.getElement(e);return t?M(t):null},getElement:function(e){var t=me(e);return t?t.element:null},getOwnerID:function(e){var t=lt.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=me(e);return t?t.parentID:null},getSource:function(e){var t=me(e),n=t?t.element:null;return null!=n?n._source:null},getText:function(e){var t=lt.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=me(e);return t?t.updateCount:0},getRootIDs:Ee,getRegisteredIDs:be},ft=lt,st=ye.createElement,pt=ye.createFactory,yt=ye.cloneElement,dt=Ze;st=dt.createElement,pt=dt.createFactory,yt=dt.cloneElement;var vt={Children:{map:Ue.map,forEach:Ue.forEach,count:Ue.count,toArray:Ue.toArray,only:Me},Component:ie.Component,PureComponent:ie.PureComponent,unstable_AsyncComponent:ie.AsyncComponent,createElement:st,cloneElement:yt,isValidElement:ye.isValidElement,createFactory:pt,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:ae,assign:$}};$(vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,{ReactComponentTreeHook:ft,ReactDebugCurrentFrame:Oe});var mt=vt;e.exports=mt}()}),ue=(r(function(e){"production"===process.env.NODE_ENV?e.exports=H:e.exports=ie}),function(e,t){function n(e){var t=e&&(_&&e[_]||e[E]);if("function"==typeof t)return t}function r(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function n(n,u,a,c,l,f,s){if(c=c||O,f=f||a,s!==Z)if(t)N(!1,"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");else if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+a;!r[p]&&i<3&&(X(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,c),r[p]=!0,i++)}return null==u[a]?n?new o(null===u[a]?"The "+l+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+l+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,a,c,l,f)}if("production"!==process.env.NODE_ENV)var r={},i=0;var u=n.bind(null,!1);return u.isRequired=n.bind(null,!0),u}function u(e){function t(t,n,r,i,u,a){var c=t[n];if(m(c)!==e)return new o("Invalid "+i+" `"+u+"` of type `"+h(c)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return i(t)}function a(e){function t(t,n,r,i,u){if("function"!=typeof e)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){return new o("Invalid "+i+" `"+u+"` of type `"+m(a)+"` supplied to `"+r+"`, expected an array.")}for(var c=0;c<a.length;c++){var l=e(a,c,r,i,u+"["+c+"]",Z);if(l instanceof Error)return l}return null}return i(t)}function c(e){function t(t,n,r,i,u){if(!(t[n]instanceof e)){var a=e.name||O;return new o("Invalid "+i+" `"+u+"` of type `"+g(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return i(t)}function l(e){function t(t,n,i,u,a){for(var c=t[n],l=0;l<e.length;l++)if(r(c,e[l]))return null;return new o("Invalid "+u+" `"+a+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?i(t):("production"!==process.env.NODE_ENV&&X(!1,"Invalid argument supplied to oneOf, expected an instance of array."),T.thatReturnsNull)}function f(e){function t(t,n,r,i,u){if("function"!=typeof e)return new o("Property `"+u+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],c=m(a);if("object"!==c)return new o("Invalid "+i+" `"+u+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var l in a)if(a.hasOwnProperty(l)){var f=e(a,l,r,i,u+"."+l,Z);if(f instanceof Error)return f}return null}return i(t)}function s(e){function t(t,n,r,i,u){for(var a=0;a<e.length;a++){if(null==(0,e[a])(t,n,r,i,u,Z))return null}return new o("Invalid "+i+" `"+u+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&X(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),T.thatReturnsNull;for(var n=0;n<e.length;n++){var r=e[n];if("function"!=typeof r)return X(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",b(r),n),T.thatReturnsNull}return i(t)}function p(e){function t(t,n,r,i,u){var a=t[n],c=m(a);if("object"!==c)return new o("Invalid "+i+" `"+u+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var f=e[l];if(f){var s=f(a,l,r,i,u+"."+l,Z);if(s)return s}}return null}return i(t)}function y(e){function t(t,n,r,i,u){var a=t[n],c=m(a);if("object"!==c)return new o("Invalid "+i+" `"+u+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var l=R({},t[n],e);for(var f in l){var s=e[f];if(!s)return new o("Invalid "+i+" `"+u+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=s(a,f,r,i,u+"."+f,Z);if(p)return p}return null}return i(t)}function d(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(d);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!d(o.value))return!1}else for(;!(o=i.next()).done;){var u=o.value;if(u&&!d(u[1]))return!1}return!0;default:return!1}}function v(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":v(t,e)?"symbol":t}function h(e){if(void 0===e||null===e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=h(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:O}var _="function"==typeof Symbol&&Symbol.iterator,E="@@iterator",O="<<anonymous>>",w={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:function(){return i(T.thatReturnsNull)}(),arrayOf:a,element:function(){function t(t,n,r,i,u){var a=t[n];if(!e(a)){return new o("Invalid "+i+" `"+u+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return i(t)}(),instanceOf:c,node:function(){function e(e,t,n,r,i){return d(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return i(e)}(),objectOf:f,oneOf:l,oneOfType:s,shape:p,exact:y};return o.prototype=Error.prototype, | ||
w.checkPropTypes=oe,w.PropTypes=w,w}),ae=function(){function e(e,t,n,r,o,i){i!==Z&&N(!1,"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")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=T,n.PropTypes=n,n},ce=(r(function(e){if("production"!==process.env.NODE_ENV){var t="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,n=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t};e.exports=ue(n,!0)}else e.exports=ae()}),function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.getChildContext=function(){return this.props.context},n.prototype.render=function(){return(void 0)(this.props.children)},n.childContextTypes={store:void 0},n}(void 0));e.createStore=n,e.connect=w,e.Provider=ce,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],e):e(t["redux-zero"]=t["redux-zero"]||{},t.React,t.PropTypes)}(this,function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t){void 0===t&&(t={});var e=[];return{setState:function(n){t=p({},t,n),e.forEach(function(e){return e(t)})},subscribe:function(t){e.push(t)},unsubscribe:function(t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},getState:function(){return t}}}function i(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 u(t){return function(o){return u=function(n){function u(){var t=null!==n&&n.apply(this,arguments)||this;return t.state=t.getProps(),t.update=function(){var e=t.getProps();i(e,t.state)||t.setState(e)},t}return r(u,n),u.prototype.componentWillMount=function(){this.context.store.subscribe(this.update)},u.prototype.componentWillUnmount=function(){this.context.store.unsubscribe(this.update)},u.prototype.getProps=function(){var e=this.context.store&&this.context.store.getState()||{};return t(e,this.props)},u.prototype.render=function(){return e.createElement(o,p({store:this.context.store},this.props,this.state))},u}(e.Component),u.contextTypes={store:n.object},u;var u}}var c=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,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},s=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return r(o,t),o.prototype.getChildContext=function(){return this.props.context},o.prototype.render=function(){var t=this.props.children;return e.Children.only(t)},o.childContextTypes={store:n.object},o}(e.Component);t.createStore=o,t.connect=u,t.Provider=s,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=redux-zero.min.js.map |
{ | ||
"name": "redux-zero", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -57,2 +57,3 @@ "main": "dist/redux-zero.cjs.js", | ||
"rollup-plugin-node-resolve": "3.0.0", | ||
"rollup-plugin-peer-deps-external": "1.0.0", | ||
"rollup-plugin-typescript2": "0.7.0", | ||
@@ -59,0 +60,0 @@ "rollup-plugin-uglify": "1.0.2", |
import typescript from 'rollup-plugin-typescript2'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import peerDeps from 'rollup-plugin-peer-deps-external'; | ||
@@ -11,2 +12,3 @@ export default { | ||
plugins: [ | ||
peerDeps(), | ||
typescript(), | ||
@@ -13,0 +15,0 @@ resolve({ |
import typescript from 'rollup-plugin-typescript2'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import peerDeps from 'rollup-plugin-peer-deps-external'; | ||
@@ -11,2 +12,3 @@ export default { | ||
plugins: [ | ||
peerDeps(), | ||
typescript(), | ||
@@ -13,0 +15,0 @@ resolve({ |
@@ -5,2 +5,3 @@ import typescript from 'rollup-plugin-typescript2'; | ||
import uglify from 'rollup-plugin-uglify'; | ||
import peerDeps from 'rollup-plugin-peer-deps-external'; | ||
@@ -13,2 +14,3 @@ export default { | ||
plugins: [ | ||
peerDeps(), | ||
typescript(), | ||
@@ -15,0 +17,0 @@ resolve({ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
26
0
8
36174
16
593
2
1