react-router-pagination 3.3.1 → 3.3.3
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/package.json +1 -1
- package/src/index.cjs +5 -1
- package/src/pagination/centered/index.cjs +11 -1
- package/src/pagination/centered/index.mjs +6 -2
- package/src/pagination/centered/index.tsx +5 -3
- package/src/pagination/common/index.cjs +9 -1
- package/src/pagination/common/index.mjs +5 -2
- package/src/pagination/component.cjs +11 -1
- package/src/pagination/component.mjs +6 -2
- package/src/pagination/component.tsx +7 -6
- package/src/pagination/index.cjs +13 -1
- package/src/pagination/index.mjs +7 -2
- package/src/pagination/standard/index.cjs +11 -1
- package/src/pagination/standard/index.mjs +6 -2
- package/src/pagination/standard/index.tsx +5 -3
- package/src/super/pagination/component.tsx +1 -7
package/package.json
CHANGED
package/src/index.cjs
CHANGED
|
@@ -9,4 +9,14 @@ require('@babel/register')({
|
|
|
9
9
|
]
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const {
|
|
13
|
+
toInteger,
|
|
14
|
+
calculateTotalPages,
|
|
15
|
+
calculatePageNumber,
|
|
16
|
+
Centered
|
|
17
|
+
} = require('./index.tsx')
|
|
18
|
+
|
|
19
|
+
module.exports.toInteger = toInteger
|
|
20
|
+
module.exports.calculateTotalPages = calculateTotalPages
|
|
21
|
+
module.exports.calculatePageNumber = calculatePageNumber
|
|
22
|
+
module.exports.Centered = Centered
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import debug from 'debug'
|
|
2
2
|
|
|
3
|
-
import AbstractPagination from '#pagination/super/pagination/component' // '../../super/pagination/component.tsx'
|
|
4
|
-
|
|
5
3
|
import {
|
|
6
4
|
toInteger,
|
|
7
5
|
calculateTotalPages,
|
|
8
6
|
calculatePageNumber
|
|
9
|
-
} from '#pagination/pagination/
|
|
7
|
+
} from '#pagination/pagination/common'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
AbstractPagination
|
|
11
|
+
} from '#pagination/super/pagination/component' // '../../super/pagination/component.tsx'
|
|
10
12
|
|
|
11
13
|
const error = debug('react-router-pagination/pagination/component')
|
|
12
14
|
|
|
@@ -9,4 +9,12 @@ require('@babel/register')({
|
|
|
9
9
|
]
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const {
|
|
13
|
+
toInteger,
|
|
14
|
+
calculateTotalPages,
|
|
15
|
+
calculatePageNumber
|
|
16
|
+
} = require('./index.mts')
|
|
17
|
+
|
|
18
|
+
module.exports.toInteger = toInteger
|
|
19
|
+
module.exports.calculateTotalPages = calculateTotalPages
|
|
20
|
+
module.exports.calculatePageNumber = calculatePageNumber
|
|
@@ -9,4 +9,14 @@ require('@babel/register')({
|
|
|
9
9
|
]
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const {
|
|
13
|
+
toInteger,
|
|
14
|
+
calculateTotalPages,
|
|
15
|
+
calculatePageNumber,
|
|
16
|
+
Pagination
|
|
17
|
+
} = require('./component.tsx')
|
|
18
|
+
|
|
19
|
+
module.exports.toInteger = toInteger
|
|
20
|
+
module.exports.calculateTotalPages = calculateTotalPages
|
|
21
|
+
module.exports.calculatePageNumber = calculatePageNumber
|
|
22
|
+
module.exports.Pagination = Pagination
|
|
@@ -7,12 +7,9 @@ import {
|
|
|
7
7
|
calculatePageNumber
|
|
8
8
|
} from '#pagination/pagination/common'
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
AbstractPaginationProps,
|
|
14
|
-
AbstractPaginationState
|
|
15
|
-
} from '#pagination/super/pagination/component'
|
|
10
|
+
import {
|
|
11
|
+
AbstractPagination
|
|
12
|
+
} from '#pagination/super/pagination/component' // '../super/pagination/component.tsx'
|
|
16
13
|
|
|
17
14
|
export {
|
|
18
15
|
toInteger,
|
|
@@ -20,6 +17,10 @@ export {
|
|
|
20
17
|
calculatePageNumber
|
|
21
18
|
}
|
|
22
19
|
|
|
20
|
+
type AbstractPaginationProps = ReactRouterPaginationTypes.AbstractPaginationProps
|
|
21
|
+
|
|
22
|
+
type AbstractPaginationState = ReactRouterPaginationTypes.AbstractPaginationState
|
|
23
|
+
|
|
23
24
|
export class Pagination extends AbstractPagination<AbstractPaginationProps, AbstractPaginationState> {
|
|
24
25
|
state = {
|
|
25
26
|
pageNumber: toInteger(this.props.pageNumber),
|
package/src/pagination/index.cjs
CHANGED
|
@@ -9,4 +9,16 @@ require('@babel/register')({
|
|
|
9
9
|
]
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const {
|
|
13
|
+
calculateTotalPages,
|
|
14
|
+
calculatePageNumber,
|
|
15
|
+
Pagination,
|
|
16
|
+
Centered,
|
|
17
|
+
Standard
|
|
18
|
+
} = require('./index.tsx')
|
|
19
|
+
|
|
20
|
+
module.exports.calculateTotalPages = calculateTotalPages
|
|
21
|
+
module.exports.calculatePageNumber = calculatePageNumber
|
|
22
|
+
module.exports.Pagination = Pagination
|
|
23
|
+
module.exports.Centered = Centered
|
|
24
|
+
module.exports.Standard = Standard
|
package/src/pagination/index.mjs
CHANGED
|
@@ -9,4 +9,14 @@ require('@babel/register')({
|
|
|
9
9
|
]
|
|
10
10
|
})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const {
|
|
13
|
+
toInteger,
|
|
14
|
+
calculateTotalPages,
|
|
15
|
+
calculatePageNumber,
|
|
16
|
+
Standard
|
|
17
|
+
} = require('./index.tsx')
|
|
18
|
+
|
|
19
|
+
module.exports.toInteger = toInteger
|
|
20
|
+
module.exports.calculateTotalPages = calculateTotalPages
|
|
21
|
+
module.exports.calculatePageNumber = calculatePageNumber
|
|
22
|
+
module.exports.Standard = Standard
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import debug from 'debug'
|
|
2
2
|
|
|
3
|
-
import AbstractPagination from '#pagination/super/pagination/component' // '../../super/pagination/component.tsx'
|
|
4
|
-
|
|
5
3
|
import {
|
|
6
4
|
toInteger,
|
|
7
5
|
calculateTotalPages,
|
|
8
6
|
calculatePageNumber
|
|
9
|
-
} from '#pagination/pagination/
|
|
7
|
+
} from '#pagination/pagination/common'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
AbstractPagination
|
|
11
|
+
} from '#pagination/super/pagination/component' // '../../super/pagination/component.tsx'
|
|
10
12
|
|
|
11
13
|
const error = debug('react-router-pagination/pagination/component')
|
|
12
14
|
|
|
@@ -25,17 +25,11 @@ const getListItemKey = (key: string | number): string => `list-item-${key}`
|
|
|
25
25
|
|
|
26
26
|
const getLinkTo = ({ path = '/:pageNumber', params = {} } = {}, pageNumber = 0): string => generatePath(path, { ...params, pageNumber })
|
|
27
27
|
|
|
28
|
-
export {
|
|
29
|
-
toInteger,
|
|
30
|
-
calculateTotalPages,
|
|
31
|
-
calculatePageNumber
|
|
32
|
-
}
|
|
33
|
-
|
|
34
28
|
export type AbstractPaginationProps = ReactRouterPaginationTypes.AbstractPaginationProps
|
|
35
29
|
|
|
36
30
|
export type AbstractPaginationState = ReactRouterPaginationTypes.AbstractPaginationState
|
|
37
31
|
|
|
38
|
-
export
|
|
32
|
+
export abstract class AbstractPagination<P, S> extends Component<P & AbstractPaginationProps, S & AbstractPaginationState> { // eslint-disable-line @typescript-eslint/no-unnecessary-type-parameters -- Base
|
|
39
33
|
static defaultProps = {
|
|
40
34
|
onClick () {},
|
|
41
35
|
pageNumber: 0,
|