@datagouv/components-next 0.0.32 → 0.1.0

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.
Files changed (85) hide show
  1. package/README.md +5 -15
  2. package/assets/labels/hvd.svg +15 -0
  3. package/assets/labels/inspire.svg +20 -0
  4. package/assets/labels/sl.svg +5 -0
  5. package/assets/labels/spd.svg +5 -0
  6. package/assets/labels/sr.svg +5 -0
  7. package/dist/JsonPreview.client-NQ9byxF5.js +92 -0
  8. package/dist/{MapContainer.client-Dhfz-YU8.js → MapContainer.client-D7Y0OXMU.js} +17587 -6826
  9. package/dist/{PdfPreview.client--W0FK7CN.js → PdfPreview.client-DU6FbUh0.js} +47 -48
  10. package/dist/{Pmtiles.client-B6vRTwrm.js → Pmtiles.client-DCOxft6M.js} +7609 -7503
  11. package/dist/Swagger.client-DTHhEAFT.js +4 -0
  12. package/dist/XmlPreview.client-BEOCeCP8.js +84 -0
  13. package/dist/components-next.css +6 -6
  14. package/dist/components-next.js +95 -80
  15. package/dist/components.css +2 -2
  16. package/dist/en-CuSmdvir.js +30 -0
  17. package/dist/hvd-DYeke1vM.js +4 -0
  18. package/dist/inspire-BLXeJvob.js +4 -0
  19. package/dist/{main-yWiuApVL.js → main-DFEQrdg5.js} +53395 -55984
  20. package/dist/{pdf-vue3-Dm2ZCc3P.js → pdf-vue3-IkJO65RH.js} +2 -2
  21. package/dist/{pdf.min-f72cfa08-DAetWL3M.js → pdf.min-f72cfa08-CdgJTooZ.js} +78 -78
  22. package/dist/sl-VR8Tb1_u.js +4 -0
  23. package/dist/spd-BJ-Omhgt.js +4 -0
  24. package/dist/sr-DjSF-8xW.js +4 -0
  25. package/dist/{text-clamp.esm-Mb7Qdtu9.js → text-clamp.esm-B5kW_XMt.js} +54 -55
  26. package/dist/{vue3-json-viewer-B1fiyuLU.js → vue3-json-viewer-BXwup7nO.js} +88 -93
  27. package/dist/{vue3-xml-viewer.common-1QyofKqS.js → vue3-xml-viewer.common-RC76oYFu.js} +54 -54
  28. package/package.json +12 -11
  29. package/src/components/ActivityList/ActivityList.vue +159 -0
  30. package/src/components/ActivityList/UserActivityList.vue +30 -0
  31. package/src/components/AppLink.vue +3 -3
  32. package/src/components/Avatar.vue +1 -0
  33. package/src/components/DataserviceCard.vue +3 -3
  34. package/src/components/DatasetCard.vue +19 -18
  35. package/src/components/DatasetInformationPanel.vue +16 -16
  36. package/src/components/DatasetLabelTag.vue +40 -0
  37. package/src/components/DatasetQuality.vue +13 -10
  38. package/src/components/DatasetQualityInline.vue +5 -2
  39. package/src/components/DatasetQualityScore.vue +3 -3
  40. package/src/components/DatasetQualityTooltipContent.vue +2 -2
  41. package/src/components/DateRangeDetails.vue +7 -3
  42. package/src/components/ExtraAccordion.vue +3 -1
  43. package/src/components/OrganizationNameWithCertificate.vue +2 -2
  44. package/src/components/PaddedContainer.vue +28 -0
  45. package/src/components/Pagination.vue +2 -2
  46. package/src/components/Placeholder.vue +1 -1
  47. package/src/components/ReadMore.vue +17 -17
  48. package/src/components/ResourceAccordion/DataStructure.vue +8 -3
  49. package/src/components/ResourceAccordion/EditButton.vue +2 -2
  50. package/src/components/ResourceAccordion/JsonPreview.client.vue +7 -5
  51. package/src/components/ResourceAccordion/MapContainer.client.vue +2 -2
  52. package/src/components/ResourceAccordion/Metadata.vue +10 -10
  53. package/src/components/ResourceAccordion/PdfPreview.client.vue +7 -5
  54. package/src/components/ResourceAccordion/Pmtiles.client.vue +2 -2
  55. package/src/components/ResourceAccordion/Preview.vue +2 -2
  56. package/src/components/ResourceAccordion/ResourceAccordion.vue +23 -15
  57. package/src/components/ResourceAccordion/SchemaBadge.vue +4 -4
  58. package/src/components/ResourceAccordion/XmlPreview.client.vue +7 -5
  59. package/src/components/ReuseCard.vue +3 -3
  60. package/src/components/ReuseDetails.vue +2 -2
  61. package/src/components/SmallChart.vue +33 -30
  62. package/src/components/StatBox.vue +6 -6
  63. package/src/components/Toggletip.vue +0 -1
  64. package/src/components/TranslationT.vue +51 -0
  65. package/src/composables/useTranslation.ts +169 -0
  66. package/src/functions/activities.ts +36 -0
  67. package/src/functions/api.ts +4 -4
  68. package/src/functions/datasets.ts +28 -0
  69. package/src/functions/dates.ts +4 -4
  70. package/src/functions/helpers.ts +3 -3
  71. package/src/functions/organizations.ts +2 -2
  72. package/src/functions/pagination.ts +9 -0
  73. package/src/functions/resources.ts +2 -2
  74. package/src/functions/reuses.ts +3 -3
  75. package/src/main.ts +24 -20
  76. package/src/types/activity.ts +24 -0
  77. package/src/types/api.ts +8 -0
  78. package/src/types/badges.ts +4 -0
  79. package/src/types/dataservices.ts +6 -8
  80. package/src/types/datasets.ts +2 -1
  81. package/src/types/site.ts +1 -0
  82. package/src/types/topics.ts +17 -2
  83. package/dist/JsonPreview.client-BRhCOHlE.js +0 -93
  84. package/dist/Swagger.client-ch5H8aT2.js +0 -4
  85. 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.i18n.baseUrl,
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 [`vue-i18n`](https://vue-i18n.intlify.dev/) to provide internationalisation. As always, there are two modes:
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>