@dhis2-ui/pagination 10.16.2 → 10.16.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 +7 -6
- package/src/__fixtures__/index.js +46 -0
- package/src/__tests__/get-item-range.test.js +65 -0
- package/src/__tests__/page-controls.test.js +80 -0
- package/src/__tests__/page-select.test.js +40 -0
- package/src/__tests__/page-size-select.test.js +29 -0
- package/src/__tests__/page-summary.test.js +70 -0
- package/src/__tests__/pagination.test.js +212 -0
- package/src/get-default-page-summary-text.js +34 -0
- package/src/get-item-range.js +35 -0
- package/src/index.js +1 -0
- package/src/locales/ar/translations.json +10 -0
- package/src/locales/ar_IQ/translations.json +10 -0
- package/src/locales/bn/translations.json +10 -0
- package/src/locales/ckb/translations.json +10 -0
- package/src/locales/cs/translations.json +10 -0
- package/src/locales/da/translations.json +10 -0
- package/src/locales/en/translations.json +10 -0
- package/src/locales/es/translations.json +10 -0
- package/src/locales/es_419/translations.json +10 -0
- package/src/locales/fr/translations.json +10 -0
- package/src/locales/hi_IN/translations.json +10 -0
- package/src/locales/id/translations.json +10 -0
- package/src/locales/index.js +82 -0
- package/src/locales/km/translations.json +10 -0
- package/src/locales/lo/translations.json +10 -0
- package/src/locales/my/translations.json +10 -0
- package/src/locales/nb/translations.json +10 -0
- package/src/locales/nl/translations.json +10 -0
- package/src/locales/prs/translations.json +10 -0
- package/src/locales/ps/translations.json +10 -0
- package/src/locales/pt/translations.json +10 -0
- package/src/locales/pt_BR/translations.json +10 -0
- package/src/locales/ro/translations.json +10 -0
- package/src/locales/ru/translations.json +10 -0
- package/src/locales/sv/translations.json +10 -0
- package/src/locales/tet/translations.json +10 -0
- package/src/locales/tg/translations.json +10 -0
- package/src/locales/uk/translations.json +10 -0
- package/src/locales/ur/translations.json +10 -0
- package/src/locales/uz_Latn/translations.json +10 -0
- package/src/locales/uz_UZ_Cyrl/translations.json +10 -0
- package/src/locales/uz_UZ_Latn/translations.json +10 -0
- package/src/locales/vi/translations.json +10 -0
- package/src/locales/zh/translations.json +10 -0
- package/src/locales/zh_CN/translations.json +10 -0
- package/src/page-controls.js +83 -0
- package/src/page-select.js +62 -0
- package/src/page-size-select.js +64 -0
- package/src/page-summary.js +67 -0
- package/src/pagination.js +152 -0
- package/src/pagination.prod.stories.js +113 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "داهاتوو",
|
|
6
|
+
"Page": "لابةرة",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "ذيَشوو",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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}}",
|
|
5
|
+
"Next": "Další",
|
|
6
|
+
"Page": "Strana",
|
|
7
|
+
"Items per page": "Položek na stránce",
|
|
8
|
+
"Previous": "Předchozí",
|
|
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"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Next",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Page {{page}}, items {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Page {{page}}",
|
|
5
|
+
"Next": "Next",
|
|
6
|
+
"Page": "Page",
|
|
7
|
+
"Items per page": "Items per page",
|
|
8
|
+
"Previous": "Previous",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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}}": "Página {{page}}, elementos {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Página {{page}}",
|
|
5
|
+
"Next": "Siguiente",
|
|
6
|
+
"Page": "Página",
|
|
7
|
+
"Items per page": "Elementos por página",
|
|
8
|
+
"Previous": "Anterior",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, puntos {{firstItem}}-{{lastItem}} de {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Página {{page}}, artículos {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Página {{page}}",
|
|
5
|
+
"Next": "Siguiente",
|
|
6
|
+
"Page": "Página",
|
|
7
|
+
"Items per page": "Artículos por página",
|
|
8
|
+
"Previous": "Anterior",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Usted está en la página {{page}} que muestra los artículos {{firstItem}}-{{lastItem}}, pero hay páginas {{pageCount}} y artículos {{total}} "
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Page {{page}} des {{pageCount}}, éléments {{firstItem}}-{{lastItem}} de {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Page {{page}}, éléments {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Page {{page}}",
|
|
5
|
+
"Next": "Suivant",
|
|
6
|
+
"Page": "Page",
|
|
7
|
+
"Items per page": "Éléments par page",
|
|
8
|
+
"Previous": "Précédent",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Vous êtes sur la page {{page}} qui affiche les éléments {{firstItem}}-{{lastItem}}, mais il y a des pages {{pageCount}} et des éléments {{total}}."
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "आगे",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "पिछला",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "Halaman {{page}}",
|
|
5
|
+
"Next": "Selanjutnya",
|
|
6
|
+
"Page": "Halaman",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Sebelumnya",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by d2-i18n-generate.
|
|
4
|
+
//
|
|
5
|
+
// Changes to this file may cause incorrect behavior and will be lost if
|
|
6
|
+
// the code is regenerated.
|
|
7
|
+
// </auto-generated>
|
|
8
|
+
//------------------------------------------------------------------------------
|
|
9
|
+
import i18n from '@dhis2/d2-i18n'
|
|
10
|
+
|
|
11
|
+
import arTranslations from './ar/translations.json'
|
|
12
|
+
import ar_IQTranslations from './ar_IQ/translations.json'
|
|
13
|
+
import bnTranslations from './bn/translations.json'
|
|
14
|
+
import ckbTranslations from './ckb/translations.json'
|
|
15
|
+
import csTranslations from './cs/translations.json'
|
|
16
|
+
import daTranslations from './da/translations.json'
|
|
17
|
+
import enTranslations from './en/translations.json'
|
|
18
|
+
import esTranslations from './es/translations.json'
|
|
19
|
+
import es_419Translations from './es_419/translations.json'
|
|
20
|
+
import frTranslations from './fr/translations.json'
|
|
21
|
+
import hi_INTranslations from './hi_IN/translations.json'
|
|
22
|
+
import idTranslations from './id/translations.json'
|
|
23
|
+
import kmTranslations from './km/translations.json'
|
|
24
|
+
import loTranslations from './lo/translations.json'
|
|
25
|
+
import myTranslations from './my/translations.json'
|
|
26
|
+
import nbTranslations from './nb/translations.json'
|
|
27
|
+
import nlTranslations from './nl/translations.json'
|
|
28
|
+
import prsTranslations from './prs/translations.json'
|
|
29
|
+
import psTranslations from './ps/translations.json'
|
|
30
|
+
import ptTranslations from './pt/translations.json'
|
|
31
|
+
import pt_BRTranslations from './pt_BR/translations.json'
|
|
32
|
+
import roTranslations from './ro/translations.json'
|
|
33
|
+
import ruTranslations from './ru/translations.json'
|
|
34
|
+
import svTranslations from './sv/translations.json'
|
|
35
|
+
import tetTranslations from './tet/translations.json'
|
|
36
|
+
import tgTranslations from './tg/translations.json'
|
|
37
|
+
import ukTranslations from './uk/translations.json'
|
|
38
|
+
import urTranslations from './ur/translations.json'
|
|
39
|
+
import uz_LatnTranslations from './uz_Latn/translations.json'
|
|
40
|
+
import uz_UZ_CyrlTranslations from './uz_UZ_Cyrl/translations.json'
|
|
41
|
+
import uz_UZ_LatnTranslations from './uz_UZ_Latn/translations.json'
|
|
42
|
+
import viTranslations from './vi/translations.json'
|
|
43
|
+
import zhTranslations from './zh/translations.json'
|
|
44
|
+
import zh_CNTranslations from './zh_CN/translations.json'
|
|
45
|
+
|
|
46
|
+
const namespace = 'default'
|
|
47
|
+
i18n.addResources('ar', namespace, arTranslations)
|
|
48
|
+
i18n.addResources('ar_IQ', namespace, ar_IQTranslations)
|
|
49
|
+
i18n.addResources('bn', namespace, bnTranslations)
|
|
50
|
+
i18n.addResources('ckb', namespace, ckbTranslations)
|
|
51
|
+
i18n.addResources('cs', namespace, csTranslations)
|
|
52
|
+
i18n.addResources('da', namespace, daTranslations)
|
|
53
|
+
i18n.addResources('en', namespace, enTranslations)
|
|
54
|
+
i18n.addResources('es', namespace, esTranslations)
|
|
55
|
+
i18n.addResources('es_419', namespace, es_419Translations)
|
|
56
|
+
i18n.addResources('fr', namespace, frTranslations)
|
|
57
|
+
i18n.addResources('hi_IN', namespace, hi_INTranslations)
|
|
58
|
+
i18n.addResources('id', namespace, idTranslations)
|
|
59
|
+
i18n.addResources('km', namespace, kmTranslations)
|
|
60
|
+
i18n.addResources('lo', namespace, loTranslations)
|
|
61
|
+
i18n.addResources('my', namespace, myTranslations)
|
|
62
|
+
i18n.addResources('nb', namespace, nbTranslations)
|
|
63
|
+
i18n.addResources('nl', namespace, nlTranslations)
|
|
64
|
+
i18n.addResources('prs', namespace, prsTranslations)
|
|
65
|
+
i18n.addResources('ps', namespace, psTranslations)
|
|
66
|
+
i18n.addResources('pt', namespace, ptTranslations)
|
|
67
|
+
i18n.addResources('pt_BR', namespace, pt_BRTranslations)
|
|
68
|
+
i18n.addResources('ro', namespace, roTranslations)
|
|
69
|
+
i18n.addResources('ru', namespace, ruTranslations)
|
|
70
|
+
i18n.addResources('sv', namespace, svTranslations)
|
|
71
|
+
i18n.addResources('tet', namespace, tetTranslations)
|
|
72
|
+
i18n.addResources('tg', namespace, tgTranslations)
|
|
73
|
+
i18n.addResources('uk', namespace, ukTranslations)
|
|
74
|
+
i18n.addResources('ur', namespace, urTranslations)
|
|
75
|
+
i18n.addResources('uz_Latn', namespace, uz_LatnTranslations)
|
|
76
|
+
i18n.addResources('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations)
|
|
77
|
+
i18n.addResources('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations)
|
|
78
|
+
i18n.addResources('vi', namespace, viTranslations)
|
|
79
|
+
i18n.addResources('zh', namespace, zhTranslations)
|
|
80
|
+
i18n.addResources('zh_CN', namespace, zh_CNTranslations)
|
|
81
|
+
|
|
82
|
+
export default i18n
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "បន្ទាប់",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "មុន",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "ໜ້າ {{page}} ຂອງ {{pageCount}} , ລາຍການ {{firstItem}} - {{lastItem}} ຂອງ {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "ໜ້າ {{page}} , ລາຍການ {{firstItem}} - {{lastItem}}",
|
|
4
|
+
"Page {{page}}": "ໜ້າ {{page}}",
|
|
5
|
+
"Next": "ຕໍ່ໄປ",
|
|
6
|
+
"Page": "ໜ້າ",
|
|
7
|
+
"Items per page": "ລາຍການຕໍ່ໜ້າ",
|
|
8
|
+
"Previous": "ຍ້ອນກັບ",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "ທ່ານຢູ່ທີ່ໜ້າ {{page}} ສະແດງລາຍການ {{firstItem}} - {{lastItem}} , ແຕ່ມີໜ້າ {{pageCount}} ແລະ {{total}} ລາຍການ"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "ရှေ့သို့",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "နောက်သို့",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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}}": "Side {{page}}, elementer {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Side {{page}}",
|
|
5
|
+
"Next": "Neste",
|
|
6
|
+
"Page": "Side",
|
|
7
|
+
"Items per page": "Elementer per side",
|
|
8
|
+
"Previous": "Forrige",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Du er på side {{page}} som viser elementer {{firstItem}}-{{lastItem}}, men det er {{pageCount}} sider og {{total}} elementer."
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Pagina {{page}} van {{pageCount}}, items {{firstItem}}-{{lastItem}} van {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Pagina {{page}}, items {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Pagina {{page}}",
|
|
5
|
+
"Next": "Volgende",
|
|
6
|
+
"Page": "Bladzijde",
|
|
7
|
+
"Items per page": "Items per pagina",
|
|
8
|
+
"Previous": "Vorige",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "U bevindt zich op pagina {{page}} laat items zien {{firstItem}}-{{lastItem}}, maar er zijn {{pageCount}} pagina's en {{total}} items"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "بعدی",
|
|
6
|
+
"Page": "صفحه\\:",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "قبلی",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "راتلونکی",
|
|
6
|
+
"Page": "پاڼه",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "مخکینۍ",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Página {{page}} de {{pageCount}}, itens {{firstItem}}-{{lastItem}} de {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Página {{page}}, itens {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Página {{page}}",
|
|
5
|
+
"Next": "Próximo",
|
|
6
|
+
"Page": "Página",
|
|
7
|
+
"Items per page": "Itens por página",
|
|
8
|
+
"Previous": "Anterior",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Está na página {{page}} que mostra os itens {{firstItem}}-{{lastItem}}, mas existem páginas {{pageCount}} e itens {{total}} "
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Próximo",
|
|
6
|
+
"Page": "Página",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Anterior",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "Pagina {{page}}",
|
|
5
|
+
"Next": "Următorul",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Страница {{page}} из {{pageCount}}, элементы {{firstItem}}-{{lastItem}} из {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Страница {{page}}, элементы {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Страница {{page}}",
|
|
5
|
+
"Next": "Следующая",
|
|
6
|
+
"Page": "Страница",
|
|
7
|
+
"Items per page": "Количество элементов на странице",
|
|
8
|
+
"Previous": "Предыдущая",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Вы находитесь на странице {{page}}, где отображены элементы {{firstItem}}-{{lastItem}}, при этом всего страниц -{{pageCount}}, и элементов - {{total}}."
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Nästa",
|
|
6
|
+
"Page": "Sida",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Tidigare",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Próximu",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Anterior",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Навбатӣ",
|
|
6
|
+
"Page": "",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Қаблӣ",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "Сторінка {{page}} з {{pageCount}}, об'єкти {{firstItem}}-{{lastItem}} з {{total}}",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "Сторінка {{page}}, об'єкти {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "Сторінка {{page}}",
|
|
5
|
+
"Next": "Наступний",
|
|
6
|
+
"Page": "Сторінка",
|
|
7
|
+
"Items per page": "Об'єктів на сторінці",
|
|
8
|
+
"Previous": "Попередня",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "Ви знаходитесь на сторінці {{page}}, де відображаються об'єкти {{firstItem}}-{{lastItem}}, але є {{pageCount}} сторінок і {{total}} об'єктів"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "اگلہ",
|
|
6
|
+
"Page": "صفحہ",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "پچھلہ",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "",
|
|
5
|
+
"Next": "Кейинги",
|
|
6
|
+
"Page": "Sahifa",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Oldingi",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "{{page}} саҳифаси",
|
|
5
|
+
"Next": "Кейинги",
|
|
6
|
+
"Page": "Саҳифа",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Олдинги",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "{{page}} sahifasi",
|
|
5
|
+
"Next": "Кейинги",
|
|
6
|
+
"Page": "Sahifa",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Oldingi",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "Trang {{page}}",
|
|
5
|
+
"Next": "Sau",
|
|
6
|
+
"Page": "Trang",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "Trước",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "第 {{page}} 页,共 {{pageCount}},第 {{firstItem}}-{{lastItem}} 条,共 {{total}} 条",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "页面 {{page}},条目 {{firstItem}}-{{lastItem}}",
|
|
4
|
+
"Page {{page}}": "页 {{page}}",
|
|
5
|
+
"Next": "下一个",
|
|
6
|
+
"Page": "页",
|
|
7
|
+
"Items per page": "条每页",
|
|
8
|
+
"Previous": "前一",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": "您在第 {{page}} 页显示项目 {{firstItem}}-{{lastItem}},但有 {{pageCount}} 个页面和 {{total}} 个项目"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Page {{page}} of {{pageCount}}, items {{firstItem}}-{{lastItem}} of {{total}}": "",
|
|
3
|
+
"Page {{page}}, items {{firstItem}}-{{lastItem}}": "",
|
|
4
|
+
"Page {{page}}": "第{{page}}页",
|
|
5
|
+
"Next": "下一个",
|
|
6
|
+
"Page": "页",
|
|
7
|
+
"Items per page": "",
|
|
8
|
+
"Previous": "前一",
|
|
9
|
+
"You are at page {{page}} showing items {{firstItem}}-{{lastItem}}, but there are {{pageCount}} pages and {{total}} items": ""
|
|
10
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { spacers } from '@dhis2/ui-constants'
|
|
2
|
+
import { IconChevronLeft16, IconChevronRight16 } from '@dhis2/ui-icons'
|
|
3
|
+
import { Button } from '@dhis2-ui/button'
|
|
4
|
+
import PropTypes from 'prop-types'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
|
|
7
|
+
const translate = (prop, interpolationObject) => {
|
|
8
|
+
if (typeof prop === 'function') {
|
|
9
|
+
return prop(interpolationObject)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return prop
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const PageControls = ({
|
|
16
|
+
dataTest,
|
|
17
|
+
isNextDisabled,
|
|
18
|
+
isPreviousDisabled,
|
|
19
|
+
nextPageText,
|
|
20
|
+
page,
|
|
21
|
+
previousPageText,
|
|
22
|
+
onClick,
|
|
23
|
+
}) => (
|
|
24
|
+
<div data-test={`${dataTest}-pagecontrols`}>
|
|
25
|
+
<Button
|
|
26
|
+
secondary
|
|
27
|
+
className="button-previous"
|
|
28
|
+
small
|
|
29
|
+
disabled={isPreviousDisabled}
|
|
30
|
+
onClick={() => onClick(page - 1)}
|
|
31
|
+
dataTest={`${dataTest}-page-previous`}
|
|
32
|
+
>
|
|
33
|
+
<div className="navigator-icon">
|
|
34
|
+
<IconChevronLeft16 />
|
|
35
|
+
</div>
|
|
36
|
+
{translate(previousPageText)}
|
|
37
|
+
</Button>
|
|
38
|
+
<Button
|
|
39
|
+
secondary
|
|
40
|
+
className="button-next"
|
|
41
|
+
small
|
|
42
|
+
disabled={isNextDisabled}
|
|
43
|
+
onClick={() => onClick(page + 1)}
|
|
44
|
+
dataTest={`${dataTest}-page-next`}
|
|
45
|
+
>
|
|
46
|
+
{translate(nextPageText)}
|
|
47
|
+
<div className="navigator-icon">
|
|
48
|
+
<IconChevronRight16 />
|
|
49
|
+
</div>
|
|
50
|
+
</Button>
|
|
51
|
+
<style jsx>{`
|
|
52
|
+
div {
|
|
53
|
+
display: flex;
|
|
54
|
+
}
|
|
55
|
+
div :global(.button-previous) {
|
|
56
|
+
height: 32px;
|
|
57
|
+
padding-inline-start: 0;
|
|
58
|
+
}
|
|
59
|
+
div :global(.button-next) {
|
|
60
|
+
height: 32px;
|
|
61
|
+
padding-inline-end: 0;
|
|
62
|
+
margin-inline-start: ${spacers.dp4};
|
|
63
|
+
}
|
|
64
|
+
div .navigator-icon:dir(rtl) {
|
|
65
|
+
transform: rotate(180deg);
|
|
66
|
+
}
|
|
67
|
+
`}</style>
|
|
68
|
+
</div>
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
PageControls.propTypes = {
|
|
72
|
+
dataTest: PropTypes.string.isRequired,
|
|
73
|
+
nextPageText: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
|
|
74
|
+
.isRequired,
|
|
75
|
+
page: PropTypes.number.isRequired,
|
|
76
|
+
previousPageText: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
|
|
77
|
+
.isRequired,
|
|
78
|
+
onClick: PropTypes.func.isRequired,
|
|
79
|
+
isNextDisabled: PropTypes.bool,
|
|
80
|
+
isPreviousDisabled: PropTypes.bool,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { PageControls }
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { spacers } from '@dhis2/ui-constants'
|
|
2
|
+
import { SingleSelect, SingleSelectOption } from '@dhis2-ui/select'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
|
|
6
|
+
// TODO: i18n translate
|
|
7
|
+
const translate = (prop, interpolationObject) => {
|
|
8
|
+
if (typeof prop === 'function') {
|
|
9
|
+
return prop(interpolationObject)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return prop
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const createAvailablePages = (length) =>
|
|
16
|
+
Array.from({ length }, (_x, i) => (i + 1).toString())
|
|
17
|
+
|
|
18
|
+
const PageSelect = ({
|
|
19
|
+
dataTest,
|
|
20
|
+
disabled,
|
|
21
|
+
pageSelectText,
|
|
22
|
+
onChange,
|
|
23
|
+
page,
|
|
24
|
+
pageCount,
|
|
25
|
+
}) => (
|
|
26
|
+
<div data-test={`${dataTest}-gotopage`}>
|
|
27
|
+
<SingleSelect
|
|
28
|
+
dense
|
|
29
|
+
disabled={disabled}
|
|
30
|
+
selected={page.toString()}
|
|
31
|
+
onChange={({ selected }) => onChange(parseInt(selected, 10))}
|
|
32
|
+
className="select"
|
|
33
|
+
dataTest={`${dataTest}-page-select`}
|
|
34
|
+
prefix={translate(pageSelectText)}
|
|
35
|
+
>
|
|
36
|
+
{createAvailablePages(pageCount).map((availablePage) => (
|
|
37
|
+
<SingleSelectOption
|
|
38
|
+
key={availablePage}
|
|
39
|
+
value={availablePage}
|
|
40
|
+
label={availablePage}
|
|
41
|
+
/>
|
|
42
|
+
))}
|
|
43
|
+
</SingleSelect>
|
|
44
|
+
<style jsx>{`
|
|
45
|
+
div {
|
|
46
|
+
margin-inline-end: ${spacers.dp12};
|
|
47
|
+
}
|
|
48
|
+
`}</style>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
PageSelect.propTypes = {
|
|
53
|
+
dataTest: PropTypes.string.isRequired,
|
|
54
|
+
page: PropTypes.number.isRequired,
|
|
55
|
+
pageCount: PropTypes.number.isRequired,
|
|
56
|
+
pageSelectText: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
|
|
57
|
+
.isRequired,
|
|
58
|
+
onChange: PropTypes.func.isRequired,
|
|
59
|
+
disabled: PropTypes.bool,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { PageSelect, createAvailablePages }
|