Skip to content

Move to Father #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const base = require('@umijs/fabric/dist/eslint');

module.exports = {
...base,
rules: {
...base.rules,
'no-template-curly-in-string': 0,
'prefer-promise-reject-errors': 0,
'react/no-array-index-key': 0,
'react/sort-comp': 0,
'@typescript-eslint/no-explicit-any': 0,
'jsx-a11y/no-noninteractive-tabindex': 0,
},
};
8 changes: 8 additions & 0 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
cjs: 'babel',
esm: { type: 'babel', importLibToEs: true },
preCommit: {
eslint: true,
prettier: true,
},
};
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.storybook
*.iml
*.log
*.log.*
.idea/
.ipr
.iws
Expand All @@ -21,11 +21,11 @@ Thumbs.db
.build
node_modules
.cache
dist
assets/**/*.css
build
lib
es
.vscode
coverage/
yarn.lock
package-lock.json
coverage/
.doc
29 changes: 29 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
build/
*.cfg
nohup.out
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.log
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
out/
.build
node_modules
.cache
examples
tests
src
/index.js
.*
assets/**/*.less
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.storybook
node_modules
lib
es
.cache
package.json
package-lock.json
public
.site
_site
.umi
.doc
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
language: node_js

sudo: false

node_js:
- 11
- 10

