{"_id":"@bazhe/with-pagination","_rev":"5-167a8fdbf149abeabfb27391b0d4203f","name":"@bazhe/with-pagination","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@bazhe/with-pagination","version":"1.0.0","description":"React Higher-Order Component for handling your pagination","author":{"name":"Blagoj Petrov"},"repository":{"type":"git","url":"https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","scripts":{"start":"tsdx watch --tsconfig tsconfig.build.json --verbose --noClean","build":"tsdx build --tsconfig tsconfig.build.json","test":"tsdx test","lint":"tsdx lint","prepublish":"npm run build"},"main":"dist/index.js","module":"dist/react.esm.js","typings":"dist/index.d.ts","peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"dependencies":{"@bazhe/paginator":"^1.0.0","@bazhe/use-pagination":"^1.0.0","tslib":"^2.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/react":"^11.2.6","@testing-library/react-hooks":"^5.1.2","utility-types":"^3.10.0"},"licenseText":"MIT License\n\nCopyright (c) <year> <author>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","license":"MIT","_id":"@bazhe/with-pagination@1.0.0","dist":{"shasum":"e38755a51989c350baa0e6989d454bc44c667007","integrity":"sha512-7kbq9SXdoEr3Y5eRvK8KJjvWOkZOmh6jdcHhM7XO/nixIMzLQrEHfn2rsA8Hxc0XqtvCLWuaClB2EArNkEyqUA==","tarball":"https://registry.npmjs.org/@bazhe/with-pagination/-/with-pagination-1.0.0.tgz","fileCount":15,"unpackedSize":16058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnX44CRA9TVsSAnZWagAAeDcP/RjKqOPkfR1YfLBj2dgf\n9druwsYuE9zByy/lbw9aPKi/OpTcQgg9FzwYngI7t4pJRa3T3MjsYNcR1zig\nXUqsDHf+wtjG/fTZzmK40ttI8mlNpPplISQhsQDnM0HAGCa3+ufB5c/B/vyZ\nI3Yt/wLSQtPP+TZ9SBU4ZtovtDNa//EKXb9zWaM1J3f+E22YsKfLtFsrjp+J\n2i1aDkZcEymKSUejwman4+drooKVhQUO8NtqoWJVJVyJTm5/fCL53XcQ1im/\nenVyQLHkqsGUNIZ3RseDqaipbaP0GDjT2Y0I3jTP9885HVZE12ZVPEwQkMJU\n8MtrEKOykUZwGxyR6D8N1zd2vigzafHhc5rx6qWJHHBdbYiPkJZUMeeuC+D/\nDHYyO3ywQD2Vrza5BuZrX3Qk7RJKd3rIT0GlaeyiC6WKgHjN18w5qaTim71z\ndGtIFReE7yeJRUdCprEFaj68ZGnkBQxnjD3nLY3Gcq5HYNJ0DHYq0sB/k21k\n12vA3tCyHnhIbp/+ocrsdpOlSxL6fTQNHQbvYUG0QshHoC9BqQ/HQkDvPGY3\ndtTG2anQ5ExKhA+Jj/yxlYec/scs4AGSv4Bq0mdHmB8Yx6rkfSP2X20i1web\nQl5HYBPHA8bCSxyfdIh7k8aTI59WV66ER0QC+nO5snLryfOxQYegMQy8L2/b\nNM1S\r\n=YlJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDljR7Cm/vlKL3dkjZm5KacXCcXf90HA6IYSzOdL9QnhQIhAMh2PjB83SIu+I0luPFxji9PNU/b1WfN/pxySO8hyC5P"}]},"_npmUser":{"name":"baze5","email":"blagoj.petrov5@gmail.com"},"directories":{},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/with-pagination_1.0.0_1620934200201_0.2717296967965872"},"_hasShrinkwrap":false},"1.1.0":{"name":"@bazhe/with-pagination","version":"1.1.0","description":"React Higher-Order Component for handling your pagination","author":{"name":"Blagoj Petrov"},"repository":{"type":"git","url":"git+https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","scripts":{"start":"tsdx watch --tsconfig tsconfig.build.json --verbose --noClean","build":"tsdx build --tsconfig tsconfig.build.json","test":"tsdx test","lint":"tsdx lint","prepublish":"npm run build"},"main":"dist/index.js","module":"dist/react.esm.js","typings":"dist/index.d.ts","peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"dependencies":{"@bazhe/paginator":"^1.1.0","@bazhe/use-pagination":"^1.1.0","tslib":"^2.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/react":"^11.2.6","@testing-library/react-hooks":"^5.1.2","utility-types":"^3.10.0"},"keywords":["react","javascript","typescript","pagination","hoc","wrapper"],"bugs":{"url":"https://github.com/Blagoj5/pagination/issues"},"_id":"@bazhe/with-pagination@1.1.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-70vKo6X+9rz5yl39qm/qJwmHG4qIkVw2XYpBpyqslWfAJjlmzXdTmby2IljPF9X52Ir3Bj6AP55IRUimmhq2DQ==","shasum":"9b2d1d4eba285449b86bdbafed7d9d7b8728f432","tarball":"https://registry.npmjs.org/@bazhe/with-pagination/-/with-pagination-1.1.0.tgz","fileCount":13,"unpackedSize":16722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnYfUCRA9TVsSAnZWagAAt1gQAIyJsNFAj2epZLRvS3tU\nkUBMHHJ+5XbAF52fMJPNz0Kcslxm3+ABopKh7sBJKuXZ6vMmwgzjlFF8+JWe\ntx/BbJ80iYC+jAscrPGmgTRJAS8VqRKVEbqRw3qE5pRELHqE4fVscMEhOekI\ntQWqkR0U0ckdRDsyh11wNYK3kHm+IyjIMVm2uR8n3ZYrY5TPhTJVZiNts7r+\nTCvmL+zeXc3SWuG1CGnYocQ3tL1Zoxx2AiIG8CIqMFNHpPsM9M4roB33/d5e\n4rQG9gea2iRuD+td7wQafLB1I98WuDc1g6PN6kHn4KPyqTKyCwcLatXux6UH\n+3gyvLiDj/07e+NY2Lu5iuIZKF/MWYzYhkKEanCjSUErQqkcLk2EW0+697+9\nrCQdEGyGvGRKiyOEqtTGO4rdcwn2mzy211EgIyBU7lIXVxg8GSeXVfPvHGdo\nAJT0gH6tRaLm7Ft+Nt0X5f3haW/EFxZezBzxDOjrKaLcy7a5FVXtCRKR6gFx\nufS6cwv/HZhkt4kz9waenoeb8Ao0cKrgf8AFF91uHTcVB+QWIelBaUZZVfe3\nubaE0UwncYTJyVIgd3G2oiZVXoGID5ZMOlvGKzA4zQ2EAt0l80xRvFrnXFsJ\nFL3xnhLu6ilJsliNeavZ1EjRe3LA15MqFs3opZxXyVw3s2Dbd+F0DB8oCxqd\nctzC\r\n=lGLK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCONB0b2lM3F3AJECoUzcEQ+WFtb3A4oWQc0qbjtIJCJgIgD+IREc4vB+I9rjeCq8Q9qbcG+limoW5c41R9O7E40Ug="}]},"_npmUser":{"name":"baze5","email":"blagoj.petrov5@gmail.com"},"directories":{},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/with-pagination_1.1.0_1620936660042_0.7713005877020807"},"_hasShrinkwrap":false},"1.1.1":{"name":"@bazhe/with-pagination","version":"1.1.1","description":"React Higher-Order Component for handling your pagination","author":{"name":"Blagoj Petrov"},"repository":{"type":"git","url":"git+https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","scripts":{"start":"tsdx watch --tsconfig tsconfig.build.json --verbose --noClean","build":"tsdx build --tsconfig tsconfig.build.json","test":"tsdx test","lint":"tsdx lint","prepublish":"npm run build"},"main":"dist/index.js","module":"dist/react.esm.js","typings":"dist/index.d.ts","peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"dependencies":{"@bazhe/paginator":"^1.1.1","@bazhe/use-pagination":"^1.1.1","tslib":"^2.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/react":"^11.2.6","@testing-library/react-hooks":"^5.1.2","utility-types":"^3.10.0"},"keywords":["react","javascript","typescript","pagination","hoc","wrapper"],"bugs":{"url":"https://github.com/Blagoj5/pagination/issues"},"_id":"@bazhe/with-pagination@1.1.1","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-CD4ZLGVCH1v7LS40P5O5KA0cXWt4CrhoOYZohDa7Iwmls4jBAqkEYwUXusBDYFWpBbXZG3RTB8b8Co7xF6RsdA==","shasum":"fe660354c6575c4fb2b3dc9132e6214253f1e8ed","tarball":"https://registry.npmjs.org/@bazhe/with-pagination/-/with-pagination-1.1.1.tgz","fileCount":13,"unpackedSize":17106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnY9CCRA9TVsSAnZWagAABz0P/RwHwxoHFMq/XoBokPZB\nCXrwd98Ddrnirctc2atT8nguX+GipNMMfY8pJA7T1f0qXI8vwkd5S8AwnHe8\nK4QulTBKqT/w/Rg1mZ7wYLd9OcWOD2PxSpQmHqUgo2dcFD0X4tKH4VDoPxNa\n5vCtzZkcrIOBLu/WElGz54gXsbLhVwJKR+bCfKvLx8w4QwEIKb5FtLxzIoOo\n1IeMMi/ObO28w9Kk6zX4X3tQhmLch8R1T1KSuZpJmW/euSoerZoWYvTpnUOq\nb4i8Q9tMme1xjLdPZw7mGvueJkX5+/QhE1d7g/10BoX2MaVs0dmhCgHQYwPN\nPnIePVPiAhxrjnvKVeqhl71L4XlW69PBCljoFgNpVVIaZ3srWKpCmw2PCQ1u\n4jTaypWmgSm1ME4QJ3nsy2CIcCJXM91HBdFlZx8YIvM74+fUXN5rT4QUZbDL\n7/Cvi/U+708jc2JHfay9n36JstlF5PEyZOvI5XFpyVrbT3mzKLguhZWw3xsm\n2g1zBZWMNLpZIn2mr9Vv0QW4frKDUNBWwrLsJSbJju44TO1pCyhNZg1R99DU\nSX7xkqy56MewLjbf8JYaAXb3T9zXFMLcYy2l6HmGGpAHKEcMToF2yXQFLQi7\n+19cknkOhK4Q1ECYvi3wnPRuMSCsGK49e82da0q8KAZWm1I/56tma00H4k+b\nw+0C\r\n=w9qm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/FmTOTNXNUOstuNRGTkqyW0ev9Ri7PCR4DBpssijulAiEAshPtSUMIpy0VHAnCRgVsu8QSB0nJmL/LV+PwO4F3p7s="}]},"_npmUser":{"name":"baze5","email":"blagoj.petrov5@gmail.com"},"directories":{},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/with-pagination_1.1.1_1620938561485_0.9902370365645792"},"_hasShrinkwrap":false},"1.2.0":{"name":"@bazhe/with-pagination","version":"1.2.0","description":"React Higher-Order Component for handling your pagination","author":{"name":"Blagoj Petrov"},"repository":{"type":"git","url":"git+https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","scripts":{"start":"tsdx watch --tsconfig tsconfig.build.json --verbose --noClean","build":"tsdx build --tsconfig tsconfig.build.json","test":"tsdx test","lint":"tsdx lint","prepublish":"npm run build"},"main":"dist/index.js","module":"dist/react.esm.js","typings":"dist/index.d.ts","peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"dependencies":{"@bazhe/paginator":"^1.2.0","@bazhe/use-pagination":"^1.2.0","tslib":"^2.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/react":"^11.2.6","@testing-library/react-hooks":"^5.1.2","utility-types":"^3.10.0"},"keywords":["react","javascript","typescript","pagination","hoc","wrapper"],"bugs":{"url":"https://github.com/Blagoj5/pagination/issues"},"_id":"@bazhe/with-pagination@1.2.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-IvfwsW1O/YEXxhnIeRhIuivgitaF3Qi32HzhZ58jl7mIqBz/07WNzHESCp5AEza+17ci0aYtdDrmCDXEDkdZ4w==","shasum":"951d6140657e2dff1fd9d32d8623e24d41ce49b3","tarball":"https://registry.npmjs.org/@bazhe/with-pagination/-/with-pagination-1.2.0.tgz","fileCount":13,"unpackedSize":18334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgn/5PCRA9TVsSAnZWagAAgqMP/1iRQOf1apYkWPJAVuhO\npaZWG0Kt5Jn7qQUhBf5kphzSntKI5n15sp/cJXbwMUF+zvsiiCebAQgRB+Kg\nzcVGkW3WxdelgIChVl0F2TRTXlPemP3DMVmxDrQSGAVojG3fOhK3TaQcegge\n/M31xnkG9GsHcjUtFEuqPR90pG0CZt+iEb1JmFJdVtPu8eAW05OCVEuDaIZM\nOXUkG2aoZsGdlb5x3zmtHOOuOTs4gjv5bemTqssCteYN06sNvS9zPQGuLm4d\nkqvEvOcj04QmuK8Dq8D9zWztqdboGtSdYgzfEO3+bW2t/Elo8Cnq+do91jVr\ny0etvNGYPF8YM7HQ3T+Zyg/aFGhfMXNtNRORaF4YUcfcyidHu9jueHBaRxWC\no7HMBsPCQSS5xjJ2WJ0hjEONmHRFfFc4hDcR9V0rs/AW3jIXTrAtevMaZR1t\nBPy1V1Wnvxnu7nncD/8NqmLMs2SeyqMkUhq2WhXidQzfM0dvRYR0n13KDIna\ni9ArtMjf85YzctG5BfDVHzqDNGXMVY6ATui5FjHzf5u6DHCZBK/E9M3Utuuh\nOx9Z9MpJj/PWzOj7hB4oHXzcJ37Q/ixmPvjV8YukmTedtNsPwRpaBW6icmQL\nqV0TgHWCQVxrx+w/pGK+cuSlfqL2qhtMrsvprHhKRbQWOlnJlVRP557biKxq\nmsQj\r\n=8qIF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKGxdk5/7WQgOdsI8V692NgoGHo6LujVhn77/BSDsISwIhALySVtixVd5WbcxZ3GfKV+lTQZd17SP/WnHD8FDmGDEU"}]},"_npmUser":{"name":"baze5","email":"blagoj.petrov5@gmail.com"},"directories":{},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/with-pagination_1.2.0_1621098063340_0.09930908355515844"},"_hasShrinkwrap":false},"1.2.1":{"name":"@bazhe/with-pagination","version":"1.2.1","description":"React Higher-Order Component for handling your pagination","author":{"name":"Blagoj Petrov"},"repository":{"type":"git","url":"git+https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","scripts":{"start":"tsdx watch --tsconfig tsconfig.build.json --verbose --noClean","build":"tsdx build --tsconfig tsconfig.build.json","test":"tsdx test","lint":"tsdx lint","prepublish":"npm run build"},"main":"dist/index.js","module":"dist/react.esm.js","typings":"dist/index.d.ts","peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"dependencies":{"@bazhe/paginator":"^1.2.1","@bazhe/use-pagination":"^1.2.1","tslib":"^2.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/react":"^11.2.6","@testing-library/react-hooks":"^5.1.2","utility-types":"^3.10.0"},"keywords":["react","javascript","typescript","pagination","hoc","wrapper"],"bugs":{"url":"https://github.com/Blagoj5/pagination/issues"},"_id":"@bazhe/with-pagination@1.2.1","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-odbL16gOlhuWYx5vIl7Z1cMn4+LTfN8rSOEOJh+oFW8P8EpUH1L16a7msD5ZzRaq68JKF3rKAyfSefWnchRHig==","shasum":"727ecdcef6472841f52754a6a32be7f9f6badddf","tarball":"https://registry.npmjs.org/@bazhe/with-pagination/-/with-pagination-1.2.1.tgz","fileCount":13,"unpackedSize":18723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoWHnCRA9TVsSAnZWagAAcDsP/3+ADdBPqXAslLvQ5MPL\nJLkx07W0xJr+mBXXJwYhBTpN9aYawj2Tfohl7jQPwYVYw0Bq5bmxsPf+4ykx\n0Bd5YS37Ci+wivrUrr/bHMqH3bjzsJTvXp0rgTSxiIsA6WfTQ2JqTl+X1Xes\nNsbeftBnEDrAHfhY7zF9hCyIDP3ffjkLl97Jf0wOMMHdWM8i930KEFHEEF7F\nSPBe8cvImhtd/mbYbwngu2wo/6ezJ2+slD8pUmDuTNV6boez+1JdAKUk8kyu\nfAjlsJcBP0zriORvpWjJvOeb6MDVtNWMvY9KQ136k7XPHSfJgDnO8cqruNko\n4xp+K16sBJ1/YgOOR0Dhi2rtHQEsbR0eeVyWtaE7XIf/6OvpWabp0HwG7T5/\ng9cHIzGh/J74ylg9bUmq30g+K8J8cWL0GGT/vUBWxp7w4nUbScomNOSTcncl\n3mIjlIcX549/Mqd1Zi7QpwcUHVtS4dKbw99LvkO+zXxeLXZvevMw54o6WiSG\nsINkW8/6/FO9Yf3qlxga3876o4UgXk3+y2WwUcbzsPhAfoJYGx6bUNy+vmON\nS4WB+FDpwUqrD/TCS85OzufRymrAfh3D6kbcmuH/mg7ykUBVPG9VS1v+wC+2\ncUANO8HTa5Nu613hQAaDpE+V3OsMt2Uau12fIYWNGczm5+2KZPvTO0SdVDTO\nGovu\r\n=nPkg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzMWaebnLDi4vXES/l9KcIMMjGb8gaPSZ/G6eYA8EpvgIhALiR860lrdnoTabMefBvJYEzKa1F+wYRXDaSrQt9pZb3"}]},"_npmUser":{"name":"baze5","email":"blagoj.petrov5@gmail.com"},"directories":{},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/with-pagination_1.2.1_1621189094711_0.12108373517297943"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-13T19:29:59.793Z","1.0.0":"2021-05-13T19:30:00.403Z","modified":"2022-04-04T17:50:02.900Z","1.1.0":"2021-05-13T20:11:00.154Z","1.1.1":"2021-05-13T20:42:41.699Z","1.2.0":"2021-05-15T17:01:03.499Z","1.2.1":"2021-05-16T18:18:14.905Z"},"maintainers":[{"name":"baze5","email":"blagoj.petrov5@gmail.com"}],"description":"React Higher-Order Component for handling your pagination","homepage":"https://github.com/Blagoj5/pagination/tree/main/packages/with-pagination","repository":{"type":"git","url":"git+https://github.com/Blagoj5/pagination.git","directory":"packages/with-pagination"},"author":{"name":"Blagoj Petrov"},"readme":"# @bazhe/with-pagination\n\nReact Higher-Order Component for handling your pagination\n\n**Playground/Demo:** https://blagoj5.github.io/pagination/#playground  \n**Full documentation:** https://blagoj5.github.io/pagination\n\n## Getting Started\n\n### Prerequisites\n\nYou need to have react-dom and react above version 16\n\n```\n\"react\": \">=16.0.0\",\n\"react-dom\": \">=16.0.0\"\n```\n\n### Installing\n\nnpm\n\n```\nnpm install @bazhe/with-pagination\n```\n\nyarn\n\n```\nyarn add @bazhe/with-pagination\n```\n\n## Usage\n\nTypescript usage example in: https://github.com/Blagoj5/pagination/blob/main/example/components/pagination-hoc-demo.tsx\n\nThe example includes the implementation of withPagination for both class based and function based components\n\n### Import\n\n```js\nimport { withPagination } from '@bazhe/with-pagination';\n```\n\n### Initialization\n\n**Syntax:** withPagination(WrappedComponent, [paginationOptions](https://blagoj5.github.io/pagination/#pagination-options))  \n**Returns:** [PaginationResult](https://blagoj5.github.io/pagination/#pagination-result/return) as props to the wrapped component\n\nFunction based components:\n\n```js\nconst fakeData = [1, 2, 3]\n\n\nconst FunctionalBasedComponent = ({\n  paginationResult,\n  nextPage,\n  previousPage,\n  setItems,\n  setCurrentPage,\n}: WithPaginationProps<typeof fakeData[0]>) => {\n  // pass the typeof the element in this case items have number\n\n  return (\n    <div>\n        The pagination result:\n        <pre>{JSON.stringify(paginationResult)}</pre>\n    </div>\n    );\n};\n\nexport const PaginationHocHookDemo = withPagination(FunctionalBasedComponent, {\n  items: fakeData,\n  limit: 2,\n});\n```\n\nClass based components:\n\n```jsx\nconst fakeData = [1, 2, 3]\n\nclass ClassBasedComponent extends React.Component<\n  WithPaginationProps<typeof fakeData[0]>\n> {\n  constructor(props) {\n    super(props);\n  }\n\n  render() {\n    const {\n      nextPage,\n      paginationResult,\n      previousPage,\n      setCurrentPage,\n      setItems,\n    } = this.props;\n\n  return (\n    <div>\n        The pagination result:\n        <pre>{JSON.stringify(paginationResult)}</pre>\n    </div>\n    );\n  }\n}\n\n\n\nexport const PaginationHocHookDemo = withPagination(ClassBasedComponent, {\n  items: fakeData,\n  limit: 2,\n});\n```\n\n## API\n\n### Parameters\n\nwithPagination(WrappedComponent, paginationOptions) accepts 2 parameters:\n\n#### Wrapper Component\n\n| Name             | Type                    | Description                                                            |\n| ---------------- | ----------------------- | ---------------------------------------------------------------------- |\n| WrappedComponent | React.ComponentType\\<T> | The wrapped component that will recieve the pagination result as props |\n\n#### Pagination Options\n\n| Name         | Type                | Default      | Description                                                                                                              |\n| ------------ | ------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------ |\n| items        | T[] \\| undefined    | []           | Initial items for the pagination                                                                                         |\n| limit        | number \\| undefined | 4            | The limit of items per page                                                                                              |\n| currentPage  | number \\| undefined | 1            | The current page                                                                                                         |\n| links        | number \\| undefined | 10           | Links is the number of pages/links/buttons to display. Example: How many buttons you want to show in the pagination bar? |\n| totalResults | number \\| undefined | items.length | Total results is the maximum number of items. Usually refers to items.length (so there's no need to pass it)             |\n\n<br />\n\n### Pagination Result/Return\n\nExpected pagination props to the wrapped component:\n\n- **paginationResult:**\n\n| Name              | Type                | Description                                                                                                               |\n| ----------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| items             | T[] \\| undefined    | The items that will change depending on the pagination (currentPage, limit ...)                                           |\n| all_items         | T[] \\| undefined    | Initial/All items for the pagination                                                                                      |\n| total_pages       | number \\| undefined | The total pages for the provided items. Example: 12 items with limit 2 -> 6 total pages                                   |\n| pages             | number              | The number of pages between range(first_page, last_page)                                                                  |\n| current_page      | number              | Current page                                                                                                              |\n| first_page        | number              | First page, depends on the link (buttons/links to display in the pagination bar) and limit (items per page)               |\n| last_page         | number              | Last page, depends on the link (buttons/links to display in the pagination bar) and limit (items per page)                |\n| previous_page     | number              | Previous page, current_page - 1                                                                                           |\n| next_page         | number              | Next page, current_page + 1                                                                                               |\n| has_previous_page | boolean             |\n| has_next_page     | boolean             |\n| total_results     | number              | The length of the initial items                                                                                           |\n| results           | number              | Results per page                                                                                                          |\n| first_result      | number              | First result is the index of the item that's first for the current page - items[first_result] (depends on link and limit) |\n| last_result       | number              | Last result is the index of the item that's last for the current page - items[last_result] (depends on link and limit)    |\n| limit             | number              | The limit of items per page                                                                                               |\n\n<br />\n\n- **Pagination handlers for managing state**\n\n| Name            | Type                                                   | Description                                                         |\n| --------------- | ------------------------------------------------------ | ------------------------------------------------------------------- |\n| setCurrentPage  | (n: number) => void                                    | Function handler for changing the current page                      |\n| setItems        | (items: T[]) => void                                   | Function handler for changing the items                             |\n| setPageAndItems | (payload: { items: I[]; currentPage: number }) => void | Function handler for changing current page and the items themselves |\n| nextPage        | () => void                                             | Function handler for changing to next page                          |\n| previousPage    | () => void                                             | Function handler for changing to previous page                      |\n\n## Built With\n\nDepends on:\n\n- [@bazhe/use-pagination](https://www.npmjs.com/package/@bazhe/use-pagination) - Used usePagination hook for the pagination logic\n- [@bazhe/paginator](https://www.npmjs.com/package/@bazhe/paginator) - The utilities used\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Blagoj5/pagination/tags).\n\n## Authors\n\n- **Blagoj Petrov**\n\n## Security\n\nThis project doesn’t have any security concerns.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details\n","readmeFilename":"README.md","keywords":["react","javascript","typescript","pagination","hoc","wrapper"],"bugs":{"url":"https://github.com/Blagoj5/pagination/issues"}}