@datagouv/components-next 0.0.8 → 0.0.10

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 (103) hide show
  1. package/README.md +34 -14
  2. package/assets/json/vector.json +2377 -0
  3. package/assets/main.css +3 -0
  4. package/assets/swagger-themes/newspaper.css +1669 -0
  5. package/assets/tailwind.config.js +1 -1
  6. package/dist/JsonPreview.client-DFSq3qMS.js +92 -0
  7. package/dist/MapContainer.client-CCHOsGLk.js +78314 -0
  8. package/dist/PdfPreview.client-Ce-Rk3ui.js +112 -0
  9. package/dist/Pmtiles.client-pBRpsEs7.js +22377 -0
  10. package/dist/Swagger.client-CfS91EWS.js +4 -0
  11. package/dist/XmlPreview.client-D62Apole.js +84 -0
  12. package/dist/components-next.css +52 -1
  13. package/dist/components-next.js +42 -41
  14. package/dist/components.css +1 -1
  15. package/dist/main-CRrqrPkO.js +105745 -0
  16. package/dist/pdf-vue3-D9uzcuC5.js +273 -0
  17. package/dist/pdf.min-f72cfa08-DAetWL3M.js +9501 -0
  18. package/dist/{text-clamp.esm-DurZFOvT.js → text-clamp.esm-CmCeJwgZ.js} +1 -1
  19. package/dist/vue3-json-viewer-B8azJ68d.js +1089 -0
  20. package/dist/vue3-xml-viewer.common-CIro0ncJ.js +5430 -0
  21. package/package.json +10 -8
  22. package/src/components/AvatarWithName.vue +6 -2
  23. package/src/components/BannerAction.vue +1 -1
  24. package/src/components/BrandedButton.vue +13 -8
  25. package/src/components/CopyButton.vue +7 -7
  26. package/src/components/DataserviceCard.vue +54 -23
  27. package/src/components/DatasetCard.vue +36 -24
  28. package/src/components/DatasetInformationPanel.vue +19 -18
  29. package/src/components/DatasetQuality.vue +21 -18
  30. package/src/components/DatasetQualityInline.vue +1 -1
  31. package/src/components/DatasetQualityItem.vue +3 -3
  32. package/src/components/DatasetQualityItemWarning.vue +2 -2
  33. package/src/components/DatasetQualityScore.vue +2 -2
  34. package/src/components/DatasetQualityTooltipContent.vue +29 -29
  35. package/src/components/DescriptionDetails.vue +2 -2
  36. package/src/components/ExtraAccordion.vue +10 -7
  37. package/src/components/OrganizationCard.vue +9 -4
  38. package/src/components/OrganizationNameWithCertificate.vue +25 -11
  39. package/src/components/Pagination.vue +26 -15
  40. package/src/components/ReadMore.vue +2 -2
  41. package/src/components/ResourceAccordion/DataStructure.vue +2 -2
  42. package/src/components/ResourceAccordion/EditButton.vue +10 -6
  43. package/src/components/ResourceAccordion/JsonPreview.client.vue +153 -0
  44. package/src/components/ResourceAccordion/MapContainer.client.vue +137 -0
  45. package/src/components/ResourceAccordion/Metadata.vue +33 -54
  46. package/src/components/ResourceAccordion/PdfPreview.client.vue +189 -0
  47. package/src/components/ResourceAccordion/Pmtiles.client.vue +166 -0
  48. package/src/components/ResourceAccordion/Preview.vue +39 -37
  49. package/src/components/ResourceAccordion/ResourceAccordion.vue +141 -63
  50. package/src/components/ResourceAccordion/ResourceIcon.vue +7 -1
  51. package/src/components/ResourceAccordion/SchemaBadge.vue +26 -26
  52. package/src/components/ResourceAccordion/{Swagger.vue → Swagger.client.vue} +1 -1
  53. package/src/components/ResourceAccordion/XmlPreview.client.vue +143 -0
  54. package/src/components/ReuseCard.vue +10 -7
  55. package/src/components/ReuseDetails.vue +3 -3
  56. package/src/components/SimpleBanner.vue +7 -4
  57. package/src/components/SmallChart.vue +23 -9
  58. package/src/components/StatBox.vue +92 -10
  59. package/src/config.ts +6 -2
  60. package/src/functions/api.ts +18 -18
  61. package/src/functions/dates.ts +81 -74
  62. package/src/functions/helpers.ts +5 -4
  63. package/src/functions/organizations.ts +5 -5
  64. package/src/functions/resources.ts +34 -5
  65. package/src/functions/schemas.ts +4 -3
  66. package/src/functions/tabularApi.ts +1 -1
  67. package/src/main.ts +10 -11
  68. package/src/types/badges.ts +3 -3
  69. package/src/types/contact_point.ts +5 -5
  70. package/src/types/dataservices.ts +16 -2
  71. package/src/types/datasets.ts +20 -2
  72. package/src/types/frequency.ts +5 -5
  73. package/src/types/granularity.ts +12 -4
  74. package/src/types/harvest.ts +2 -2
  75. package/src/types/licenses.ts +8 -8
  76. package/src/types/organizations.ts +6 -0
  77. package/src/types/resources.ts +3 -3
  78. package/src/types/reuses.ts +3 -1
  79. package/src/types/site.ts +8 -0
  80. package/src/types/ui.ts +2 -2
  81. package/src/types/users.ts +24 -8
  82. package/src/types/vue3-xml-viewer.d.ts +10 -0
  83. package/dist/Swagger-DjysB-OI.js +0 -67851
  84. package/dist/en-DCRve7vN.js +0 -613
  85. package/dist/fr-DCOnbL-p.js +0 -613
  86. package/dist/locales/de.js +0 -155
  87. package/dist/locales/en.js +0 -155
  88. package/dist/locales/es.js +0 -155
  89. package/dist/locales/fr.js +0 -155
  90. package/dist/locales/it.js +0 -155
  91. package/dist/locales/pt.js +0 -155
  92. package/dist/locales/sr.js +0 -155
  93. package/dist/main-CPW2vNLE.js +0 -32008
  94. package/src/components/DescriptionList/DescriptionDetails.stories.ts +0 -43
  95. package/src/components/DescriptionList/DescriptionList.stories.ts +0 -47
  96. package/src/components/DescriptionList/DescriptionTerm.stories.ts +0 -28
  97. package/src/locales/de.json +0 -154
  98. package/src/locales/en.json +0 -154
  99. package/src/locales/es.json +0 -154
  100. package/src/locales/fr.json +0 -154
  101. package/src/locales/it.json +0 -154
  102. package/src/locales/pt.json +0 -154
  103. package/src/locales/sr.json +0 -154
