diff --git a/CHANGELOG.md b/CHANGELOG.md index d015259..e39c4aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Add sort to exploration preview component [#20](https://github.com/opendatateam/udata-tabular-preview/pull/20) - Fix setuptools version used in CI [#23](https://github.com/opendatateam/udata-tabular-preview/pull/23) +- Add pagination to exploration preview component [#21](https://github.com/opendatateam/udata-tabular-preview/pull/21) ## 3.0.0 (2023-01-18) diff --git a/package-lock.json b/package-lock.json index aa2c30a..c4a9ee2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@etalab/explore.data.gouv.fr": "^1.0.1", - "@etalab/udata-front-plugins-helper": "^1.0.1", + "@etalab/udata-front-plugins-helper": "^1.1.0", "@intlify/unplugin-vue-i18n": "^0.8.0", "@intlify/vite-plugin-vue-i18n": "^6.0.3", "@vitejs/plugin-legacy": "^2.3.1", @@ -83,9 +83,9 @@ "dev": true }, "node_modules/@etalab/udata-front-plugins-helper": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@etalab/udata-front-plugins-helper/-/udata-front-plugins-helper-1.0.1.tgz", - "integrity": "sha512-lSXdjmqk/ULibNJTClgNpFrfnSYlFwmZ+XkzYFbGqFrPuwngxetBqQUGjw1epMF1yJE/qHAj0Z9qxjMiaXxYYQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@etalab/udata-front-plugins-helper/-/udata-front-plugins-helper-1.1.0.tgz", + "integrity": "sha512-TEZlt+DMsTzMVy7a39nkDRK70qGP77a1IagOAqeN9m2IyLSZyEA3SsRFAUPNt8FJWN684N8DoGsn/vIAkUbxwA==", "dev": true }, "node_modules/@intlify/bundle-utils": { @@ -1992,9 +1992,9 @@ "dev": true }, "@etalab/udata-front-plugins-helper": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@etalab/udata-front-plugins-helper/-/udata-front-plugins-helper-1.0.1.tgz", - "integrity": "sha512-lSXdjmqk/ULibNJTClgNpFrfnSYlFwmZ+XkzYFbGqFrPuwngxetBqQUGjw1epMF1yJE/qHAj0Z9qxjMiaXxYYQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@etalab/udata-front-plugins-helper/-/udata-front-plugins-helper-1.1.0.tgz", + "integrity": "sha512-TEZlt+DMsTzMVy7a39nkDRK70qGP77a1IagOAqeN9m2IyLSZyEA3SsRFAUPNt8FJWN684N8DoGsn/vIAkUbxwA==", "dev": true }, "@intlify/bundle-utils": { diff --git a/package.json b/package.json index 2a21f4a..f1833c9 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@etalab/explore.data.gouv.fr": "^1.0.1", - "@etalab/udata-front-plugins-helper": "^1.0.1", + "@etalab/udata-front-plugins-helper": "^1.1.0", "@intlify/unplugin-vue-i18n": "^0.8.0", "@intlify/vite-plugin-vue-i18n": "^6.0.3", "@vitejs/plugin-legacy": "^2.3.1", diff --git a/udata-tabular-preview/explore.vue b/udata-tabular-preview/explore.vue index 840f155..9dd848b 100644 --- a/udata-tabular-preview/explore.vue +++ b/udata-tabular-preview/explore.vue @@ -38,8 +38,16 @@ +
-
{{ $t('{count} columns', columnCount) }} — {{ $t('Showing the first {shown} of {count} rows', {shown: Math.min(tabular_page_size, rowCount), count: rowCount}) }}
+
{{ $t('{count} columns', columnCount) }} — {{ $t('{count} rows', rowCount) }}
{{ $t("Explore data") }} @@ -50,13 +58,14 @@ diff --git a/udata-tabular-preview/locales/en.json b/udata-tabular-preview/locales/en.json index ca2e2fd..82b0e94 100644 --- a/udata-tabular-preview/locales/en.json +++ b/udata-tabular-preview/locales/en.json @@ -1,9 +1,9 @@ { "Preview of {name}": "Preview of {name}", "{count} columns": "{count} columns | {count} column | {count} columns", - "Showing the first {shown} of {count} rows": "No rows in file | Showing the only row | Showing the first {shown} of {count} rows", "Explore data": "Explore data", "The preview of this file failed to load.": "The preview of this file failed to load.", + "{count} rows": "{count} rows | {count} row | {count} rows", "Sort ascending": "Sort ascending", "Sort descending": "Sort descending" } diff --git a/udata-tabular-preview/locales/es.json b/udata-tabular-preview/locales/es.json index 73ff2d5..e3e4d58 100644 --- a/udata-tabular-preview/locales/es.json +++ b/udata-tabular-preview/locales/es.json @@ -1,9 +1,9 @@ { "Preview of {name}": "", "{count} columns": "", - "Showing the first {shown} of {count} rows": "", "Explore data": "", "The preview of this file failed to load.": "", + "{count} rows": "", "Sort ascending": "", "Sort descending": "" -} \ No newline at end of file +} diff --git a/udata-tabular-preview/locales/fr.json b/udata-tabular-preview/locales/fr.json index 47b5fd0..1c376e8 100644 --- a/udata-tabular-preview/locales/fr.json +++ b/udata-tabular-preview/locales/fr.json @@ -1,9 +1,9 @@ { "Preview of {name}": "Prévisualisation de {name}", "{count} columns": "{count} colonnes | {count} colonne | {count} colonnes", - "Showing the first {shown} of {count} rows": "Pas de ligne dans le fichier | Affichage de la seule ligne | Affichage des {shown} premières lignes sur {count}", "Explore data": "Explorer les données", "The preview of this file failed to load.": "La prévisualisation de ce fichier n'a pas pu être chargée.", + "{count} rows": "", "Sort ascending": "", "Sort descending": "" -} \ No newline at end of file +}