react-ultimate-pagination-basic
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -80,6 +80,11 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
isActive = _ref.isActive, | ||
onClick = _ref.onClick; | ||
onClick = _ref.onClick, | ||
isDisabled = _ref.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ style: isActive ? activePageStyle : null, onClick: onClick }, | ||
{ | ||
style: isActive ? activePageStyle : null, | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
value | ||
@@ -90,6 +95,10 @@ ); | ||
var Ellipsis = function Ellipsis(_ref2) { | ||
var onClick = _ref2.onClick; | ||
var onClick = _ref2.onClick, | ||
isDisabled = _ref2.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'...' | ||
@@ -101,6 +110,10 @@ ); | ||
var isActive = _ref3.isActive, | ||
onClick = _ref3.onClick; | ||
onClick = _ref3.onClick, | ||
isDisabled = _ref3.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'First' | ||
@@ -112,6 +125,10 @@ ); | ||
var isActive = _ref4.isActive, | ||
onClick = _ref4.onClick; | ||
onClick = _ref4.onClick, | ||
isDisabled = _ref4.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Prev' | ||
@@ -123,6 +140,10 @@ ); | ||
var isActive = _ref5.isActive, | ||
onClick = _ref5.onClick; | ||
onClick = _ref5.onClick, | ||
isDisabled = _ref5.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Next' | ||
@@ -134,6 +155,10 @@ ); | ||
var isActive = _ref6.isActive, | ||
onClick = _ref6.onClick; | ||
onClick = _ref6.onClick, | ||
isDisabled = _ref6.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Last' | ||
@@ -183,5 +208,8 @@ ); | ||
var renderItemComponentFunctionFactory = function renderItemComponentFunctionFactory(itemTypeToComponent, currentPage, onChange) { | ||
var onItemClickFunctionFactory = function onItemClickFunctionFactory(value) { | ||
var onItemClickFunctionFactory = function onItemClickFunctionFactory(_ref) { | ||
var value = _ref.value, | ||
isDisabled = _ref.isDisabled; | ||
return function () { | ||
if (onChange && currentPage !== value) { | ||
if (!isDisabled && onChange && currentPage !== value) { | ||
onChange(value); | ||
@@ -192,13 +220,13 @@ } | ||
return function (item) { | ||
var ItemComponent = itemTypeToComponent[item.type]; | ||
var onItemClick = onItemClickFunctionFactory(item.value); | ||
return _react2.default.createElement(ItemComponent, _extends({ onClick: onItemClick }, item)); | ||
return function (props) { | ||
var ItemComponent = itemTypeToComponent[props.type]; | ||
var onItemClick = onItemClickFunctionFactory(props); | ||
return _react2.default.createElement(ItemComponent, _extends({ onClick: onItemClick }, props)); | ||
}; | ||
}; | ||
var createUltimatePagination = function createUltimatePagination(_ref) { | ||
var itemTypeToComponent = _ref.itemTypeToComponent, | ||
_ref$WrapperComponent = _ref.WrapperComponent, | ||
WrapperComponent = _ref$WrapperComponent === undefined ? 'div' : _ref$WrapperComponent; | ||
var createUltimatePagination = function createUltimatePagination(_ref2) { | ||
var itemTypeToComponent = _ref2.itemTypeToComponent, | ||
_ref2$WrapperComponen = _ref2.WrapperComponent, | ||
WrapperComponent = _ref2$WrapperComponen === undefined ? 'div' : _ref2$WrapperComponen; | ||
@@ -214,3 +242,4 @@ var UltimatePaginationComponent = function UltimatePaginationComponent(props) { | ||
onChange = props.onChange, | ||
restProps = _objectWithoutProperties(props, ['currentPage', 'totalPages', 'boundaryPagesRange', 'siblingPagesRange', 'hideEllipsis', 'hidePreviousAndNextPageLinks', 'hideFirstAndLastPageLinks', 'onChange']); | ||
disabled = props.disabled, | ||
restProps = _objectWithoutProperties(props, ['currentPage', 'totalPages', 'boundaryPagesRange', 'siblingPagesRange', 'hideEllipsis', 'hidePreviousAndNextPageLinks', 'hideFirstAndLastPageLinks', 'onChange', 'disabled']); | ||
@@ -230,3 +259,7 @@ var paginationModel = (0, _ultimatePagination.getPaginationModel)({ | ||
restProps, | ||
paginationModel.map(renderItemComponent) | ||
paginationModel.map(function (itemModel) { | ||
return renderItemComponent(_extends({}, itemModel, { | ||
isDisabled: !!disabled | ||
})); | ||
}) | ||
); | ||
@@ -243,3 +276,4 @@ }; | ||
hideFirstAndLastPageLinks: _propTypes2.default.bool, | ||
onChange: _propTypes2.default.func | ||
onChange: _propTypes2.default.func, | ||
disabled: _propTypes2.default.bool | ||
}; | ||
@@ -246,0 +280,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.reactUltimatePaginationBasic=n(require("react")):e.reactUltimatePaginationBasic=n(e.React)}(this,function(e){return function(e){function n(r){if(t[r])return t[r].exports;var a=t[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0});var o,i=t(7),u=r(i),c=t(13),s={fontWeight:"bold"},l=function(e){var n=e.value,t=e.isActive,r=e.onClick;return u.default.createElement("button",{style:t?s:null,onClick:r},n)},f=function(e){var n=e.onClick;return u.default.createElement("button",{onClick:n},"...")},p=function(e){var n=(e.isActive,e.onClick);return u.default.createElement("button",{onClick:n},"First")},d=function(e){var n=(e.isActive,e.onClick);return u.default.createElement("button",{onClick:n},"Prev")},g=function(e){var n=(e.isActive,e.onClick);return u.default.createElement("button",{onClick:n},"Next")},v=function(e){var n=(e.isActive,e.onClick);return u.default.createElement("button",{onClick:n},"Last")},y=(o={},a(o,c.ITEM_TYPES.PAGE,l),a(o,c.ITEM_TYPES.ELLIPSIS,f),a(o,c.ITEM_TYPES.FIRST_PAGE_LINK,p),a(o,c.ITEM_TYPES.PREVIOUS_PAGE_LINK,d),a(o,c.ITEM_TYPES.NEXT_PAGE_LINK,g),a(o,c.ITEM_TYPES.LAST_PAGE_LINK,v),o),E=(0,c.createUltimatePagination)({itemTypeToComponent:y});n.default=E},function(e,n){function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===t||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(n){try{return l.call(null,e,0)}catch(n){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(n){try{return f.call(null,e)}catch(n){return f.call(this,e)}}}function i(){v&&d&&(v=!1,d.length?g=d.concat(g):y=-1,g.length&&u())}function u(){if(!v){var e=a(i);v=!0;for(var n=g.length;n;){for(d=g,g=[];++y<n;)d&&d[y].run();y=-1,n=g.length}d=null,v=!1,o(e)}}function c(e,n){this.fun=e,this.array=n}function s(){}var l,f,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:t}catch(e){l=t}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,g=[],v=!1,y=-1;p.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];g.push(new c(e,n)),1!==g.length||v||a(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=s,p.addListener=s,p.once=s,p.off=s,p.removeListener=s,p.removeAllListeners=s,p.emit=s,p.prependListener=s,p.prependOnceListener=s,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,n){"use strict";function t(e){return function(){return e}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,n,t){(function(n){"use strict";function t(e,n,t,a,o,i,u,c){if(r(n),!e){var s;if(void 0===n)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[t,a,o,i,u,c],f=0;s=new Error(n.replace(/%s/g,function(){return l[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var r=function(e){};"production"!==n.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=t}).call(n,t(1))},function(e,n){"use strict";var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t},function(e,n,t){(function(n){"use strict";var r=t(2),a=r;if("production"!==n.env.NODE_ENV){var o=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var a=0,o="Warning: "+e.replace(/%s/g,function(){return t[a++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};a=function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!e){for(var t=arguments.length,r=Array(t>2?t-2:0),a=2;a<t;a++)r[a-2]=arguments[a];o.apply(void 0,[n].concat(r))}}}e.exports=a}).call(n,t(1))},function(e,n){"use strict";n.ITEM_TYPES={PAGE:"PAGE",ELLIPSIS:"ELLIPSIS",FIRST_PAGE_LINK:"FIRST_PAGE_LINK",PREVIOUS_PAGE_LINK:"PREVIOUS_PAGE_LINK",NEXT_PAGE_LINK:"NEXT_PAGE_LINK",LAST_PAGE_LINK:"LAST_PAGE_LINK"},n.ITEM_KEYS={FIRST_ELLIPSIS:-1,SECOND_ELLIPSIS:-2,FIRST_PAGE_LINK:-3,PREVIOUS_PAGE_LINK:-4,NEXT_PAGE_LINK:-5,LAST_PAGE_LINK:-6}},function(n,t){n.exports=e},function(e,n){/* | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.reactUltimatePaginationBasic=n(require("react")):e.reactUltimatePaginationBasic=n(e.React)}(this,function(e){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0});var a,o=t(7),u=r(o),s=t(13),c={fontWeight:"bold"},l=function(e){var n=e.value,t=e.isActive,r=e.onClick,i=e.isDisabled;return u.default.createElement("button",{style:t?c:null,onClick:r,disabled:i},n)},f=function(e){var n=e.onClick,t=e.isDisabled;return u.default.createElement("button",{onClick:n,disabled:t},"...")},p=function(e){var n=(e.isActive,e.onClick),t=e.isDisabled;return u.default.createElement("button",{onClick:n,disabled:t},"First")},d=function(e){var n=(e.isActive,e.onClick),t=e.isDisabled;return u.default.createElement("button",{onClick:n,disabled:t},"Prev")},g=function(e){var n=(e.isActive,e.onClick),t=e.isDisabled;return u.default.createElement("button",{onClick:n,disabled:t},"Next")},v=function(e){var n=(e.isActive,e.onClick),t=e.isDisabled;return u.default.createElement("button",{onClick:n,disabled:t},"Last")},y=(a={},i(a,s.ITEM_TYPES.PAGE,l),i(a,s.ITEM_TYPES.ELLIPSIS,f),i(a,s.ITEM_TYPES.FIRST_PAGE_LINK,p),i(a,s.ITEM_TYPES.PREVIOUS_PAGE_LINK,d),i(a,s.ITEM_TYPES.NEXT_PAGE_LINK,g),i(a,s.ITEM_TYPES.LAST_PAGE_LINK,v),a),E=(0,s.createUltimatePagination)({itemTypeToComponent:y});n.default=E},function(e,n){function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===t||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(n){try{return l.call(null,e,0)}catch(n){return l.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(n){try{return f.call(null,e)}catch(n){return f.call(this,e)}}}function o(){v&&d&&(v=!1,d.length?g=d.concat(g):y=-1,g.length&&u())}function u(){if(!v){var e=i(o);v=!0;for(var n=g.length;n;){for(d=g,g=[];++y<n;)d&&d[y].run();y=-1,n=g.length}d=null,v=!1,a(e)}}function s(e,n){this.fun=e,this.array=n}function c(){}var l,f,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:t}catch(e){l=t}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,g=[],v=!1,y=-1;p.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];g.push(new s(e,n)),1!==g.length||v||i(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,n){"use strict";function t(e){return function(){return e}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,n,t){(function(n){"use strict";function t(e,n,t,i,a,o,u,s){if(r(n),!e){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[t,i,a,o,u,s],f=0;c=new Error(n.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==n.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=t}).call(n,t(1))},function(e,n){"use strict";var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t},function(e,n,t){(function(n){"use strict";var r=t(2),i=r;if("production"!==n.env.NODE_ENV){var a=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var i=0,a="Warning: "+e.replace(/%s/g,function(){return t[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}};i=function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!e){for(var t=arguments.length,r=Array(t>2?t-2:0),i=2;i<t;i++)r[i-2]=arguments[i];a.apply(void 0,[n].concat(r))}}}e.exports=i}).call(n,t(1))},function(e,n){"use strict";n.ITEM_TYPES={PAGE:"PAGE",ELLIPSIS:"ELLIPSIS",FIRST_PAGE_LINK:"FIRST_PAGE_LINK",PREVIOUS_PAGE_LINK:"PREVIOUS_PAGE_LINK",NEXT_PAGE_LINK:"NEXT_PAGE_LINK",LAST_PAGE_LINK:"LAST_PAGE_LINK"},n.ITEM_KEYS={FIRST_ELLIPSIS:-1,SECOND_ELLIPSIS:-2,FIRST_PAGE_LINK:-3,PREVIOUS_PAGE_LINK:-4,NEXT_PAGE_LINK:-5,LAST_PAGE_LINK:-6}},function(n,t){n.exports=e},function(e,n){/* | ||
object-assign | ||
@@ -6,3 +6,3 @@ (c) Sindre Sorhus | ||
*/ | ||
"use strict";function t(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;var r=Object.getOwnPropertyNames(n).map(function(e){return n[e]});if("0123456789"!==r.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}var a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,n){for(var r,u,c=t(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)o.call(r,l)&&(c[l]=r[l]);if(a){u=a(r);for(var f=0;f<u.length;f++)i.call(r,u[f])&&(c[u[f]]=r[u[f]])}}return c}},function(e,n,t){(function(n){"use strict";function r(e,t,r,c,s){if("production"!==n.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{a("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",r,l,typeof e[l]),f=e[l](t,l,c,r,null,i)}catch(e){f=e}if(o(!f||f 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).",c||"React class",r,l,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=s?s():"";o(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==n.env.NODE_ENV)var a=t(3),o=t(5),i=t(4),u={};e.exports=r}).call(n,t(1))},function(e,n,t){"use strict";var r=t(2),a=t(3),o=t(4);e.exports=function(){function e(e,n,t,r,i,u){u!==o&&a(!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 n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return t.checkPropTypes=r,t.PropTypes=t,t}},function(e,n,t){(function(n){"use strict";var r=t(2),a=t(3),o=t(5),i=t(8),u=t(4),c=t(9);e.exports=function(e,t){function s(e){var n=e&&(A&&e[A]||e[k]);if("function"==typeof n)return n}function l(e,n){return e===n?0!==e||1/e===1/n:e!==e&&n!==n}function f(e){this.message=e,this.stack=""}function p(e){function r(r,s,l,p,d,g,v){if(p=p||R,g=g||l,v!==u)if(t)a(!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"!==n.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+l;!i[y]&&c<3&&(o(!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.",g,p),i[y]=!0,c++)}return null==s[l]?r?new f(null===s[l]?"The "+d+" `"+g+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+g+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(s,l,p,d,g)}if("production"!==n.env.NODE_ENV)var i={},c=0;var s=r.bind(null,!1);return s.isRequired=r.bind(null,!0),s}function d(e){function n(n,t,r,a,o,i){var u=n[t],c=N(u);if(c!==e){var s=L(u);return new f("Invalid "+a+" `"+o+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(n)}function g(){return p(r.thatReturnsNull)}function v(e){function n(n,t,r,a,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var i=n[t];if(!Array.isArray(i)){var c=N(i);return new f("Invalid "+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<i.length;s++){var l=e(i,s,r,a,o+"["+s+"]",u);if(l instanceof Error)return l}return null}return p(n)}function y(){function n(n,t,r,a,o){var i=n[t];if(!e(i)){var u=N(i);return new f("Invalid "+a+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(n)}function E(e){function n(n,t,r,a,o){if(!(n[t]instanceof e)){var i=e.name||R,u=O(n[t]);return new f("Invalid "+a+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+i+"`."))}return null}return p(n)}function P(e){function t(n,t,r,a,o){for(var i=n[t],u=0;u<e.length;u++)if(l(i,e[u]))return null;var c=JSON.stringify(e);return new f("Invalid "+a+" `"+o+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return Array.isArray(e)?p(t):("production"!==n.env.NODE_ENV?o(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function h(e){function n(n,t,r,a,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var i=n[t],c=N(i);if("object"!==c)return new f("Invalid "+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var s in i)if(i.hasOwnProperty(s)){var l=e(i,s,r,a,o+"."+s,u);if(l instanceof Error)return l}return null}return p(n)}function b(e){function t(n,t,r,a,o){for(var i=0;i<e.length;i++){var c=e[i];if(null==c(n,t,r,a,o,u))return null}return new f("Invalid "+a+" `"+o+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==n.env.NODE_ENV?o(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var a=0;a<e.length;a++){var i=e[a];if("function"!=typeof i)return o(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",w(i),a),r.thatReturnsNull}return p(t)}function m(){function e(e,n,t,r,a){return I(e[n])?null:new f("Invalid "+r+" `"+a+"` supplied to "+("`"+t+"`, expected a ReactNode."))}return p(e)}function T(e){function n(n,t,r,a,o){var i=n[t],c=N(i);if("object"!==c)return new f("Invalid "+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var s in e){var l=e[s];if(l){var p=l(i,s,r,a,o+"."+s,u);if(p)return p}}return null}return p(n)}function _(e){function n(n,t,r,a,o){var c=n[t],s=N(c);if("object"!==s)return new f("Invalid "+a+" `"+o+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));var l=i({},n[t],e);for(var p in l){var d=e[p];if(!d)return new f("Invalid "+a+" `"+o+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=d(c,p,r,a,o+"."+p,u);if(g)return g}return null}return p(n)}function I(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(I);if(null===n||e(n))return!0;var t=s(n);if(!t)return!1;var r,a=t.call(n);if(t!==n.entries){for(;!(r=a.next()).done;)if(!I(r.value))return!1}else for(;!(r=a.next()).done;){var o=r.value;if(o&&!I(o[1]))return!1}return!0;default:return!1}}function S(e,n){return"symbol"===e||("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}function N(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":S(n,e)?"symbol":n}function L(e){if("undefined"==typeof e||null===e)return""+e;var n=N(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function w(e){var n=L(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}function O(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var A="function"==typeof Symbol&&Symbol.iterator,k="@@iterator",R="<<anonymous>>",x={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:g(),arrayOf:v,element:y(),instanceOf:E,node:m(),objectOf:h,oneOf:P,oneOfType:b,shape:T,exact:_};return f.prototype=Error.prototype,x.checkPropTypes=c,x.PropTypes=x,x}}).call(n,t(1))},function(e,n,t){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,a=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},o=!0;e.exports=t(11)(a,o)}else e.exports=t(10)()}).call(n,t(1))},function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,n){var t={};for(var r in e)n.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}Object.defineProperty(n,"__esModule",{value:!0}),n.ITEM_TYPES=n.createUltimatePagination=void 0;var o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i=t(7),u=r(i),c=t(12),s=r(c),l=t(16),f=function(e,n,t){var r=function(e){return function(){t&&n!==e&&t(e)}};return function(n){var t=e[n.type],a=r(n.value);return u.default.createElement(t,o({onClick:a},n))}},p=function(e){var n=e.itemTypeToComponent,t=e.WrapperComponent,r=void 0===t?"div":t,o=function(e){var t=e.currentPage,o=e.totalPages,i=e.boundaryPagesRange,c=e.siblingPagesRange,s=e.hideEllipsis,p=e.hidePreviousAndNextPageLinks,d=e.hideFirstAndLastPageLinks,g=e.onChange,v=a(e,["currentPage","totalPages","boundaryPagesRange","siblingPagesRange","hideEllipsis","hidePreviousAndNextPageLinks","hideFirstAndLastPageLinks","onChange"]),y=(0,l.getPaginationModel)({currentPage:t,totalPages:o,boundaryPagesRange:i,siblingPagesRange:c,hideEllipsis:s,hidePreviousAndNextPageLinks:p,hideFirstAndLastPageLinks:d}),E=f(n,t,g);return u.default.createElement(r,v,y.map(E))};return o.propTypes={currentPage:s.default.number.isRequired,totalPages:s.default.number.isRequired,boundaryPagesRange:s.default.number,siblingPagesRange:s.default.number,hideEllipsis:s.default.bool,hidePreviousAndNextPageLinks:s.default.bool,hideFirstAndLastPageLinks:s.default.bool,onChange:s.default.func},o};n.createUltimatePagination=p,n.ITEM_TYPES=l.ITEM_TYPES},function(e,n,t){"use strict";var r=t(6);n.createFirstEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.FIRST_ELLIPSIS,value:e,isActive:!1}},n.createSecondEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.SECOND_ELLIPSIS,value:e,isActive:!1}},n.createFirstPageLink=function(e){var n=e.currentPage;return{type:r.ITEM_TYPES.FIRST_PAGE_LINK,key:r.ITEM_KEYS.FIRST_PAGE_LINK,value:1,isActive:1===n}},n.createPreviousPageLink=function(e){var n=e.currentPage;return{type:r.ITEM_TYPES.PREVIOUS_PAGE_LINK,key:r.ITEM_KEYS.PREVIOUS_PAGE_LINK,value:Math.max(1,n-1),isActive:1===n}},n.createNextPageLink=function(e){var n=e.currentPage,t=e.totalPages;return{type:r.ITEM_TYPES.NEXT_PAGE_LINK,key:r.ITEM_KEYS.NEXT_PAGE_LINK,value:Math.min(t,n+1),isActive:n===t}},n.createLastPageLink=function(e){var n=e.currentPage,t=e.totalPages;return{type:r.ITEM_TYPES.LAST_PAGE_LINK,key:r.ITEM_KEYS.LAST_PAGE_LINK,value:t,isActive:n===t}},n.createPageFunctionFactory=function(e){var n=e.currentPage;return function(e){return{type:r.ITEM_TYPES.PAGE,key:e,value:e,isActive:e===n}}}},function(e,n){"use strict";function t(e,n){for(var t=[],r=e;r<=n;r++)t.push(r);return t}n.createRange=t},function(e,n,t){"use strict";function r(e){if(null==e)throw new Error("getPaginationModel(): options object should be a passed");var n=Number(e.totalPages);if(isNaN(n))throw new Error("getPaginationModel(): totalPages should be a number");if(n<0)throw new Error("getPaginationModel(): totalPages shouldn't be a negative number");var t=Number(e.currentPage);if(isNaN(t))throw new Error("getPaginationModel(): currentPage should be a number");if(t<0)throw new Error("getPaginationModel(): currentPage shouldn't be a negative number");if(t>n)throw new Error("getPaginationModel(): currentPage shouldn't be greater than totalPages");var r=null==e.boundaryPagesRange?1:Number(e.boundaryPagesRange);if(isNaN(r))throw new Error("getPaginationModel(): boundaryPagesRange should be a number");if(r<0)throw new Error("getPaginationModel(): boundaryPagesRange shouldn't be a negative number");var i=null==e.siblingPagesRange?1:Number(e.siblingPagesRange);if(isNaN(i))throw new Error("getPaginationModel(): siblingPagesRange should be a number");if(i<0)throw new Error("getPaginationModel(): siblingPagesRange shouldn't be a negative number");var u=Boolean(e.hidePreviousAndNextPageLinks),c=Boolean(e.hideFirstAndLastPageLinks),s=Boolean(e.hideEllipsis),l=s?0:1,f=[],p=o.createPageFunctionFactory(e);if(c||f.push(o.createFirstPageLink(e)),u||f.push(o.createPreviousPageLink(e)),1+2*l+2*i+2*r>=n){var d=a.createRange(1,n).map(p);f.push.apply(f,d)}else{var g=1,v=r,y=a.createRange(g,v).map(p),E=n+1-r,P=n,h=a.createRange(E,P).map(p),b=Math.min(Math.max(t-i,v+l+1),E-l-2*i-1),m=b+2*i,T=a.createRange(b,m).map(p);if(f.push.apply(f,y),!s){var _=b-1,I=_===v+1,S=I?p:o.createFirstEllipsis,N=S(_);f.push(N)}if(f.push.apply(f,T),!s){var L=m+1,w=L===E-1,O=w?p:o.createSecondEllipsis,A=O(L);f.push(A)}f.push.apply(f,h)}return u||f.push(o.createNextPageLink(e)),c||f.push(o.createLastPageLink(e)),f}var a=t(15),o=t(14);n.getPaginationModel=r;var i=t(6);n.ITEM_TYPES=i.ITEM_TYPES,n.ITEM_KEYS=i.ITEM_KEYS}])}); | ||
"use strict";function t(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;var r=Object.getOwnPropertyNames(n).map(function(e){return n[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,n){for(var r,u,s=t(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var l in r)a.call(r,l)&&(s[l]=r[l]);if(i){u=i(r);for(var f=0;f<u.length;f++)o.call(r,u[f])&&(s[u[f]]=r[u[f]])}}return s}},function(e,n,t){(function(n){"use strict";function r(e,t,r,s,c){if("production"!==n.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{i("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",s||"React class",r,l,typeof e[l]),f=e[l](t,l,s,r,null,o)}catch(e){f=e}if(a(!f||f 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).",s||"React class",r,l,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=c?c():"";a(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==n.env.NODE_ENV)var i=t(3),a=t(5),o=t(4),u={};e.exports=r}).call(n,t(1))},function(e,n,t){"use strict";var r=t(2),i=t(3),a=t(4);e.exports=function(){function e(e,n,t,r,o,u){u!==a&&i(!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 n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return t.checkPropTypes=r,t.PropTypes=t,t}},function(e,n,t){(function(n){"use strict";var r=t(2),i=t(3),a=t(5),o=t(8),u=t(4),s=t(9);e.exports=function(e,t){function c(e){var n=e&&(A&&e[A]||e[k]);if("function"==typeof n)return n}function l(e,n){return e===n?0!==e||1/e===1/n:e!==e&&n!==n}function f(e){this.message=e,this.stack=""}function p(e){function r(r,c,l,p,d,g,v){if(p=p||R,g=g||l,v!==u)if(t)i(!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"!==n.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+l;!o[y]&&s<3&&(a(!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.",g,p),o[y]=!0,s++)}return null==c[l]?r?new f(null===c[l]?"The "+d+" `"+g+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+g+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,l,p,d,g)}if("production"!==n.env.NODE_ENV)var o={},s=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function n(n,t,r,i,a,o){var u=n[t],s=N(u);if(s!==e){var c=L(u);return new f("Invalid "+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(n)}function g(){return p(r.thatReturnsNull)}function v(e){function n(n,t,r,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var o=n[t];if(!Array.isArray(o)){var s=N(o);return new f("Invalid "+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<o.length;c++){var l=e(o,c,r,i,a+"["+c+"]",u);if(l instanceof Error)return l}return null}return p(n)}function y(){function n(n,t,r,i,a){var o=n[t];if(!e(o)){var u=N(o);return new f("Invalid "+i+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(n)}function E(e){function n(n,t,r,i,a){if(!(n[t]instanceof e)){var o=e.name||R,u=O(n[t]);return new f("Invalid "+i+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return p(n)}function P(e){function t(n,t,r,i,a){for(var o=n[t],u=0;u<e.length;u++)if(l(o,e[u]))return null;var s=JSON.stringify(e);return new f("Invalid "+i+" `"+a+"` of value `"+o+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(e)?p(t):("production"!==n.env.NODE_ENV?a(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function b(e){function n(n,t,r,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var o=n[t],s=N(o);if("object"!==s)return new f("Invalid "+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."));for(var c in o)if(o.hasOwnProperty(c)){var l=e(o,c,r,i,a+"."+c,u);if(l instanceof Error)return l}return null}return p(n)}function h(e){function t(n,t,r,i,a){for(var o=0;o<e.length;o++){var s=e[o];if(null==s(n,t,r,i,a,u))return null}return new f("Invalid "+i+" `"+a+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==n.env.NODE_ENV?a(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var i=0;i<e.length;i++){var o=e[i];if("function"!=typeof o)return a(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",w(o),i),r.thatReturnsNull}return p(t)}function m(){function e(e,n,t,r,i){return I(e[n])?null:new f("Invalid "+r+" `"+i+"` supplied to "+("`"+t+"`, expected a ReactNode."))}return p(e)}function T(e){function n(n,t,r,i,a){var o=n[t],s=N(o);if("object"!==s)return new f("Invalid "+i+" `"+a+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var l=e[c];if(l){var p=l(o,c,r,i,a+"."+c,u);if(p)return p}}return null}return p(n)}function _(e){function n(n,t,r,i,a){var s=n[t],c=N(s);if("object"!==c)return new f("Invalid "+i+" `"+a+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));var l=o({},n[t],e);for(var p in l){var d=e[p];if(!d)return new f("Invalid "+i+" `"+a+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=d(s,p,r,i,a+"."+p,u);if(g)return g}return null}return p(n)}function I(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(I);if(null===n||e(n))return!0;var t=c(n);if(!t)return!1;var r,i=t.call(n);if(t!==n.entries){for(;!(r=i.next()).done;)if(!I(r.value))return!1}else for(;!(r=i.next()).done;){var a=r.value;if(a&&!I(a[1]))return!1}return!0;default:return!1}}function S(e,n){return"symbol"===e||("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}function N(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":S(n,e)?"symbol":n}function L(e){if("undefined"==typeof e||null===e)return""+e;var n=N(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function w(e){var n=L(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}function O(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var A="function"==typeof Symbol&&Symbol.iterator,k="@@iterator",R="<<anonymous>>",x={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:g(),arrayOf:v,element:y(),instanceOf:E,node:m(),objectOf:b,oneOf:P,oneOfType:h,shape:T,exact:_};return f.prototype=Error.prototype,x.checkPropTypes=s,x.PropTypes=x,x}}).call(n,t(1))},function(e,n,t){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},a=!0;e.exports=t(11)(i,a)}else e.exports=t(10)()}).call(n,t(1))},function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,n){var t={};for(var r in e)n.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}Object.defineProperty(n,"__esModule",{value:!0}),n.ITEM_TYPES=n.createUltimatePagination=void 0;var a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=t(7),u=r(o),s=t(12),c=r(s),l=t(16),f=function(e,n,t){var r=function(e){var r=e.value,i=e.isDisabled;return function(){!i&&t&&n!==r&&t(r)}};return function(n){var t=e[n.type],i=r(n);return u.default.createElement(t,a({onClick:i},n))}},p=function(e){var n=e.itemTypeToComponent,t=e.WrapperComponent,r=void 0===t?"div":t,o=function(e){var t=e.currentPage,o=e.totalPages,s=e.boundaryPagesRange,c=e.siblingPagesRange,p=e.hideEllipsis,d=e.hidePreviousAndNextPageLinks,g=e.hideFirstAndLastPageLinks,v=e.onChange,y=e.disabled,E=i(e,["currentPage","totalPages","boundaryPagesRange","siblingPagesRange","hideEllipsis","hidePreviousAndNextPageLinks","hideFirstAndLastPageLinks","onChange","disabled"]),P=(0,l.getPaginationModel)({currentPage:t,totalPages:o,boundaryPagesRange:s,siblingPagesRange:c,hideEllipsis:p,hidePreviousAndNextPageLinks:d,hideFirstAndLastPageLinks:g}),b=f(n,t,v);return u.default.createElement(r,E,P.map(function(e){return b(a({},e,{isDisabled:!!y}))}))};return o.propTypes={currentPage:c.default.number.isRequired,totalPages:c.default.number.isRequired,boundaryPagesRange:c.default.number,siblingPagesRange:c.default.number,hideEllipsis:c.default.bool,hidePreviousAndNextPageLinks:c.default.bool,hideFirstAndLastPageLinks:c.default.bool,onChange:c.default.func,disabled:c.default.bool},o};n.createUltimatePagination=p,n.ITEM_TYPES=l.ITEM_TYPES},function(e,n,t){"use strict";var r=t(6);n.createFirstEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.FIRST_ELLIPSIS,value:e,isActive:!1}},n.createSecondEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.SECOND_ELLIPSIS,value:e,isActive:!1}},n.createFirstPageLink=function(e){var n=e.currentPage;return{type:r.ITEM_TYPES.FIRST_PAGE_LINK,key:r.ITEM_KEYS.FIRST_PAGE_LINK,value:1,isActive:1===n}},n.createPreviousPageLink=function(e){var n=e.currentPage;return{type:r.ITEM_TYPES.PREVIOUS_PAGE_LINK,key:r.ITEM_KEYS.PREVIOUS_PAGE_LINK,value:Math.max(1,n-1),isActive:1===n}},n.createNextPageLink=function(e){var n=e.currentPage,t=e.totalPages;return{type:r.ITEM_TYPES.NEXT_PAGE_LINK,key:r.ITEM_KEYS.NEXT_PAGE_LINK,value:Math.min(t,n+1),isActive:n===t}},n.createLastPageLink=function(e){var n=e.currentPage,t=e.totalPages;return{type:r.ITEM_TYPES.LAST_PAGE_LINK,key:r.ITEM_KEYS.LAST_PAGE_LINK,value:t,isActive:n===t}},n.createPageFunctionFactory=function(e){var n=e.currentPage;return function(e){return{type:r.ITEM_TYPES.PAGE,key:e,value:e,isActive:e===n}}}},function(e,n){"use strict";function t(e,n){for(var t=[],r=e;r<=n;r++)t.push(r);return t}n.createRange=t},function(e,n,t){"use strict";function r(e){if(null==e)throw new Error("getPaginationModel(): options object should be a passed");var n=Number(e.totalPages);if(isNaN(n))throw new Error("getPaginationModel(): totalPages should be a number");if(n<0)throw new Error("getPaginationModel(): totalPages shouldn't be a negative number");var t=Number(e.currentPage);if(isNaN(t))throw new Error("getPaginationModel(): currentPage should be a number");if(t<0)throw new Error("getPaginationModel(): currentPage shouldn't be a negative number");if(t>n)throw new Error("getPaginationModel(): currentPage shouldn't be greater than totalPages");var r=null==e.boundaryPagesRange?1:Number(e.boundaryPagesRange);if(isNaN(r))throw new Error("getPaginationModel(): boundaryPagesRange should be a number");if(r<0)throw new Error("getPaginationModel(): boundaryPagesRange shouldn't be a negative number");var o=null==e.siblingPagesRange?1:Number(e.siblingPagesRange);if(isNaN(o))throw new Error("getPaginationModel(): siblingPagesRange should be a number");if(o<0)throw new Error("getPaginationModel(): siblingPagesRange shouldn't be a negative number");var u=Boolean(e.hidePreviousAndNextPageLinks),s=Boolean(e.hideFirstAndLastPageLinks),c=Boolean(e.hideEllipsis),l=c?0:1,f=[],p=a.createPageFunctionFactory(e);if(s||f.push(a.createFirstPageLink(e)),u||f.push(a.createPreviousPageLink(e)),1+2*l+2*o+2*r>=n){var d=i.createRange(1,n).map(p);f.push.apply(f,d)}else{var g=1,v=r,y=i.createRange(g,v).map(p),E=n+1-r,P=n,b=i.createRange(E,P).map(p),h=Math.min(Math.max(t-o,v+l+1),E-l-2*o-1),m=h+2*o,T=i.createRange(h,m).map(p);if(f.push.apply(f,y),!c){var _=h-1,I=_===v+1,S=I?p:a.createFirstEllipsis,N=S(_);f.push(N)}if(f.push.apply(f,T),!c){var L=m+1,w=L===E-1,O=w?p:a.createSecondEllipsis,A=O(L);f.push(A)}f.push.apply(f,b)}return u||f.push(a.createNextPageLink(e)),s||f.push(a.createLastPageLink(e)),f}var i=t(15),a=t(14);n.getPaginationModel=r;var o=t(6);n.ITEM_TYPES=o.ITEM_TYPES,n.ITEM_KEYS=o.ITEM_KEYS}])}); | ||
//# sourceMappingURL=react-ultimate-pagination-basic.min.js.map |
@@ -24,6 +24,11 @@ 'use strict'; | ||
isActive = _ref.isActive, | ||
onClick = _ref.onClick; | ||
onClick = _ref.onClick, | ||
isDisabled = _ref.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ style: isActive ? activePageStyle : null, onClick: onClick }, | ||
{ | ||
style: isActive ? activePageStyle : null, | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
value | ||
@@ -34,6 +39,10 @@ ); | ||
var Ellipsis = function Ellipsis(_ref2) { | ||
var onClick = _ref2.onClick; | ||
var onClick = _ref2.onClick, | ||
isDisabled = _ref2.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'...' | ||
@@ -45,6 +54,10 @@ ); | ||
var isActive = _ref3.isActive, | ||
onClick = _ref3.onClick; | ||
onClick = _ref3.onClick, | ||
isDisabled = _ref3.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'First' | ||
@@ -56,6 +69,10 @@ ); | ||
var isActive = _ref4.isActive, | ||
onClick = _ref4.onClick; | ||
onClick = _ref4.onClick, | ||
isDisabled = _ref4.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Prev' | ||
@@ -67,6 +84,10 @@ ); | ||
var isActive = _ref5.isActive, | ||
onClick = _ref5.onClick; | ||
onClick = _ref5.onClick, | ||
isDisabled = _ref5.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Next' | ||
@@ -78,6 +99,10 @@ ); | ||
var isActive = _ref6.isActive, | ||
onClick = _ref6.onClick; | ||
onClick = _ref6.onClick, | ||
isDisabled = _ref6.isDisabled; | ||
return _react2.default.createElement( | ||
'button', | ||
{ onClick: onClick }, | ||
{ | ||
onClick: onClick, | ||
disabled: isDisabled | ||
}, | ||
'Last' | ||
@@ -84,0 +109,0 @@ ); |
{ | ||
"name": "react-ultimate-pagination-basic", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "React.js pagination component with basic theme", | ||
@@ -37,3 +37,3 @@ "main": "lib/react-ultimate-pagination-basic.js", | ||
"dependencies": { | ||
"react-ultimate-pagination": "1.1.0" | ||
"react-ultimate-pagination": "1.2.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
296817
1660
+ Addedreact-ultimate-pagination@1.2.0(transitive)
- Removedreact-ultimate-pagination@1.1.0(transitive)