Comparing version 2.0.7 to 2.0.8
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).rcHooks={},e.React)}(this,(function(e,n){"use strict";function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var r=t(n),u=function(){return u=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var u in n=arguments[t])Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u]);return e},u.apply(this,arguments)};function i(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(r=Object.getOwnPropertySymbols(e);u<r.length;u++)n.indexOf(r[u])<0&&Object.prototype.propertyIsEnumerable.call(e,r[u])&&(t[r[u]]=e[r[u]])}return t}function o(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,u,i=t.call(e),o=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){u={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(u)throw u.error}}return o}function c(e,n,t){if(t||2===arguments.length)for(var r,u=0,i=n.length;u<i;u++)!r&&u in n||(r||(r=Array.prototype.slice.call(n,0,u)),r[u]=n[u]);return e.concat(r||Array.prototype.slice.call(n))}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var l=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},s="object"==typeof f&&f&&f.Object===Object&&f,d="object"==typeof self&&self&&self.Object===Object&&self,v=s||d||Function("return this")(),p=v,h=function(){return p.Date.now()},y=/\s/;var g=function(e){for(var n=e.length;n--&&y.test(e.charAt(n)););return n},m=/^\s+/;var b=function(e){return e?e.slice(0,g(e)+1).replace(m,""):e},w=v.Symbol,E=w,R=Object.prototype,T=R.hasOwnProperty,S=R.toString,O=E?E.toStringTag:void 0;var C=function(e){var n=T.call(e,O),t=e[O];try{e[O]=void 0;var r=!0}catch(e){}var u=S.call(e);return r&&(n?e[O]=t:delete e[O]),u},j=Object.prototype.toString;var k=C,L=function(e){return j.call(e)},x=w?w.toStringTag:void 0;var P=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?k(e):L(e)},A=function(e){return null!=e&&"object"==typeof e};var M=b,N=l,_=function(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==P(e)},z=/^[-+]0x[0-9a-f]+$/i,D=/^0b[01]+$/i,H=/^0o[0-7]+$/i,I=parseInt;var F=l,W=h,U=function(e){if("number"==typeof e)return e;if(_(e))return NaN;if(N(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=N(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=M(e);var t=D.test(e);return t||H.test(e)?I(e.slice(2),t?2:8):z.test(e)?NaN:+e},V=Math.max,$=Math.min;var q=function(e,n,t){var r,u,i,o,a,c,f=0,l=!1,s=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(n){var t=r,i=u;return r=u=void 0,f=n,o=e.apply(i,t)}function p(e){return f=e,a=setTimeout(y,n),l?v(e):o}function h(e){var t=e-c;return void 0===c||t>=n||t<0||s&&e-f>=i}function y(){var e=W();if(h(e))return g(e);a=setTimeout(y,function(e){var t=n-(e-c);return s?$(t,i-(e-f)):t}(e))}function g(e){return a=void 0,d&&r?v(e):(r=u=void 0,o)}function m(){var e=W(),t=h(e);if(r=arguments,u=this,c=e,t){if(void 0===a)return p(c);if(s)return clearTimeout(a),a=setTimeout(y,n),v(c)}return void 0===a&&(a=setTimeout(y,n)),o}return n=U(n)||0,F(t)&&(l=!!t.leading,i=(s="maxWait"in t)?V(U(t.maxWait)||0,n):i,d="trailing"in t?!!t.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),f=0,r=c=u=a=void 0},m.flush=function(){return void 0===a?o:g(W())},m},B=q,K=l;var Y=function(e,n,t){var r=!0,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return K(t)&&(r="leading"in t?!!t.leading:r,u="trailing"in t?!!t.trailing:u),B(e,n,{leading:r,maxWait:n,trailing:u})};function G(e){var t=n.useRef(e);t.current=e;var r=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.current;return null==r?void 0:r.apply(void 0,c([],a(e),!1))}),[t]);return r}var J=function(e,t){var r=n.useRef(!1);n.useEffect((function(){if(r.current)return e();r.current=!0}),t)};function Q(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}var X={},Z=function(e){var n=X[e];if(n){var t=n.startTime,r=n.cacheTime,u=n.data;if(!((new Date).getTime()-t>=r))return u;n.timer&&(clearTimeout(n.timer),n.timer=null,delete X[e])}},ee=function(e,n,t){void 0===t&&(t=3e5),X[e]&&clearTimeout(X[e].timer);var r=setTimeout((function(){delete X[e]}),t);X[e]={data:n,timer:r,cacheTime:t,startTime:(new Date).getTime()}};var ne=[];var te=!1;if("undefined"!=typeof window&&window.addEventListener&&!te){var re=function(){if(Q()&&("undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine))for(var e=0;e<ne.length;e++){(0,ne[e])()}};window.addEventListener("visibilitychange",re,!1),window.addEventListener("focus",re,!1),te=!0}var ue=[];var ie=!1;if("undefined"!=typeof window&&window.addEventListener&&!ie){window.addEventListener("visibilitychange",(function(){if(Q())for(var e=0;e<ue.length;e++){(0,ue[e])()}}),!1),ie=!0}var oe=function(){};function ae(e,t){var r=t||{},i=r.autoRun,o=void 0===i||i,f=r.refreshDeps,l=void 0===f?[]:f,s=r.defaultParams,d=void 0===s?[]:s,v=r.defaultLoading,p=void 0!==v&&v,h=r.initialData,y=r.cacheKey,g=void 0===y?"":y,m=r.cacheTime,b=void 0===m?3e5:m,w=r.persisted,E=void 0!==w&&w,R=r.onSuccess,T=void 0===R?oe:R,S=r.onError,O=void 0===S?oe:S,C=r.__INTERNAL_FORMAT__,j=r.pollingInterval,k=void 0===j?0:j,L=r.pollingWhenHidden,x=void 0===L||L,P=r.refreshOnWindowFocus,A=void 0!==P&&P,M=r.focusTimespan,N=void 0===M?5e3:M,_=r.loadingDelay,z=r.debounceInterval,D=r.throttleInterval,H=a(n.useState({params:Array.isArray(d)?d:[d],loading:p,error:null,data:g&&Z(g)||h}),2),I=H[0],F=H[1],W=n.useRef(0),U=n.useRef(null),V=n.useRef(!1),$=n.useRef(null),B=n.useRef(!1),K=n.useRef([]),X=G(e),te=G(T),re=G(O),ie=n.useRef(C);ie.current=C;var ae=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];U.current&&clearTimeout(U.current),$.current&&clearTimeout($.current),W.current+=1;var t=W.current,r=g?Z(g):void 0;r&&E||(F((function(n){return u(u({},n),{loading:!_,params:e})})),$.current=_?setTimeout((function(){F((function(e){return u(u({},e),{loading:!0})}))}),_):null);var i=function(){return new Promise((function(n,i){r&&E?B.current||t!==W.current||(te(r,e),F((function(e){return u(u({},e),{data:r,error:null,loading:!1})})),n(r)):X.apply(void 0,c([],a(e),!1)).then((function(r){if(!B.current&&t===W.current){$.current&&clearTimeout($.current);var i="function"==typeof ie.current?ie.current(r,e):r;F((function(e){return u(u({},e),{data:i,error:null,loading:!1})})),g&&ee(g,i,b),te(i,e),n(i)}})).catch((function(n){B.current||t!==W.current||($.current&&clearTimeout($.current),F((function(e){return u(u({},e),{error:n,loading:!1})})),re(n,e),i(n))}))}))};return i().finally((function(){if(!B.current&&t===W.current&&k){if(!Q()&&!x)return void(V.current=!0);U.current=setTimeout((function(){le.apply(void 0,c([],a(e),!1))}),k)}}))}),[g,b,_,E,k,x]),ce=n.useRef(z?q(ae,z):void 0),fe=n.useRef(D?Y(ae,D):void 0),le=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return ce.current?(ce.current.apply(ce,c([],a(e),!1)),Promise.resolve(null)):fe.current?(fe.current.apply(fe,c([],a(e),!1)),Promise.resolve(null)):ae.apply(void 0,c([],a(e),!1))}),[ae]),se=n.useCallback((function(){return le.apply(void 0,c([],a(I.params),!1))}),[le,I.params]),de=n.useCallback((function(){V.current&&(V.current=!1,se())}),[se]),ve=n.useCallback((function(){ce.current&&ce.current.cancel(),fe.current&&fe.current.cancel(),U.current&&clearTimeout(U.current),$.current&&clearTimeout($.current),V.current=!1,W.current+=1,F((function(e){return u(u({},e),{loading:!1})}))}),[]);J((function(){o&&Array.isArray(l)&&l.length>0&&se()}),l);return n.useEffect((function(){B.current=!1,o&&le.apply(void 0,c([],a(I.params),!1));var e,n,t,r,u=K.current;if(k&&u.push((e=de,ue.push(e),function(){var n=ue.indexOf(e);ue.splice(n,1)})),A){var i=(n=se,t=N,r=!1,function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];r||(r=!0,n.apply(void 0,c([],a(e),!1)),setTimeout((function(){r=!1}),t))});u.push(function(e){return ne.push(e),function(){var n=ne.indexOf(e);ne.splice(n,1)}}(i))}return function(){B.current=!0,ve(),u.forEach((function(e){return e()}))}}),[]),u(u({},I),{run:le,cancel:ve,mutate:function(e){F("function"==typeof e?function(n){return u(u({},n),{data:e(I.data)})}:function(n){return u(u({},n),{data:e})})},refresh:se})}var ce=function(e){return null!=e&&e===(null==e?void 0:e.window)};function fe(e){return"function"==typeof e?e():e}var le=function(e){var t=void 0===e?{}:e,r=t.target,u=t.threshold,i=void 0===u?100:u,o=t.onScrollLower,a=G(void 0===o?function(){}:o),c=n.useCallback((function(){if(r){var e,n=fe(r);if(n)void 0===(e=n)&&(e=window),("undefined"==typeof window?0:ce(e)?document.documentElement.scrollHeight:e.scrollHeight)-function(e){return void 0===e&&(e=window),"undefined"==typeof window?0:ce(e)?window.scrollY:(null==e?void 0:e.scrollTop)||0}(n)<=function(e){return void 0===e&&(e=window),"undefined"==typeof window?0:ce(e)?document.documentElement.clientHeight:e.clientHeight}(n)+i&&a()}}),[a,r,i]);n.useEffect((function(){if(r){var e=fe(r);if(e)return e.addEventListener("scroll",c),function(){e.removeEventListener("scroll",c)}}}),[r,c])};var se=function(e){var t=n.useRef(e);t.current=e,n.useEffect((function(){return function(){return t.current()}}),[])};function de(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=n.useRef(e);u.current=e;var i=n.useRef(q((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return u.current.apply(u,c([],a(e),!1))}),t,r));return se((function(){i.current.cancel()})),{run:i.current,cancel:i.current.cancel,flush:i.current.flush}}function ve(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=n.useRef(e);u.current=e;var i=n.useRef(Y((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return u.current.apply(u,c([],a(e),!1))}),t,r));return se((function(){i.current.cancel()})),{run:i.current,cancel:i.current.cancel,flush:i.current.flush}}var pe=function(){var e=r.useRef(!1);return r.useEffect((function(){return e.current=!1,function(){e.current=!0}}),[]),e};function he(e){return"function"==typeof e?e():e&&"current"in e?e.current:e}var ye="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ge=["top","right","bottom","left","width","height","size","weight"],me={characterData:!0,childList:!0,attributes:!0,subtree:!0},be=function(e){var n=this;this.refresh=function(){n.targetNode&&n.callback([{target:n.targetNode}],{})},this.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;ge.some((function(e){return r.indexOf(e)>-1}))&&n.throttleRefresh()},this.observe=function(e,t){ye&&(n.targetNode=e,document.addEventListener("transitionend",n.onTransitionEnd_),window.addEventListener("resize",n.throttleRefresh),n.observer.observe(document,u(u({},me),t)))},this.disconnect=function(){ye&&(n.throttleRefresh.cancel(),n.targetNode=null,document.removeEventListener("transitionend",n.onTransitionEnd_),window.removeEventListener("resize",n.throttleRefresh),n.observer.disconnect())},this.throttleRefresh=Y(this.refresh,50),this.targetNode=null,this.callback=e,this.observer=new MutationObserver(this.throttleRefresh)};e.useAsync=ae,e.useClickAway=function(e,n,t){void 0===t&&(t="click");var u=r.useRef(n);u.current=n,r.useEffect((function(){var n,r,i=function(n){var t;(Array.isArray(e)?e:[e]).some((function(e){var t=he(e);return!t||(null==t?void 0:t.contains(n.target))}))||null===(t=u.current)||void 0===t||t.call(u,n)},a=Array.isArray(t)?t:[t];try{for(var c=o(a),f=c.next();!f.done;f=c.next()){var l=f.value;document.addEventListener(l,i)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return function(){var e,n;try{for(var t=o(a),r=t.next();!r.done;r=t.next()){var u=r.value;document.removeEventListener(u,i)}}catch(n){e={error:n}}finally{try{r&&!r.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}),[e,t])},e.useClientRect=function(){var e=n.useRef(null),t=a(n.useState(),2),r=t[0],u=t[1];return n.useEffect((function(){var n;e.current&&u(null===(n=e.current)||void 0===n?void 0:n.getBoundingClientRect())}),[e]),[r,e]},e.useControllableValue=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var r=t.defaultValue,u=t.defaultValuePropName,i=void 0===u?"defaultValue":u,o=t.valuePropName,f=void 0===o?"value":o,l=t.trigger,s=void 0===l?"onChange":l,d=f in e,v=e[f],p=a(n.useState((function(){return d?v:i in e?e[i]:r})),2),h=p[0],y=p[1];J((function(){d&&y(v)}),[v,d]);var g=n.useCallback((function(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];d||y(n),e[s]&&e[s].apply(e,c([n],a(t),!1))}),[d,e,s]);return[d?v:h,g]},e.useDebounce=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=a(n.useState(e),2),i=u[0],o=de(u[1],t,r).run;return n.useEffect((function(){o(e)}),[o,e]),i},e.useDebounceFn=de,e.useIsMounted=function(){var e=n.useRef(!1);return n.useEffect((function(){return e.current=!0,function(){e.current=!1}}),[]),e},e.useLimitList=function(e,t){void 0===t&&(t={});var r=t||{},u=r.count,i=void 0===u?3:u,o=r.defaultLimited,c=void 0===o||o,f=n.useRef(e);f.current=Array.isArray(e)?e:[];var l=n.useMemo((function(){return i<0?0:Math.ceil(i)}),[i]),s=f.current.length>l,d=a(n.useState((function(){return s&&c?f.current.slice(0,l):f.current})),2),v=d[0],p=d[1],h=s&&v.length!==f.current.length,y=n.useCallback((function(){p(h?f.current:f.current.slice(0,l))}),[l,h]);return n.useEffect((function(){p(h?f.current.slice(0,l):f.current)}),[l,e]),{canLimit:s,limited:h,data:v,toggle:y}},e.useLoadMore=function(e,n){var t=n||{},o=t.threshold,f=void 0===o?100:o,l=t.target,s=t.isNoMore,d=void 0===s?function(){return!1}:s,v=t.refreshDeps,p=void 0===v?[]:v,h=i(t,["threshold","target","isNoMore","refreshDeps"]),y=r.useRef([]),g=r.useRef(1),m=ae(e,u(u({defaultParams:[{current:g.current}]},h),{onError:function(e,n){var t;g.current>1&&(g.current-=1),null===(t=null==h?void 0:h.onError)||void 0===t||t.call(h,e,n)},__INTERNAL_FORMAT__:function(e){return y.current=1===g.current?e.list:y.current.concat(e.list),u(u({},e),{list:y.current})}})),b=m.run,w=m.data,E=m.loading,R=m.cancel,T=m.params,S=m.mutate,O=i(m,["run","data","loading","cancel","params","mutate"]),C=!!d&&(!E&&d(w)),j=r.useCallback((function(){var e=a(T).slice(1);return b.apply(void 0,c([{current:g.current}],a(e),!1))}),[T,b]),k=r.useCallback((function(){E&&g.current>1&&(g.current-=1),R()}),[R,E]),L=r.useCallback((function(){E||C||(g.current+=1,j())}),[E,C,j]),x=r.useCallback((function(e){var n="function"==typeof e?e(w):e;y.current=(null==n?void 0:n.list)||[],S(n)}),[w,S]),P=r.useCallback((function(){return k(),g.current=1,x((function(e){return u(u({},e),{list:[]})})),j()}),[k,j,x]),A=r.useCallback((function(){if(!E&&l)return L()}),[L,l,E]);return le({target:l,threshold:f,onScrollLower:A}),J((function(){(void 0===(null==n?void 0:n.autoRun)||(null==n?void 0:n.autoRun))&&Array.isArray(p)&&p.length>0&&P()}),p),u(u({},O),{loading:E,data:w,run:b,refresh:P,cancel:k,mutate:x,params:T,loadMore:L,loadingMore:E&&g.current>1,noMore:C})},e.useMount=function(e){n.useEffect((function(){e()}),[])},e.useMountedRef=function(){var e=n.useRef(!1);return n.useEffect((function(){return e.current=!0,function(){e.current=!1}}),[]),e},e.usePagination=function(e,n){var t=n||{},o=t.defaultPageSize,f=void 0===o?10:o,l=t.refreshDeps,s=void 0===l?[]:l,d=i(t,["defaultPageSize","refreshDeps"]),v=ae(e,u({defaultParams:[{current:1,pageSize:f}]},d)),p=v.run,h=v.data,y=v.params,g=v.loading,m=i(v,["run","data","params","loading"]),b=y&&y[0]?y[0]:{},w=b.current,E=b.pageSize,R=(null==h?void 0:h.total)||0,T=Math.ceil(R/E),S=r.useCallback((function(e){var n=a(y),t=n[0],r=n.slice(1);p.apply(void 0,c([u(u({},t),e)],a(r),!1))}),[y,p]),O=r.useCallback((function(e,n){var t=e<=0?1:e,r=n<=0?1:n,u=Math.ceil(R/r);t>u&&u>0&&(t=u),S({current:t,pageSize:r})}),[S,R]),C=r.useCallback((function(e){O(e,E)}),[O,E]),j=r.useCallback((function(e){O(w,e)}),[w,O]),k=r.useCallback((function(e,n,t,r){S({current:null==e?void 0:e.current,pageSize:null==e?void 0:e.pageSize,filters:n,sorter:t,extra:r})}),[S]);return J((function(){(void 0===(null==n?void 0:n.autoRun)||(null==n?void 0:n.autoRun))&&Array.isArray(s)&&s.length>0&&C(1)}),s),u(u({},m),{data:h,run:p,loading:g,params:y,pagination:{current:w,pageSize:E,total:R,totalPage:T,onChange:O,changeCurrent:C,changePageSize:j},tableProps:{dataSource:(null==h?void 0:h.list)||[],loading:g,onChange:k,pagination:{total:R,current:w,pageSize:E}}})},e.usePersistFn=G,e.usePrevious=function(e){var t=n.useRef();return n.useEffect((function(){t.current=e})),t.current},e.useSafeState=function(e){var n=pe(),t=a(r.useState(e),2),u=t[0],i=t[1];return[u,r.useCallback((function(e){n.current||i(e)}),[n])]},e.useSize=function(e){var t=a(n.useState((function(){var n=he(e);return{width:(n||{}).clientWidth,height:(n||{}).clientHeight}})),2),r=t[0],u=t[1];return n.useEffect((function(){var n=he(e);function t(e){e&&u({width:e.clientWidth,height:e.clientHeight})}if(!n)return function(){};t(n);var r=new be((function(e){var n,r;try{for(var u=o(e),i=u.next();!i.done;i=u.next()){t(i.value.target)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}));return r.observe(n),function(){r.disconnect()}}),[e]),r},e.useThrottle=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=a(n.useState(e),2),i=u[0],o=ve(u[1],t,r).run;return n.useEffect((function(){o(e)}),[o,e]),i},e.useThrottleFn=ve,e.useUnmount=se,e.useUnmountedRef=pe,e.useUpdate=function(){var e=a(n.useState(0),2)[1];return n.useCallback((function(){return e((function(e){return e+1}))}),[])},e.useUpdateEffect=J,e.useUpdateLayoutEffect=function(e,t){var r=n.useRef(!1);n.useLayoutEffect((function(){if(r.current)return e();r.current=!0}),t)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).rcHooks={},e.React)}(this,(function(e,n){"use strict";function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var r=t(n),u=function(){return u=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var u in n=arguments[t])Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u]);return e},u.apply(this,arguments)};function i(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(r=Object.getOwnPropertySymbols(e);u<r.length;u++)n.indexOf(r[u])<0&&Object.prototype.propertyIsEnumerable.call(e,r[u])&&(t[r[u]]=e[r[u]])}return t}function o(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,u,i=t.call(e),o=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){u={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(u)throw u.error}}return o}function c(e,n,t){if(t||2===arguments.length)for(var r,u=0,i=n.length;u<i;u++)!r&&u in n||(r||(r=Array.prototype.slice.call(n,0,u)),r[u]=n[u]);return e.concat(r||Array.prototype.slice.call(n))}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var l=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},s="object"==typeof f&&f&&f.Object===Object&&f,d="object"==typeof self&&self&&self.Object===Object&&self,v=s||d||Function("return this")(),p=v,h=function(){return p.Date.now()},y=/\s/;var g=function(e){for(var n=e.length;n--&&y.test(e.charAt(n)););return n},m=/^\s+/;var b=function(e){return e?e.slice(0,g(e)+1).replace(m,""):e},w=v.Symbol,E=w,R=Object.prototype,T=R.hasOwnProperty,S=R.toString,O=E?E.toStringTag:void 0;var C=function(e){var n=T.call(e,O),t=e[O];try{e[O]=void 0;var r=!0}catch(e){}var u=S.call(e);return r&&(n?e[O]=t:delete e[O]),u},j=Object.prototype.toString;var k=C,L=function(e){return j.call(e)},x=w?w.toStringTag:void 0;var P=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?k(e):L(e)},A=function(e){return null!=e&&"object"==typeof e};var M=b,N=l,_=function(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==P(e)},z=/^[-+]0x[0-9a-f]+$/i,D=/^0b[01]+$/i,H=/^0o[0-7]+$/i,I=parseInt;var F=l,W=h,U=function(e){if("number"==typeof e)return e;if(_(e))return NaN;if(N(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=N(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=M(e);var t=D.test(e);return t||H.test(e)?I(e.slice(2),t?2:8):z.test(e)?NaN:+e},V=Math.max,$=Math.min;var q=function(e,n,t){var r,u,i,o,a,c,f=0,l=!1,s=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(n){var t=r,i=u;return r=u=void 0,f=n,o=e.apply(i,t)}function p(e){return f=e,a=setTimeout(y,n),l?v(e):o}function h(e){var t=e-c;return void 0===c||t>=n||t<0||s&&e-f>=i}function y(){var e=W();if(h(e))return g(e);a=setTimeout(y,function(e){var t=n-(e-c);return s?$(t,i-(e-f)):t}(e))}function g(e){return a=void 0,d&&r?v(e):(r=u=void 0,o)}function m(){var e=W(),t=h(e);if(r=arguments,u=this,c=e,t){if(void 0===a)return p(c);if(s)return clearTimeout(a),a=setTimeout(y,n),v(c)}return void 0===a&&(a=setTimeout(y,n)),o}return n=U(n)||0,F(t)&&(l=!!t.leading,i=(s="maxWait"in t)?V(U(t.maxWait)||0,n):i,d="trailing"in t?!!t.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),f=0,r=c=u=a=void 0},m.flush=function(){return void 0===a?o:g(W())},m},B=q,K=l;var Y=function(e,n,t){var r=!0,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return K(t)&&(r="leading"in t?!!t.leading:r,u="trailing"in t?!!t.trailing:u),B(e,n,{leading:r,maxWait:n,trailing:u})};function G(e){var t=n.useRef(e);t.current=e;var r=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.current;return null==r?void 0:r.apply(void 0,c([],a(e),!1))}),[t]);return r}var J=function(e,t){var r=n.useRef(!1);n.useEffect((function(){if(r.current)return e();r.current=!0}),t)};function Q(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}var X={},Z=function(e){var n=X[e];if(n){var t=n.startTime,r=n.cacheTime,u=n.data;if(!((new Date).getTime()-t>=r))return u;n.timer&&(clearTimeout(n.timer),n.timer=null,delete X[e])}},ee=function(e,n,t){void 0===t&&(t=3e5),X[e]&&clearTimeout(X[e].timer);var r=setTimeout((function(){delete X[e]}),t);X[e]={data:n,timer:r,cacheTime:t,startTime:(new Date).getTime()}};var ne=[];var te=!1;if("undefined"!=typeof window&&window.addEventListener&&!te){var re=function(){if(Q()&&("undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine))for(var e=0;e<ne.length;e++){(0,ne[e])()}};window.addEventListener("visibilitychange",re,!1),window.addEventListener("focus",re,!1),te=!0}var ue=[];var ie=!1;if("undefined"!=typeof window&&window.addEventListener&&!ie){window.addEventListener("visibilitychange",(function(){if(Q())for(var e=0;e<ue.length;e++){(0,ue[e])()}}),!1),ie=!0}var oe=function(){};function ae(e,t){var r=t||{},i=r.autoRun,o=void 0===i||i,f=r.refreshDeps,l=void 0===f?[]:f,s=r.defaultParams,d=void 0===s?[]:s,v=r.defaultLoading,p=void 0!==v&&v,h=r.initialData,y=r.cacheKey,g=void 0===y?"":y,m=r.cacheTime,b=void 0===m?3e5:m,w=r.persisted,E=void 0!==w&&w,R=r.onSuccess,T=void 0===R?oe:R,S=r.onError,O=void 0===S?oe:S,C=r.__INTERNAL_FORMAT__,j=r.pollingInterval,k=void 0===j?0:j,L=r.pollingWhenHidden,x=void 0===L||L,P=r.refreshOnWindowFocus,A=void 0!==P&&P,M=r.focusTimespan,N=void 0===M?5e3:M,_=r.loadingDelay,z=r.debounceInterval,D=r.throttleInterval,H=a(n.useState({params:Array.isArray(d)?d:[d],loading:p,error:null,data:g&&Z(g)||h}),2),I=H[0],F=H[1],W=n.useRef(0),U=n.useRef(null),V=n.useRef(!1),$=n.useRef(null),B=n.useRef(!1),K=n.useRef([]),X=G(e),te=G(T),re=G(O),ie=n.useRef(C);ie.current=C;var ae=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];U.current&&clearTimeout(U.current),$.current&&clearTimeout($.current);var t=W.current,r=g?Z(g):void 0;r&&E||(F((function(n){return u(u({},n),{loading:!_,params:e})})),$.current=_?setTimeout((function(){F((function(e){return u(u({},e),{loading:!0})}))}),_):null);var i=function(){return new Promise((function(n,i){r&&E?B.current||t!==W.current||(te(r,e),F((function(e){return u(u({},e),{data:r,error:null,loading:!1})})),n(r)):X.apply(void 0,c([],a(e),!1)).then((function(r){if(!B.current&&t===W.current){$.current&&clearTimeout($.current);var i="function"==typeof ie.current?ie.current(r,e):r;F((function(e){return u(u({},e),{data:i,error:null,loading:!1})})),g&&ee(g,i,b),te(i,e),n(i)}})).catch((function(n){B.current||t!==W.current||($.current&&clearTimeout($.current),F((function(e){return u(u({},e),{error:n,loading:!1})})),re(n,e),i(n))}))}))};return i().finally((function(){if(!B.current&&t===W.current&&k){if(!Q()&&!x)return void(V.current=!0);U.current=setTimeout((function(){le.apply(void 0,c([],a(e),!1))}),k)}}))}),[g,b,_,E,k,x]),ce=n.useRef(z?q(ae,z):void 0),fe=n.useRef(D?Y(ae,D):void 0),le=n.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return ce.current?(ce.current.apply(ce,c([],a(e),!1)),Promise.resolve(null)):fe.current?(fe.current.apply(fe,c([],a(e),!1)),Promise.resolve(null)):(W.current+=1,ae.apply(void 0,c([],a(e),!1)))}),[ae]),se=n.useCallback((function(){return le.apply(void 0,c([],a(I.params),!1))}),[le,I.params]),de=n.useCallback((function(){V.current&&(V.current=!1,se())}),[se]),ve=n.useCallback((function(){ce.current&&ce.current.cancel(),fe.current&&fe.current.cancel(),U.current&&clearTimeout(U.current),$.current&&clearTimeout($.current),V.current=!1,W.current+=1,F((function(e){return u(u({},e),{loading:!1})}))}),[]);J((function(){o&&Array.isArray(l)&&l.length>0&&se()}),l);return n.useEffect((function(){B.current=!1,o&&le.apply(void 0,c([],a(I.params),!1));var e,n,t,r,u=K.current;if(k&&u.push((e=de,ue.push(e),function(){var n=ue.indexOf(e);ue.splice(n,1)})),A){var i=(n=se,t=N,r=!1,function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];r||(r=!0,n.apply(void 0,c([],a(e),!1)),setTimeout((function(){r=!1}),t))});u.push(function(e){return ne.push(e),function(){var n=ne.indexOf(e);ne.splice(n,1)}}(i))}return function(){B.current=!0,ve(),u.forEach((function(e){return e()}))}}),[]),u(u({},I),{run:le,cancel:ve,mutate:function(e){F("function"==typeof e?function(n){return u(u({},n),{data:e(I.data)})}:function(n){return u(u({},n),{data:e})})},refresh:se})}var ce=function(e){return null!=e&&e===(null==e?void 0:e.window)};function fe(e){return"function"==typeof e?e():e}var le=function(e){var t=void 0===e?{}:e,r=t.target,u=t.threshold,i=void 0===u?100:u,o=t.onScrollLower,a=G(void 0===o?function(){}:o),c=n.useCallback((function(){if(r){var e,n=fe(r);if(n)void 0===(e=n)&&(e=window),("undefined"==typeof window?0:ce(e)?document.documentElement.scrollHeight:e.scrollHeight)-function(e){return void 0===e&&(e=window),"undefined"==typeof window?0:ce(e)?window.scrollY:(null==e?void 0:e.scrollTop)||0}(n)<=function(e){return void 0===e&&(e=window),"undefined"==typeof window?0:ce(e)?document.documentElement.clientHeight:e.clientHeight}(n)+i&&a()}}),[a,r,i]);n.useEffect((function(){if(r){var e=fe(r);if(e)return e.addEventListener("scroll",c),function(){e.removeEventListener("scroll",c)}}}),[r,c])};var se=function(e){var t=n.useRef(e);t.current=e,n.useEffect((function(){return function(){return t.current()}}),[])};function de(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=n.useRef(e);u.current=e;var i=n.useRef(q((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return u.current.apply(u,c([],a(e),!1))}),t,r));return se((function(){i.current.cancel()})),{run:i.current,cancel:i.current.cancel,flush:i.current.flush}}function ve(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=n.useRef(e);u.current=e;var i=n.useRef(Y((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return u.current.apply(u,c([],a(e),!1))}),t,r));return se((function(){i.current.cancel()})),{run:i.current,cancel:i.current.cancel,flush:i.current.flush}}var pe=function(){var e=r.useRef(!1);return r.useEffect((function(){return e.current=!1,function(){e.current=!0}}),[]),e};function he(e){return"function"==typeof e?e():e&&"current"in e?e.current:e}var ye="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ge=["top","right","bottom","left","width","height","size","weight"],me={characterData:!0,childList:!0,attributes:!0,subtree:!0},be=function(e){var n=this;this.refresh=function(){n.targetNode&&n.callback([{target:n.targetNode}],{})},this.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;ge.some((function(e){return r.indexOf(e)>-1}))&&n.throttleRefresh()},this.observe=function(e,t){ye&&(n.targetNode=e,document.addEventListener("transitionend",n.onTransitionEnd_),window.addEventListener("resize",n.throttleRefresh),n.observer.observe(document,u(u({},me),t)))},this.disconnect=function(){ye&&(n.throttleRefresh.cancel(),n.targetNode=null,document.removeEventListener("transitionend",n.onTransitionEnd_),window.removeEventListener("resize",n.throttleRefresh),n.observer.disconnect())},this.throttleRefresh=Y(this.refresh,50),this.targetNode=null,this.callback=e,this.observer=new MutationObserver(this.throttleRefresh)};e.useAsync=ae,e.useClickAway=function(e,n,t){void 0===t&&(t="click");var u=r.useRef(n);u.current=n,r.useEffect((function(){var n,r,i=function(n){var t;(Array.isArray(e)?e:[e]).some((function(e){var t=he(e);return!t||(null==t?void 0:t.contains(n.target))}))||null===(t=u.current)||void 0===t||t.call(u,n)},a=Array.isArray(t)?t:[t];try{for(var c=o(a),f=c.next();!f.done;f=c.next()){var l=f.value;document.addEventListener(l,i)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return function(){var e,n;try{for(var t=o(a),r=t.next();!r.done;r=t.next()){var u=r.value;document.removeEventListener(u,i)}}catch(n){e={error:n}}finally{try{r&&!r.done&&(n=t.return)&&n.call(t)}finally{if(e)throw e.error}}}}),[e,t])},e.useClientRect=function(){var e=n.useRef(null),t=a(n.useState(),2),r=t[0],u=t[1];return n.useEffect((function(){var n;e.current&&u(null===(n=e.current)||void 0===n?void 0:n.getBoundingClientRect())}),[e]),[r,e]},e.useControllableValue=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var r=t.defaultValue,u=t.defaultValuePropName,i=void 0===u?"defaultValue":u,o=t.valuePropName,f=void 0===o?"value":o,l=t.trigger,s=void 0===l?"onChange":l,d=f in e,v=e[f],p=a(n.useState((function(){return d?v:i in e?e[i]:r})),2),h=p[0],y=p[1];J((function(){d&&y(v)}),[v,d]);var g=n.useCallback((function(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];d||y(n),e[s]&&e[s].apply(e,c([n],a(t),!1))}),[d,e,s]);return[d?v:h,g]},e.useDebounce=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=a(n.useState(e),2),i=u[0],o=de(u[1],t,r).run;return n.useEffect((function(){o(e)}),[o,e]),i},e.useDebounceFn=de,e.useIsMounted=function(){var e=n.useRef(!1);return n.useEffect((function(){return e.current=!0,function(){e.current=!1}}),[]),e},e.useLimitList=function(e,t){void 0===t&&(t={});var r=t||{},u=r.count,i=void 0===u?3:u,o=r.defaultLimited,c=void 0===o||o,f=n.useRef(e);f.current=Array.isArray(e)?e:[];var l=n.useMemo((function(){return i<0?0:Math.ceil(i)}),[i]),s=f.current.length>l,d=a(n.useState((function(){return s&&c?f.current.slice(0,l):f.current})),2),v=d[0],p=d[1],h=s&&v.length!==f.current.length,y=n.useCallback((function(){p(h?f.current:f.current.slice(0,l))}),[l,h]);return n.useEffect((function(){p(h?f.current.slice(0,l):f.current)}),[l,e]),{canLimit:s,limited:h,data:v,toggle:y}},e.useLoadMore=function(e,n){var t=n||{},o=t.threshold,f=void 0===o?100:o,l=t.target,s=t.isNoMore,d=void 0===s?function(){return!1}:s,v=t.refreshDeps,p=void 0===v?[]:v,h=i(t,["threshold","target","isNoMore","refreshDeps"]),y=r.useRef([]),g=r.useRef(1),m=ae(e,u(u({defaultParams:[{current:g.current}]},h),{onError:function(e,n){var t;g.current>1&&(g.current-=1),null===(t=null==h?void 0:h.onError)||void 0===t||t.call(h,e,n)},__INTERNAL_FORMAT__:function(e){return y.current=1===g.current?e.list:y.current.concat(e.list),u(u({},e),{list:y.current})}})),b=m.run,w=m.data,E=m.loading,R=m.cancel,T=m.params,S=m.mutate,O=i(m,["run","data","loading","cancel","params","mutate"]),C=!!d&&(!E&&d(w)),j=r.useCallback((function(){var e=a(T).slice(1);return b.apply(void 0,c([{current:g.current}],a(e),!1))}),[T,b]),k=r.useCallback((function(){E&&g.current>1&&(g.current-=1),R()}),[R,E]),L=r.useCallback((function(){E||C||(g.current+=1,j())}),[E,C,j]),x=r.useCallback((function(e){var n="function"==typeof e?e(w):e;y.current=(null==n?void 0:n.list)||[],S(n)}),[w,S]),P=r.useCallback((function(){return k(),g.current=1,x((function(e){return u(u({},e),{list:[]})})),j()}),[k,j,x]),A=r.useCallback((function(){if(!E&&l)return L()}),[L,l,E]);return le({target:l,threshold:f,onScrollLower:A}),J((function(){(void 0===(null==n?void 0:n.autoRun)||(null==n?void 0:n.autoRun))&&Array.isArray(p)&&p.length>0&&P()}),p),u(u({},O),{loading:E,data:w,run:b,refresh:P,cancel:k,mutate:x,params:T,loadMore:L,loadingMore:E&&g.current>1,noMore:C})},e.useMount=function(e){n.useEffect((function(){e()}),[])},e.useMountedRef=function(){var e=n.useRef(!1);return n.useEffect((function(){return e.current=!0,function(){e.current=!1}}),[]),e},e.usePagination=function(e,n){var t=n||{},o=t.defaultPageSize,f=void 0===o?10:o,l=t.refreshDeps,s=void 0===l?[]:l,d=i(t,["defaultPageSize","refreshDeps"]),v=ae(e,u({defaultParams:[{current:1,pageSize:f}]},d)),p=v.run,h=v.data,y=v.params,g=v.loading,m=i(v,["run","data","params","loading"]),b=y&&y[0]?y[0]:{},w=b.current,E=b.pageSize,R=(null==h?void 0:h.total)||0,T=Math.ceil(R/E),S=r.useCallback((function(e){var n=a(y),t=n[0],r=n.slice(1);p.apply(void 0,c([u(u({},t),e)],a(r),!1))}),[y,p]),O=r.useCallback((function(e,n){var t=e<=0?1:e,r=n<=0?1:n,u=Math.ceil(R/r);t>u&&u>0&&(t=u),S({current:t,pageSize:r})}),[S,R]),C=r.useCallback((function(e){O(e,E)}),[O,E]),j=r.useCallback((function(e){O(w,e)}),[w,O]),k=r.useCallback((function(e,n,t,r){S({current:null==e?void 0:e.current,pageSize:null==e?void 0:e.pageSize,filters:n,sorter:t,extra:r})}),[S]);return J((function(){(void 0===(null==n?void 0:n.autoRun)||(null==n?void 0:n.autoRun))&&Array.isArray(s)&&s.length>0&&C(1)}),s),u(u({},m),{data:h,run:p,loading:g,params:y,pagination:{current:w,pageSize:E,total:R,totalPage:T,onChange:O,changeCurrent:C,changePageSize:j},tableProps:{dataSource:(null==h?void 0:h.list)||[],loading:g,onChange:k,pagination:{total:R,current:w,pageSize:E}}})},e.usePersistFn=G,e.usePrevious=function(e){var t=n.useRef();return n.useEffect((function(){t.current=e})),t.current},e.useSafeState=function(e){var n=pe(),t=a(r.useState(e),2),u=t[0],i=t[1];return[u,r.useCallback((function(e){n.current||i(e)}),[n])]},e.useSize=function(e){var t=a(n.useState((function(){var n=he(e);return{width:(n||{}).clientWidth,height:(n||{}).clientHeight}})),2),r=t[0],u=t[1];return n.useEffect((function(){var n=he(e);function t(e){e&&u({width:e.clientWidth,height:e.clientHeight})}if(!n)return function(){};t(n);var r=new be((function(e){var n,r;try{for(var u=o(e),i=u.next();!i.done;i=u.next()){t(i.value.target)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}));return r.observe(n),function(){r.disconnect()}}),[e]),r},e.useThrottle=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r={});var u=a(n.useState(e),2),i=u[0],o=ve(u[1],t,r).run;return n.useEffect((function(){o(e)}),[o,e]),i},e.useThrottleFn=ve,e.useUnmount=se,e.useUnmountedRef=pe,e.useUpdate=function(){var e=a(n.useState(0),2)[1];return n.useCallback((function(){return e((function(e){return e+1}))}),[])},e.useUpdateEffect=J,e.useUpdateLayoutEffect=function(e,t){var r=n.useRef(!1);n.useLayoutEffect((function(){if(r.current)return e();r.current=!0}),t)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=rcHooks.min.js.map |
@@ -50,3 +50,2 @@ import { __assign, __read, __spreadArray } from "tslib"; | ||
// 确保返回最后结果,并且不会返回取消的结果 | ||
counterRef.current += 1; | ||
var currentCount = counterRef.current; | ||
@@ -140,2 +139,3 @@ // 缓存数据 | ||
} | ||
counterRef.current += 1; | ||
return _run.apply(void 0, __spreadArray([], __read(args), false)); | ||
@@ -142,0 +142,0 @@ }, [_run]); |
@@ -53,3 +53,2 @@ "use strict"; | ||
// 确保返回最后结果,并且不会返回取消的结果 | ||
counterRef.current += 1; | ||
var currentCount = counterRef.current; | ||
@@ -143,2 +142,3 @@ // 缓存数据 | ||
} | ||
counterRef.current += 1; | ||
return _run.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false)); | ||
@@ -145,0 +145,0 @@ }, [_run]); |
{ | ||
"name": "rc-hooks", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "React Hooks Library.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
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
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
314230