Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-responsive-pagination

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-pagination - npm Package Compare versions

Comparing version 2.5.0-beta.1 to 2.5.0-beta.2

dist/helpers/react.d.ts

215

CHANGELOG.md
# React Responsive Pagination Changelog
# [2.5.0-beta.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.4-beta.2...v2.5.0-beta.1) (2024-04-28)
# [2.5.0-beta.2](https://github.com/jonelantha/react-responsive-pagination/compare/v2.5.0-beta.1...v2.5.0-beta.2) (2024-04-28)

@@ -8,324 +8,287 @@

* change to publish ([447127c](https://github.com/jonelantha/react-responsive-pagination/commit/447127c8bc84ff7d13df9affc968a5b7a834b04b))
* Faster handling of css induced changes ([554c529](https://github.com/jonelantha/react-responsive-pagination/commit/554c529a9fd270b6c62ab4a986ee914a49ed1ee5))
# [2.5.0-beta.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.4-beta.2...v2.5.0-beta.1) (2024-04-28)
### Features
- change to publish ([447127c](https://github.com/jonelantha/react-responsive-pagination/commit/447127c8bc84ff7d13df9affc968a5b7a834b04b))
## [2.4.4-beta.2](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.4-beta.1...v2.4.4-beta.2) (2024-04-28)
## [2.4.4](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.3...v2.4.4) (2024-04-28)
### Bug Fixes
* Package updates ([b4ae892](https://github.com/jonelantha/react-responsive-pagination/commit/b4ae892975469a8610627e80f3e197c294e654df))
- Package updates ([b4ae892](https://github.com/jonelantha/react-responsive-pagination/commit/b4ae892975469a8610627e80f3e197c294e654df))
## [2.4.4-beta.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.3...v2.4.4-beta.1) (2024-04-25)
### Bug Fixes
* Package updates ([a715af8](https://github.com/jonelantha/react-responsive-pagination/commit/a715af88ae6ca7cb1a83d58ab39d08dc135aee27))
- Package updates ([a715af8](https://github.com/jonelantha/react-responsive-pagination/commit/a715af88ae6ca7cb1a83d58ab39d08dc135aee27))
## [2.4.3](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.2...v2.4.3) (2024-04-05)
### Bug Fixes
* Package updates (create-react-app -> vite) ([f8ef050](https://github.com/jonelantha/react-responsive-pagination/commit/f8ef0502f1aa720c4a06e74ef44f9190e9d2ce6e))
- Package updates (create-react-app -> vite) ([f8ef050](https://github.com/jonelantha/react-responsive-pagination/commit/f8ef0502f1aa720c4a06e74ef44f9190e9d2ce6e))
## [2.4.2](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.1...v2.4.2) (2024-03-10)
### Bug Fixes
* Package updates ([f691568](https://github.com/jonelantha/react-responsive-pagination/commit/f691568e24d358b7e52db71f6de14a2cf7968349))
- Package updates ([f691568](https://github.com/jonelantha/react-responsive-pagination/commit/f691568e24d358b7e52db71f6de14a2cf7968349))
## [2.4.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.0...v2.4.1) (2024-01-04)
### Bug Fixes
* package updates ([a0bac8b](https://github.com/jonelantha/react-responsive-pagination/commit/a0bac8b78ab6f5bbbe5f278059b7e9245acf3542))
- package updates ([a0bac8b](https://github.com/jonelantha/react-responsive-pagination/commit/a0bac8b78ab6f5bbbe5f278059b7e9245acf3542))
# [2.4.0](https://github.com/jonelantha/react-responsive-pagination/compare/v2.3.0...v2.4.0) (2023-12-21)
### Features
* Support for React elements for previous/next labels ([1cda768](https://github.com/jonelantha/react-responsive-pagination/commit/1cda76855213a6eda58dcd74f64838e4698a60fd))
- Support for React elements for previous/next labels ([1cda768](https://github.com/jonelantha/react-responsive-pagination/commit/1cda76855213a6eda58dcd74f64838e4698a60fd))
# [2.3.0](https://github.com/jonelantha/react-responsive-pagination/compare/v2.2.4...v2.3.0) (2023-12-11)
### Features
* NarrowBehaviour combine helper, for using multiple NarrowBehaviours ([3c040ec](https://github.com/jonelantha/react-responsive-pagination/commit/3c040ec0060fcb9aeaa284b66f1d35376ed748f2))
* new dropFirstAndLast NarrowBehaviour ([f0b0a54](https://github.com/jonelantha/react-responsive-pagination/commit/f0b0a54d1886fded1a1aa8d25921a4f8f3a622ed))
- NarrowBehaviour combine helper, for using multiple NarrowBehaviours ([3c040ec](https://github.com/jonelantha/react-responsive-pagination/commit/3c040ec0060fcb9aeaa284b66f1d35376ed748f2))
- new dropFirstAndLast NarrowBehaviour ([f0b0a54](https://github.com/jonelantha/react-responsive-pagination/commit/f0b0a54d1886fded1a1aa8d25921a4f8f3a622ed))
## [2.2.4](https://github.com/jonelantha/react-responsive-pagination/compare/v2.2.3...v2.2.4) (2023-11-24)
### Bug Fixes
* Package updates ([ead92d9](https://github.com/jonelantha/react-responsive-pagination/commit/ead92d94ea69762dfdf2b7ce379065453bc8eb9c))
- Package updates ([ead92d9](https://github.com/jonelantha/react-responsive-pagination/commit/ead92d94ea69762dfdf2b7ce379065453bc8eb9c))
## [2.2.3](https://github.com/jonelantha/react-responsive-pagination/compare/v2.2.2...v2.2.3) (2023-08-31)
### Bug Fixes
* Main package updates ([9a1f59b](https://github.com/jonelantha/react-responsive-pagination/commit/9a1f59b712b29ebb1b2ca405e425ffbc3034686d))
- Main package updates ([9a1f59b](https://github.com/jonelantha/react-responsive-pagination/commit/9a1f59b712b29ebb1b2ca405e425ffbc3034686d))
## [2.2.2](https://github.com/jonelantha/react-responsive-pagination/compare/v2.2.1...v2.2.2) (2023-08-03)
### Bug Fixes
* Package updates ([b12e56b](https://github.com/jonelantha/react-responsive-pagination/commit/b12e56b6cd18be08cc3333a06d456471d011e16b))
- Package updates ([b12e56b](https://github.com/jonelantha/react-responsive-pagination/commit/b12e56b6cd18be08cc3333a06d456471d011e16b))
## [2.2.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.2.0...v2.2.1) (2023-07-17)
### Bug Fixes
* Package updates ([7621448](https://github.com/jonelantha/react-responsive-pagination/commit/7621448567a61e4989863db80f2adf98dca4a4dd))
- Package updates ([7621448](https://github.com/jonelantha/react-responsive-pagination/commit/7621448567a61e4989863db80f2adf98dca4a4dd))
# [2.2.0](https://github.com/jonelantha/react-responsive-pagination/compare/v2.1.0...v2.2.0) (2023-05-08)
### Features
* Themes ([198dd0e](https://github.com/jonelantha/react-responsive-pagination/commit/198dd0e19fe63c4375c2d7f040706bc967bbec17))
- Themes ([198dd0e](https://github.com/jonelantha/react-responsive-pagination/commit/198dd0e19fe63c4375c2d7f040706bc967bbec17))
# [2.1.0](https://github.com/jonelantha/react-responsive-pagination/compare/v2.0.1...v2.1.0) (2023-04-02)
### Bug Fixes
* Package updates ([2a26be3](https://github.com/jonelantha/react-responsive-pagination/commit/2a26be3db0010c23345c4716a9bc96136b35fbe4))
- Package updates ([2a26be3](https://github.com/jonelantha/react-responsive-pagination/commit/2a26be3db0010c23345c4716a9bc96136b35fbe4))
### Features
* nav button className props ([c8ff00b](https://github.com/jonelantha/react-responsive-pagination/commit/c8ff00be60645553cd74e25618b641a3acbcbafe))
- nav button className props ([c8ff00b](https://github.com/jonelantha/react-responsive-pagination/commit/c8ff00be60645553cd74e25618b641a3acbcbafe))
## [2.0.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.0.0...v2.0.1) (2023-03-24)
### Bug Fixes
* Package updates ([f6248d8](https://github.com/jonelantha/react-responsive-pagination/commit/f6248d8de22b59a1222adb45313e53289f23b367))
- Package updates ([f6248d8](https://github.com/jonelantha/react-responsive-pagination/commit/f6248d8de22b59a1222adb45313e53289f23b367))
# [2.0.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.10.2...v2.0.0) (2023-03-23)
### Features
* ESM only distribution & ES2020 target ([f814c5e](https://github.com/jonelantha/react-responsive-pagination/commit/f814c5ed6e64c5750c3972d71c19288a47eb87f2))
* Move presets/labelBehavior to sub-packages ([872ccee](https://github.com/jonelantha/react-responsive-pagination/commit/872cceed53fb9ec2691700cfbbfca16e86441486))
* Move v1 srOnly label behaviour into new LabelBehavior ([98ab8d7](https://github.com/jonelantha/react-responsive-pagination/commit/98ab8d74817d18ecdc27985785b68a788de36969))
* Remove resize-observer-polyfill for better bundle sizes ([0dd33b3](https://github.com/jonelantha/react-responsive-pagination/commit/0dd33b3b2d9e875272cf0f053ee6aaf88d7bc264))
* Rename default export to ResponsivePagination (with updated examples) ([162973e](https://github.com/jonelantha/react-responsive-pagination/commit/162973e4b1ac9e0ec4277883a80bad73fc38af76))
* Replace narrowStrategy with new NarrowBehaviour (to reduce bundle size) ([8ca58f7](https://github.com/jonelantha/react-responsive-pagination/commit/8ca58f7c83bb33dc44a2de2358cb542ddead7307))
* Use aria attributes for screen readers (instead of visually hidden spans) ([39f5e33](https://github.com/jonelantha/react-responsive-pagination/commit/39f5e3379634472e38f31e5a20e6260a315defd2))
- ESM only distribution & ES2020 target ([f814c5e](https://github.com/jonelantha/react-responsive-pagination/commit/f814c5ed6e64c5750c3972d71c19288a47eb87f2))
- Move presets/labelBehavior to sub-packages ([872ccee](https://github.com/jonelantha/react-responsive-pagination/commit/872cceed53fb9ec2691700cfbbfca16e86441486))
- Move v1 srOnly label behaviour into new LabelBehavior ([98ab8d7](https://github.com/jonelantha/react-responsive-pagination/commit/98ab8d74817d18ecdc27985785b68a788de36969))
- Remove resize-observer-polyfill for better bundle sizes ([0dd33b3](https://github.com/jonelantha/react-responsive-pagination/commit/0dd33b3b2d9e875272cf0f053ee6aaf88d7bc264))
- Rename default export to ResponsivePagination (with updated examples) ([162973e](https://github.com/jonelantha/react-responsive-pagination/commit/162973e4b1ac9e0ec4277883a80bad73fc38af76))
- Replace narrowStrategy with new NarrowBehaviour (to reduce bundle size) ([8ca58f7](https://github.com/jonelantha/react-responsive-pagination/commit/8ca58f7c83bb33dc44a2de2358cb542ddead7307))
- Use aria attributes for screen readers (instead of visually hidden spans) ([39f5e33](https://github.com/jonelantha/react-responsive-pagination/commit/39f5e3379634472e38f31e5a20e6260a315defd2))
### BREAKING CHANGES
* `narrowStrategy` will require transition to `narrowBehaviour`
* `srOnlyClassName` and `a11yActiveLabel` will require transition to srOnlySpanLabel
* .sr-only spans no longer output, replaced with aria attributes
* ResizeObserver no longer polyfilled
* commonjs build no longer included and pre-2020 js engines not supported
- `narrowStrategy` will require transition to `narrowBehaviour`
- `srOnlyClassName` and `a11yActiveLabel` will require transition to srOnlySpanLabel
- .sr-only spans no longer output, replaced with aria attributes
- ResizeObserver no longer polyfilled
- commonjs build no longer included and pre-2020 js engines not supported
## [1.10.2](https://github.com/jonelantha/react-responsive-pagination/compare/v1.10.1...v1.10.2) (2023-03-07)
### Bug Fixes
* Package updates ([6df2ee6](https://github.com/jonelantha/react-responsive-pagination/commit/6df2ee6840222b869c90fdcdb60874f85ccedb3f))
- Package updates ([6df2ee6](https://github.com/jonelantha/react-responsive-pagination/commit/6df2ee6840222b869c90fdcdb60874f85ccedb3f))
## [1.10.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.10.0...v1.10.1) (2023-02-02)
### Bug Fixes
* Package updates ([be692ee](https://github.com/jonelantha/react-responsive-pagination/commit/be692eecb3a773bccdd51b1b034650934ae32c00))
- Package updates ([be692ee](https://github.com/jonelantha/react-responsive-pagination/commit/be692eecb3a773bccdd51b1b034650934ae32c00))
# [1.10.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.9.0...v1.10.0) (2022-11-29)
### Bug Fixes
* Active page number for ARIA incorrectly being hidden ([ea955d9](https://github.com/jonelantha/react-responsive-pagination/commit/ea955d935dc08e91a3fb6c4f237ed1493dc21925))
* Remove incorrect aria-label for current page and move space into srOnly ([c3b142d](https://github.com/jonelantha/react-responsive-pagination/commit/c3b142dd758c6a3cb670391ee4d97a99c1838d54))
- Active page number for ARIA incorrectly being hidden ([ea955d9](https://github.com/jonelantha/react-responsive-pagination/commit/ea955d935dc08e91a3fb6c4f237ed1493dc21925))
- Remove incorrect aria-label for current page and move space into srOnly ([c3b142d](https://github.com/jonelantha/react-responsive-pagination/commit/c3b142dd758c6a3cb670391ee4d97a99c1838d54))
### Features
* ariaPreviousLabel and ariaNextLabel props ([e7bdf02](https://github.com/jonelantha/react-responsive-pagination/commit/e7bdf02508a657e5e48de486ca9d43bf0ac44333))
* renderNav prop ([e32e15d](https://github.com/jonelantha/react-responsive-pagination/commit/e32e15daa1bd0a91997e8bef354e3bc00d8fab10))
- ariaPreviousLabel and ariaNextLabel props ([e7bdf02](https://github.com/jonelantha/react-responsive-pagination/commit/e7bdf02508a657e5e48de486ca9d43bf0ac44333))
- renderNav prop ([e32e15d](https://github.com/jonelantha/react-responsive-pagination/commit/e32e15daa1bd0a91997e8bef354e3bc00d8fab10))
# [1.9.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.8.1...v1.9.0) (2022-11-25)
### Bug Fixes
* Remove href attribute ([8a38c8a](https://github.com/jonelantha/react-responsive-pagination/commit/8a38c8a29bfa36db81527942150e009bbcd69b0a))
- Remove href attribute ([8a38c8a](https://github.com/jonelantha/react-responsive-pagination/commit/8a38c8a29bfa36db81527942150e009bbcd69b0a))
### Features
* linkHref prop to omit href from a tags ([f5b0567](https://github.com/jonelantha/react-responsive-pagination/commit/f5b0567ca2b2935b8d2a0b47a404f34a21f52f62))
- linkHref prop to omit href from a tags ([f5b0567](https://github.com/jonelantha/react-responsive-pagination/commit/f5b0567ca2b2935b8d2a0b47a404f34a21f52f62))
## [1.8.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.8.0...v1.8.1) (2022-11-19)
### Bug Fixes
* Package updates ([2799eb0](https://github.com/jonelantha/react-responsive-pagination/commit/2799eb0f1ec4b21d0c585f68d6067bb87d77d802))
- Package updates ([2799eb0](https://github.com/jonelantha/react-responsive-pagination/commit/2799eb0f1ec4b21d0c585f68d6067bb87d77d802))
# [1.8.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.7.0...v1.8.0) (2022-10-05)
### Bug Fixes
* Package updates ([cba192a](https://github.com/jonelantha/react-responsive-pagination/commit/cba192af2dd025c865cb7a6e5770365f65905ce3))
- Package updates ([cba192a](https://github.com/jonelantha/react-responsive-pagination/commit/cba192af2dd025c865cb7a6e5770365f65905ce3))
### Features
* Bootstrap 5 preset ([f3635b4](https://github.com/jonelantha/react-responsive-pagination/commit/f3635b4f8dc543f3547d6ad750c9276cdf43ea8a))
- Bootstrap 5 preset ([f3635b4](https://github.com/jonelantha/react-responsive-pagination/commit/f3635b4f8dc543f3547d6ad750c9276cdf43ea8a))
# [1.7.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.6.0...v1.7.0) (2022-09-06)
### Bug Fixes
* Added missing aria-label for disabled elements ([e1d2cc1](https://github.com/jonelantha/react-responsive-pagination/commit/e1d2cc140d892f8a21aeeefb42769f2fda2f2fa0))
* Non-docs package updates ([2ec3686](https://github.com/jonelantha/react-responsive-pagination/commit/2ec3686f7fdf022ae5c7d03bec91ef45fe9751aa))
- Added missing aria-label for disabled elements ([e1d2cc1](https://github.com/jonelantha/react-responsive-pagination/commit/e1d2cc140d892f8a21aeeefb42769f2fda2f2fa0))
- Non-docs package updates ([2ec3686](https://github.com/jonelantha/react-responsive-pagination/commit/2ec3686f7fdf022ae5c7d03bec91ef45fe9751aa))
### Features
* Add ariaCurrentAttr for including aria-current attribute on active page ([1c4e185](https://github.com/jonelantha/react-responsive-pagination/commit/1c4e185835f34e839d07ad4653018d57bdc1be3d))
* Added a11yActiveLabel prop for controlling a11y label on active link ([ae7ea23](https://github.com/jonelantha/react-responsive-pagination/commit/ae7ea23700361e88c26d4b6aa96e92e0a42bc5f7))
* srOnlyClassName='' hides .sr-only elements ([5af0c41](https://github.com/jonelantha/react-responsive-pagination/commit/5af0c418764d1cef53c459ede875d46ff022ba75))
- Add ariaCurrentAttr for including aria-current attribute on active page ([1c4e185](https://github.com/jonelantha/react-responsive-pagination/commit/1c4e185835f34e839d07ad4653018d57bdc1be3d))
- Added a11yActiveLabel prop for controlling a11y label on active link ([ae7ea23](https://github.com/jonelantha/react-responsive-pagination/commit/ae7ea23700361e88c26d4b6aa96e92e0a42bc5f7))
- srOnlyClassName='' hides .sr-only elements ([5af0c41](https://github.com/jonelantha/react-responsive-pagination/commit/5af0c418764d1cef53c459ede875d46ff022ba75))
# [1.6.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.5.0...v1.6.0) (2022-07-17)
### Bug Fixes
* Package updates ([7009bdf](https://github.com/jonelantha/react-responsive-pagination/commit/7009bdf9e4636375447c0ab1878773b43cbcda73))
- Package updates ([7009bdf](https://github.com/jonelantha/react-responsive-pagination/commit/7009bdf9e4636375447c0ab1878773b43cbcda73))
### Features
* narrowStrategy prop for improved handling of narrow pagination ([c9f0225](https://github.com/jonelantha/react-responsive-pagination/commit/c9f02250b7676d668d15d70a4118a037f40fae0c))
- narrowStrategy prop for improved handling of narrow pagination ([c9f0225](https://github.com/jonelantha/react-responsive-pagination/commit/c9f02250b7676d668d15d70a4118a037f40fae0c))
# [1.5.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.4.1...v1.5.0) (2022-06-13)
### Bug Fixes
* Package updates ([0b537b1](https://github.com/jonelantha/react-responsive-pagination/commit/0b537b1a391446f1f3fec3d218e9ac389a055574))
- Package updates ([0b537b1](https://github.com/jonelantha/react-responsive-pagination/commit/0b537b1a391446f1f3fec3d218e9ac389a055574))
### Features
* Props for overriding classNames ([606a22b](https://github.com/jonelantha/react-responsive-pagination/commit/606a22bcdb07b38fc8a5e660ab78b5a08f8006ac))
- Props for overriding classNames ([606a22b](https://github.com/jonelantha/react-responsive-pagination/commit/606a22bcdb07b38fc8a5e660ab78b5a08f8006ac))
## [1.4.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.4.0...v1.4.1) (2022-05-03)
### Bug Fixes
* Package updates ([e7f2fd3](https://github.com/jonelantha/react-responsive-pagination/commit/e7f2fd34afaaa5241c7f0c39b83064d87a592413))
- Package updates ([e7f2fd3](https://github.com/jonelantha/react-responsive-pagination/commit/e7f2fd34afaaa5241c7f0c39b83064d87a592413))
# [1.4.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.3.3...v1.4.0) (2022-04-25)
### Features
* React 18 support ([eb5547f](https://github.com/jonelantha/react-responsive-pagination/commit/eb5547f7368b47fbd353734b277d92936133e395))
- React 18 support ([eb5547f](https://github.com/jonelantha/react-responsive-pagination/commit/eb5547f7368b47fbd353734b277d92936133e395))
## [1.3.3](https://github.com/jonelantha/react-responsive-pagination/compare/v1.3.2...v1.3.3) (2022-04-11)
### Bug Fixes
* Dependency updates ([a598a43](https://github.com/jonelantha/react-responsive-pagination/commit/a598a4352020d55a5fa992a6750979e69c0b95b5))
- Dependency updates ([a598a43](https://github.com/jonelantha/react-responsive-pagination/commit/a598a4352020d55a5fa992a6750979e69c0b95b5))
## [1.3.2](https://github.com/jonelantha/react-responsive-pagination/compare/v1.3.1...v1.3.2) (2022-03-09)
### Bug Fixes
* Bump package dependencies ([60cd9ac](https://github.com/jonelantha/react-responsive-pagination/commit/60cd9ac127bd0329a61d417234d00429c43df8f9))
- Bump package dependencies ([60cd9ac](https://github.com/jonelantha/react-responsive-pagination/commit/60cd9ac127bd0329a61d417234d00429c43df8f9))
## [1.3.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.3.0...v1.3.1) (2022-01-06)
### Bug Fixes
* Bump more package dependencies ([a06e753](https://github.com/jonelantha/react-responsive-pagination/commit/a06e7534d3c6ce4a645735d44688e3c840c2777c))
* Bump package dependencies ([dcce75a](https://github.com/jonelantha/react-responsive-pagination/commit/dcce75a4df52a863f8ab0d666ec71287b01a1603))
* Bump packages ([b1b406f](https://github.com/jonelantha/react-responsive-pagination/commit/b1b406f7c695341d3474b801fd0ddd1a287e26e2))
* Bump test-harness to create react app 5 ([a23eac9](https://github.com/jonelantha/react-responsive-pagination/commit/a23eac95397dfa9941fbd542b88887958d3ae44c))
- Bump more package dependencies ([a06e753](https://github.com/jonelantha/react-responsive-pagination/commit/a06e7534d3c6ce4a645735d44688e3c840c2777c))
- Bump package dependencies ([dcce75a](https://github.com/jonelantha/react-responsive-pagination/commit/dcce75a4df52a863f8ab0d666ec71287b01a1603))
- Bump packages ([b1b406f](https://github.com/jonelantha/react-responsive-pagination/commit/b1b406f7c695341d3474b801fd0ddd1a287e26e2))
- Bump test-harness to create react app 5 ([a23eac9](https://github.com/jonelantha/react-responsive-pagination/commit/a23eac95397dfa9941fbd542b88887958d3ae44c))
# [1.3.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.2.0...v1.3.0) (2021-11-08)
### Features
* Added props to override previous/next buttons ([abb60a8](https://github.com/jonelantha/react-responsive-pagination/commit/abb60a8fd4693596754261d26ec54a4d049d3c9c))
- Added props to override previous/next buttons ([abb60a8](https://github.com/jonelantha/react-responsive-pagination/commit/abb60a8fd4693596754261d26ec54a4d049d3c9c))
# [1.2.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.9...v1.2.0) (2021-10-04)
### Features
* Override Bootstrap justify class ([b9ebc16](https://github.com/jonelantha/react-responsive-pagination/commit/b9ebc164a1b50d4260cac962cad7e51715ebce56))
- Override Bootstrap justify class ([b9ebc16](https://github.com/jonelantha/react-responsive-pagination/commit/b9ebc164a1b50d4260cac962cad7e51715ebce56))
## [1.1.9](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.8...v1.1.9) (2021-09-08)
### Bug Fixes
* Bump package dependencies ([c840f07](https://github.com/jonelantha/react-responsive-pagination/commit/c840f078e9f0f64adfb95da36eb66f98b907ed3d))
- Bump package dependencies ([c840f07](https://github.com/jonelantha/react-responsive-pagination/commit/c840f078e9f0f64adfb95da36eb66f98b907ed3d))
## [1.1.8](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.7...v1.1.8) (2021-08-01)
### Bug Fixes
* Dependency updates ([dc77e8e](https://github.com/jonelantha/react-responsive-pagination/commit/dc77e8e0f8c8280b7ee2664d7fd3e422bc6963f3))
- Dependency updates ([dc77e8e](https://github.com/jonelantha/react-responsive-pagination/commit/dc77e8e0f8c8280b7ee2664d7fd3e422bc6963f3))
## [1.1.7](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.6...v1.1.7) (2021-07-11)
### Bug Fixes
* Dependency updates ([ce98cc3](https://github.com/jonelantha/react-responsive-pagination/commit/ce98cc3e2604437d315d6a17565cb12f772f5cd9))
- Dependency updates ([ce98cc3](https://github.com/jonelantha/react-responsive-pagination/commit/ce98cc3e2604437d315d6a17565cb12f772f5cd9))
## [1.1.6](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.5...v1.1.6) (2021-06-18)
### Bug Fixes
* Dependency updates ([a6446ab](https://github.com/jonelantha/react-responsive-pagination/commit/a6446ab307b65264d93e3c8e8cb8a3cf1cf8c43a))
- Dependency updates ([a6446ab](https://github.com/jonelantha/react-responsive-pagination/commit/a6446ab307b65264d93e3c8e8cb8a3cf1cf8c43a))
## [1.1.5](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.4...v1.1.5) (2021-06-16)
### Bug Fixes
* Dependency updates ([69cf5c9](https://github.com/jonelantha/react-responsive-pagination/commit/69cf5c9e8a29bac8d4c2089dc45111c2ff1f4c05))
* package updates + yarn 3 ([f0cb3b2](https://github.com/jonelantha/react-responsive-pagination/commit/f0cb3b22ddf5c8e51e99e3f34e00dcc85ae5542f))
- Dependency updates ([69cf5c9](https://github.com/jonelantha/react-responsive-pagination/commit/69cf5c9e8a29bac8d4c2089dc45111c2ff1f4c05))
- package updates + yarn 3 ([f0cb3b2](https://github.com/jonelantha/react-responsive-pagination/commit/f0cb3b22ddf5c8e51e99e3f34e00dcc85ae5542f))
## [1.1.4](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.3...v1.1.4) (2021-05-05)
### Bug Fixes
* Dependency updates ([58ffac7](https://github.com/jonelantha/react-responsive-pagination/commit/58ffac7a77c8a5e76e130b0002658a85a92f7928))
* Dependency updates ([7ba5f2f](https://github.com/jonelantha/react-responsive-pagination/commit/7ba5f2f266bd59a14b60818ac23f7019cd97dfad))
* Hot reloading issue ([edf2955](https://github.com/jonelantha/react-responsive-pagination/commit/edf2955c91f70a036d9406ac08670aa23e10ad4d))
- Dependency updates ([58ffac7](https://github.com/jonelantha/react-responsive-pagination/commit/58ffac7a77c8a5e76e130b0002658a85a92f7928))
- Dependency updates ([7ba5f2f](https://github.com/jonelantha/react-responsive-pagination/commit/7ba5f2f266bd59a14b60818ac23f7019cd97dfad))
- Hot reloading issue ([edf2955](https://github.com/jonelantha/react-responsive-pagination/commit/edf2955c91f70a036d9406ac08670aa23e10ad4d))

@@ -336,33 +299,28 @@ ## [1.1.3](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.2...v1.1.3) (2021-03-17)

### Bug Fixes
* Dependency updates & yarn ([4f5e546](https://github.com/jonelantha/react-responsive-pagination/commit/4f5e546e319944a74184d2376d826f65fd64f6d4))
- Dependency updates & yarn ([4f5e546](https://github.com/jonelantha/react-responsive-pagination/commit/4f5e546e319944a74184d2376d826f65fd64f6d4))
## [1.1.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.1.0...v1.1.1) (2020-10-20)
### Bug Fixes
* Package Bumps ([29409f3](https://github.com/jonelantha/react-responsive-pagination/commit/29409f3054067a4e4b9c6077e173b22090f5484b))
- Package Bumps ([29409f3](https://github.com/jonelantha/react-responsive-pagination/commit/29409f3054067a4e4b9c6077e173b22090f5484b))
# [1.1.0](https://github.com/jonelantha/react-responsive-pagination/compare/v1.0.3...v1.1.0) (2020-07-13)
### Bug Fixes
* Package Bumps ([b55832f](https://github.com/jonelantha/react-responsive-pagination/commit/b55832f2f1754b038fd6518475a6ed266791fcc6))
- Package Bumps ([b55832f](https://github.com/jonelantha/react-responsive-pagination/commit/b55832f2f1754b038fd6518475a6ed266791fcc6))
### Features
* Auto calculation of width from parent element ([fe42252](https://github.com/jonelantha/react-responsive-pagination/commit/fe42252806d07f4870bbd281e08f8a6ffa37bc87))
- Auto calculation of width from parent element ([fe42252](https://github.com/jonelantha/react-responsive-pagination/commit/fe42252806d07f4870bbd281e08f8a6ffa37bc87))
## [1.0.3](https://github.com/jonelantha/react-responsive-pagination/compare/v1.0.2...v1.0.3) (2020-06-16)
### Bug Fixes
* Package Bumps ([7f73b6e](https://github.com/jonelantha/react-responsive-pagination/commit/7f73b6ea246d685f4ab265439152794e23647af4))
* Prevent navigating to '#' on clicks ([a910ac1](https://github.com/jonelantha/react-responsive-pagination/commit/a910ac1e7fafd872dd5ede943336938cb16670f0))
- Package Bumps ([7f73b6e](https://github.com/jonelantha/react-responsive-pagination/commit/7f73b6ea246d685f4ab265439152794e23647af4))
- Prevent navigating to '#' on clicks ([a910ac1](https://github.com/jonelantha/react-responsive-pagination/commit/a910ac1e7fafd872dd5ede943336938cb16670f0))

@@ -373,18 +331,15 @@ ## [1.0.2](https://github.com/jonelantha/react-responsive-pagination/compare/v1.0.1...v1.0.2) (2020-03-24)

### Bug Fixes
* Package bumps ([179c74b](https://github.com/jonelantha/react-responsive-pagination/commit/179c74bd929b6a10df7a1df6f2769db508cf0df2))
- Package bumps ([179c74b](https://github.com/jonelantha/react-responsive-pagination/commit/179c74bd929b6a10df7a1df6f2769db508cf0df2))
# [1.0.0](https://github.com/jonelantha/react-responsive-pagination/compare/v0.1.1...v1.0.0) (2020-03-21)
### Features
* Remove undocumented Skin prop ([375f363](https://github.com/jonelantha/react-responsive-pagination/commit/375f3631c1f71c2a415a9e6f2f047d53e748d665))
- Remove undocumented Skin prop ([375f363](https://github.com/jonelantha/react-responsive-pagination/commit/375f3631c1f71c2a415a9e6f2f047d53e748d665))
### BREAKING CHANGES
* remove the undocumented Skin prop
- remove the undocumented Skin prop

@@ -391,0 +346,0 @@ ## 0.1.1

@@ -1,1 +0,2 @@

export declare function useFoutDetector(getElements: () => Element[] | null, handleFout: () => void): void;
/// <reference types="react" />
export declare function useFoutDetector(getElements: (element: Element | null) => Element[] | null, handleFout: () => void): import("react").MutableRefObject<Element | null>;

@@ -1,39 +0,22 @@

import { useLayoutEffect } from 'react';
import { useRef } from 'react';
import { useIsomorphicLayoutEffect } from '../helpers/react.js';
import { getWidth } from '../helpers/style.js';
import { flushSync } from 'react-dom';
export function useFoutDetector(getElements, handleFout) {
useLayoutEffect(() => {
const elements = getElements();
const containerRef = useRef(null);
useIsomorphicLayoutEffect(() => {
const elements = getElements(containerRef.current);
if (!elements)
return;
return setupWidthChangeAfterRenderListener(elements, handleFout);
const widthsAtRender = new Map(elements.map(element => [element, getWidth(element)]));
const resizeObserver = new ResizeObserver(entries => {
const hasAnElementChangedSignificantly = entries
.map(entry => widthsAtRender.get(entry.target) - getWidth(entry.target))
.some(difference => difference < -0.5 || difference > 0.5);
hasAnElementChangedSignificantly && flushSync(handleFout);
});
elements.forEach(element => resizeObserver.observe(element));
return () => resizeObserver.disconnect();
});
return containerRef;
}
function setupWidthChangeAfterRenderListener(elements, handleWidthChangeAfterRender) {
const getInitialWidth = createInitialWidthProvider(elements);
const hasWidthChanged = (element) => {
return isSignificantDifference(getInitialWidth(element), getWidth(element));
};
return setupResizeObserver(elements, maybeResizedElements => {
if (maybeResizedElements.some(hasWidthChanged)) {
handleWidthChangeAfterRender();
}
});
}
function createInitialWidthProvider(elements) {
const initialWidths = elements.map(getWidth);
return function getInitialWidth(element) {
const index = elements.indexOf(element);
return initialWidths[index];
};
}
function setupResizeObserver(elements, handleElementsResized) {
const resizeObserver = new ResizeObserver((entries) => {
const elements = entries.map(entry => entry.target);
handleElementsResized(elements);
});
elements.forEach(element => resizeObserver.observe(element));
return () => resizeObserver.disconnect();
}
function isSignificantDifference(width1, width2) {
return Math.abs(width1 - width2) > 0.5;
}
import { useCallback, useState } from 'react';
import { setRefValue } from '../helpers/ref.js';
import { useAvailableWidth } from './useAvailableWidth.js';
import { useWidestCompositionForWidth } from './useWidestCompositionForWidth.js';
import { useFoutDetector } from './useFoutDetector.js';
import { useWidthCalculator } from './useWidthCalculator/index.js';
import { iteratorNext, lastWhere } from '../helpers/iterator.js';
export function useWidestComposition(narrowToWideCompositionsProvider, maxWidth) {

@@ -9,12 +10,35 @@ const [containerElement, setContainerElement] = useState(null);

const width = maxWidth ?? availableWidth ?? 0;
const { items, ref: widestCompositionRef, clearCache, } = useWidestCompositionForWidth(narrowToWideCompositionsProvider, width);
const widthCalculator = useWidthCalculator();
const clearCache = widthCalculator.clearCache;
const foutDetectorRef = useFoutDetector(getItemsDomElements, clearCache);
const ref = useCallback((element) => {
setRefValue(widestCompositionRef, element);
foutDetectorRef.current = element;
setContainerElement(element);
}, [widestCompositionRef]);
return {
items,
ref,
clearCache,
};
}, [foutDetectorRef]);
if ('renderNeeded' in widthCalculator) {
return {
items: widthCalculator.renderNeeded.items,
ref(containerElement) {
widthCalculator.renderNeeded.ref(containerElement);
ref(containerElement);
},
clearCache,
};
}
else {
return {
items: getLargestFittingCompositionWithFallback(narrowToWideCompositionsProvider, widthCalculator.calculator, width),
ref,
clearCache,
};
}
}
function getLargestFittingCompositionWithFallback(getNarrowToWideCompositions, getCompositionWidth, maxWidth) {
const narrowToWideCompositions = getNarrowToWideCompositions();
const firstComposition = iteratorNext(narrowToWideCompositions) ?? [];
const doesCompositionFit = (composition) => getCompositionWidth(composition) < maxWidth;
return lastWhere(narrowToWideCompositions, doesCompositionFit) ?? firstComposition;
}
function getItemsDomElements(viewDomElement) {
return viewDomElement && Array.from(viewDomElement.children);
}
{
"name": "react-responsive-pagination",
"version": "2.5.0-beta.1",
"version": "2.5.0-beta.2",
"description": "React component for responsive pagination",

@@ -5,0 +5,0 @@ "author": "jonelantha",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc