feat(pagination): add pagination component
Resolves #15 (closed)
You can preview a working example here: https://preview-6--webdev-eclipse-org-solstice-components.eclipsecontent.org/docs/components/?path=/story/modules-project-list--project-list
How it works:
There is a reusable pagination component that can be paired with any web component which utilizes a PaginationController. Currently, there is only one controller: ClientPaginationController. This controller is used when the client already has all the data but wants to paginate for UI/UX purposes.
In the future, we can introduce a DrupalPaginationController which would handle pagination for our Drupal APIs (which are handled with link headers). We could also have a controller for our Java APIs which have pagination. We could also implement a controller to interface with APIs which utilize cursor-based pagination.
In any case, we should abstract pagination logic away from the UI. This is what this MR accomplishes.
The usage of the component is as simple as:
<efsc-project-list id="project-list" collaboration="sdv" pagesize="6"></efsc-project-list>
<efsc-pagination for="project-list"></efsc-pagination>