@datagouv/components-next 1.0.2-dev.3 → 1.0.2-dev.31
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/dist/Datafair.client-BzyuQrsK.js +30 -0
- package/dist/{Event--kp8kMdJ.js → Event-B0pbfyAo.js} +1 -1
- package/dist/JsonPreview.client-CsFH4_pc.js +78 -0
- package/dist/{Map-BjUnLyj8.js → Map-ByzoJvTf.js} +2 -2
- package/dist/MapContainer.client-PxTb3GFB.js +102 -0
- package/dist/{OSM-s40W6sQ2.js → OSM-FSBCBM2l.js} +1 -1
- package/dist/{PdfPreview.client-C-w6-w44.js → PdfPreview.client-F9riTFzW.js} +693 -699
- package/dist/{Pmtiles.client-BR7_ldHY.js → Pmtiles.client-BdN6D_o3.js} +575 -580
- package/dist/Swagger.client-DRsUsdkD.js +4 -0
- package/dist/{Tile-DbNFNPfU.js → Tile-nykTnQlb.js} +4 -4
- package/dist/{TileImage-BsXBxMtq.js → TileImage-RLU-wMoy.js} +1 -1
- package/dist/{View-BR92hTWP.js → View-SHblmfOT.js} +1 -1
- package/dist/XmlPreview.client-CLDalkuE.js +70 -0
- package/dist/components-next.css +4 -4
- package/dist/components-next.js +47 -46
- package/dist/components.css +1 -1
- package/dist/{index-SrYZwgCT.js → index-DwQ7YeNi.js} +1164 -1164
- package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-DKk3Q492.js} +185 -183
- package/dist/{main-B2kXxWRG.js → main-BLApSdTQ.js} +34789 -34016
- package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
- package/dist/{tilecoord-Db24Px13.js → tilecoord-BgTy1qJO.js} +5 -5
- package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-BgCuOAH6.js} +10 -10
- package/dist/{vue3-xml-viewer.common-BRxsqI9j.js → vue3-xml-viewer.common-DkEC3fSC.js} +16 -16
- package/package.json +9 -5
- package/src/components/Form/SearchableSelect.vue +2 -1
- package/src/components/ReadMore.vue +1 -1
- package/src/components/ResourceAccordion/Datafair.client.vue +4 -10
- package/src/components/ResourceAccordion/JsonPreview.client.vue +34 -47
- package/src/components/ResourceAccordion/MapContainer.client.vue +7 -11
- package/src/components/ResourceAccordion/Metadata.vue +1 -2
- package/src/components/ResourceAccordion/PdfPreview.client.vue +28 -32
- package/src/components/ResourceAccordion/Pmtiles.client.vue +5 -10
- package/src/components/ResourceAccordion/Preview.vue +5 -10
- package/src/components/ResourceAccordion/PreviewLoader.vue +1 -2
- package/src/components/ResourceAccordion/PreviewUnavailable.vue +22 -0
- package/src/components/ResourceAccordion/ResourceAccordion.vue +1 -2
- package/src/components/ResourceAccordion/XmlPreview.client.vue +34 -47
- package/src/components/ResourceExplorer/ResourceExplorer.vue +21 -10
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +13 -3
- package/src/composables/useResourceCapabilities.ts +1 -1
- package/src/config.ts +2 -0
- package/src/functions/datasets.ts +0 -17
- package/src/functions/resources.ts +56 -1
- package/src/types/dataservices.ts +2 -0
- package/src/types/organizations.ts +1 -1
- package/src/types/users.ts +0 -1
- package/dist/Datafair.client-E5D6ePRC.js +0 -35
- package/dist/JsonPreview.client-C-6eBbPw.js +0 -87
- package/dist/MapContainer.client-DRkAmdOc.js +0 -105
- package/dist/Swagger.client-D4-F6yEf.js +0 -4
- package/dist/XmlPreview.client-Dl2VCgXF.js +0 -79
- /package/assets/illustrations/{_microscope.svg → microscope.svg} +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
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-B2kXxWRG.js";
|
|
3
|
-
const j = /* @__PURE__ */ G({
|
|
4
|
-
__name: "MapContainer.client",
|
|
5
|
-
props: {
|
|
6
|
-
resource: {}
|
|
7
|
-
},
|
|
8
|
-
setup(f) {
|
|
9
|
-
const a = f, { t: d } = D();
|
|
10
|
-
let e = null;
|
|
11
|
-
const r = W("mapRef"), n = z(!1);
|
|
12
|
-
async function w() {
|
|
13
|
-
const [
|
|
14
|
-
{ default: i },
|
|
15
|
-
{ default: s },
|
|
16
|
-
{ default: y },
|
|
17
|
-
{ default: h },
|
|
18
|
-
{ default: C },
|
|
19
|
-
_
|
|
20
|
-
] = await Promise.all([
|
|
21
|
-
import("./View-BR92hTWP.js").then((t) => t.M),
|
|
22
|
-
import("./Map-BjUnLyj8.js").then((t) => t.U),
|
|
23
|
-
import("./ScaleLine-KW-nXqp3.js"),
|
|
24
|
-
import("./Tile-DbNFNPfU.js").then((t) => t.d),
|
|
25
|
-
import("./OSM-s40W6sQ2.js"),
|
|
26
|
-
// @ts-expect-error no types provided
|
|
27
|
-
import("./index-SrYZwgCT.js")
|
|
28
|
-
]), { CRS: g, GeoportalAttribution: S, GeoportalFullScreen: M, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = _;
|
|
29
|
-
await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), g.load(), e = new s({
|
|
30
|
-
target: r.value,
|
|
31
|
-
layers: [
|
|
32
|
-
new h({
|
|
33
|
-
source: new C()
|
|
34
|
-
})
|
|
35
|
-
],
|
|
36
|
-
view: new i({
|
|
37
|
-
center: [288074.8449901076, 6247982515792289e-9],
|
|
38
|
-
zoom: 8,
|
|
39
|
-
constrainResolution: !0
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
const R = new y({
|
|
43
|
-
units: "metric",
|
|
44
|
-
bar: !1
|
|
45
|
-
});
|
|
46
|
-
e.addControl(R);
|
|
47
|
-
const k = new M({
|
|
48
|
-
position: "top-right"
|
|
49
|
-
});
|
|
50
|
-
e.addControl(k);
|
|
51
|
-
const T = new b({
|
|
52
|
-
position: "bottom-left"
|
|
53
|
-
});
|
|
54
|
-
e.addControl(T);
|
|
55
|
-
const x = new L({
|
|
56
|
-
options: {
|
|
57
|
-
position: "top-right"
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
e.addControl(x);
|
|
61
|
-
const E = new S({
|
|
62
|
-
position: "bottom-right"
|
|
63
|
-
});
|
|
64
|
-
e.addControl(E);
|
|
65
|
-
const o = new v({
|
|
66
|
-
position: "bottom-left",
|
|
67
|
-
listable: !0,
|
|
68
|
-
layerTypes: ["WMS"]
|
|
69
|
-
});
|
|
70
|
-
o._serviceUrlImportInput.value = a.resource.url, o._formContainer.dispatchEvent(new CustomEvent("submit", { cancelable: !0 })), e.addControl(o);
|
|
71
|
-
const l = 500;
|
|
72
|
-
let p = 20;
|
|
73
|
-
function c() {
|
|
74
|
-
if (!o._getCapResponseWMSLayers)
|
|
75
|
-
p--, p > 0 ? setTimeout(c, l) : n.value = !0;
|
|
76
|
-
else {
|
|
77
|
-
const t = o._getCapResponseWMSLayers.filter((I) => I.Name == a.resource.title)[0];
|
|
78
|
-
o._addGetCapWMSLayer(t);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
setTimeout(c, l);
|
|
82
|
-
}
|
|
83
|
-
return B(() => {
|
|
84
|
-
w();
|
|
85
|
-
}), (i, s) => n.value ? (u(), F(O, {
|
|
86
|
-
key: 0,
|
|
87
|
-
type: "warning",
|
|
88
|
-
class: "flex items-center space-x-2"
|
|
89
|
-
}, {
|
|
90
|
-
default: V(() => [
|
|
91
|
-
U(m(P), { class: "shrink-0 size-6" }),
|
|
92
|
-
q("span", null, A(m(d)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
|
|
93
|
-
]),
|
|
94
|
-
_: 1
|
|
95
|
-
})) : (u(), N("div", {
|
|
96
|
-
key: 1,
|
|
97
|
-
id: "map",
|
|
98
|
-
ref_key: "mapRef",
|
|
99
|
-
ref: r
|
|
100
|
-
}, null, 512));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
export {
|
|
104
|
-
j as default
|
|
105
|
-
};
|
|
@@ -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
|
-
};
|
|
File without changes
|