script:
- |
- |
if [ "$TEST_TYPE" = test ]; then
npm test
npm run coverage && \
bash <(curl -s https://codecov.io/bash)
else
npm run $TEST_TYPE
fi
env:
matrix:
- TEST_TYPE=lint
- TEST_TYPE=test
- TEST_TYPE=coverage
- TEST_TYPE=lint
- TEST_TYPE=test
133 changes: 54 additions & 79 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,103 @@
2.0.0
==================
# 2.0.0

* Remove prop-types and react-lifecycles-compat
- Remove prop-types and react-lifecycles-compat

1.20.0
==================
# 1.20.0

* Add locale `ms_MY`
- Add locale `ms_MY`

1.19.0
==================
# 1.19.0

* Support Latvian localization
- Support Latvian localization

1.18.0
==================
# 1.18.0

* Support `disabled`
- Support `disabled`

1.17.0
==================
# 1.17.0

* Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.
- Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.

1.16.1
==================
# 1.16.1

* Add locale `sl_SI`. #130
- Add locale `sl_SI`. #130

1.16.0
==================
# 1.16.0

* Add locale `id_ID`
* Add prop `showPrevNextJumpers`
- Add locale `id_ID`
- Add prop `showPrevNextJumpers`

1.15.2
==================
# 1.15.2

* Add locale `tr_TR`.
- Add locale `tr_TR`.

1.12.0
==================
# 1.12.0

* `itemRender(current, type)` => `itemRender(current, type, element): element`.
- `itemRender(current, type)` => `itemRender(current, type, element): element`.

1.11.0
==================
# 1.11.0

* Add `goButton`.
- Add `goButton`.

1.10.0
==================
# 1.10.0

* Add `itemRender`.
- Add `itemRender`.

1.9.0
==================
# 1.9.0

* Add keyboard support
* Add es folder.
- Add keyboard support
- Add es folder.

1.8.0
==================
# 1.8.0

* Add locale `zh_TW`.
* Add `showTitle`.
- Add locale `zh_TW`.
- Add `showTitle`.

1.7.5
==================
# 1.7.5

* Add locale `sk_SK(Slovak)`.
- Add locale `sk_SK(Slovak)`.

1.7.4
==================
# 1.7.4

* Add locale `et_EE(Estonian)`.
- Add locale `et_EE(Estonian)`.

1.7.3
==================
# 1.7.3

* Add locale `Czech`.
- Add locale `Czech`.

1.7.2
==================
# 1.7.2

* Add locale `ko_KR(Korean)`.
- Add locale `ko_KR(Korean)`.

1.7.1
==================
# 1.7.1

* Add locale `ca_ES (Catalan)`.
- Add locale `ca_ES (Catalan)`.

1.7.0
==================
# 1.7.0

* support `showLessItems`. #55
* Add `pageSize` as onChange's second argument.
- support `showLessItems`. #55
- Add `pageSize` as onChange's second argument.

1.6.0
==================
# 1.6.0

* Add `range` as showTotal's second argument.
- Add `range` as showTotal's second argument.

1.5.5 / 2016-09-01
==================
# 1.5.5 / 2016-09-01

* Fix #34
- Fix #34

1.5.4 / 2016-07-31
==================
# 1.5.4 / 2016-07-31

* Add space before per page #33
- Add space before per page #33

1.5.0 / 2016-03-02
==================
# 1.5.0 / 2016-03-02

* Add `defaultPageSize` and fix `pageSize` to a controlled prop
- Add `defaultPageSize` and fix `pageSize` to a controlled prop

1.3.0 / 2015-11-25
==================
# 1.3.0 / 2015-11-25

* Add `defaultCurrent` prop
- Add `defaultCurrent` prop

1.2.0
==================
# 1.2.0

* Allow specifying the page size for **sizeChanger**
- Allow specifying the page size for **sizeChanger**
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# rc-pagination

---

React Pagination Component.

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![codecov](https://codecov.io/gh/react-component/pagination/branch/master/graph/badge.svg)](https://codecov.io/gh/react-component/pagination)
[![Dependencies](https://img.shields.io/david/react-component/pagination.svg?style=flat-square)](https://david-dm.org/react-component/pagination)
[![DevDependencies](https://img.shields.io/david/dev/react-component/pagination.svg?style=flat-square)](https://david-dm.org/react-component/pagination?type=dev)
[![npm download][download-image]][download-url]
Expand Down Expand Up @@ -34,7 +36,7 @@ online example: http://react-component.github.io/pagination/examples/

## Feature

* support ie9,ie9+,chrome,firefox,safari
- support ie9,ie9+,chrome,firefox,safari

## Install

Expand All @@ -50,34 +52,33 @@ React.render(<Pagination />, container);

## API

| Parameter | Description | Type | Default |
|------------------|------------------------------------|---------------|--------------------------|
| disabled | disable pagination | Bool | - |
| defaultCurrent | uncontrolled current page | Number | 1 |
| current | current page | Number | undefined |
| total | items total count | Number | 0 |
| defaultPageSize | default items per page | Number | 10 |
| pageSize | items per page | Number | 10 |
| onChange | page change callback | Function(current, pageSize) | - |
| showSizeChanger | show pageSize changer | Bool | false |
| pageSizeOptions | specify the sizeChanger selections | Array<String> | ['10', '20', '30', '40'] |
| onShowSizeChange | pageSize change callback | Function(current, size) | - |
| hideOnSinglePage | hide on single page | Bool | false |
| showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
| showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
| showTotal | show total records and range | Function(total, [from, to]) | - |
| className | className of pagination | String | - |
| simple | when set, show simple pager | Object | null |
| locale | to set l10n config | Object | [zh_CN](https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js) |
| style | the style of pagination | Object | {} |
| showLessItems | show less page items | Bool | false |
| showTitle | show page items title | Bool | true |
| itemRender | custom page item renderer | Function(current, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next', element): React.ReactNode| `(current, type, element) => element` |
| prevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |

| Parameter | Description | Type | Default |
| ------------------- | ----------------------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------- |
| disabled | disable pagination | Bool | - |
| defaultCurrent | uncontrolled current page | Number | 1 |
| current | current page | Number | undefined |
| total | items total count | Number | 0 |
| defaultPageSize | default items per page | Number | 10 |
| pageSize | items per page | Number | 10 |
| onChange | page change callback | Function(current, pageSize) | - |
| showSizeChanger | show pageSize changer | Bool | false |
| pageSizeOptions | specify the sizeChanger selections | Array<String> | ['10', '20', '30', '40'] |
| onShowSizeChange | pageSize change callback | Function(current, size) | - |
| hideOnSinglePage | hide on single page | Bool | false |
| showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
| showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
| showTotal | show total records and range | Function(total, [from, to]) | - |
| className | className of pagination | String | - |
| simple | when set, show simple pager | Object | null |
| locale | to set l10n config | Object | [zh_CN](https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js) |
| style | the style of pagination | Object | {} |
| showLessItems | show less page items | Bool | false |
| showTitle | show page items title | Bool | true |
| itemRender | custom page item renderer | Function(current, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next', element): React.ReactNode | `(current, type, element) => element` |
| prevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |

## License

Expand Down
Loading