@datagouv/components-next 0.0.7 → 0.0.9
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/README.md +34 -14
- package/assets/json/vector.json +2377 -0
- package/assets/main.css +3 -0
- package/assets/swagger-themes/newspaper.css +1669 -0
- package/assets/tailwind.config.js +1 -1
- package/dist/JsonPreview.client-BIz1_EiB.js +92 -0
- package/dist/MapContainer.client-ZDwr4Q_I.js +78276 -0
- package/dist/PdfPreview.client-BTTMM27i.js +112 -0
- package/dist/Pmtiles.client-4kOoUQcR.js +22377 -0
- package/dist/Swagger.client-Q7a5wb51.js +4 -0
- package/dist/XmlPreview.client-BYIIkDqf.js +84 -0
- package/dist/components-next.css +52 -1
- package/dist/components-next.js +42 -41
- package/dist/components.css +1 -1
- package/dist/main-CLUk9Jj7.js +105843 -0
- package/dist/pdf-vue3-BZh6kzke.js +273 -0
- package/dist/pdf.min-f72cfa08-DAetWL3M.js +9501 -0
- package/dist/{text-clamp.esm-DurZFOvT.js → text-clamp.esm-DP59tec5.js} +1 -1
- package/dist/vue3-json-viewer-DIQzFF6K.js +1089 -0
- package/dist/vue3-xml-viewer.common-BmKw6vER.js +5437 -0
- package/package.json +7 -5
- package/src/components/AvatarWithName.vue +6 -2
- package/src/components/BannerAction.vue +1 -1
- package/src/components/BrandedButton.vue +13 -8
- package/src/components/CopyButton.vue +7 -7
- package/src/components/DataserviceCard.vue +54 -23
- package/src/components/DatasetCard.vue +36 -24
- package/src/components/DatasetInformationPanel.vue +19 -18
- package/src/components/DatasetQuality.vue +21 -18
- package/src/components/DatasetQualityInline.vue +1 -1
- package/src/components/DatasetQualityItem.vue +3 -3
- package/src/components/DatasetQualityItemWarning.vue +2 -2
- package/src/components/DatasetQualityScore.vue +2 -2
- package/src/components/DatasetQualityTooltipContent.vue +29 -29
- package/src/components/DescriptionDetails.vue +2 -2
- package/src/components/ExtraAccordion.vue +10 -7
- package/src/components/OrganizationCard.vue +9 -4
- package/src/components/OrganizationNameWithCertificate.vue +25 -11
- package/src/components/Pagination.vue +26 -15
- package/src/components/ReadMore.vue +2 -2
- package/src/components/ResourceAccordion/DataStructure.vue +2 -2
- package/src/components/ResourceAccordion/EditButton.vue +10 -6
- package/src/components/ResourceAccordion/JsonPreview.client.vue +153 -0
- package/src/components/ResourceAccordion/MapContainer.client.vue +137 -0
- package/src/components/ResourceAccordion/Metadata.vue +33 -54
- package/src/components/ResourceAccordion/PdfPreview.client.vue +189 -0
- package/src/components/ResourceAccordion/Pmtiles.client.vue +166 -0
- package/src/components/ResourceAccordion/Preview.vue +39 -37
- package/src/components/ResourceAccordion/ResourceAccordion.vue +141 -63
- package/src/components/ResourceAccordion/ResourceIcon.vue +7 -1
- package/src/components/ResourceAccordion/SchemaBadge.vue +26 -26
- package/src/components/ResourceAccordion/{Swagger.vue → Swagger.client.vue} +1 -1
- package/src/components/ResourceAccordion/XmlPreview.client.vue +143 -0
- package/src/components/ReuseCard.vue +10 -7
- package/src/components/ReuseDetails.vue +3 -3
- package/src/components/SimpleBanner.vue +7 -4
- package/src/components/SmallChart.vue +23 -9
- package/src/components/StatBox.vue +92 -10
- package/src/config.ts +6 -2
- package/src/functions/api.ts +18 -18
- package/src/functions/dates.ts +81 -74
- package/src/functions/helpers.ts +5 -4
- package/src/functions/organizations.ts +5 -5
- package/src/functions/resources.ts +34 -5
- package/src/functions/schemas.ts +4 -3
- package/src/functions/tabularApi.ts +1 -1
- package/src/main.ts +10 -11
- package/src/types/badges.ts +3 -3
- package/src/types/contact_point.ts +5 -5
- package/src/types/dataservices.ts +16 -2
- package/src/types/datasets.ts +20 -2
- package/src/types/frequency.ts +5 -5
- package/src/types/granularity.ts +12 -4
- package/src/types/harvest.ts +2 -2
- package/src/types/licenses.ts +8 -8
- package/src/types/organizations.ts +6 -0
- package/src/types/resources.ts +3 -3
- package/src/types/reuses.ts +3 -1
- package/src/types/site.ts +8 -0
- package/src/types/ui.ts +2 -2
- package/src/types/users.ts +24 -8
- package/src/types/vue3-xml-viewer.d.ts +10 -0
- package/dist/Swagger-DjysB-OI.js +0 -67851
- package/dist/en-DCRve7vN.js +0 -613
- package/dist/fr-DCOnbL-p.js +0 -613
- package/dist/locales/de.js +0 -155
- package/dist/locales/en.js +0 -155
- package/dist/locales/es.js +0 -155
- package/dist/locales/fr.js +0 -155
- package/dist/locales/it.js +0 -155
- package/dist/locales/pt.js +0 -155
- package/dist/locales/sr.js +0 -155
- package/dist/main-CPW2vNLE.js +0 -32008
- package/src/components/DescriptionList/DescriptionDetails.stories.ts +0 -43
- package/src/components/DescriptionList/DescriptionList.stories.ts +0 -47
- package/src/components/DescriptionList/DescriptionTerm.stories.ts +0 -28
- package/src/locales/de.json +0 -154
- package/src/locales/en.json +0 -154
- package/src/locales/es.json +0 -154
- package/src/locales/fr.json +0 -154
- package/src/locales/it.json +0 -154
- package/src/locales/pt.json +0 -154
- package/src/locales/sr.json +0 -154
|
@@ -1,52 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<Toggletip
|
|
4
|
-
|
|
2
|
+
<div class="flex items-center">
|
|
3
|
+
<Toggletip
|
|
4
|
+
class="-ml-2 mt-px"
|
|
5
|
+
size="2xs"
|
|
6
|
+
>
|
|
7
|
+
{{ $t('Qualité des métadonnées:') }}
|
|
5
8
|
<template #toggletip>
|
|
6
9
|
<DatasetQualityTooltipContent :quality />
|
|
7
10
|
</template>
|
|
8
11
|
</Toggletip>
|
|
9
|
-
<
|
|
10
|
-
{{ $t('
|
|
11
|
-
</
|
|
12
|
+
<div class="text-sm text-gray-plain font-bold">
|
|
13
|
+
{{ $t('Qualité des métadonnées:') }}
|
|
14
|
+
</div>
|
|
12
15
|
</div>
|
|
13
16
|
<DatasetQualityScore
|
|
14
17
|
:score="quality.score"
|
|
15
|
-
class="w-
|
|
18
|
+
class="w-full"
|
|
16
19
|
/>
|
|
17
|
-
<template v-if="
|
|
20
|
+
<template v-if="!hideWarnings">
|
|
18
21
|
<ul class="list-none pl-0">
|
|
19
22
|
<DatasetQualityItemWarning
|
|
20
23
|
:quality-item="quality.dataset_description_quality"
|
|
21
|
-
:message="$t('
|
|
24
|
+
:message="$t('Description des données non renseignée')"
|
|
22
25
|
/>
|
|
23
26
|
<DatasetQualityItemWarning
|
|
24
27
|
:quality-item="quality.resources_documentation"
|
|
25
|
-
:message="$t('
|
|
28
|
+
:message="$t('Documentation des fichiers manquante')"
|
|
26
29
|
/>
|
|
27
30
|
<DatasetQualityItemWarning
|
|
28
31
|
:quality-item="quality.license"
|
|
29
|
-
:message="$t('
|
|
32
|
+
:message="$t('Licence non renseignée')"
|
|
30
33
|
/>
|
|
31
34
|
<DatasetQualityItemWarning
|
|
32
35
|
:quality-item="quality.update_frequency && quality.update_fulfilled_in_time"
|
|
33
|
-
:message="quality.update_frequency ? $t('
|
|
36
|
+
:message="quality.update_frequency ? $t('Fréquence de mise à jour non respectée') : $t('Fréquence de mise à jour non renseignée')"
|
|
34
37
|
/>
|
|
35
38
|
<DatasetQualityItemWarning
|
|
36
39
|
:quality-item="quality.has_open_format"
|
|
37
|
-
:message="$t('
|
|
40
|
+
:message="$t('Formats de fichiers non standards')"
|
|
38
41
|
/>
|
|
39
42
|
<DatasetQualityItemWarning
|
|
40
43
|
:quality-item="quality.temporal_coverage"
|
|
41
|
-
:message="$t('
|
|
44
|
+
:message="$t('Couverture temporelle non renseignée')"
|
|
42
45
|
/>
|
|
43
46
|
<DatasetQualityItemWarning
|
|
44
47
|
:quality-item="quality.spatial"
|
|
45
|
-
:message="$t('
|
|
48
|
+
:message="$t('Couverture spatiale non renseignée')"
|
|
46
49
|
/>
|
|
47
50
|
<DatasetQualityItemWarning
|
|
48
51
|
:quality-item="quality.all_resources_available"
|
|
49
|
-
:message="$t('
|
|
52
|
+
:message="$t('Certains fichiers ne sont pas disponibles')"
|
|
50
53
|
/>
|
|
51
54
|
</ul>
|
|
52
55
|
</template>
|
|
@@ -61,8 +64,8 @@ import DatasetQualityTooltipContent from './DatasetQualityTooltipContent.vue'
|
|
|
61
64
|
|
|
62
65
|
withDefaults(defineProps<{
|
|
63
66
|
quality: Quality
|
|
64
|
-
|
|
67
|
+
hideWarnings?: boolean
|
|
65
68
|
}>(), {
|
|
66
|
-
|
|
69
|
+
hideWarnings: true,
|
|
67
70
|
})
|
|
68
71
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<li>
|
|
3
3
|
<p
|
|
4
4
|
v-if="passed"
|
|
5
|
-
class="fr-my-0"
|
|
5
|
+
class="fr-my-0 text-sm"
|
|
6
6
|
>
|
|
7
7
|
<span
|
|
8
8
|
class="fr-icon-check-line"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</p>
|
|
13
13
|
<p
|
|
14
14
|
v-else
|
|
15
|
-
class="my-0 text-gray-medium"
|
|
15
|
+
class="my-0 text-gray-medium text-sm"
|
|
16
16
|
>
|
|
17
17
|
<span
|
|
18
18
|
class="fr-icon-warning-line"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<script setup lang="ts">
|
|
27
27
|
defineProps<{
|
|
28
|
-
passed
|
|
28
|
+
passed?: boolean | null
|
|
29
29
|
messagePassed: string
|
|
30
30
|
messageFailed: string
|
|
31
31
|
}>()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li
|
|
3
3
|
v-if="!qualityItem"
|
|
4
|
-
class="text-warning-dark flex flex-wrap items-center
|
|
4
|
+
class="text-warning-dark flex flex-wrap items-center"
|
|
5
5
|
>
|
|
6
|
-
<p class="
|
|
6
|
+
<p class="!m-0 text-sm">
|
|
7
7
|
<span
|
|
8
8
|
class="fr-icon-warning-line fr-icon--sm"
|
|
9
9
|
aria-hidden="true"
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<h5 class="
|
|
3
|
-
{{ t("
|
|
2
|
+
<h5 class="text-sm text-gray-plain font-bold">
|
|
3
|
+
{{ t("Qualité des métadonnées:") }}
|
|
4
4
|
</h5>
|
|
5
|
-
<ul class="list-none pl-0">
|
|
5
|
+
<ul class="list-none pl-0 space-y-2">
|
|
6
6
|
<DatasetQualityItem
|
|
7
7
|
:passed="quality.dataset_description_quality"
|
|
8
|
-
:message-passed="t('
|
|
9
|
-
:message-failed="t('
|
|
10
|
-
class="
|
|
8
|
+
:message-passed="t('Description des données renseignée')"
|
|
9
|
+
:message-failed="t('Description des données non renseignée')"
|
|
10
|
+
class="pb-0"
|
|
11
11
|
/>
|
|
12
12
|
<DatasetQualityItem
|
|
13
13
|
:passed="quality.resources_documentation"
|
|
14
|
-
:message-passed="t('
|
|
15
|
-
:message-failed="t('
|
|
16
|
-
class="
|
|
14
|
+
:message-passed="t('Fichiers documentés')"
|
|
15
|
+
:message-failed="t('Documentation des fichiers manquante')"
|
|
16
|
+
class="pb-0"
|
|
17
17
|
/>
|
|
18
18
|
<DatasetQualityItem
|
|
19
19
|
:passed="quality.license"
|
|
20
|
-
:message-passed="t('
|
|
21
|
-
:message-failed="t('
|
|
22
|
-
class="
|
|
20
|
+
:message-passed="t('Licence renseignée')"
|
|
21
|
+
:message-failed="t('Licence non renseignée')"
|
|
22
|
+
class="pb-0"
|
|
23
23
|
/>
|
|
24
24
|
<DatasetQualityItem
|
|
25
25
|
:passed="quality.update_frequency && !!quality.update_fulfilled_in_time"
|
|
26
|
-
:message-passed="t('
|
|
27
|
-
:message-failed="quality.update_frequency ? t('
|
|
28
|
-
class="
|
|
26
|
+
:message-passed="t('Fréquence de mise à jour respectée')"
|
|
27
|
+
:message-failed="quality.update_frequency ? t('Fréquence de mise à jour non respectée') : t('Fréquence de mise à jour non renseignée')"
|
|
28
|
+
class="pb-0"
|
|
29
29
|
/>
|
|
30
30
|
<DatasetQualityItem
|
|
31
31
|
:passed="quality.has_open_format"
|
|
32
|
-
:message-passed="t('
|
|
33
|
-
:message-failed="t('
|
|
34
|
-
class="
|
|
32
|
+
:message-passed="t('Formats de fichiers standards')"
|
|
33
|
+
:message-failed="t('Formats de fichiers non standards')"
|
|
34
|
+
class="pb-0"
|
|
35
35
|
/>
|
|
36
36
|
<DatasetQualityItem
|
|
37
37
|
:passed="quality.temporal_coverage"
|
|
38
|
-
:message-passed="t('
|
|
39
|
-
:message-failed="t('
|
|
40
|
-
class="
|
|
38
|
+
:message-passed="t('Couverture temporelle renseignée')"
|
|
39
|
+
:message-failed="t('Couverture temporelle non renseignée')"
|
|
40
|
+
class="pb-0"
|
|
41
41
|
/>
|
|
42
42
|
<DatasetQualityItem
|
|
43
43
|
:passed="quality.spatial"
|
|
44
|
-
:message-passed="t('
|
|
45
|
-
:message-failed="t('
|
|
46
|
-
class="
|
|
44
|
+
:message-passed="t('Couverture spatiale renseignée')"
|
|
45
|
+
:message-failed="t('Couverture spatiale non renseignée')"
|
|
46
|
+
class="pb-0"
|
|
47
47
|
/>
|
|
48
48
|
<DatasetQualityItem
|
|
49
49
|
:passed="quality.all_resources_available"
|
|
50
|
-
:message-passed="t('
|
|
51
|
-
:message-failed="t('
|
|
52
|
-
class="
|
|
50
|
+
:message-passed="t('Tous les fichiers sont disponibles')"
|
|
51
|
+
:message-failed="t('Certains fichiers ne sont pas disponibles')"
|
|
52
|
+
class="pb-0"
|
|
53
53
|
/>
|
|
54
54
|
</ul>
|
|
55
55
|
<div class="fr-grid-row fr-grid-row--right not-enlarged">
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
:href="config.datasetQualityGuideUrl"
|
|
58
58
|
target="_blank"
|
|
59
59
|
rel="noopener"
|
|
60
|
-
:title="t('
|
|
60
|
+
:title="t('En savoir plus sur cet indicateur - ouvre une nouvelle fenêtre')"
|
|
61
61
|
>
|
|
62
|
-
{{ t("
|
|
62
|
+
{{ t("En savoir plus sur cet indicateur") }}
|
|
63
63
|
</a>
|
|
64
64
|
</div>
|
|
65
65
|
</template>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dd
|
|
3
|
-
class="text-sm
|
|
3
|
+
class="text-sm pl-0 mb-4 text-gray-medium h-8 flex flex-wrap items-center"
|
|
4
4
|
>
|
|
5
5
|
<div
|
|
6
6
|
v-if="withEllipsis"
|
|
7
|
-
class="
|
|
7
|
+
class="truncate"
|
|
8
8
|
>
|
|
9
9
|
<slot />
|
|
10
10
|
</div>
|
|
@@ -14,19 +14,22 @@
|
|
|
14
14
|
{{ titleText }}
|
|
15
15
|
</component>
|
|
16
16
|
</div>
|
|
17
|
-
<div class="fr-col-auto">
|
|
17
|
+
<div class="fr-col-auto space-x-4">
|
|
18
|
+
<slot name="buttons" />
|
|
18
19
|
<DisclosureButton
|
|
19
20
|
:as="BrandedButton"
|
|
20
21
|
color="secondary-softer"
|
|
21
22
|
keep-margins-even-without-borders
|
|
22
23
|
:icon="open ? RiArrowUpSLine : RiArrowDownSLine"
|
|
23
24
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
{{ buttonText }}
|
|
26
|
+
|
|
27
|
+
<span
|
|
28
|
+
v-if="open"
|
|
29
|
+
class="sr-only"
|
|
30
|
+
>
|
|
31
|
+
{{ $t('Fermer les détails') }}
|
|
32
|
+
</span>
|
|
30
33
|
</DisclosureButton>
|
|
31
34
|
</div>
|
|
32
35
|
</header>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="border border-gray-default relative fr-enlarge-link">
|
|
2
|
+
<div class="border border-gray-default bg-white relative fr-enlarge-link">
|
|
3
3
|
<div class="h-[4.5rem] pt-4 px-4 bg-blue-lighter" />
|
|
4
4
|
<div class="px-4 pb-4 pt-5 mt-2">
|
|
5
5
|
<div class="inline-flex border border-gray-default p-1.5 absolute top-4 left-4 bg-white">
|
|
@@ -12,14 +12,15 @@
|
|
|
12
12
|
>
|
|
13
13
|
</div>
|
|
14
14
|
<p class="mb-0.5 font-bold">
|
|
15
|
-
<
|
|
15
|
+
<AppLink
|
|
16
16
|
:to="`/organizations/${organization.slug}`"
|
|
17
|
+
class="overflow-hidden"
|
|
17
18
|
>
|
|
18
19
|
<OrganizationNameWithCertificate
|
|
19
20
|
:show-type="false"
|
|
20
21
|
:organization
|
|
21
22
|
/>
|
|
22
|
-
</
|
|
23
|
+
</AppLink>
|
|
23
24
|
</p>
|
|
24
25
|
<div class="mb-2 flex flex-wrap items-center">
|
|
25
26
|
<OwnerType
|
|
@@ -28,7 +29,10 @@
|
|
|
28
29
|
:type
|
|
29
30
|
/>
|
|
30
31
|
<div>
|
|
31
|
-
<div
|
|
32
|
+
<div
|
|
33
|
+
v-if="organization.metrics"
|
|
34
|
+
class="text-gray-medium flex items-center text-sm gap-0.5"
|
|
35
|
+
>
|
|
32
36
|
<RiDatabase2Line class="size-4 -mt-1" /> {{ organization.metrics.datasets }}
|
|
33
37
|
<RiTerminalLine class="size-4 -mt-1 ml-1" /> {{ organization.metrics.dataservices }}
|
|
34
38
|
<RiLineChartLine class="size-4 -mt-1 ml-1" /> {{ organization.metrics.reuses }}
|
|
@@ -54,6 +58,7 @@ import { getOrganizationType } from '../functions/organizations'
|
|
|
54
58
|
import type { Organization } from '../types/organizations'
|
|
55
59
|
import OwnerType from './OwnerType.vue'
|
|
56
60
|
import OrganizationNameWithCertificate from './OrganizationNameWithCertificate.vue'
|
|
61
|
+
import AppLink from './AppLink.vue'
|
|
57
62
|
|
|
58
63
|
const props = defineProps<{
|
|
59
64
|
organization: Organization
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex gap-1 items-center
|
|
2
|
+
<div class="min-w-0 flex gap-1 items-center">
|
|
3
3
|
<OwnerTypeIcon
|
|
4
4
|
v-if="showType"
|
|
5
5
|
:type="getOrganizationType(organization)"
|
|
@@ -9,17 +9,29 @@
|
|
|
9
9
|
:class="{ 'text-sm': size === 'sm' }"
|
|
10
10
|
>
|
|
11
11
|
{{ organization.name }}
|
|
12
|
+
<small
|
|
13
|
+
v-if="organization.acronym && showAcronym"
|
|
14
|
+
class="text-xs text-gray-title font-extrabold align-super"
|
|
15
|
+
>
|
|
16
|
+
{{ organization.acronym }}
|
|
17
|
+
</small>
|
|
12
18
|
</div>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
<Tooltip v-if="isOrganizationCertified(organization)">
|
|
20
|
+
<RiCheckboxCircleLine
|
|
21
|
+
class="flex-none"
|
|
22
|
+
:class="{
|
|
23
|
+
'size-4': size === 'sm',
|
|
24
|
+
'size-5': size === 'base',
|
|
25
|
+
}"
|
|
26
|
+
:aria-label="t(`L'identité de ce service public est certifiée par {certifier}`, { certifier: config.name })"
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
/>
|
|
29
|
+
<template #tooltip>
|
|
30
|
+
<p class="text-sm font-normal mb-0">
|
|
31
|
+
{{ t(`L'identité de ce service public est certifiée par {certifier}`, { certifier: config.name }) }}
|
|
32
|
+
</p>
|
|
33
|
+
</template>
|
|
34
|
+
</Tooltip>
|
|
23
35
|
</div>
|
|
24
36
|
</template>
|
|
25
37
|
|
|
@@ -36,9 +48,11 @@ const config = useComponentsConfig()
|
|
|
36
48
|
const { t } = useI18n()
|
|
37
49
|
withDefaults(defineProps<{
|
|
38
50
|
organization: Organization
|
|
51
|
+
showAcronym?: boolean
|
|
39
52
|
showType?: boolean
|
|
40
53
|
size?: 'base' | 'sm'
|
|
41
54
|
}>(), {
|
|
55
|
+
showAcronym: false,
|
|
42
56
|
showType: true,
|
|
43
57
|
size: 'base',
|
|
44
58
|
})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav
|
|
3
3
|
v-if="totalResults > pageSize"
|
|
4
|
+
ref="navRef"
|
|
4
5
|
role="navigation"
|
|
5
6
|
class="fr-pagination fr-pagination--centered"
|
|
6
7
|
:aria-label="t('Pagination')"
|
|
@@ -11,9 +12,9 @@
|
|
|
11
12
|
:href="getHref(1)"
|
|
12
13
|
class="fr-pagination__link fr-pagination__link--first"
|
|
13
14
|
data-testid="first-page"
|
|
14
|
-
@click.prevent="onClick(1)"
|
|
15
|
+
@click.prevent.stop="onClick(1)"
|
|
15
16
|
>
|
|
16
|
-
{{ t('
|
|
17
|
+
{{ t('Première page') }}
|
|
17
18
|
</a>
|
|
18
19
|
</li>
|
|
19
20
|
<li>
|
|
@@ -21,9 +22,9 @@
|
|
|
21
22
|
:href="getHref(page - 1)"
|
|
22
23
|
class="fr-pagination__link fr-pagination__link--prev fr-pagination__link--lg-label"
|
|
23
24
|
data-testid="previous-page"
|
|
24
|
-
@click.prevent="previousPage"
|
|
25
|
+
@click.prevent.stop="previousPage"
|
|
25
26
|
>
|
|
26
|
-
{{ t('
|
|
27
|
+
{{ t('Page précédente') }}
|
|
27
28
|
</a>
|
|
28
29
|
</li>
|
|
29
30
|
<li>
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
:class="{ 'fr-hidden fr-unhidden-sm': page > 1 }"
|
|
35
36
|
:title="t('Page {nb}', { nb: 1 })"
|
|
36
37
|
:data-testid="1"
|
|
37
|
-
@click.prevent="onClick(1)"
|
|
38
|
+
@click.prevent.stop="onClick(1)"
|
|
38
39
|
>
|
|
39
40
|
1
|
|
40
41
|
</a>
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
:href="getHref(index)"
|
|
52
53
|
:title="t('Page {nb}', { nb: index })"
|
|
53
54
|
:data-testid="index"
|
|
54
|
-
@click.prevent="onClick(index)"
|
|
55
|
+
@click.prevent.stop="onClick(index)"
|
|
55
56
|
>
|
|
56
57
|
{{ index }}
|
|
57
58
|
</a>
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
:href="getHref(pageCount)"
|
|
70
71
|
:title="t('Page {nb}', { nb: pageCount })"
|
|
71
72
|
:data-testid="pageCount"
|
|
72
|
-
@click.prevent="onClick(pageCount)"
|
|
73
|
+
@click.prevent.stop="onClick(pageCount)"
|
|
73
74
|
>
|
|
74
75
|
{{ pageCount }}
|
|
75
76
|
</a>
|
|
@@ -79,9 +80,9 @@
|
|
|
79
80
|
class="fr-pagination__link fr-pagination__link--next fr-pagination__link--lg-label"
|
|
80
81
|
:href="getHref(page + 1)"
|
|
81
82
|
data-testid="next-page"
|
|
82
|
-
@click.prevent="nextPage"
|
|
83
|
+
@click.prevent.stop="nextPage"
|
|
83
84
|
>
|
|
84
|
-
{{ t('
|
|
85
|
+
{{ t('Page suivante') }}
|
|
85
86
|
</a>
|
|
86
87
|
</li>
|
|
87
88
|
<li>
|
|
@@ -89,9 +90,9 @@
|
|
|
89
90
|
class="fr-pagination__link fr-pagination__link--last"
|
|
90
91
|
:href="getHref(pageCount)"
|
|
91
92
|
data-testid="last-page"
|
|
92
|
-
@click.prevent="onClick(pageCount)"
|
|
93
|
+
@click.prevent.stop="onClick(pageCount)"
|
|
93
94
|
>
|
|
94
|
-
{{ t('
|
|
95
|
+
{{ t('Dernière page') }}
|
|
95
96
|
</a>
|
|
96
97
|
</li>
|
|
97
98
|
</ul>
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
</template>
|
|
100
101
|
|
|
101
102
|
<script setup lang="ts">
|
|
102
|
-
import { computed } from 'vue'
|
|
103
|
+
import { computed, useTemplateRef } from 'vue'
|
|
103
104
|
import { useI18n } from 'vue-i18n'
|
|
104
105
|
|
|
105
106
|
type Props = {
|
|
@@ -176,23 +177,33 @@ const { t } = useI18n()
|
|
|
176
177
|
const pageCount = computed(() => Math.ceil(props.totalResults / props.pageSize))
|
|
177
178
|
const visiblePages = computed(() => getVisiblePages(props.page, pageCount.value))
|
|
178
179
|
|
|
180
|
+
const nav = useTemplateRef('navRef')
|
|
181
|
+
function change(index: number) {
|
|
182
|
+
emit('change', index)
|
|
183
|
+
|
|
184
|
+
if (!nav.value || !nav.value.parentElement) return
|
|
185
|
+
|
|
186
|
+
nav.value.parentElement.style.scrollMarginTop = '100px'
|
|
187
|
+
nav.value.parentElement.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
188
|
+
}
|
|
189
|
+
|
|
179
190
|
function onClick(index: number) {
|
|
180
191
|
if (index !== props.page) {
|
|
181
|
-
|
|
192
|
+
change(index)
|
|
182
193
|
}
|
|
183
194
|
}
|
|
184
195
|
|
|
185
196
|
function nextPage() {
|
|
186
197
|
const index = props.page + 1
|
|
187
198
|
if (index <= pageCount.value) {
|
|
188
|
-
|
|
199
|
+
change(index)
|
|
189
200
|
}
|
|
190
201
|
}
|
|
191
202
|
|
|
192
203
|
function previousPage() {
|
|
193
204
|
const index = props.page - 1
|
|
194
205
|
if (index > 0) {
|
|
195
|
-
|
|
206
|
+
change(index)
|
|
196
207
|
}
|
|
197
208
|
}
|
|
198
209
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
class="fr-icon-warning-line"
|
|
9
9
|
aria-hidden="true"
|
|
10
10
|
/>
|
|
11
|
-
{{ $t("
|
|
11
|
+
{{ $t("La structure de données de ce fichier n'a pas pu être chargée.") }}
|
|
12
12
|
</p>
|
|
13
13
|
</div>
|
|
14
14
|
<PreviewLoader v-else-if="loading" />
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
class="fr-icon-warning-line"
|
|
26
26
|
aria-hidden="true"
|
|
27
27
|
/>
|
|
28
|
-
{{ $t("
|
|
28
|
+
{{ $t("Aucune structure de données détectée pour ce fichier.") }}
|
|
29
29
|
</p>
|
|
30
30
|
</div>
|
|
31
31
|
<template v-if="hasColumnInfo">
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
color="warning"
|
|
7
7
|
data-testid="edit-button"
|
|
8
8
|
>
|
|
9
|
-
{{ t("
|
|
9
|
+
{{ t("Éditer le fichier") }}
|
|
10
10
|
</BrandedButton>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import { useI18n } from 'vue-i18n'
|
|
15
15
|
import { RiPencilLine } from '@remixicon/vue'
|
|
16
|
-
import {
|
|
16
|
+
import { computed } from 'vue'
|
|
17
17
|
import BrandedButton from '../BrandedButton.vue'
|
|
18
18
|
|
|
19
19
|
type Props = {
|
|
@@ -26,9 +26,13 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
26
26
|
isCommunityResource: false,
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
-
const config = useComponentsConfig()
|
|
30
|
-
|
|
31
29
|
const { t } = useI18n()
|
|
32
|
-
|
|
33
|
-
const adminUrl =
|
|
30
|
+
|
|
31
|
+
const adminUrl = computed(() => {
|
|
32
|
+
if (props.isCommunityResource) {
|
|
33
|
+
return `/admin/site/community-resources/?resource_id=${props.resourceId}`
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return `/admin/datasets/${props.datasetId}/files/?resource_id=${props.resourceId}`
|
|
37
|
+
})
|
|
34
38
|
</script>
|