<commit_before>[![npm](https://img.shields.io/npm/v/violet-paginator.svg)](https://github.com/sslotsky/violet-paginator)
[![npm](https://img.shields.io/npm/dt/violet-paginator.svg)](https://www.npmjs.com/package/violet-paginator)
[![npm](https://img.shields.io/npm/dm/violet-paginator.svg)](https://www.npmjs.com/package/violet-paginator)
[![Build Status](https://travis-ci.org/sslotsky/violet-paginator.svg?branch=master)](https://travis-ci.org/sslotsky/violet-paginator)
[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/sslotsky/violet-paginator)
[![dependencies](https://david-dm.org/sslotsky/violet-paginator.svg)](https://david-dm.org/sslotsky/violet-paginator)

# violet-paginator

VioletPaginator is a react-redux package allowing users to manage arbitrarily many filtered, paginated lists
of records. We provide a set of premade components including both simple and robust pagination controls,
sort links, and data tables. We also make it ridiculously easy to write your own components and configure
and extend VioletPaginator's default behavior by composing actions.

## Demo

https://sslotsky.github.io/violet-paginator/

## Extended Documentation

https://sslotsky.gitbooks.io/violet-paginator/content/

## Installation

```
npm i --save violet-paginator
```

### Dependencies

The current version of this package includes the following peer dependencies:

```javascript
  "peerDependencies": {
    "immutable": "^3.7.6",
    "react": "^0.14.8 || ^15.1.0",
    "react-redux": "^4.4.4 || 5.x",
    "redux": "^3.4.0"
  },
```

Additionally, it is assumed that you are running some middleware that allows action creators to return
promises, such as [redux-thunk](https://github.com/gaearon/redux-thunk).

Finally, if you wish to use the premade `VioletPaginator` components, it is recommended that you include the `violet`
and `font-awesome` stylesheets as described later in this document.

## Usage

`VioletPaginator` is intended to be flexible so that it can be used in many ways without much fuss. We provide premade components, but our library is broken down into small, exposed pieces that allow you to easily override default settings, abstract core functionality, and create your own components.

### Creating a reducer

Rather than exposing a single reducer, `violet-paginator` uses a
[higher order reducer function](http://redux.js.org/docs/recipes/reducers/ReusingReducerLogic.html#customizing-behavior-with-higher-order-reducers)
that creates a reducer and ties it to a `listId` and a `fetch` function (this has changed since version 1, see the [upgrade guide](upgrade_guide.md) for details).<commit_msg>Fix broken upgrade guide link<commit_after>[![npm](https://img.shields.io/npm/v/violet-paginator.svg)](https://github.com/sslotsky/violet-paginator)
[![npm](https://img.shields.io/npm/dt/violet-paginator.svg)](https://www.npmjs.com/package/violet-paginator)
[![npm](https://img.shields.io/npm/dm/violet-paginator.svg)](https://www.npmjs.com/package/violet-paginator)
[![Build Status](https://travis-ci.org/sslotsky/violet-paginator.svg?branch=master)](https://travis-ci.org/sslotsky/violet-paginator)
[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/sslotsky/violet-paginator)
[![dependencies](https://david-dm.org/sslotsky/violet-paginator.svg)](https://david-dm.org/sslotsky/violet-paginator)

# violet-paginator

VioletPaginator is a react-redux package allowing users to manage arbitrarily many filtered, paginated lists
of records. We provide a set of premade components including both simple and robust pagination controls,
sort links, and data tables. We also make it ridiculously easy to write your own components and configure
and extend VioletPaginator's default behavior by composing actions.

## Demo

https://sslotsky.github.io/violet-paginator/

## Extended Documentation

https://sslotsky.gitbooks.io/violet-paginator/content/

## Installation

```
npm i --save violet-paginator
```

### Dependencies

The current version of this package includes the following peer dependencies:

```javascript
  "peerDependencies": {
    "immutable": "^3.7.6",
    "react": "^0.14.8 || ^15.1.0",
    "react-redux": "^4.4.4 || 5.x",
    "redux": "^3.4.0"
  },
```

Additionally, it is assumed that you are running some middleware that allows action creators to return
promises, such as [redux-thunk](https://github.com/gaearon/redux-thunk).

Finally, if you wish to use the premade `VioletPaginator` components, it is recommended that you include the `violet`
and `font-awesome` stylesheets as described later in this document.

## Usage

`VioletPaginator` is intended to be flexible so that it can be used in many ways without much fuss. We provide premade components, but our library is broken down into small, exposed pieces that allow you to easily override default settings, abstract core functionality, and create your own components.

### Creating a reducer

Rather than exposing a single reducer, `violet-paginator` uses a
[higher order reducer function](http://redux.js.org/docs/recipes/reducers/ReusingReducerLogic.html#customizing-behavior-with-higher-order-reducers)
that creates a reducer and ties it to a `listId` and a `fetch` function (this has changed since version 1, see the [upgrade guide](https://sslotsky.gitbooks.io/violet-paginator/content/upgrade_guide.html) for details).
{'fraction_non_alphanumeric': 0.12812383439015293, 'fraction_numerical': 0.007086907870197687, 'mean_word_length': 4.992178770949721, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 31, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7400437', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1639, 'n_words': 475}