@dhis2-ui/pagination 8.1.4 → 8.1.7
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/build/cjs/__tests__/pagination.test.js +21 -0
- package/build/cjs/locales/ar/translations.json +4 -2
- package/build/cjs/locales/ar_IQ/translations.json +4 -2
- package/build/cjs/locales/bn/translations.json +4 -2
- package/build/cjs/locales/ckb/translations.json +4 -2
- package/build/cjs/locales/cs/translations.json +4 -2
- package/build/cjs/locales/da/translations.json +4 -2
- package/build/cjs/locales/es/translations.json +4 -2
- package/build/cjs/locales/fr/translations.json +4 -2
- package/build/cjs/locales/id/translations.json +4 -2
- package/build/cjs/locales/km/translations.json +4 -2
- package/build/cjs/locales/lo/translations.json +4 -2
- package/build/cjs/locales/my/translations.json +4 -2
- package/build/cjs/locales/nb/translations.json +4 -2
- package/build/cjs/locales/prs/translations.json +4 -2
- package/build/cjs/locales/ps/translations.json +4 -2
- package/build/cjs/locales/pt/translations.json +4 -2
- package/build/cjs/locales/pt_BR/translations.json +4 -2
- package/build/cjs/locales/ru/translations.json +4 -2
- package/build/cjs/locales/sv/translations.json +4 -2
- package/build/cjs/locales/tet/translations.json +4 -2
- package/build/cjs/locales/tg/translations.json +4 -2
- package/build/cjs/locales/uk/translations.json +4 -2
- package/build/cjs/locales/ur/translations.json +4 -2
- package/build/cjs/locales/uz/translations.json +4 -2
- package/build/cjs/locales/uz_Latn/translations.json +4 -2
- package/build/cjs/locales/vi/translations.json +4 -2
- package/build/cjs/locales/zh/translations.json +4 -2
- package/build/cjs/locales/zh_CN/translations.json +4 -2
- package/build/cjs/pagination.js +4 -1
- package/build/es/__tests__/pagination.test.js +21 -0
- package/build/es/locales/ar/translations.json +4 -2
- package/build/es/locales/ar_IQ/translations.json +4 -2
- package/build/es/locales/bn/translations.json +4 -2
- package/build/es/locales/ckb/translations.json +4 -2
- package/build/es/locales/cs/translations.json +4 -2
- package/build/es/locales/da/translations.json +4 -2
- package/build/es/locales/es/translations.json +4 -2
- package/build/es/locales/fr/translations.json +4 -2
- package/build/es/locales/id/translations.json +4 -2
- package/build/es/locales/km/translations.json +4 -2
- package/build/es/locales/lo/translations.json +4 -2
- package/build/es/locales/my/translations.json +4 -2
- package/build/es/locales/nb/translations.json +4 -2
- package/build/es/locales/prs/translations.json +4 -2
- package/build/es/locales/ps/translations.json +4 -2
- package/build/es/locales/pt/translations.json +4 -2
- package/build/es/locales/pt_BR/translations.json +4 -2
- package/build/es/locales/ru/translations.json +4 -2
- package/build/es/locales/sv/translations.json +4 -2
- package/build/es/locales/tet/translations.json +4 -2
- package/build/es/locales/tg/translations.json +4 -2
- package/build/es/locales/uk/translations.json +4 -2
- package/build/es/locales/ur/translations.json +4 -2
- package/build/es/locales/uz/translations.json +4 -2
- package/build/es/locales/uz_Latn/translations.json +4 -2
- package/build/es/locales/vi/translations.json +4 -2
- package/build/es/locales/zh/translations.json +4 -2
- package/build/es/locales/zh_CN/translations.json +4 -2
- package/build/es/pagination.js +3 -1
- package/package.json +5 -5
|
@@ -41,6 +41,27 @@ describe('<Pagination />', () => {
|
|
|
41
41
|
expect(wrapper.find(_pageSelect.PageSelect).length).toEqual(0);
|
|
42
42
|
expect(wrapper.find(_pageSizeSelect.PageSizeSelect).length).toEqual(1);
|
|
43
43
|
});
|
|
44
|
+
it('renders without a PageSelect when pageCount is not provided', () => {
|
|
45
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_pagination.Pagination, _extends({}, props, {
|
|
46
|
+
pageCount: undefined
|
|
47
|
+
})));
|
|
48
|
+
expect(wrapper.find(_pageSelect.PageSelect).length).toEqual(0);
|
|
49
|
+
expect(wrapper.find(_pageSizeSelect.PageSizeSelect).length).toEqual(1);
|
|
50
|
+
});
|
|
51
|
+
it('renders without a PageSelect when pageCount is 1', () => {
|
|
52
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_pagination.Pagination, _extends({}, props, {
|
|
53
|
+
pageCount: 1
|
|
54
|
+
})));
|
|
55
|
+
expect(wrapper.find(_pageSelect.PageSelect).length).toEqual(0);
|
|
56
|
+
expect(wrapper.find(_pageSizeSelect.PageSizeSelect).length).toEqual(1);
|
|
57
|
+
});
|
|
58
|
+
it('renders without a PageSelect when pageCount is over 2000', () => {
|
|
59
|
+
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_pagination.Pagination, _extends({}, props, {
|
|
60
|
+
pageCount: 2001
|
|
61
|
+
})));
|
|
62
|
+
expect(wrapper.find(_pageSelect.PageSelect).length).toEqual(0);
|
|
63
|
+
expect(wrapper.find(_pageSizeSelect.PageSizeSelect).length).toEqual(1);
|
|
64
|
+
});
|
|
44
65
|
it('renders without a PageSizeSelect when hidePageSizeSelect is true', () => {
|
|
45
66
|
const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_pagination.Pagination, _extends({}, props, {
|
|
46
67
|
hidePageSizeSelect: true
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "التالي",
|
|
3
6
|
"Page": "الصفحة",
|
|
4
7
|
"Items per page": "عناصر لكل صفحة",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "السابق",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "التالي",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "পূর্ববর্তী",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "داهاتوو",
|
|
3
6
|
"Page": "لابةرة",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "ذيَشوو",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Stránka {{page}} z {{pageCount}}, položky {{firstItem}}-{{lastItem}} z {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Stránka {{page}}, položky {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Stránka {{page}}",
|
|
2
5
|
"Next": "Další",
|
|
3
6
|
"Page": "Strana",
|
|
4
7
|
"Items per page": "Položek na stránce",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Stránka {{page}} z {{pageCount}}, položky {{firstItem}}-{{lastItem}} z {{total}}",
|
|
6
8
|
"Previous": "Předchozí",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Nacházíte se na stránce {{page}} zobrazující položky {{firstItem}}-{{lastItem}}, ale je zde {{pageCount}} stránek a {{total}} položek"
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Next",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, elementos {{firstItem}} - {{lastItem}} de {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Siguiente",
|
|
3
6
|
"Page": "Página",
|
|
4
7
|
"Items per page": "Elementos por página",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, elementos {{firstItem}} - {{lastItem}} de {{total}}",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Suivant",
|
|
3
6
|
"Page": "Page",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Précédent",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Selanjutnya",
|
|
3
6
|
"Page": "Halaman",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Sebelumnya",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "បន្ទាប់",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "មុន",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "ຕໍ່ໄປ",
|
|
3
6
|
"Page": "ໜ້າ",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "ຍ້ອນກັບ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "ရှေ့သို့",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "နောက်သို့",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Side {{page}} av {{pageCount}}, elementer {{firstItem}}-{{lastItem}} av {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Neste",
|
|
3
6
|
"Page": "Side",
|
|
4
7
|
"Items per page": "Elementer per side",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Side {{page}} av {{pageCount}}, elementer {{firstItem}}-{{lastItem}} av {{total}}",
|
|
6
8
|
"Previous": "Forrige",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "بعدی",
|
|
3
6
|
"Page": "صفحه\\:",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "قبلی",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "راتلونکی",
|
|
3
6
|
"Page": "پاڼه",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "مخکینۍ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximo",
|
|
3
6
|
"Page": "Pagina",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximo",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Следующая",
|
|
3
6
|
"Page": "Страница",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Предыдущая",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Nästa",
|
|
3
6
|
"Page": "Sida",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Tidigare",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximu",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Навбатӣ",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Қаблӣ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Наступна",
|
|
3
6
|
"Page": "Сторінка",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Попередня",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "اگلہ",
|
|
3
6
|
"Page": "صفحہ",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "پچھلہ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Кейинги",
|
|
3
6
|
"Page": "Саҳифа",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Олдинги",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Кейинги",
|
|
3
6
|
"Page": "Sahifa",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Oldingi",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Sau",
|
|
3
6
|
"Page": "Trang",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Trước",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "第 {{page}} 页,共 {{pageCount}},第 {{firstItem}}-{{lastItem}} 条,共 {{total}} 条",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "下一个",
|
|
3
6
|
"Page": "页",
|
|
4
7
|
"Items per page": "条每页",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "第 {{page}} 页,共 {{pageCount}},第 {{firstItem}}-{{lastItem}} 条,共 {{total}} 条",
|
|
6
8
|
"Previous": "前一",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "下一个",
|
|
3
6
|
"Page": "页",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "前一",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
package/build/cjs/pagination.js
CHANGED
|
@@ -31,6 +31,8 @@ var _pageSummary = require("./page-summary.js");
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
34
|
+
const MAX_PAGE_COUNT = 2000;
|
|
35
|
+
|
|
34
36
|
const Pagination = ({
|
|
35
37
|
className,
|
|
36
38
|
dataTest,
|
|
@@ -62,6 +64,7 @@ const Pagination = ({
|
|
|
62
64
|
pageSize,
|
|
63
65
|
total
|
|
64
66
|
});
|
|
67
|
+
const showPageSelect = !hidePageSelect && typeof pageCount === 'number' && pageCount > 1 && pageCount <= MAX_PAGE_COUNT;
|
|
65
68
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
69
|
"data-test": dataTest,
|
|
67
70
|
className: "jsx-3647884394" + " " + ((0, _classnames.default)('container', className) || "")
|
|
@@ -83,7 +86,7 @@ const Pagination = ({
|
|
|
83
86
|
total: total
|
|
84
87
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
85
88
|
className: "jsx-3647884394" + " " + "page-navigation"
|
|
86
|
-
},
|
|
89
|
+
}, showPageSelect && /*#__PURE__*/_react.default.createElement(_pageSelect.PageSelect, {
|
|
87
90
|
dataTest: dataTest,
|
|
88
91
|
pageSelectText: pageSelectText,
|
|
89
92
|
page: page,
|
|
@@ -27,6 +27,27 @@ describe('<Pagination />', () => {
|
|
|
27
27
|
expect(wrapper.find(PageSelect).length).toEqual(0);
|
|
28
28
|
expect(wrapper.find(PageSizeSelect).length).toEqual(1);
|
|
29
29
|
});
|
|
30
|
+
it('renders without a PageSelect when pageCount is not provided', () => {
|
|
31
|
+
const wrapper = shallow( /*#__PURE__*/React.createElement(Pagination, _extends({}, props, {
|
|
32
|
+
pageCount: undefined
|
|
33
|
+
})));
|
|
34
|
+
expect(wrapper.find(PageSelect).length).toEqual(0);
|
|
35
|
+
expect(wrapper.find(PageSizeSelect).length).toEqual(1);
|
|
36
|
+
});
|
|
37
|
+
it('renders without a PageSelect when pageCount is 1', () => {
|
|
38
|
+
const wrapper = shallow( /*#__PURE__*/React.createElement(Pagination, _extends({}, props, {
|
|
39
|
+
pageCount: 1
|
|
40
|
+
})));
|
|
41
|
+
expect(wrapper.find(PageSelect).length).toEqual(0);
|
|
42
|
+
expect(wrapper.find(PageSizeSelect).length).toEqual(1);
|
|
43
|
+
});
|
|
44
|
+
it('renders without a PageSelect when pageCount is over 2000', () => {
|
|
45
|
+
const wrapper = shallow( /*#__PURE__*/React.createElement(Pagination, _extends({}, props, {
|
|
46
|
+
pageCount: 2001
|
|
47
|
+
})));
|
|
48
|
+
expect(wrapper.find(PageSelect).length).toEqual(0);
|
|
49
|
+
expect(wrapper.find(PageSizeSelect).length).toEqual(1);
|
|
50
|
+
});
|
|
30
51
|
it('renders without a PageSizeSelect when hidePageSizeSelect is true', () => {
|
|
31
52
|
const wrapper = shallow( /*#__PURE__*/React.createElement(Pagination, _extends({}, props, {
|
|
32
53
|
hidePageSizeSelect: true
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "التالي",
|
|
3
6
|
"Page": "الصفحة",
|
|
4
7
|
"Items per page": "عناصر لكل صفحة",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "السابق",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "التالي",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "পূর্ববর্তী",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "داهاتوو",
|
|
3
6
|
"Page": "لابةرة",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "ذيَشوو",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Stránka {{page}} z {{pageCount}}, položky {{firstItem}}-{{lastItem}} z {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Stránka {{page}}, položky {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Stránka {{page}}",
|
|
2
5
|
"Next": "Další",
|
|
3
6
|
"Page": "Strana",
|
|
4
7
|
"Items per page": "Položek na stránce",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Stránka {{page}} z {{pageCount}}, položky {{firstItem}}-{{lastItem}} z {{total}}",
|
|
6
8
|
"Previous": "Předchozí",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Nacházíte se na stránce {{page}} zobrazující položky {{firstItem}}-{{lastItem}}, ale je zde {{pageCount}} stránek a {{total}} položek"
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Next",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, elementos {{firstItem}} - {{lastItem}} de {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Siguiente",
|
|
3
6
|
"Page": "Página",
|
|
4
7
|
"Items per page": "Elementos por página",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, elementos {{firstItem}} - {{lastItem}} de {{total}}",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Suivant",
|
|
3
6
|
"Page": "Page",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Précédent",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Selanjutnya",
|
|
3
6
|
"Page": "Halaman",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Sebelumnya",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "បន្ទាប់",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "មុន",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "ຕໍ່ໄປ",
|
|
3
6
|
"Page": "ໜ້າ",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "ຍ້ອນກັບ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "ရှေ့သို့",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "နောက်သို့",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Side {{page}} av {{pageCount}}, elementer {{firstItem}}-{{lastItem}} av {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Neste",
|
|
3
6
|
"Page": "Side",
|
|
4
7
|
"Items per page": "Elementer per side",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Side {{page}} av {{pageCount}}, elementer {{firstItem}}-{{lastItem}} av {{total}}",
|
|
6
8
|
"Previous": "Forrige",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "بعدی",
|
|
3
6
|
"Page": "صفحه\\:",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "قبلی",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "راتلونکی",
|
|
3
6
|
"Page": "پاڼه",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "مخکینۍ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximo",
|
|
3
6
|
"Page": "Pagina",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximo",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Следующая",
|
|
3
6
|
"Page": "Страница",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Предыдущая",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Nästa",
|
|
3
6
|
"Page": "Sida",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Tidigare",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Próximu",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Anterior",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Навбатӣ",
|
|
3
6
|
"Page": "",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Қаблӣ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Наступна",
|
|
3
6
|
"Page": "Сторінка",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Попередня",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "اگلہ",
|
|
3
6
|
"Page": "صفحہ",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "پچھلہ",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Кейинги",
|
|
3
6
|
"Page": "Саҳифа",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Олдинги",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Кейинги",
|
|
3
6
|
"Page": "Sahifa",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Oldingi",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "Sau",
|
|
3
6
|
"Page": "Trang",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "Trước",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "第 {{page}} 页,共 {{pageCount}},第 {{firstItem}}-{{lastItem}} 条,共 {{total}} 条",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "下一个",
|
|
3
6
|
"Page": "页",
|
|
4
7
|
"Items per page": "条每页",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "第 {{page}} 页,共 {{pageCount}},第 {{firstItem}}-{{lastItem}} 条,共 {{total}} 条",
|
|
6
8
|
"Previous": "前一",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
2
5
|
"Next": "下一个",
|
|
3
6
|
"Page": "页",
|
|
4
7
|
"Items per page": "",
|
|
5
|
-
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
6
8
|
"Previous": "前一",
|
|
7
|
-
"
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
8
10
|
}
|
package/build/es/pagination.js
CHANGED
|
@@ -10,6 +10,7 @@ import { PageControls } from './page-controls.js';
|
|
|
10
10
|
import { PageSelect } from './page-select.js';
|
|
11
11
|
import { PageSizeSelect } from './page-size-select.js';
|
|
12
12
|
import { PageSummary } from './page-summary.js';
|
|
13
|
+
const MAX_PAGE_COUNT = 2000;
|
|
13
14
|
|
|
14
15
|
const Pagination = ({
|
|
15
16
|
className,
|
|
@@ -42,6 +43,7 @@ const Pagination = ({
|
|
|
42
43
|
pageSize,
|
|
43
44
|
total
|
|
44
45
|
});
|
|
46
|
+
const showPageSelect = !hidePageSelect && typeof pageCount === 'number' && pageCount > 1 && pageCount <= MAX_PAGE_COUNT;
|
|
45
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
48
|
"data-test": dataTest,
|
|
47
49
|
className: "jsx-3647884394" + " " + (cx('container', className) || "")
|
|
@@ -63,7 +65,7 @@ const Pagination = ({
|
|
|
63
65
|
total: total
|
|
64
66
|
}), /*#__PURE__*/React.createElement("div", {
|
|
65
67
|
className: "jsx-3647884394" + " " + "page-navigation"
|
|
66
|
-
},
|
|
68
|
+
}, showPageSelect && /*#__PURE__*/React.createElement(PageSelect, {
|
|
67
69
|
dataTest: dataTest,
|
|
68
70
|
pageSelectText: pageSelectText,
|
|
69
71
|
page: page,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/pagination",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.7",
|
|
4
4
|
"description": "UI Pagination",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.0.0-beta.1",
|
|
36
|
-
"@dhis2-ui/button": "8.1.
|
|
37
|
-
"@dhis2-ui/select": "8.1.
|
|
38
|
-
"@dhis2/ui-constants": "8.1.
|
|
39
|
-
"@dhis2/ui-icons": "8.1.
|
|
36
|
+
"@dhis2-ui/button": "8.1.7",
|
|
37
|
+
"@dhis2-ui/select": "8.1.7",
|
|
38
|
+
"@dhis2/ui-constants": "8.1.7",
|
|
39
|
+
"@dhis2/ui-icons": "8.1.7",
|
|
40
40
|
"classnames": "^2.3.1",
|
|
41
41
|
"prop-types": "^15.7.2"
|
|
42
42
|
},
|