Skip to content

Commit 3c22c9e

Browse files
authored
Merge pull request #255 from react-component/father
Move to Father
2 parents 98de742 + 73906bb commit 3c22c9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+10346
-1655
lines changed

.editorconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const base = require('@umijs/fabric/dist/eslint');
2+
3+
module.exports = {
4+
...base,
5+
rules: {
6+
...base.rules,
7+
'no-template-curly-in-string': 0,
8+
'prefer-promise-reject-errors': 0,
9+
'react/no-array-index-key': 0,
10+
'react/sort-comp': 0,
11+
'@typescript-eslint/no-explicit-any': 0,
12+
'jsx-a11y/no-noninteractive-tabindex': 0,
13+
},
14+
};

.fatherrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
cjs: 'babel',
3+
esm: { type: 'babel', importLibToEs: true },
4+
preCommit: {
5+
eslint: true,
6+
prettier: true,
7+
},
8+
};

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
.storybook
12
*.iml
23
*.log
3-
*.log.*
44
.idea/
55
.ipr
66
.iws
@@ -21,11 +21,11 @@ Thumbs.db
2121
.build
2222
node_modules
2323
.cache
24-
dist
2524
assets/**/*.css
2625
build
2726
lib
2827
es
29-
.vscode
30-
coverage/
3128
yarn.lock
29+
package-lock.json
30+
coverage/
31+
.doc

.npmignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
build/
2+
*.cfg
3+
nohup.out
4+
*.iml
5+
.idea/
6+
.ipr
7+
.iws
8+
*~
9+
~*
10+
*.diff
11+
*.log
12+
*.patch
13+
*.bak
14+
.DS_Store
15+
Thumbs.db
16+
.project
17+
.*proj
18+
.svn/
19+
*.swp
20+
out/
21+
.build
22+
node_modules
23+
.cache
24+
examples
25+
tests
26+
src
27+
/index.js
28+
.*
29+
assets/**/*.less

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
.storybook
12
node_modules
3+
lib
4+
es
5+
.cache
26
package.json
37
package-lock.json
8+
public
9+
.site
10+
_site
11+
.umi
12+
.doc

.travis.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
language: node_js
22

3-
sudo: false
4-
53
node_js:
6-
- 11
4+
- 10
75

