react-router-pagination 3.1.20 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.cjs +4 -4
- package/package.json +16 -29
- package/src/pagination/centered/index.tsx +33 -5
- package/src/pagination/common/index.cjs +0 -2
- package/src/pagination/component.tsx +16 -16
- package/src/pagination/standard/index.tsx +37 -5
- package/jest.config.cjs +0 -13
- package/src/__tests__/pagination/__snapshots__/component.test.tsx.snap +0 -36
- package/src/__tests__/pagination/__snapshots__/index.test.tsx.snap +0 -190
- package/src/__tests__/pagination/centered/__snapshots__/index.test.tsx.snap +0 -141
- package/src/__tests__/pagination/centered/index.test.tsx +0 -123
- package/src/__tests__/pagination/common/index.test.mts +0 -79
- package/src/__tests__/pagination/component.test.tsx +0 -103
- package/src/__tests__/pagination/index.test.tsx +0 -124
- package/src/__tests__/pagination/standard/__snapshots__/index.test.tsx.snap +0 -141
- package/src/__tests__/pagination/standard/index.test.tsx +0 -123
- package/tsconfig.json +0 -27
package/babel.config.cjs
CHANGED
|
@@ -42,10 +42,10 @@ const plugins = [
|
|
|
42
42
|
'module-resolver',
|
|
43
43
|
{
|
|
44
44
|
alias: {
|
|
45
|
-
'#pagination/centered
|
|
46
|
-
'#pagination/standard
|
|
47
|
-
'#pagination/component
|
|
48
|
-
'#pagination/index
|
|
45
|
+
'#pagination/centered': './src/pagination/centered/index.tsx',
|
|
46
|
+
'#pagination/standard': './src/pagination/standard/index.tsx',
|
|
47
|
+
'#pagination/component': './src/pagination/component.tsx',
|
|
48
|
+
'#pagination/index': './src/pagination/index.tsx'
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-router-pagination",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A React Router Pagination component",
|
|
5
5
|
"main": "./src/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"build-storybook": "storybook build",
|
|
26
26
|
"prepare": "husky install"
|
|
27
27
|
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"debug": "^4.3.4"
|
|
30
|
+
},
|
|
28
31
|
"devDependencies": {
|
|
29
32
|
"@babel/core": "^7.22.20",
|
|
30
33
|
"@babel/eslint-parser": "^7.22.15",
|
|
@@ -34,12 +37,11 @@
|
|
|
34
37
|
"@babel/preset-react": "^7.22.15",
|
|
35
38
|
"@babel/preset-typescript": "^7.22.15",
|
|
36
39
|
"@babel/register": "^7.22.15",
|
|
37
|
-
"@sequencemedia/hooks": "^1.0.
|
|
38
|
-
"@storybook/addon-essentials": "^7.4.
|
|
39
|
-
"@storybook/
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@
|
|
42
|
-
"@storybook/react-webpack5": "^7.4.3",
|
|
40
|
+
"@sequencemedia/hooks": "^1.0.454",
|
|
41
|
+
"@storybook/addon-essentials": "^7.4.4",
|
|
42
|
+
"@storybook/react": "^7.4.4",
|
|
43
|
+
"@storybook/react-webpack5": "^7.4.4",
|
|
44
|
+
"@types/debug": "^4.1.9",
|
|
43
45
|
"@types/jest": "^29.5.5",
|
|
44
46
|
"@types/react": "^18.2.22",
|
|
45
47
|
"@types/react-router": "^5.1.20",
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
51
53
|
"core-js": "^3.32.2",
|
|
52
54
|
"cross-env": "^7.0.3",
|
|
53
|
-
"eslint": "^8.
|
|
55
|
+
"eslint": "^8.50.0",
|
|
54
56
|
"eslint-config-standard": "^17.1.0",
|
|
55
57
|
"eslint-config-standard-with-typescript": "35.0.0",
|
|
56
58
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
@@ -64,30 +66,15 @@
|
|
|
64
66
|
"react-router": "^6.16.0",
|
|
65
67
|
"react-router-dom": "^6.16.0",
|
|
66
68
|
"react-test-renderer": "^18.2.0",
|
|
67
|
-
"storybook": "^7.4.
|
|
69
|
+
"storybook": "^7.4.4",
|
|
68
70
|
"typescript": "^5.2.2"
|
|
69
71
|
},
|
|
70
72
|
"imports": {
|
|
71
|
-
"#pagination/centered":
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"#pagination
|
|
76
|
-
"require": "./src/pagination/common/index.cjs",
|
|
77
|
-
"import": "./src/pagination/common/index.mjs"
|
|
78
|
-
},
|
|
79
|
-
"#pagination/standard": {
|
|
80
|
-
"require": "./src/pagination/standard/index.cjs",
|
|
81
|
-
"import": "./src/pagination/standard/index.mjs"
|
|
82
|
-
},
|
|
83
|
-
"#pagination/component": {
|
|
84
|
-
"require": "./src/pagination/component.cjs",
|
|
85
|
-
"import": "./src/pagination/component.mjs"
|
|
86
|
-
},
|
|
87
|
-
"#pagination": {
|
|
88
|
-
"require": "./src/pagination/index.cjs",
|
|
89
|
-
"import": "./src/pagination/index.mjs"
|
|
90
|
-
}
|
|
73
|
+
"#pagination/centered": "./src/pagination/centered/index.tsx",
|
|
74
|
+
"#pagination/common": "./src/pagination/common/index.mts",
|
|
75
|
+
"#pagination/standard": "./src/pagination/standard/index.tsx",
|
|
76
|
+
"#pagination/component": "./src/pagination/component.tsx",
|
|
77
|
+
"#pagination": "./src/pagination/index.tsx"
|
|
91
78
|
},
|
|
92
79
|
"exports": {
|
|
93
80
|
".": {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import debug from 'debug'
|
|
2
|
+
|
|
1
3
|
import type {
|
|
2
4
|
AbstractPaginationProps,
|
|
3
5
|
AbstractPaginationState
|
|
4
|
-
} from '
|
|
6
|
+
} from '#pagination/component'
|
|
5
7
|
|
|
6
8
|
import AbstractPagination, {
|
|
7
9
|
toInteger,
|
|
8
10
|
calculateTotalPages,
|
|
9
11
|
calculatePageNumber
|
|
10
|
-
} from '
|
|
12
|
+
} from '#pagination/component'
|
|
13
|
+
|
|
14
|
+
const error = debug('react-router-pagination/pagination/component')
|
|
11
15
|
|
|
12
16
|
export {
|
|
13
17
|
toInteger,
|
|
@@ -15,18 +19,20 @@ export {
|
|
|
15
19
|
calculatePageNumber
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
interface CenteredProps extends AbstractPaginationProps {
|
|
22
|
+
export interface CenteredProps extends AbstractPaginationProps {
|
|
19
23
|
spread: string | number
|
|
24
|
+
onChange: (pageNumber: number) => void
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
interface CenteredState extends AbstractPaginationState {
|
|
27
|
+
export interface CenteredState extends AbstractPaginationState {
|
|
23
28
|
spread: number
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
export class Centered extends AbstractPagination<CenteredProps, CenteredState> {
|
|
27
32
|
static defaultProps = {
|
|
28
33
|
...AbstractPagination.defaultProps,
|
|
29
|
-
spread: 3
|
|
34
|
+
spread: 3,
|
|
35
|
+
onChange () {}
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
state = {
|
|
@@ -82,4 +88,26 @@ export class Centered extends AbstractPagination<CenteredProps, CenteredState> {
|
|
|
82
88
|
shouldComponentUpdate (props: CenteredProps): boolean {
|
|
83
89
|
return super.shouldComponentUpdate(props) || (props.spread !== this.props.spread)
|
|
84
90
|
}
|
|
91
|
+
|
|
92
|
+
handlePageNumberSelect = (pageNumber: number): any => {
|
|
93
|
+
const { onClick } = this.props
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
onClick(pageNumber)
|
|
97
|
+
} catch {
|
|
98
|
+
error('Error `onClick`')
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (pageNumber !== this.state.pageNumber) {
|
|
102
|
+
this.setState({ pageNumber }, () => {
|
|
103
|
+
const { onChange } = this.props
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
onChange(pageNumber)
|
|
107
|
+
} catch {
|
|
108
|
+
error('Error `onChange`')
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
85
113
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
const getListItemClassName = (currentPageNumber: string | number, pageNumber: string | number): string => (
|
|
21
21
|
toInteger(currentPageNumber) === toInteger(pageNumber)
|
|
22
|
-
? '
|
|
22
|
+
? 'current-page'
|
|
23
23
|
: 'page'
|
|
24
24
|
)
|
|
25
25
|
|
|
@@ -50,7 +50,7 @@ export interface AbstractPaginationState {
|
|
|
50
50
|
|
|
51
51
|
export default abstract class AbstractPagination<P, S> extends Component<P & AbstractPaginationProps, S & AbstractPaginationState> {
|
|
52
52
|
static defaultProps = {
|
|
53
|
-
onClick
|
|
53
|
+
onClick () {},
|
|
54
54
|
pageNumber: 0,
|
|
55
55
|
totalPages: 0,
|
|
56
56
|
match: {}
|
|
@@ -106,8 +106,8 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
106
106
|
if (this.hasReversePageLink(pageNumber, totalPages)) {
|
|
107
107
|
const n = this.zeroIndex(pageNumber, totalPages)
|
|
108
108
|
return (
|
|
109
|
-
<li key={getListItemKey('reverse')} className='
|
|
110
|
-
<Link to={getLinkTo(match, n)} onClick={() => this.
|
|
109
|
+
<li key={getListItemKey('reverse')} className='reverse-page'>
|
|
110
|
+
<Link to={getLinkTo(match, n)} onClick={() => this.handlePageNumberSelect(n)}>
|
|
111
111
|
<span className='reverse'>
|
|
112
112
|
{'\u00AB'}
|
|
113
113
|
</span>
|
|
@@ -122,9 +122,9 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
122
122
|
if (this.hasForwardPageLink(pageNumber, totalPages)) {
|
|
123
123
|
const n = this.lastIndex(pageNumber, totalPages) + 1
|
|
124
124
|
return (
|
|
125
|
-
<li key={getListItemKey('forward')} className='
|
|
126
|
-
<Link to={getLinkTo(match, n)} onClick={() => this.
|
|
127
|
-
<span className='
|
|
125
|
+
<li key={getListItemKey('forward')} className='forward-page'>
|
|
126
|
+
<Link to={getLinkTo(match, n)} onClick={() => this.handlePageNumberSelect(n)}>
|
|
127
|
+
<span className='forward-page'>
|
|
128
128
|
{'\u00BB'}
|
|
129
129
|
</span>
|
|
130
130
|
</Link>
|
|
@@ -138,9 +138,9 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
138
138
|
if (this.hasZeroPageLink(pageNumber, totalPages)) {
|
|
139
139
|
const n = 1
|
|
140
140
|
return (
|
|
141
|
-
<li key={getListItemKey(n)} className='
|
|
142
|
-
<Link to={getLinkTo(match, n)} onClick={() => this.
|
|
143
|
-
<span className='
|
|
141
|
+
<li key={getListItemKey(n)} className='zero-page'>
|
|
142
|
+
<Link to={getLinkTo(match, n)} onClick={() => this.handlePageNumberSelect(n)}>
|
|
143
|
+
<span className='page-number'>
|
|
144
144
|
{n}
|
|
145
145
|
</span>
|
|
146
146
|
</Link>
|
|
@@ -154,9 +154,9 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
154
154
|
if (this.hasLastPageLink(pageNumber, totalPages)) {
|
|
155
155
|
const n = toInteger(totalPages)
|
|
156
156
|
return (
|
|
157
|
-
<li key={getListItemKey(n)} className='
|
|
158
|
-
<Link to={getLinkTo(match, n)} onClick={() => this.
|
|
159
|
-
<span className='
|
|
157
|
+
<li key={getListItemKey(n)} className='last-page'>
|
|
158
|
+
<Link to={getLinkTo(match, n)} onClick={() => this.handlePageNumberSelect(n)}>
|
|
159
|
+
<span className='page-number'>
|
|
160
160
|
{n}
|
|
161
161
|
</span>
|
|
162
162
|
</Link>
|
|
@@ -174,8 +174,8 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
174
174
|
const n = (i + 1)
|
|
175
175
|
a.push((
|
|
176
176
|
<li key={getListItemKey(n)} className={getListItemClassName(pageNumber, n)}>
|
|
177
|
-
<Link to={getLinkTo(match, n)} onClick={() => this.
|
|
178
|
-
<span className='
|
|
177
|
+
<Link to={getLinkTo(match, n)} onClick={() => this.handlePageNumberSelect(n)}>
|
|
178
|
+
<span className='page-number'>
|
|
179
179
|
{n}
|
|
180
180
|
</span>
|
|
181
181
|
</Link>
|
|
@@ -200,7 +200,7 @@ export default abstract class AbstractPagination<P, S> extends Component<P & Abs
|
|
|
200
200
|
)
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
handlePageNumberSelect = (pageNumber: number): any => {
|
|
204
204
|
this.props.onClick(pageNumber)
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import debug from 'debug'
|
|
2
|
+
|
|
1
3
|
import type {
|
|
2
4
|
AbstractPaginationProps,
|
|
3
5
|
AbstractPaginationState
|
|
4
|
-
} from '
|
|
6
|
+
} from '#pagination/component'
|
|
5
7
|
|
|
6
8
|
import AbstractPagination, {
|
|
7
9
|
toInteger,
|
|
8
10
|
calculateTotalPages,
|
|
9
11
|
calculatePageNumber
|
|
10
|
-
} from '
|
|
12
|
+
} from '#pagination/component'
|
|
13
|
+
|
|
14
|
+
const error = debug('react-router-pagination/pagination/component')
|
|
11
15
|
|
|
12
16
|
export {
|
|
13
17
|
toInteger,
|
|
@@ -15,18 +19,24 @@ export {
|
|
|
15
19
|
calculatePageNumber
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
interface StandardProps extends AbstractPaginationProps {
|
|
22
|
+
export interface StandardProps extends AbstractPaginationProps {
|
|
23
|
+
pageNumber: string | number
|
|
24
|
+
totalPages: string | number
|
|
19
25
|
spread: string | number
|
|
26
|
+
onChange: (pageNumber: number) => void
|
|
20
27
|
}
|
|
21
28
|
|
|
22
|
-
interface StandardState extends AbstractPaginationState {
|
|
29
|
+
export interface StandardState extends AbstractPaginationState {
|
|
30
|
+
pageNumber: number
|
|
31
|
+
totalPages: number
|
|
23
32
|
spread: number
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
export class Standard extends AbstractPagination<StandardProps, StandardState> {
|
|
27
36
|
static defaultProps = {
|
|
28
37
|
...AbstractPagination.defaultProps,
|
|
29
|
-
spread: 1
|
|
38
|
+
spread: 1,
|
|
39
|
+
onChange () {}
|
|
30
40
|
}
|
|
31
41
|
|
|
32
42
|
state = {
|
|
@@ -65,4 +75,26 @@ export class Standard extends AbstractPagination<StandardProps, StandardState> {
|
|
|
65
75
|
shouldComponentUpdate (props: StandardProps): boolean {
|
|
66
76
|
return super.shouldComponentUpdate(props) || (props.spread !== this.props.spread)
|
|
67
77
|
}
|
|
78
|
+
|
|
79
|
+
handlePageNumberSelect = (pageNumber: number): any => {
|
|
80
|
+
const { onClick } = this.props
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
onClick(pageNumber)
|
|
84
|
+
} catch {
|
|
85
|
+
error('Error `onClick`')
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (pageNumber !== this.state.pageNumber) {
|
|
89
|
+
this.setState({ pageNumber }, () => {
|
|
90
|
+
const { onChange } = this.props
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
onChange(pageNumber)
|
|
94
|
+
} catch {
|
|
95
|
+
error('Error `onChange`')
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
}
|
|
68
100
|
}
|
package/jest.config.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
bail: 1,
|
|
3
|
-
verbose: true,
|
|
4
|
-
rootDir: '.',
|
|
5
|
-
transform: {
|
|
6
|
-
'^.+\\.mts$': 'babel-jest',
|
|
7
|
-
'^.+\\.tsx$': 'babel-jest',
|
|
8
|
-
'^.+\\.mjs$': 'babel-jest',
|
|
9
|
-
'^.+\\.jsx$': 'babel-jest'
|
|
10
|
-
},
|
|
11
|
-
collectCoverage: true,
|
|
12
|
-
coverageDirectory: './.coverage'
|
|
13
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`react-router-pagination/pagination/component <Pagination /> With \`pageNumber\` and \`totalPages\` renders 1`] = `
|
|
4
|
-
<ul
|
|
5
|
-
className="pagination"
|
|
6
|
-
>
|
|
7
|
-
<li
|
|
8
|
-
className="forwardPage"
|
|
9
|
-
>
|
|
10
|
-
<a
|
|
11
|
-
href="/1"
|
|
12
|
-
onClick={[Function]}
|
|
13
|
-
>
|
|
14
|
-
<span
|
|
15
|
-
className="forwardPage"
|
|
16
|
-
>
|
|
17
|
-
»
|
|
18
|
-
</span>
|
|
19
|
-
</a>
|
|
20
|
-
</li>
|
|
21
|
-
<li
|
|
22
|
-
className="lastPage"
|
|
23
|
-
>
|
|
24
|
-
<a
|
|
25
|
-
href="/2"
|
|
26
|
-
onClick={[Function]}
|
|
27
|
-
>
|
|
28
|
-
<span
|
|
29
|
-
className="pageNumber"
|
|
30
|
-
>
|
|
31
|
-
2
|
|
32
|
-
</span>
|
|
33
|
-
</a>
|
|
34
|
-
</li>
|
|
35
|
-
</ul>
|
|
36
|
-
`;
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`react-router-pagination <Centered /> With \`pageNumber\` and \`totalPages\` and \`spread\` renders 1`] = `
|
|
4
|
-
<ul
|
|
5
|
-
className="pagination"
|
|
6
|
-
>
|
|
7
|
-
<li
|
|
8
|
-
className="zeroPage"
|
|
9
|
-
>
|
|
10
|
-
<a
|
|
11
|
-
href="/1"
|
|
12
|
-
onClick={[Function]}
|
|
13
|
-
>
|
|
14
|
-
<span
|
|
15
|
-
className="pageNumber"
|
|
16
|
-
>
|
|
17
|
-
1
|
|
18
|
-
</span>
|
|
19
|
-
</a>
|
|
20
|
-
</li>
|
|
21
|
-
<li
|
|
22
|
-
className="reversePage"
|
|
23
|
-
>
|
|
24
|
-
<a
|
|
25
|
-
href="/6"
|
|
26
|
-
onClick={[Function]}
|
|
27
|
-
>
|
|
28
|
-
<span
|
|
29
|
-
className="reverse"
|
|
30
|
-
>
|
|
31
|
-
«
|
|
32
|
-
</span>
|
|
33
|
-
</a>
|
|
34
|
-
</li>
|
|
35
|
-
<li
|
|
36
|
-
className="page"
|
|
37
|
-
>
|
|
38
|
-
<a
|
|
39
|
-
href="/7"
|
|
40
|
-
onClick={[Function]}
|
|
41
|
-
>
|
|
42
|
-
<span
|
|
43
|
-
className="pageNumber"
|
|
44
|
-
>
|
|
45
|
-
7
|
|
46
|
-
</span>
|
|
47
|
-
</a>
|
|
48
|
-
</li>
|
|
49
|
-
<li
|
|
50
|
-
className="page"
|
|
51
|
-
>
|
|
52
|
-
<a
|
|
53
|
-
href="/8"
|
|
54
|
-
onClick={[Function]}
|
|
55
|
-
>
|
|
56
|
-
<span
|
|
57
|
-
className="pageNumber"
|
|
58
|
-
>
|
|
59
|
-
8
|
|
60
|
-
</span>
|
|
61
|
-
</a>
|
|
62
|
-
</li>
|
|
63
|
-
<li
|
|
64
|
-
className="currentPage"
|
|
65
|
-
>
|
|
66
|
-
<a
|
|
67
|
-
href="/9"
|
|
68
|
-
onClick={[Function]}
|
|
69
|
-
>
|
|
70
|
-
<span
|
|
71
|
-
className="pageNumber"
|
|
72
|
-
>
|
|
73
|
-
9
|
|
74
|
-
</span>
|
|
75
|
-
</a>
|
|
76
|
-
</li>
|
|
77
|
-
</ul>
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`react-router-pagination <Pagination /> With \`pageNumber\` and \`totalPages\` renders 1`] = `
|
|
81
|
-
<ul
|
|
82
|
-
className="pagination"
|
|
83
|
-
>
|
|
84
|
-
<li
|
|
85
|
-
className="forwardPage"
|
|
86
|
-
>
|
|
87
|
-
<a
|
|
88
|
-
href="/1"
|
|
89
|
-
onClick={[Function]}
|
|
90
|
-
>
|
|
91
|
-
<span
|
|
92
|
-
className="forwardPage"
|
|
93
|
-
>
|
|
94
|
-
»
|
|
95
|
-
</span>
|
|
96
|
-
</a>
|
|
97
|
-
</li>
|
|
98
|
-
<li
|
|
99
|
-
className="lastPage"
|
|
100
|
-
>
|
|
101
|
-
<a
|
|
102
|
-
href="/2"
|
|
103
|
-
onClick={[Function]}
|
|
104
|
-
>
|
|
105
|
-
<span
|
|
106
|
-
className="pageNumber"
|
|
107
|
-
>
|
|
108
|
-
2
|
|
109
|
-
</span>
|
|
110
|
-
</a>
|
|
111
|
-
</li>
|
|
112
|
-
</ul>
|
|
113
|
-
`;
|
|
114
|
-
|
|
115
|
-
exports[`react-router-pagination <Standard /> With \`pageNumber\` and \`totalPages\` and \`spread\` renders 1`] = `
|
|
116
|
-
<ul
|
|
117
|
-
className="pagination"
|
|
118
|
-
>
|
|
119
|
-
<li
|
|
120
|
-
className="zeroPage"
|
|
121
|
-
>
|
|
122
|
-
<a
|
|
123
|
-
href="/1"
|
|
124
|
-
onClick={[Function]}
|
|
125
|
-
>
|
|
126
|
-
<span
|
|
127
|
-
className="pageNumber"
|
|
128
|
-
>
|
|
129
|
-
1
|
|
130
|
-
</span>
|
|
131
|
-
</a>
|
|
132
|
-
</li>
|
|
133
|
-
<li
|
|
134
|
-
className="reversePage"
|
|
135
|
-
>
|
|
136
|
-
<a
|
|
137
|
-
href="/6"
|
|
138
|
-
onClick={[Function]}
|
|
139
|
-
>
|
|
140
|
-
<span
|
|
141
|
-
className="reverse"
|
|
142
|
-
>
|
|
143
|
-
«
|
|
144
|
-
</span>
|
|
145
|
-
</a>
|
|
146
|
-
</li>
|
|
147
|
-
<li
|
|
148
|
-
className="page"
|
|
149
|
-
>
|
|
150
|
-
<a
|
|
151
|
-
href="/7"
|
|
152
|
-
onClick={[Function]}
|
|
153
|
-
>
|
|
154
|
-
<span
|
|
155
|
-
className="pageNumber"
|
|
156
|
-
>
|
|
157
|
-
7
|
|
158
|
-
</span>
|
|
159
|
-
</a>
|
|
160
|
-
</li>
|
|
161
|
-
<li
|
|
162
|
-
className="page"
|
|
163
|
-
>
|
|
164
|
-
<a
|
|
165
|
-
href="/8"
|
|
166
|
-
onClick={[Function]}
|
|
167
|
-
>
|
|
168
|
-
<span
|
|
169
|
-
className="pageNumber"
|
|
170
|
-
>
|
|
171
|
-
8
|
|
172
|
-
</span>
|
|
173
|
-
</a>
|
|
174
|
-
</li>
|
|
175
|
-
<li
|
|
176
|
-
className="currentPage"
|
|
177
|
-
>
|
|
178
|
-
<a
|
|
179
|
-
href="/9"
|
|
180
|
-
onClick={[Function]}
|
|
181
|
-
>
|
|
182
|
-
<span
|
|
183
|
-
className="pageNumber"
|
|
184
|
-
>
|
|
185
|
-
9
|
|
186
|
-
</span>
|
|
187
|
-
</a>
|
|
188
|
-
</li>
|
|
189
|
-
</ul>
|
|
190
|
-
`;
|