@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,84 @@
|
|
|
1
|
+
import { defineComponent as b, defineAsyncComponent as L, ref as u, computed as w, onMounted as T, createElementBlock as f, openBlock as r, createBlock as m, createCommentVNode as P, createVNode as i, unref as t, toDisplayString as c, withCtx as h, createElementVNode as d } from "vue";
|
|
2
|
+
import { d as E, u as M, a as v, F as g } from "./main-DFEQrdg5.js";
|
|
3
|
+
const q = { class: "fr-text--xs" }, B = { key: 0 }, S = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "text-gray-medium"
|
|
6
|
+
}, F = /* @__PURE__ */ b({
|
|
7
|
+
__name: "XmlPreview.client",
|
|
8
|
+
props: {
|
|
9
|
+
resource: {}
|
|
10
|
+
},
|
|
11
|
+
setup(k) {
|
|
12
|
+
const z = L(
|
|
13
|
+
() => import("./vue3-xml-viewer.common-RC76oYFu.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
|
|
14
|
+
), s = k, x = E(), { t: l } = M(), a = u(null), p = u(!1), n = u(null), y = u(!1), _ = w(() => {
|
|
15
|
+
if (s.resource.filesize)
|
|
16
|
+
return s.resource.filesize;
|
|
17
|
+
const e = s.resource.extras?.["analysis:content-length"];
|
|
18
|
+
return e && typeof e == "number" ? e : null;
|
|
19
|
+
}), X = w(() => {
|
|
20
|
+
const e = _.value;
|
|
21
|
+
if (!e || !x.maxXmlPreviewCharSize)
|
|
22
|
+
return !1;
|
|
23
|
+
const o = x.maxXmlPreviewCharSize;
|
|
24
|
+
return e <= o;
|
|
25
|
+
}), C = async () => {
|
|
26
|
+
if (!X.value) {
|
|
27
|
+
y.value = !0;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
p.value = !0, n.value = null;
|
|
31
|
+
try {
|
|
32
|
+
const e = await fetch(s.resource.url);
|
|
33
|
+
if (!e.ok)
|
|
34
|
+
throw new Error(`HTTP error! status: ${e.status}`);
|
|
35
|
+
const o = await e.text();
|
|
36
|
+
a.value = o;
|
|
37
|
+
} catch (e) {
|
|
38
|
+
console.error("Error loading XML:", e), e instanceof TypeError ? n.value = "network" : n.value = "generic", a.value = null;
|
|
39
|
+
} finally {
|
|
40
|
+
p.value = !1;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return T(() => {
|
|
44
|
+
C();
|
|
45
|
+
}), (e, o) => (r(), f("div", q, [
|
|
46
|
+
a.value ? (r(), f("div", B, [
|
|
47
|
+
i(t(z), { xml: a.value }, null, 8, ["xml"])
|
|
48
|
+
])) : p.value ? (r(), f("div", S, c(t(l)("Chargement de l'aperçu XML...")), 1)) : y.value ? (r(), m(v, {
|
|
49
|
+
key: 2,
|
|
50
|
+
type: "warning",
|
|
51
|
+
class: "flex items-center space-x-2"
|
|
52
|
+
}, {
|
|
53
|
+
default: h(() => [
|
|
54
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
55
|
+
d("span", null, c(_.value ? t(l)("Fichier XML 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(l)("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)
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
})) : n.value === "network" ? (r(), m(v, {
|
|
59
|
+
key: 3,
|
|
60
|
+
type: "warning",
|
|
61
|
+
class: "flex items-center space-x-2"
|
|
62
|
+
}, {
|
|
63
|
+
default: h(() => [
|
|
64
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
65
|
+
d("span", null, c(t(l)("Ce fichier XML 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)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
})) : n.value ? (r(), m(v, {
|
|
69
|
+
key: 4,
|
|
70
|
+
type: "warning",
|
|
71
|
+
class: "flex items-center space-x-2"
|
|
72
|
+
}, {
|
|
73
|
+
default: h(() => [
|
|
74
|
+
i(t(g), { class: "shink-0 size-6" }),
|
|
75
|
+
d("span", null, c(t(l)("Erreur lors du chargement de l'aperçu XML.")), 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
})) : P("", !0)
|
|
79
|
+
]));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
F as default
|
|
84
|
+
};
|