@datagouv/components-next 1.0.2-dev.7 → 1.0.2-dev.70
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/assets/main.css +4 -0
- package/dist/Datafair.client-BzW-ctDf.js +30 -0
- package/dist/JsonPreview.client-BfMSzR07.js +40 -0
- package/dist/{MapContainer.client-DRkAmdOc.js → MapContainer.client-CLs-im9i.js} +35 -38
- package/dist/{PdfPreview.client-C-w6-w44.js → PdfPreview.client-C13PQCU_.js} +822 -865
- package/dist/{Pmtiles.client-BR7_ldHY.js → Pmtiles.client-CL7PXXDl.js} +574 -579
- package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-C6XnsZ-7.js +61 -0
- package/dist/XmlPreview.client-KaENrbbG.js +34 -0
- package/dist/components-next.css +3 -3
- package/dist/components-next.js +166 -148
- package/dist/components.css +1 -1
- package/dist/{index-SrYZwgCT.js → index-C7WVVGgD.js} +1 -1
- package/dist/{main-B2kXxWRG.js → main-K-42Oe8-.js} +91315 -75834
- package/dist/{vue3-xml-viewer.common-BRxsqI9j.js → vue3-xml-viewer.common-sHPSE-jD.js} +1 -1
- package/package.json +16 -10
- package/src/components/ActivityList/ActivityList.vue +0 -2
- package/src/components/Chart/ChartViewer.vue +226 -0
- package/src/components/Chart/ChartViewerWrapper.vue +170 -0
- package/src/components/Form/Listbox.vue +101 -0
- package/src/components/Form/SearchableSelect.vue +2 -1
- package/src/components/InfiniteLoader.vue +53 -0
- package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
- package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
- package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
- package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
- package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
- package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
- package/src/components/OpenApiViewer/openapi.ts +150 -0
- package/src/components/OrganizationNameWithCertificate.vue +3 -2
- package/src/components/Pagination.vue +8 -5
- package/src/components/ReadMore.vue +1 -1
- package/src/components/ResourceAccordion/Datafair.client.vue +4 -10
- package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -121
- package/src/components/ResourceAccordion/MapContainer.client.vue +7 -11
- package/src/components/ResourceAccordion/Metadata.vue +1 -2
- package/src/components/ResourceAccordion/PdfPreview.client.vue +24 -103
- package/src/components/ResourceAccordion/Pmtiles.client.vue +5 -10
- package/src/components/ResourceAccordion/Preview.vue +16 -21
- package/src/components/ResourceAccordion/PreviewLoader.vue +1 -2
- package/src/components/ResourceAccordion/PreviewUnavailable.vue +22 -0
- package/src/components/ResourceAccordion/PreviewWrapper.vue +82 -0
- package/src/components/ResourceAccordion/ResourceAccordion.vue +5 -7
- package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -115
- package/src/components/ResourceExplorer/ResourceExplorer.vue +81 -13
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +2 -2
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +30 -11
- package/src/components/Search/GlobalSearch.vue +173 -108
- package/src/components/Search/SearchInput.vue +3 -3
- package/src/components/TabularExplorer/TabularCell.vue +51 -0
- package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
- package/src/components/TabularExplorer/TabularExplorer.vue +870 -0
- package/src/components/TabularExplorer/TabularFilterContent.vue +351 -0
- package/src/components/TabularExplorer/TabularFilterPopover.vue +111 -0
- package/src/components/TabularExplorer/types.ts +83 -0
- package/src/composables/useHasTabularData.ts +6 -0
- package/src/composables/useResourceCapabilities.ts +1 -1
- package/src/composables/useSearchFilter.ts +118 -0
- package/src/composables/useStableQueryParams.ts +31 -3
- package/src/config.ts +3 -0
- package/src/functions/api.ts +34 -33
- package/src/functions/api.types.ts +1 -0
- package/src/functions/charts.ts +68 -0
- package/src/functions/datasets.ts +0 -17
- package/src/functions/resources.ts +56 -1
- package/src/functions/tabular.ts +60 -0
- package/src/functions/tabularApi.ts +138 -11
- package/src/main.ts +55 -7
- package/src/types/dataservices.ts +2 -0
- package/src/types/pages.ts +0 -5
- package/src/types/posts.ts +2 -2
- package/src/types/reports.ts +3 -0
- package/src/types/search.ts +52 -1
- package/src/types/site.ts +5 -3
- package/src/types/users.ts +0 -1
- package/src/types/visualizations.ts +89 -0
- package/assets/swagger-themes/newspaper.css +0 -1670
- package/dist/Datafair.client-E5D6ePRC.js +0 -35
- package/dist/JsonPreview.client-C-6eBbPw.js +0 -87
- package/dist/Swagger.client-D4-F6yEf.js +0 -4
- package/dist/XmlPreview.client-Dl2VCgXF.js +0 -79
- package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
- package/src/functions/pagination.ts +0 -9
- /package/assets/illustrations/{_microscope.svg → microscope.svg} +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, computed as a, createElementBlock as o, openBlock as t, createBlock as p, createElementVNode as i, withCtx as m, createVNode as _, unref as c, toDisplayString as x } from "vue";
|
|
2
|
-
import { a as h, _ as v, F as g } from "./main-B2kXxWRG.js";
|
|
3
|
-
const k = { class: "fr-text--xs" }, b = { key: 0 }, y = ["src"], B = /* @__PURE__ */ f({
|
|
4
|
-
__name: "Datafair.client",
|
|
5
|
-
props: {
|
|
6
|
-
resource: {},
|
|
7
|
-
dataset: {}
|
|
8
|
-
},
|
|
9
|
-
setup(d) {
|
|
10
|
-
const e = d, { t: l } = h(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), u = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${u.value}`);
|
|
11
|
-
return (D, E) => (t(), o("div", k, [
|
|
12
|
-
n.value ? (t(), o("div", b, [
|
|
13
|
-
i("iframe", {
|
|
14
|
-
src: n.value,
|
|
15
|
-
width: "100%",
|
|
16
|
-
height: "500px",
|
|
17
|
-
style: { "background-color": "transparent", border: "none" }
|
|
18
|
-
}, null, 8, y)
|
|
19
|
-
])) : (t(), p(v, {
|
|
20
|
-
key: 1,
|
|
21
|
-
type: "warning",
|
|
22
|
-
class: "flex items-center space-x-2"
|
|
23
|
-
}, {
|
|
24
|
-
default: m(() => [
|
|
25
|
-
_(c(g), { class: "shrink-0 size-6" }),
|
|
26
|
-
i("span", null, x(c(l)("Erreur lors de l'affichage de l'aperçu.")), 1)
|
|
27
|
-
]),
|
|
28
|
-
_: 1
|
|
29
|
-
}))
|
|
30
|
-
]));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
B as default
|
|
35
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, defineAsyncComponent as b, ref as o, computed as w, onMounted as N, createElementBlock as p, openBlock as r, createBlock as f, createCommentVNode as T, createVNode as u, unref as t, toDisplayString as i, withCtx as d, createElementVNode as h } from "vue";
|
|
2
|
-
import { u as P, a as E, g as q, _ as m, F as v } from "./main-B2kXxWRG.js";
|
|
3
|
-
const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "text-gray-medium"
|
|
6
|
-
}, L = /* @__PURE__ */ S({
|
|
7
|
-
__name: "JsonPreview.client",
|
|
8
|
-
props: {
|
|
9
|
-
resource: {}
|
|
10
|
-
},
|
|
11
|
-
setup(k) {
|
|
12
|
-
const z = b(
|
|
13
|
-
() => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
|
|
14
|
-
), g = k, x = P(), { t: s } = E(), l = o(null), c = o(!1), n = o(null), _ = o(!1), y = w(() => q(g.resource)), J = w(() => {
|
|
15
|
-
const e = y.value;
|
|
16
|
-
if (!e || !x.maxJsonPreviewCharSize)
|
|
17
|
-
return !1;
|
|
18
|
-
const a = x.maxJsonPreviewCharSize;
|
|
19
|
-
return e <= a;
|
|
20
|
-
}), C = async () => {
|
|
21
|
-
if (!J.value) {
|
|
22
|
-
_.value = !0;
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
c.value = !0, n.value = null;
|
|
26
|
-
try {
|
|
27
|
-
const e = await fetch(g.resource.url);
|
|
28
|
-
if (!e.ok)
|
|
29
|
-
throw new Error(`HTTP error! status: ${e.status}`);
|
|
30
|
-
const a = await e.json();
|
|
31
|
-
l.value = a;
|
|
32
|
-
} catch (e) {
|
|
33
|
-
console.error("Error loading JSON:", e), e instanceof TypeError ? n.value = "network" : n.value = "generic", l.value = null;
|
|
34
|
-
} finally {
|
|
35
|
-
c.value = !1;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return N(() => {
|
|
39
|
-
C();
|
|
40
|
-
}), (e, a) => (r(), p("div", B, [
|
|
41
|
-
l.value ? (r(), p("div", O, [
|
|
42
|
-
u(t(z), {
|
|
43
|
-
value: l.value,
|
|
44
|
-
boxed: "",
|
|
45
|
-
sort: "",
|
|
46
|
-
theme: "light",
|
|
47
|
-
"max-depth": 3,
|
|
48
|
-
"expand-depth": 2,
|
|
49
|
-
"indent-width": 2
|
|
50
|
-
}, null, 8, ["value"])
|
|
51
|
-
])) : c.value ? (r(), p("div", V, i(t(s)("Chargement de l'aperçu JSON...")), 1)) : _.value ? (r(), f(m, {
|
|
52
|
-
key: 2,
|
|
53
|
-
type: "warning",
|
|
54
|
-
class: "flex items-center space-x-2"
|
|
55
|
-
}, {
|
|
56
|
-
default: d(() => [
|
|
57
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
58
|
-
h("span", null, i(y.value ? t(s)("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(s)("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)
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
})) : n.value === "network" ? (r(), f(m, {
|
|
62
|
-
key: 3,
|
|
63
|
-
type: "warning",
|
|
64
|
-
class: "flex items-center space-x-2"
|
|
65
|
-
}, {
|
|
66
|
-
default: d(() => [
|
|
67
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
68
|
-
h("span", null, i(t(s)("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)
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
})) : n.value ? (r(), f(m, {
|
|
72
|
-
key: 4,
|
|
73
|
-
type: "warning",
|
|
74
|
-
class: "flex items-center space-x-2"
|
|
75
|
-
}, {
|
|
76
|
-
default: d(() => [
|
|
77
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
78
|
-
h("span", null, i(t(s)("Erreur lors du chargement de l'aperçu JSON.")), 1)
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
})) : T("", !0)
|
|
82
|
-
]));
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
export {
|
|
86
|
-
L as default
|
|
87
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { defineComponent as b, defineAsyncComponent as L, ref as o, computed as w, onMounted as T, createElementBlock as p, openBlock as r, createBlock as m, createCommentVNode as P, createVNode as u, unref as t, toDisplayString as i, withCtx as f, createElementVNode as d } from "vue";
|
|
2
|
-
import { u as E, a as M, g as q, _ as h, F as v } from "./main-B2kXxWRG.js";
|
|
3
|
-
const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "text-gray-medium"
|
|
6
|
-
}, N = /* @__PURE__ */ b({
|
|
7
|
-
__name: "XmlPreview.client",
|
|
8
|
-
props: {
|
|
9
|
-
resource: {}
|
|
10
|
-
},
|
|
11
|
-
setup(k) {
|
|
12
|
-
const z = L(
|
|
13
|
-
() => import("./vue3-xml-viewer.common-BRxsqI9j.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
|
|
14
|
-
), g = k, x = E(), { t: l } = M(), n = o(null), c = o(!1), s = o(null), _ = o(!1), y = w(() => q(g.resource)), X = w(() => {
|
|
15
|
-
const e = y.value;
|
|
16
|
-
if (!e || !x.maxXmlPreviewCharSize)
|
|
17
|
-
return !1;
|
|
18
|
-
const a = x.maxXmlPreviewCharSize;
|
|
19
|
-
return e <= a;
|
|
20
|
-
}), C = async () => {
|
|
21
|
-
if (!X.value) {
|
|
22
|
-
_.value = !0;
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
c.value = !0, s.value = null;
|
|
26
|
-
try {
|
|
27
|
-
const e = await fetch(g.resource.url);
|
|
28
|
-
if (!e.ok)
|
|
29
|
-
throw new Error(`HTTP error! status: ${e.status}`);
|
|
30
|
-
const a = await e.text();
|
|
31
|
-
n.value = a;
|
|
32
|
-
} catch (e) {
|
|
33
|
-
console.error("Error loading XML:", e), e instanceof TypeError ? s.value = "network" : s.value = "generic", n.value = null;
|
|
34
|
-
} finally {
|
|
35
|
-
c.value = !1;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return T(() => {
|
|
39
|
-
C();
|
|
40
|
-
}), (e, a) => (r(), p("div", B, [
|
|
41
|
-
n.value ? (r(), p("div", S, [
|
|
42
|
-
u(t(z), { xml: n.value }, null, 8, ["xml"])
|
|
43
|
-
])) : c.value ? (r(), p("div", V, i(t(l)("Chargement de l'aperçu XML...")), 1)) : _.value ? (r(), m(h, {
|
|
44
|
-
key: 2,
|
|
45
|
-
type: "warning",
|
|
46
|
-
class: "flex items-center space-x-2"
|
|
47
|
-
}, {
|
|
48
|
-
default: f(() => [
|
|
49
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
50
|
-
d("span", null, i(y.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)
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
})) : s.value === "network" ? (r(), m(h, {
|
|
54
|
-
key: 3,
|
|
55
|
-
type: "warning",
|
|
56
|
-
class: "flex items-center space-x-2"
|
|
57
|
-
}, {
|
|
58
|
-
default: f(() => [
|
|
59
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
60
|
-
d("span", null, i(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)
|
|
61
|
-
]),
|
|
62
|
-
_: 1
|
|
63
|
-
})) : s.value ? (r(), m(h, {
|
|
64
|
-
key: 4,
|
|
65
|
-
type: "warning",
|
|
66
|
-
class: "flex items-center space-x-2"
|
|
67
|
-
}, {
|
|
68
|
-
default: f(() => [
|
|
69
|
-
u(t(v), { class: "shrink-0 size-6" }),
|
|
70
|
-
d("span", null, i(t(l)("Erreur lors du chargement de l'aperçu XML.")), 1)
|
|
71
|
-
]),
|
|
72
|
-
_: 1
|
|
73
|
-
})) : P("", !0)
|
|
74
|
-
]));
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
export {
|
|
78
|
-
N as default
|
|
79
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="swagger-ui" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup lang="ts">
|
|
6
|
-
import { onMounted } from 'vue'
|
|
7
|
-
// @ts-expect-error no types for `swagger-ui-dist`
|
|
8
|
-
import * as SwaggerUiDist from 'swagger-ui-dist'
|
|
9
|
-
import 'swagger-ui-dist/swagger-ui.css'
|
|
10
|
-
import '../../../assets/swagger-themes/newspaper.css'
|
|
11
|
-
|
|
12
|
-
const { SwaggerUIBundle } = SwaggerUiDist
|
|
13
|
-
const props = defineProps<{
|
|
14
|
-
url: string
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
onMounted(async () => {
|
|
18
|
-
SwaggerUIBundle({
|
|
19
|
-
dom_id: '#swagger-ui',
|
|
20
|
-
url: props.url,
|
|
21
|
-
})
|
|
22
|
-
})
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style>
|
|
26
|
-
/** Taken from newsletter theme */
|
|
27
|
-
.swagger-ui .opblock-tag small,
|
|
28
|
-
.swagger-ui .opblock .opblock-summary-description,
|
|
29
|
-
.swagger-ui .opblock-description-wrapper,
|
|
30
|
-
.swagger-ui .opblock-description-wrapper h4,
|
|
31
|
-
.swagger-ui .opblock-title_normal,
|
|
32
|
-
.swagger-ui .opblock-title_normal h4,
|
|
33
|
-
.swagger-ui .opblock-description-wrapper p,
|
|
34
|
-
.swagger-ui .opblock-title_normal p,
|
|
35
|
-
.swagger-ui .responses-inner h4,
|
|
36
|
-
.swagger-ui .responses-inner h5,
|
|
37
|
-
.swagger-ui .response-col_status,
|
|
38
|
-
.swagger-ui .dialog-ux .modal-ux-content p,
|
|
39
|
-
.swagger-ui table thead tr td,
|
|
40
|
-
.swagger-ui table thead tr th,
|
|
41
|
-
.swagger-ui .parameters-col_description p,
|
|
42
|
-
.swagger-ui .info p,
|
|
43
|
-
.swagger-ui .info a,
|
|
44
|
-
.swagger-ui .info .title,
|
|
45
|
-
.swagger-ui .topbar {
|
|
46
|
-
font-family: 'Marianne', Arial, sans-serif !important;
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useRoute } from 'vue-router'
|
|
2
|
-
|
|
3
|
-
export function getLink(page: number): string {
|
|
4
|
-
const route = useRoute()
|
|
5
|
-
const routePath = route.path
|
|
6
|
-
const search = new URLSearchParams(route.query as Record<string, string>)
|
|
7
|
-
search.set('page', page.toFixed(0))
|
|
8
|
-
return `${routePath}?${search.toString()}`
|
|
9
|
-
}
|
|
File without changes
|