86
script:
9-
- |
7+
- |
108
if [ "$TEST_TYPE" = test ]; then
11-
npm test
9+
npm run coverage && \
10+
bash <(curl -s https://codecov.io/bash)
1211
else
1312
npm run $TEST_TYPE
1413
fi
1514
env:
1615
matrix:
17-
- TEST_TYPE=lint
18-
- TEST_TYPE=test
19-
- TEST_TYPE=coverage
16+
- TEST_TYPE=lint
17+
- TEST_TYPE=test

HISTORY.md

Lines changed: 54 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,103 @@
1-
2.0.0
2-
==================
1+
# 2.0.0
32

4-
* Remove prop-types and react-lifecycles-compat
3+
- Remove prop-types and react-lifecycles-compat
54

6-
1.20.0
7-
==================
5+
# 1.20.0
86

9-
* Add locale `ms_MY`
7+
- Add locale `ms_MY`
108

11-
1.19.0
12-
==================
9+
# 1.19.0
1310

14-
* Support Latvian localization
11+
- Support Latvian localization
1512

16-
1.18.0
17-
==================
13+
# 1.18.0
1814

19-
* Support `disabled`
15+
- Support `disabled`
2016

21-
1.17.0
22-
==================
17+
# 1.17.0
2318

24-
* Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.
19+
- Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.
2520

26-
1.16.1
27-
==================
21+
# 1.16.1
2822

29-
* Add locale `sl_SI`. #130
23+
- Add locale `sl_SI`. #130
3024

31-
1.16.0
32-
==================
25+
# 1.16.0
3326

34-
* Add locale `id_ID`
35-
* Add prop `showPrevNextJumpers`
27+
- Add locale `id_ID`
28+
- Add prop `showPrevNextJumpers`
3629

37-
1.15.2
38-
==================
30+
# 1.15.2
3931

40-
* Add locale `tr_TR`.
32+
- Add locale `tr_TR`.
4133

42-
1.12.0
43-
==================
34+
# 1.12.0
4435

45-
* `itemRender(current, type)` => `itemRender(current, type, element): element`.
36+
- `itemRender(current, type)` => `itemRender(current, type, element): element`.
4637

47-
1.11.0
48-
==================
38+
# 1.11.0
4939

50-
* Add `goButton`.
40+
- Add `goButton`.
5141

52-
1.10.0
53-
==================
42+
# 1.10.0
5443

55-
* Add `itemRender`.
44+
- Add `itemRender`.
5645

57-
1.9.0
58-
==================
46+
# 1.9.0
5947

60-
* Add keyboard support
61-
* Add es folder.
48+
- Add keyboard support
49+
- Add es folder.
6250

63-
1.8.0
64-
==================
51+
# 1.8.0
6552

66-
* Add locale `zh_TW`.
67-
* Add `showTitle`.
53+
- Add locale `zh_TW`.
54+
- Add `showTitle`.
6855

69-
1.7.5
70-
==================
56+
# 1.7.5
7157

72-
* Add locale `sk_SK(Slovak)`.
58+
- Add locale `sk_SK(Slovak)`.
7359

74-
1.7.4
75-
==================
60+
# 1.7.4
7661

77-
* Add locale `et_EE(Estonian)`.
62+
- Add locale `et_EE(Estonian)`.
7863

79-
1.7.3
80-
==================
64+
# 1.7.3
8165

82-
* Add locale `Czech`.
66+
- Add locale `Czech`.
8367

84-
1.7.2
85-
==================
68+
# 1.7.2
8669

87-
* Add locale `ko_KR(Korean)`.
70+
- Add locale `ko_KR(Korean)`.
8871

89-
1.7.1
90-
==================
72+
# 1.7.1
9173

92-
* Add locale `ca_ES (Catalan)`.
74+
- Add locale `ca_ES (Catalan)`.
9375

94-
1.7.0
95-
==================
76+
# 1.7.0
9677

97-
* support `showLessItems`. #55
98-
* Add `pageSize` as onChange's second argument.
78+
- support `showLessItems`. #55
79+
- Add `pageSize` as onChange's second argument.
9980

100-
1.6.0
101-
==================
81+
# 1.6.0
10282

103-
* Add `range` as showTotal's second argument.
83+
- Add `range` as showTotal's second argument.
10484

105-
1.5.5 / 2016-09-01
106-
==================
85+
# 1.5.5 / 2016-09-01
10786

108-
* Fix #34
87+
- Fix #34
10988

110-
1.5.4 / 2016-07-31
111-
==================
89+
# 1.5.4 / 2016-07-31
11290

113-
* Add space before per page #33
91+
- Add space before per page #33
11492

115-
1.5.0 / 2016-03-02
116-
==================
93+
# 1.5.0 / 2016-03-02
11794

118-
* Add `defaultPageSize` and fix `pageSize` to a controlled prop
95+
- Add `defaultPageSize` and fix `pageSize` to a controlled prop
11996

120-
1.3.0 / 2015-11-25
121-
==================
97+
# 1.3.0 / 2015-11-25
12298

123-
* Add `defaultCurrent` prop
99+
- Add `defaultCurrent` prop
124100

125-
1.2.0
126-
==================
101+
# 1.2.0
127102

128-
* Allow specifying the page size for **sizeChanger**
103+
- Allow specifying the page size for **sizeChanger**

README.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# rc-pagination
2+
23
---
34

45
React Pagination Component.
56

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

3537
## Feature
3638

37-
* support ie9,ie9+,chrome,firefox,safari
39+
- support ie9,ie9+,chrome,firefox,safari
3840

3941
## Install
4042

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

5153
## API
5254

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

8283
## License
8384

0 commit comments

Comments
 (0)