@@ -12,7 +12,7 @@ export default {
12
12
  ],
13
13
  theme: {
14
14
  extend: {
15
- typography: (theme) => ({
15
+ typography: theme => ({
16
16
  neutral: {
17
17
  css: {
18
18
  '--tw-prose-bullets': theme('colors.neutral[800]'),
@@ -0,0 +1,92 @@
1
+ import { d as b, x as S, r as l, c as x, e as C, b as p, f as t, m as f, y as N, q as o, u, C as P, t as i, p as d, g as h, F as m, s as g } from "./main-CRrqrPkO.js";
2
+ const T = { class: "fr-text--xs" }, $ = { key: 0 }, q = {
3
+ key: 1,
4
+ class: "text-gray-medium"
5
+ }, E = /* @__PURE__ */ b({
6
+ __name: "JsonPreview.client",
7
+ props: {
8
+ resource: {}
9
+ },
10
+ setup(k) {
11
+ const z = P(
12
+ () => import("./vue3-json-viewer-B8azJ68d.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
13
+ ), r = k, v = S(), a = l(null), c = l(!1), n = l(null), y = l(!1), w = x(() => {
14
+ var s;
15
+ if (r.resource.filesize)
16
+ return r.resource.filesize;
17
+ const e = (s = r.resource.extras) == null ? void 0 : s["analysis:content-length"];
18
+ return e && typeof e == "number" ? e : null;
19
+ }), J = x(() => {
20
+ const e = w.value;
21
+ if (!e || !v.maxJsonPreviewSize)
22
+ return !1;
23
+ const s = v.maxJsonPreviewSize;
24
+ return e <= s;
25
+ }), _ = async () => {
26
+ if (!J.value) {
27
+ y.value = !0;
28
+ return;
29
+ }
30
+ c.value = !0, n.value = null;
31
+ try {
32
+ const e = await fetch(r.resource.url);
33
+ if (!e.ok)
34
+ throw new Error(`HTTP error! status: ${e.status}`);
35
+ const s = await e.json();
36
+ a.value = s;
37
+ } catch (e) {
38
+ console.error("Error loading JSON:", e), e instanceof TypeError ? n.value = "network" : n.value = "generic", a.value = null;
39
+ } finally {
40
+ c.value = !1;
41
+ }
42
+ };
43
+ return C(() => {
44
+ _();
45
+ }), (e, s) => (t(), p("div", T, [
46
+ a.value ? (t(), p("div", $, [
47
+ o(u(z), {
48
+ value: a.value,
49
+ boxed: "",
50
+ sort: "",
51
+ theme: "light",
52
+ "max-depth": 3,
53
+ "expand-depth": 2,
54
+ "indent-width": 2
55
+ }, null, 8, ["value"])
56
+ ])) : c.value ? (t(), p("div", q, i(e.$t("Chargement de l'aperçu JSON...")), 1)) : y.value ? (t(), f(g, {
57
+ key: 2,
58
+ type: "warning",
59
+ class: "flex items-center space-x-2"
60
+ }, {
61
+ default: d(() => [
62
+ o(u(m), { class: "shink-0 size-6" }),
63
+ h("span", null, i(w.value ? e.$t("Fichier JSON trop volumineux pour l'aperçu. Pour consulter le fichier complet, téléchargez-le en cliquant sur le bouton bleu ou depuis l'onglet Téléchargements.") : e.$t("L'aperçu n'est pas disponible car la taille du fichier est inconnue. Pour consulter le fichier complet, téléchargez-le en cliquant sur le bouton bleu ou depuis l'onglet Téléchargements.")), 1)
64
+ ]),
65
+ _: 1
66
+ })) : n.value === "network" ? (t(), f(g, {
67
+ key: 3,
68
+ type: "warning",
69
+ class: "flex items-center space-x-2"
70
+ }, {
71
+ default: d(() => [
72
+ o(u(m), { class: "shink-0 size-6" }),
73
+ h("span", null, i(e.$t("Ce fichier JSON ne peut pas être prévisualisé, peut-être parce qu'il est hébergé sur un autre site qui ne l'autorise pas. Pour le consulter, téléchargez-le en cliquant sur le bouton bleu ou depuis l'onglet Téléchargements.")), 1)
74
+ ]),
75
+ _: 1
76
+ })) : n.value ? (t(), f(g, {
77
+ key: 4,
78
+ type: "warning",
79
+ class: "flex items-center space-x-2"
80
+ }, {
81
+ default: d(() => [
82
+ o(u(m), { class: "shink-0 size-6" }),
83
+ h("span", null, i(e.$t("Erreur lors du chargement de l'aperçu JSON.")), 1)
84
+ ]),
85
+ _: 1
86
+ })) : N("", !0)
87
+ ]));
88
+ }
89
+ });
90
+ export {
91
+ E as default
92
+ };