@datagouv/components-next 0.0.32 → 0.1.1
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 +5 -15
- package/assets/labels/hvd.svg +15 -0
- package/assets/labels/inspire.svg +20 -0
- package/assets/labels/sl.svg +5 -0
- package/assets/labels/spd.svg +5 -0
- package/assets/labels/sr.svg +5 -0
- package/dist/JsonPreview.client-nkpNPvZb.js +92 -0
- package/dist/{MapContainer.client-Dhfz-YU8.js → MapContainer.client-CrTw-ai8.js} +17587 -6826
- package/dist/{PdfPreview.client--W0FK7CN.js → PdfPreview.client-JpAWf0A2.js} +47 -48
- package/dist/{Pmtiles.client-B6vRTwrm.js → Pmtiles.client-B83l4Ft5.js} +7609 -7503
- package/dist/Swagger.client-D1TfRQjI.js +4 -0
- package/dist/XmlPreview.client-DV8N1S9Y.js +84 -0
- package/dist/components-next.css +6 -6
- package/dist/components-next.js +95 -80
- package/dist/components.css +2 -2
- package/dist/en-CuSmdvir.js +30 -0
- package/dist/hvd-DYeke1vM.js +4 -0
- package/dist/inspire-BLXeJvob.js +4 -0
- package/dist/{main-yWiuApVL.js → main-CN6IuSUA.js} +53400 -55985
- package/dist/{pdf-vue3-Dm2ZCc3P.js → pdf-vue3-IkJO65RH.js} +2 -2
- package/dist/{pdf.min-f72cfa08-DAetWL3M.js → pdf.min-f72cfa08-CdgJTooZ.js} +78 -78
- package/dist/sl-VR8Tb1_u.js +4 -0
- package/dist/spd-BJ-Omhgt.js +4 -0
- package/dist/sr-DjSF-8xW.js +4 -0
- package/dist/{text-clamp.esm-Mb7Qdtu9.js → text-clamp.esm-B5kW_XMt.js} +54 -55
- package/dist/{vue3-json-viewer-B1fiyuLU.js → vue3-json-viewer-BXwup7nO.js} +88 -93
- package/dist/{vue3-xml-viewer.common-1QyofKqS.js → vue3-xml-viewer.common-9hga4rGF.js} +54 -54
- package/package.json +12 -11
- package/src/components/ActivityList/ActivityList.vue +159 -0
- package/src/components/ActivityList/UserActivityList.vue +30 -0
- package/src/components/AppLink.vue +3 -3
- package/src/components/Avatar.vue +1 -0
- package/src/components/DataserviceCard.vue +3 -3
- package/src/components/DatasetCard.vue +19 -18
- package/src/components/DatasetInformationPanel.vue +16 -16
- package/src/components/DatasetLabelTag.vue +40 -0
- package/src/components/DatasetQuality.vue +13 -10
- package/src/components/DatasetQualityInline.vue +5 -2
- package/src/components/DatasetQualityScore.vue +3 -3
- package/src/components/DatasetQualityTooltipContent.vue +2 -2
- package/src/components/DateRangeDetails.vue +7 -3
- package/src/components/ExtraAccordion.vue +3 -1
- package/src/components/OrganizationNameWithCertificate.vue +2 -2
- package/src/components/PaddedContainer.vue +28 -0
- package/src/components/Pagination.vue +2 -2
- package/src/components/Placeholder.vue +1 -1
- package/src/components/ReadMore.vue +17 -17
- package/src/components/ResourceAccordion/DataStructure.vue +8 -3
- package/src/components/ResourceAccordion/EditButton.vue +2 -2
- package/src/components/ResourceAccordion/JsonPreview.client.vue +7 -5
- package/src/components/ResourceAccordion/MapContainer.client.vue +2 -2
- package/src/components/ResourceAccordion/Metadata.vue +10 -10
- package/src/components/ResourceAccordion/PdfPreview.client.vue +7 -5
- package/src/components/ResourceAccordion/Pmtiles.client.vue +3 -3
- package/src/components/ResourceAccordion/Preview.vue +2 -2
- package/src/components/ResourceAccordion/ResourceAccordion.vue +23 -15
- package/src/components/ResourceAccordion/SchemaBadge.vue +4 -4
- package/src/components/ResourceAccordion/XmlPreview.client.vue +7 -5
- package/src/components/ReuseCard.vue +3 -3
- package/src/components/ReuseDetails.vue +2 -2
- package/src/components/SmallChart.vue +33 -30
- package/src/components/StatBox.vue +12 -7
- package/src/components/Toggletip.vue +0 -1
- package/src/components/TranslationT.vue +51 -0
- package/src/composables/useTranslation.ts +169 -0
- package/src/functions/activities.ts +36 -0
- package/src/functions/api.ts +4 -4
- package/src/functions/datasets.ts +28 -0
- package/src/functions/dates.ts +4 -4
- package/src/functions/helpers.ts +3 -3
- package/src/functions/organizations.ts +2 -2
- package/src/functions/pagination.ts +9 -0
- package/src/functions/resources.ts +2 -2
- package/src/functions/reuses.ts +3 -3
- package/src/main.ts +24 -20
- package/src/types/activity.ts +24 -0
- package/src/types/api.ts +8 -0
- package/src/types/badges.ts +4 -0
- package/src/types/dataservices.ts +6 -8
- package/src/types/datasets.ts +6 -1
- package/src/types/site.ts +1 -0
- package/src/types/topics.ts +17 -2
- package/dist/JsonPreview.client-BRhCOHlE.js +0 -93
- package/dist/Swagger.client-ch5H8aT2.js +0 -4
- package/dist/XmlPreview.client-BcbnRWAp.js +0 -85
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ const runtimeConfig = useRuntimeConfig()
|
|
|
36
36
|
app.vueApp.use(datagouv, {
|
|
37
37
|
// These are the same as above…
|
|
38
38
|
name: runtimeConfig.public.title,
|
|
39
|
-
baseUrl: runtimeConfig.public.
|
|
39
|
+
baseUrl: runtimeConfig.public.baseUrl,
|
|
40
40
|
apiBase: runtimeConfig.public.apiBase,
|
|
41
41
|
devApiKey: runtimeConfig.public.devApiKey,
|
|
42
42
|
|
|
@@ -69,21 +69,11 @@ app.vueApp.use(datagouv, {
|
|
|
69
69
|
|
|
70
70
|
### I18n
|
|
71
71
|
|
|
72
|
-
`@datagouv/components` is using
|
|
72
|
+
`@datagouv/components` is using a few custom functions to provide internationalisation:
|
|
73
|
+
- `$t()` inside templates
|
|
74
|
+
- `const { t } = useTranslation()` inside JS
|
|
75
|
+
- `<TranslationT keypath="xxx"></TranslationT>` for putting HTML inside text
|
|
73
76
|
|
|
74
|
-
1. If the user is using Nuxt, it can simply add the locales files in the `nuxt.config.ts`
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
|
-
{
|
|
78
|
-
code: 'fr',
|
|
79
|
-
language: 'fr',
|
|
80
|
-
files: ['fr-FR.json', '../../node_modules/@datagouv/components-next/src/locales/fr.json'],
|
|
81
|
-
},
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Nuxt is responsible for building the JSON file to the correct `vue-i18n` JS format.
|
|
85
|
-
|
|
86
|
-
2. If the user is not using Nuxt, it should provide the i18n object to the `datagouv` Vue plugin. The plugin will then merge the already built messages's files.
|
|
87
77
|
|
|
88
78
|
### `Suspense`
|
|
89
79
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.4847 3H10.4761H1.51532V9H10.4761H10.4847V3Z" fill="#003399"/>
|
|
3
|
+
<path d="M6.08123 3.90656H6.39364L6.14167 4.10279L6.23979 4.41362L5.9894 4.2221L5.739 4.41362L5.83712 4.10279L5.58359 3.90656H5.8952L5.9894 3.60358L6.08123 3.90656Z" fill="#FFED00"/>
|
|
4
|
+
<path d="M6.09225 7.90815H6.40465L6.15348 8.09732L6.25081 8.39638L6.00041 8.21192L5.75002 8.39638L5.84892 8.09732L5.5946 7.90815H5.90622L6.00041 7.61694L6.09225 7.90815Z" fill="#FFED00"/>
|
|
5
|
+
<path d="M7.08206 7.64368H7.39524L7.14328 7.83206L7.2414 8.13112L6.99022 7.94666L6.73983 8.13112L6.83873 7.83206L6.58441 7.64368H6.89603L6.99022 7.35168L7.08206 7.64368Z" fill="#FFED00"/>
|
|
6
|
+
<path d="M7.08206 4.17347H7.39524L7.14328 4.36264L7.2414 4.6617L6.99022 4.47724L6.73983 4.6617L6.83873 4.36264L6.58441 4.17347H6.89603L6.99022 3.88226L7.08206 4.17347Z" fill="#FFED00"/>
|
|
7
|
+
<path d="M7.81752 4.90894H8.12914L7.87796 5.09732L7.97529 5.39638L7.7249 5.21192L7.47451 5.39638L7.57341 5.09732L7.31909 4.90894H7.63071L7.7249 4.61694L7.81752 4.90894Z" fill="#FFED00"/>
|
|
8
|
+
<path d="M7.81752 6.91841H8.12914L7.87796 7.10757L7.97529 7.40663L7.7249 7.22217L7.47451 7.40663L7.57341 7.10757L7.31909 6.91841H7.63071L7.7249 6.6272L7.81752 6.91841Z" fill="#FFED00"/>
|
|
9
|
+
<path d="M8.09225 5.89796H8.40544L8.15347 6.08713L8.25159 6.38619L8.00041 6.20173L7.75002 6.38619L7.84892 6.08713L7.5946 5.89796H7.90622L8.00041 5.60675L8.09225 5.89796Z" fill="#FFED00"/>
|
|
10
|
+
<path d="M5.0726 4.17664H5.38421L5.13304 4.36502L5.23037 4.66408L4.97998 4.47962L4.72958 4.66408L4.82848 4.36502L4.57495 4.17664H4.88578L4.97998 3.88464L5.0726 4.17664Z" fill="#FFED00"/>
|
|
11
|
+
<path d="M4.35754 4.91132H4.67073L4.41876 5.0997L4.51609 5.39876L4.2657 5.2143L4.01531 5.39876L4.11421 5.0997L3.85989 4.91132H4.17151L4.2657 4.61932L4.35754 4.91132Z" fill="#FFED00"/>
|
|
12
|
+
<path d="M4.09226 5.90112H4.40466L4.15348 6.08951L4.25081 6.38857L4.00042 6.20489L3.75003 6.38857L3.84893 6.08951L3.5954 5.90112H3.90623L4.00042 5.60913L4.09226 5.90112Z" fill="#FFED00"/>
|
|
13
|
+
<path d="M4.35754 6.92073H4.67073L4.41876 7.10989L4.51609 7.40895L4.2657 7.22449L4.01531 7.40895L4.11421 7.10989L3.85989 6.92073H4.17151L4.2657 6.62952L4.35754 6.92073Z" fill="#FFED00"/>
|
|
14
|
+
<path d="M5.08282 7.646H5.39444L5.14326 7.83438L5.24059 8.13344L4.9902 7.94898L4.73981 8.13344L4.83871 7.83438L4.58517 7.646H4.89601L4.9902 7.354L5.08282 7.646Z" fill="#FFED00"/>
|
|
15
|
+
</svg>
|