@datagouv/components-next 1.0.0 → 1.0.1
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 +0 -28
- package/dist/{Datafair.client-Dls5AHTE.js → Datafair.client-B5lBpOl8.js} +2 -2
- package/dist/{JsonPreview.client-DPDTs433.js → JsonPreview.client-Doz1Z0BS.js} +16 -16
- package/dist/{MapContainer.client-BdAzd7bj.js → MapContainer.client-oiieO8H-.js} +3 -3
- package/dist/PdfPreview.client-CdAhkDFJ.js +14513 -0
- package/dist/{Pmtiles.client-mF6xaOO_.js → Pmtiles.client-B0v8tGJQ.js} +2 -2
- package/dist/Swagger.client-CsK65JnG.js +4 -0
- package/dist/{XmlPreview.client-C0OgBkSq.js → XmlPreview.client-CrjHf74q.js} +15 -15
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +130 -125
- package/dist/components.css +1 -1
- package/dist/{index-BRGqW8aQ.js → index-Bbu9rOHt.js} +1 -1
- package/dist/{main-CNHxAJ8J.js → main-CiH8ZmBI.js} +22114 -21911
- package/dist/{vue3-xml-viewer.common-CmAdQfIy.js → vue3-xml-viewer.common-Bi_bsV6C.js} +1 -1
- package/package.json +2 -2
- package/src/components/DataserviceCard.vue +3 -3
- package/src/components/DatasetCard.vue +2 -2
- package/src/components/DatasetQuality.vue +23 -16
- package/src/components/DatasetQualityInline.vue +13 -17
- package/src/components/DatasetQualityScore.vue +12 -15
- package/src/components/DiscussionMessageCard.vue +1 -1
- package/src/components/ObjectCard.vue +2 -2
- package/src/components/ObjectCardHeader.vue +1 -1
- package/src/components/OrganizationHorizontalCard.vue +87 -0
- package/src/components/OrganizationNameWithCertificate.vue +1 -1
- package/src/components/ProgressBar.vue +31 -0
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/JsonPreview.client.vue +3 -3
- package/src/components/ResourceAccordion/MapContainer.client.vue +1 -1
- package/src/components/ResourceAccordion/PdfPreview.client.vue +70 -74
- package/src/components/ResourceAccordion/Pmtiles.client.vue +1 -1
- package/src/components/ResourceAccordion/Preview.vue +1 -1
- package/src/components/ResourceAccordion/ResourceAccordion.vue +5 -8
- package/src/components/ResourceAccordion/XmlPreview.client.vue +3 -3
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +50 -1
- package/src/components/ReuseHorizontalCard.vue +1 -1
- package/src/components/Search/Filter/ProducerTypeFilter.vue +13 -3
- package/src/components/Search/GlobalSearch.vue +124 -28
- package/src/components/Toggletip.vue +5 -2
- package/src/components/TopicCard.vue +1 -1
- package/src/composables/useHasTabularData.ts +15 -0
- package/src/composables/useResourceCapabilities.ts +18 -5
- package/src/composables/useTranslation.ts +2 -1
- package/src/functions/api.ts +11 -3
- package/src/functions/api.types.ts +1 -1
- package/src/functions/resourceCapabilities.ts +55 -0
- package/src/main.ts +8 -1
- package/src/types/resources.ts +10 -0
- package/src/types/search.ts +29 -1
- package/dist/PdfPreview.client-CopqSDyt.js +0 -107
- package/dist/Swagger.client-eJ7gpfZA.js +0 -4
- package/dist/pdf-vue3-IkJO65RH.js +0 -273
- package/dist/pdf.min-f72cfa08-CdgJTooZ.js +0 -9501
package/assets/main.css
CHANGED
|
@@ -188,34 +188,6 @@
|
|
|
188
188
|
.code {
|
|
189
189
|
@apply p-1! font-mono! bg-gray-lower! text-sm! text-gray-medium! rounded!;
|
|
190
190
|
}
|
|
191
|
-
meter.quality-score {
|
|
192
|
-
background: none;
|
|
193
|
-
border: 1px solid var(--color-gray-default);
|
|
194
|
-
border-radius: 8px;
|
|
195
|
-
height: 10px;
|
|
196
|
-
vertical-align: baseline;
|
|
197
|
-
}
|
|
198
|
-
meter.quality-score::-webkit-meter-bar {
|
|
199
|
-
height: 10px;
|
|
200
|
-
background: whiteSmoke;
|
|
201
|
-
border-radius: 8px;
|
|
202
|
-
}
|
|
203
|
-
meter.quality-score::-moz-meter-bar {
|
|
204
|
-
background: whiteSmoke;
|
|
205
|
-
border-radius: 8px;
|
|
206
|
-
}
|
|
207
|
-
meter.quality-score::-webkit-meter-suboptimum-value {
|
|
208
|
-
background-color: var(--color-gray-low);
|
|
209
|
-
}
|
|
210
|
-
meter.quality-score:-moz-meter-sub-optimum::-moz-meter-bar {
|
|
211
|
-
background-color: var(--color-gray-low);
|
|
212
|
-
}
|
|
213
|
-
meter.quality-score::-webkit-meter-optimum-value {
|
|
214
|
-
background-color: #27A658;
|
|
215
|
-
}
|
|
216
|
-
meter.quality-score:-moz-meter-optimum::-moz-meter-bar {
|
|
217
|
-
background-color: #27A658;
|
|
218
|
-
}
|
|
219
191
|
|
|
220
192
|
/* Vue Sonner Toast custom colors */
|
|
221
193
|
[data-sonner-toast][data-type="success"] {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a as h, _ as v, F as g } from "./main-CiH8ZmBI.js";
|
|
3
3
|
const k = { class: "fr-text--xs" }, b = { key: 0 }, y = ["src"], B = /* @__PURE__ */ f({
|
|
4
4
|
__name: "Datafair.client",
|
|
5
5
|
props: {
|
|
@@ -22,7 +22,7 @@ const k = { class: "fr-text--xs" }, b = { key: 0 }, y = ["src"], B = /* @__PURE_
|
|
|
22
22
|
class: "flex items-center space-x-2"
|
|
23
23
|
}, {
|
|
24
24
|
default: m(() => [
|
|
25
|
-
_(c(g), { class: "
|
|
25
|
+
_(c(g), { class: "shrink-0 size-6" }),
|
|
26
26
|
i("span", null, x(c(l)("Erreur lors de l'affichage de l'aperçu.")), 1)
|
|
27
27
|
]),
|
|
28
28
|
_: 1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as S, defineAsyncComponent as b, ref as o, computed as w, onMounted as N, createElementBlock as p, openBlock as
|
|
2
|
-
import { u as P, a as E, g as q, _ as m, F as v } from "./main-
|
|
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-CiH8ZmBI.js";
|
|
3
3
|
const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-gray-medium"
|
|
@@ -11,7 +11,7 @@ const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
|
11
11
|
setup(k) {
|
|
12
12
|
const z = b(
|
|
13
13
|
() => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
|
|
14
|
-
), g = k, x = P(), { t:
|
|
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
15
|
const e = y.value;
|
|
16
16
|
if (!e || !x.maxJsonPreviewCharSize)
|
|
17
17
|
return !1;
|
|
@@ -22,7 +22,7 @@ const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
|
22
22
|
_.value = !0;
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
c.value = !0,
|
|
25
|
+
c.value = !0, n.value = null;
|
|
26
26
|
try {
|
|
27
27
|
const e = await fetch(g.resource.url);
|
|
28
28
|
if (!e.ok)
|
|
@@ -30,15 +30,15 @@ const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
|
30
30
|
const a = await e.json();
|
|
31
31
|
l.value = a;
|
|
32
32
|
} catch (e) {
|
|
33
|
-
console.error("Error loading JSON:", e), e instanceof TypeError ?
|
|
33
|
+
console.error("Error loading JSON:", e), e instanceof TypeError ? n.value = "network" : n.value = "generic", l.value = null;
|
|
34
34
|
} finally {
|
|
35
35
|
c.value = !1;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
return N(() => {
|
|
39
39
|
C();
|
|
40
|
-
}), (e, a) => (
|
|
41
|
-
l.value ? (
|
|
40
|
+
}), (e, a) => (r(), p("div", B, [
|
|
41
|
+
l.value ? (r(), p("div", O, [
|
|
42
42
|
u(t(z), {
|
|
43
43
|
value: l.value,
|
|
44
44
|
boxed: "",
|
|
@@ -48,34 +48,34 @@ const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
|
|
|
48
48
|
"expand-depth": 2,
|
|
49
49
|
"indent-width": 2
|
|
50
50
|
}, null, 8, ["value"])
|
|
51
|
-
])) : c.value ? (
|
|
51
|
+
])) : c.value ? (r(), p("div", V, i(t(s)("Chargement de l'aperçu JSON...")), 1)) : _.value ? (r(), f(m, {
|
|
52
52
|
key: 2,
|
|
53
53
|
type: "warning",
|
|
54
54
|
class: "flex items-center space-x-2"
|
|
55
55
|
}, {
|
|
56
56
|
default: d(() => [
|
|
57
|
-
u(t(v), { class: "
|
|
58
|
-
h("span", null, i(y.value ? t(
|
|
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
59
|
]),
|
|
60
60
|
_: 1
|
|
61
|
-
})) :
|
|
61
|
+
})) : n.value === "network" ? (r(), f(m, {
|
|
62
62
|
key: 3,
|
|
63
63
|
type: "warning",
|
|
64
64
|
class: "flex items-center space-x-2"
|
|
65
65
|
}, {
|
|
66
66
|
default: d(() => [
|
|
67
|
-
u(t(v), { class: "
|
|
68
|
-
h("span", null, i(t(
|
|
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
69
|
]),
|
|
70
70
|
_: 1
|
|
71
|
-
})) :
|
|
71
|
+
})) : n.value ? (r(), f(m, {
|
|
72
72
|
key: 4,
|
|
73
73
|
type: "warning",
|
|
74
74
|
class: "flex items-center space-x-2"
|
|
75
75
|
}, {
|
|
76
76
|
default: d(() => [
|
|
77
|
-
u(t(v), { class: "
|
|
78
|
-
h("span", null, i(t(
|
|
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
79
|
]),
|
|
80
80
|
_: 1
|
|
81
81
|
})) : T("", !0)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as G, useTemplateRef as W, ref as z, onMounted as B, createBlock as F, createElementBlock as N, openBlock as u, withCtx as V, createVNode as U, createElementVNode as q, unref as m, toDisplayString as A } from "vue";
|
|
2
|
-
import { a as D, _ as O, F as P } from "./main-
|
|
2
|
+
import { a as D, _ as O, F as P } from "./main-CiH8ZmBI.js";
|
|
3
3
|
const j = /* @__PURE__ */ G({
|
|
4
4
|
__name: "MapContainer.client",
|
|
5
5
|
props: {
|
|
@@ -24,7 +24,7 @@ const j = /* @__PURE__ */ G({
|
|
|
24
24
|
import("./Tile-DCuqwNOI.js").then((t) => t.d),
|
|
25
25
|
import("./OSM-CamriM9b.js"),
|
|
26
26
|
// @ts-expect-error no types provided
|
|
27
|
-
import("./index-
|
|
27
|
+
import("./index-Bbu9rOHt.js")
|
|
28
28
|
]), { CRS: g, GeoportalAttribution: S, GeoportalFullScreen: M, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = _;
|
|
29
29
|
await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), g.load(), e = new s({
|
|
30
30
|
target: r.value,
|
|
@@ -88,7 +88,7 @@ const j = /* @__PURE__ */ G({
|
|
|
88
88
|
class: "flex items-center space-x-2"
|
|
89
89
|
}, {
|
|
90
90
|
default: V(() => [
|
|
91
|
-
U(m(P), { class: "
|
|
91
|
+
U(m(P), { class: "shrink-0 size-6" }),
|
|
92
92
|
q("span", null, A(m(d)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|