@datagouv/components-next 0.0.31 → 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.
- package/README.md +36 -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-NQ9byxF5.js +92 -0
- package/dist/{MapContainer.client-DXVDyZYz.js → MapContainer.client-D7Y0OXMU.js} +17587 -6826
- package/dist/{PdfPreview.client-XwjUHnmx.js → PdfPreview.client-DU6FbUh0.js} +47 -48
- package/dist/{Pmtiles.client-DfnKDlpg.js → Pmtiles.client-DCOxft6M.js} +7609 -7503
- package/dist/Swagger.client-DTHhEAFT.js +4 -0
- package/dist/XmlPreview.client-BEOCeCP8.js +84 -0
- package/dist/components-next.css +6 -6
- package/dist/components-next.js +96 -68
- 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-Qu3kUOIH.js → main-DFEQrdg5.js} +54440 -56951
- 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-NQY1dx9T.js → vue3-xml-viewer.common-RC76oYFu.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 +17 -17
- package/src/components/DatasetLabelTag.vue +40 -0
- package/src/components/DatasetQuality.vue +13 -11
- package/src/components/DatasetQualityInline.vue +7 -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 +4 -5
- 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 +9 -3
- 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 +2 -2
- package/src/components/ResourceAccordion/Preview.vue +2 -2
- package/src/components/ResourceAccordion/ResourceAccordion.vue +23 -15
- package/src/components/ResourceAccordion/SchemaBadge.vue +6 -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 +6 -6
- package/src/components/Toggletip.vue +15 -20
- package/src/components/TranslationT.vue +51 -0
- package/src/composables/useActiveDescendant.ts +1 -1
- 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 +29 -1
- package/src/functions/dates.ts +4 -4
- package/src/functions/helpers.ts +3 -3
- package/src/functions/organizations.ts +3 -3
- 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 +46 -26
- 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 +3 -1
- package/src/types/site.ts +1 -0
- package/src/types/topics.ts +17 -2
- package/dist/JsonPreview.client-B5cv59th.js +0 -93
- package/dist/Swagger.client-BisHyZkP.js +0 -4
- package/dist/XmlPreview.client-BSjMew4d.js +0 -85
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6 1.46784L1.39758 6L6 10.5322L10.6024 6L6 1.46784Z" fill="#3D939E"/>
|
|
3
|
+
<path d="M4.7116 6.27683C4.7116 6.27683 4.84973 6.52388 4.84973 6.82367C4.84973 6.88196 4.83845 6.92638 4.83845 6.92638C4.6665 6.88752 4.5622 6.82922 4.5622 6.82922L4.59321 6.27405H4.7116V6.27683ZM4.95121 6.94858C4.95967 6.90417 4.96812 6.85976 4.96812 6.82645C4.96812 6.81257 4.96812 6.79869 4.96812 6.77926C5.01604 6.79314 5.07242 6.80146 5.14289 6.80146C5.40787 6.80146 5.58546 6.62659 5.58546 6.40729C5.58546 5.94095 4.57912 6.01312 4.57912 5.3719C4.57912 5.09432 4.8159 4.86115 5.19927 4.86115C5.24437 4.86115 5.31766 4.8667 5.37404 4.86947C5.36558 4.91389 5.35995 4.95275 5.35995 4.98606V5.03325C5.31485 5.02492 5.2641 5.02214 5.23028 5.02214C4.99349 5.02214 4.84691 5.16649 4.84691 5.32749C4.84691 5.74942 5.86735 5.73554 5.86735 6.36288C5.86735 6.69876 5.60237 6.95969 5.17108 6.95969C5.09215 6.95969 5.01604 6.95414 4.95121 6.94581H4.95403L4.95121 6.94858ZM5.47552 4.98883C5.47552 4.93054 5.4868 4.88613 5.4868 4.88613C5.65875 4.91666 5.77432 4.96385 5.77432 4.96385L5.72922 5.50237H5.61083C5.61083 5.50237 5.47552 5.2692 5.47552 4.98606V4.98883Z" fill="white"/>
|
|
4
|
+
<path d="M6.70738 6.93475H6.21971L6.20562 6.83204C6.20562 6.83204 6.29301 6.77375 6.42831 6.74322V5.08326C6.29582 5.05272 6.20562 4.99443 6.20562 4.99443L6.21971 4.89172H6.91598L6.93007 4.99443C6.93007 4.99443 6.84269 5.05272 6.70738 5.08326V6.93475ZM6.82577 6.93475V6.75987H7.37264C7.41774 6.57111 7.53613 6.42399 7.53613 6.42399L7.65453 6.43787L7.62634 6.93475H6.82577Z" fill="white"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M4.505 3H4.50212H1.515V9H4.50212H4.505V3Z" fill="#000091"/>
|
|
3
|
+
<path d="M7.495 3H7.49213H4.505V9H7.49213H7.495V3Z" fill="white"/>
|
|
4
|
+
<path d="M10.485 3H10.4821H7.495V9H10.4821H10.485V3Z" fill="#E1000F"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6 1.46784L1.39758 6L6 10.5322L10.6024 6L6 1.46784Z" fill="#3D939E"/>
|
|
3
|
+
<path d="M4.54524 6.34073C4.54524 6.34073 4.68336 6.58778 4.68336 6.88757C4.68336 6.94587 4.67209 6.99028 4.67209 6.99028C4.50013 6.95142 4.39584 6.89313 4.39584 6.89313L4.42684 6.33796H4.54524V6.34073ZM4.78484 7.01249C4.7933 6.96807 4.80176 6.92366 4.80176 6.89035C4.80176 6.87647 4.80176 6.86259 4.80176 6.84316C4.84968 6.85704 4.90605 6.86537 4.97653 6.86537C5.2415 6.86537 5.41909 6.69049 5.41909 6.4712C5.41909 6.00485 4.41275 6.07703 4.41275 5.43581C4.41275 5.15822 4.64954 4.92505 5.0329 4.92505C5.07801 4.92505 5.1513 4.9306 5.20767 4.93338C5.19922 4.97779 5.19358 5.01665 5.19358 5.04996V5.09715C5.14848 5.08882 5.09774 5.08605 5.06391 5.08605C4.82713 5.08605 4.68054 5.23039 4.68054 5.39139C4.68054 5.81332 5.70098 5.79944 5.70098 6.42678C5.70098 6.76266 5.436 7.02359 5.00472 7.02359C4.92579 7.02359 4.84968 7.01804 4.78484 7.00971H4.78766L4.78484 7.01249ZM5.31197 5.05274C5.31197 4.99445 5.32325 4.95003 5.32325 4.95003C5.4952 4.97779 5.61078 5.02776 5.61078 5.02776L5.56567 5.56627H5.44728C5.44728 5.56627 5.31197 5.3331 5.31197 5.04996V5.05274Z" fill="white"/>
|
|
4
|
+
<path d="M6.54384 6.80706C6.67633 6.83759 6.76653 6.89589 6.76653 6.89589L6.75244 6.99859H6.05617L6.04208 6.89589C6.04208 6.89589 6.12946 6.83759 6.26477 6.80706V5.1471C6.13228 5.11657 6.04208 5.05827 6.04208 5.05827L6.05617 4.95557H6.54384V6.80706ZM6.66223 5.99096H6.80599C7.11889 5.99096 7.28239 5.82996 7.28239 5.55515C7.28239 5.28034 7.11889 5.11657 6.80881 5.11657H6.66223V4.95557H6.80881C7.31057 4.95557 7.57837 5.21927 7.57837 5.55237C7.57837 5.88548 7.31339 6.14918 6.80881 6.14918H6.66223V5.98818V5.99096ZM6.84828 6.26854C6.95539 6.26577 7.04842 6.25189 7.1358 6.22968L7.50508 6.80706C7.63757 6.83759 7.72777 6.89589 7.72777 6.89589L7.71368 6.99859H7.2852L6.8511 6.27132L6.84828 6.26854Z" fill="white"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent as C, defineAsyncComponent as S, ref as u, computed as w, onMounted as N, createElementBlock as f, openBlock as n, createBlock as d, createCommentVNode as T, createVNode as i, unref as t, toDisplayString as c, withCtx as h, createElementVNode as m } from "vue";
|
|
2
|
+
import { d as P, u as E, a as v, F as g } from "./main-DFEQrdg5.js";
|
|
3
|
+
const q = { class: "fr-text--xs" }, B = { key: 0 }, O = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "text-gray-medium"
|
|
6
|
+
}, D = /* @__PURE__ */ C({
|
|
7
|
+
__name: "JsonPreview.client",
|
|
8
|
+
props: {
|
|
9
|
+
resource: {}
|
|
10
|
+
},
|
|
11
|
+
setup(k) {
|
|
12
|
+
const z = S(
|
|
13
|
+
() => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
|
|
14
|
+
), l = k, x = P(), { t: r } = E(), a = u(null), p = u(!1), s = u(null), y = u(!1), _ = w(() => {
|
|
15
|
+
if (l.resource.filesize)
|
|
16
|
+
return l.resource.filesize;
|
|
17
|
+
const e = l.resource.extras?.["analysis:content-length"];
|
|
18
|
+
return e && typeof e == "number" ? e : null;
|
|
19
|
+
}), J = w(() => {
|
|
20
|
+
const e = _.value;
|
|
21
|
+
if (!e || !x.maxJsonPreviewCharSize)
|
|
22
|
+
return !1;
|
|
23
|
+
const o = x.maxJsonPreviewCharSize;
|
|
24
|
+
return e <= o;
|
|
25
|
+
}), b = async () => {
|
|
26
|
+
if (!J.value) {
|
|
27
|
+
y.value = !0;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
p.value = !0, s.value = null;
|
|
31
|
+
try {
|
|
32
|
+
const e = await fetch(l.resource.url);
|
|
33
|
+
if (!e.ok)
|
|
34
|
+
throw new Error(`HTTP error! status: ${e.status}`);
|
|
35
|
+
const o = await e.json();
|
|
36
|
+
a.value = o;
|
|
37
|
+
} catch (e) {
|
|
38
|
+
console.error("Error loading JSON:", e), e instanceof TypeError ? s.value = "network" : s.value = "generic", a.value = null;
|
|
39
|
+
} finally {
|
|
40
|
+
p.value = !1;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return N(() => {
|
|
44
|
+
b();
|
|
45
|
+
}), (e, o) => (n(), f("div", q, [
|
|
46
|
+
a.value ? (n(), f("div", B, [
|
|
47
|
+
i(t(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
|
+
])) : p.value ? (n(), f("div", O, c(t(r)("Chargement de l'aperçu JSON...")), 1)) : y.value ? (n(), d(v, {
|
|
57
|
+
key: 2,
|
|
58
|
+
type: "warning",
|
|
59
|
+
class: "flex items-center space-x-2"
|
|
60
|
+
}, {
|
|
61
|
+
default: h(() => [
|
|
62
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
63
|
+
m("span", null, c(_.value ? t(r)("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.") : t(r)("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
|
+
})) : s.value === "network" ? (n(), d(v, {
|
|
67
|
+
key: 3,
|
|
68
|
+
type: "warning",
|
|
69
|
+
class: "flex items-center space-x-2"
|
|
70
|
+
}, {
|
|
71
|
+
default: h(() => [
|
|
72
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
73
|
+
m("span", null, c(t(r)("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
|
+
})) : s.value ? (n(), d(v, {
|
|
77
|
+
key: 4,
|
|
78
|
+
type: "warning",
|
|
79
|
+
class: "flex items-center space-x-2"
|
|
80
|
+
}, {
|
|
81
|
+
default: h(() => [
|
|
82
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
83
|
+
m("span", null, c(t(r)("Erreur lors du chargement de l'aperçu JSON.")), 1)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
})) : T("", !0)
|
|
87
|
+
]));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
D as default
|
|
92
|
+
};
|