@datagouv/components-next 1.4.1-dev.1363.ga6a9113d → 1.4.1-dev.1366.ga52eaed5
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-Ci2WOgAS.js +28 -0
- package/dist/ImagePreview.client-B4RtxuiJ.js +36 -0
- package/dist/{JsonPreview.client-DcnN7kTh.js → JsonPreview.client-r7swv2fp.js} +13 -5
- package/dist/MapContainer.client-CxH1a8Tn.js +75 -0
- package/dist/{PdfPreview.client-D-jPm4dP.js → PdfPreview.client-BjeMcqcy.js} +783 -773
- package/dist/{PdfSkeleton-5HBfBlXx.js → PdfSkeleton-CVZxJaeL.js} +1 -1
- package/dist/{Pmtiles.client-DBaMKSO-.js → Pmtiles.client-D8idR2l7.js} +44 -44
- package/dist/{config-jrnuUDOH.js → PreviewError-Cx7CItT_.js} +11729 -9691
- package/dist/PreviewWrapper-Cd1RSmS-.js +62 -0
- package/dist/{XmlPreview.client-WnIR6jRO.js → XmlPreview.client-cSebx8br.js} +13 -5
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +10841 -11704
- package/dist/components.css +1 -1
- package/dist/france-DPcdJc84.js +75 -0
- package/package.json +1 -1
- package/src/components/ResourceAccordion/Datafair.client.vue +8 -6
- package/src/components/ResourceAccordion/ImagePreview.client.vue +22 -10
- package/src/components/ResourceAccordion/JsonPreview.client.vue +2 -0
- package/src/components/ResourceAccordion/MapContainer.client.vue +13 -5
- package/src/components/ResourceAccordion/PdfPreview.client.vue +15 -0
- package/src/components/ResourceAccordion/Pmtiles.client.vue +6 -4
- package/src/components/ResourceAccordion/Preview.vue +13 -5
- package/src/components/ResourceAccordion/PreviewError.vue +148 -0
- package/src/components/ResourceAccordion/PreviewWrapper.vue +63 -20
- package/src/components/ResourceAccordion/ResourceAccordion.vue +54 -67
- package/src/components/ResourceAccordion/UrlPreview.vue +31 -0
- package/src/components/ResourceAccordion/XmlPreview.client.vue +2 -0
- package/src/components/ResourceExplorer/ResourceExplorer.vue +3 -1
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +24 -22
- package/src/components/TabularExplorer/TabularExplorer.vue +6 -6
- package/src/composables/useResourceCapabilities.ts +27 -11
- package/src/config.ts +1 -0
- package/src/functions/previewErrors.ts +188 -0
- package/src/functions/resources.ts +22 -1
- package/src/main.ts +1 -0
- package/dist/Datafair.client-DV0kxqBW.js +0 -27
- package/dist/ImagePreview.client-0mW3sY5X.js +0 -30
- package/dist/MapContainer.client-ZoJqauC6.js +0 -74
- package/dist/PreviewUnavailable-BJkpCiyL.js +0 -82
- package/dist/PreviewWrapper-DEl1D2rR.js +0 -47
- package/dist/france-DxksUv5K.js +0 -694
- package/dist/resources-CmwQ4DAB.js +0 -316
- package/src/components/ResourceAccordion/PreviewUnavailable.vue +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as e } from "./PreviewError-Cx7CItT_.js";
|
|
2
2
|
import { createElementBlock as t, createStaticVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, unref as o } from "vue";
|
|
3
3
|
//#region src/components/ResourceAccordion/PdfSkeleton.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var s = ["aria-label"], c = /* @__PURE__ */ r({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { o as s, t as c } from "./PreviewUnavailable-BJkpCiyL.js";
|
|
1
|
+
import { H as e, L as t, M as n, dt as r, t as i } from "./PreviewError-Cx7CItT_.js";
|
|
2
|
+
import { c as a, n as o, r as s, t as c } from "./france-DPcdJc84.js";
|
|
4
3
|
import { t as l } from "./purify.es-D6pPunDo.js";
|
|
5
4
|
import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, onMounted as v, openBlock as y, ref as b, toDisplayString as x, unref as S, useTemplateRef as C, withCtx as w } from "vue";
|
|
6
5
|
//#region ../node_modules/fflate/esm/browser.js
|
|
@@ -41242,66 +41241,66 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41242
41241
|
dataset: {}
|
|
41243
41242
|
},
|
|
41244
41243
|
setup(_) {
|
|
41245
|
-
let T = _, { t: E } =
|
|
41244
|
+
let T = _, { t: E } = e(), { formatDate: D } = a(), O = t(), k = b(!1), A = u(() => T.resource.extras["analysis:parsing:pmtiles_url"] ? T.resource.extras["analysis:parsing:pmtiles_url"] : T.resource.url), j = u(() => O.pmtilesViewerBaseUrl ? `${O.pmtilesViewerBaseUrl}${encodeURIComponent(A.value)}` : null), ee = u(() => T.resource.extras["analysis:parsing:pmtiles_url"] ? D(T.resource.extras["analysis:parsing:finished_at"]) : D(T.resource.last_modified)), te = C("containerRef");
|
|
41246
41245
|
eL(tL);
|
|
41247
|
-
let ne = u(() =>
|
|
41246
|
+
let ne = u(() => s(T.dataset));
|
|
41248
41247
|
async function re() {
|
|
41249
41248
|
await Promise.resolve({ });
|
|
41250
|
-
let
|
|
41251
|
-
hi("pmtiles",
|
|
41252
|
-
let
|
|
41253
|
-
|
|
41254
|
-
let
|
|
41249
|
+
let e = new Fe();
|
|
41250
|
+
hi("pmtiles", e.tile);
|
|
41251
|
+
let t = new ot(A.value);
|
|
41252
|
+
e.add(t), t.getHeader().then((e) => {
|
|
41253
|
+
let n = e.minLon < e.maxLon && e.minLat < e.maxLat, r = new CI({
|
|
41255
41254
|
container: te.value,
|
|
41256
41255
|
style: nL,
|
|
41257
|
-
...
|
|
41258
|
-
bounds: [[
|
|
41256
|
+
...n ? {
|
|
41257
|
+
bounds: [[e.minLon, e.minLat], [e.maxLon, e.maxLat]],
|
|
41259
41258
|
fitBoundsOptions: { padding: 24 }
|
|
41260
41259
|
} : {
|
|
41261
|
-
center: [
|
|
41262
|
-
zoom:
|
|
41260
|
+
center: [e.centerLon, e.centerLat],
|
|
41261
|
+
zoom: e.centerZoom
|
|
41263
41262
|
}
|
|
41264
41263
|
});
|
|
41265
|
-
|
|
41264
|
+
r.addControl(new TI()), r.addControl(new qI({
|
|
41266
41265
|
positionOptions: { enableHighAccuracy: !0 },
|
|
41267
41266
|
trackUserLocation: !0,
|
|
41268
41267
|
showAccuracyCircle: !1
|
|
41269
41268
|
}));
|
|
41270
|
-
let
|
|
41269
|
+
let i = new ZI({
|
|
41271
41270
|
closeButton: !0,
|
|
41272
41271
|
closeOnClick: !0
|
|
41273
41272
|
}).addClassName("rounded-full").setMaxWidth("300px");
|
|
41274
|
-
function
|
|
41275
|
-
if (!e.features || !e.features[0])
|
|
41273
|
+
function a(e) {
|
|
41274
|
+
if (!e.features || !e.features[0]) i.remove();
|
|
41276
41275
|
else {
|
|
41277
41276
|
let t = e.lngLat, n = Object.keys(e.features[0].properties).map((t) => `<p class="my-0"><b class="font-marianne text-sm" !important;">${l.sanitize(t, { USE_PROFILES: { html: !1 } })} :</b> <span class="font-mono text-xs">${l.sanitize(e.features[0].properties[t], { USE_PROFILES: { html: !1 } })}</span></p>`).join("");
|
|
41278
|
-
|
|
41277
|
+
i.setLngLat(t).setHTML(n).addTo(r);
|
|
41279
41278
|
}
|
|
41280
41279
|
}
|
|
41281
|
-
|
|
41282
|
-
|
|
41283
|
-
let
|
|
41284
|
-
|
|
41280
|
+
r.on("load", () => {
|
|
41281
|
+
t.getMetadata().then((e) => {
|
|
41282
|
+
let t = e;
|
|
41283
|
+
r.addSource("pmtiles_source", {
|
|
41285
41284
|
type: "vector",
|
|
41286
41285
|
url: `pmtiles://${A.value}`,
|
|
41287
41286
|
attribution: ne.value
|
|
41288
|
-
}),
|
|
41289
|
-
let
|
|
41290
|
-
switch (
|
|
41287
|
+
}), t.tilestats.layers.forEach((e) => {
|
|
41288
|
+
let t = u(() => {
|
|
41289
|
+
switch (e.geometry) {
|
|
41291
41290
|
case "Polygon": return "fill";
|
|
41292
41291
|
case "Point": return "circle";
|
|
41293
41292
|
case "LineString": return "line";
|
|
41294
|
-
default: return e
|
|
41293
|
+
default: return o(e.geometry, "Unsupported geometry"), "";
|
|
41295
41294
|
}
|
|
41296
41295
|
});
|
|
41297
|
-
|
|
41298
|
-
id:
|
|
41296
|
+
r.addLayer({
|
|
41297
|
+
id: e.layer,
|
|
41299
41298
|
source: "pmtiles_source",
|
|
41300
|
-
"source-layer":
|
|
41301
|
-
type:
|
|
41299
|
+
"source-layer": e.layer,
|
|
41300
|
+
type: t.value,
|
|
41302
41301
|
paint: {
|
|
41303
|
-
[`${
|
|
41304
|
-
[`${
|
|
41302
|
+
[`${t.value}-color`]: "steelblue",
|
|
41303
|
+
[`${t.value}-opacity`]: [
|
|
41305
41304
|
"interpolate",
|
|
41306
41305
|
["linear"],
|
|
41307
41306
|
["zoom"],
|
|
@@ -41311,10 +41310,10 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41311
41310
|
.6
|
|
41312
41311
|
]
|
|
41313
41312
|
}
|
|
41314
|
-
}),
|
|
41315
|
-
|
|
41316
|
-
}),
|
|
41317
|
-
|
|
41313
|
+
}), r.on("click", e.layer, a), r.on("mouseenter", e.layer, () => {
|
|
41314
|
+
r.getCanvas().style.cursor = "pointer";
|
|
41315
|
+
}), r.on("mouseleave", e.layer, () => {
|
|
41316
|
+
r.getCanvas().style.cursor = "";
|
|
41318
41317
|
});
|
|
41319
41318
|
});
|
|
41320
41319
|
}).catch(() => k.value = !0);
|
|
@@ -41323,18 +41322,19 @@ var tL = "/assets/maplibre-gl-worker-C24SsKwV.js", nL = {
|
|
|
41323
41322
|
}
|
|
41324
41323
|
return v(() => {
|
|
41325
41324
|
re();
|
|
41326
|
-
}), (e,
|
|
41327
|
-
|
|
41328
|
-
|
|
41329
|
-
|
|
41325
|
+
}), (e, t) => (y(), p("div", rL, [k.value ? (y(), d(i, {
|
|
41326
|
+
key: 0,
|
|
41327
|
+
resource: _.resource,
|
|
41328
|
+
"error-type": "map_load"
|
|
41329
|
+
}, null, 8, ["resource"])) : (y(), p("div", iL, [j.value ? (y(), p("div", aL, [m("div", oL, [
|
|
41330
41330
|
m("div", {
|
|
41331
41331
|
class: "fr-col-auto",
|
|
41332
|
-
innerHTML: S(
|
|
41332
|
+
innerHTML: S(c)
|
|
41333
41333
|
}, null, 8, sL),
|
|
41334
41334
|
m("div", cL, [m("p", lL, x(S(E)("Explorer les données en détail")), 1), m("p", uL, x(S(E)("Utiliser un visualisateur PMTiles pour obtenir un aperçu des données.")), 1)]),
|
|
41335
|
-
m("p", dL, [g(
|
|
41335
|
+
m("p", dL, [g(n, {
|
|
41336
41336
|
href: j.value,
|
|
41337
|
-
icon: S(
|
|
41337
|
+
icon: S(r),
|
|
41338
41338
|
"icon-right": ""
|
|
41339
41339
|
}, {
|
|
41340
41340
|
default: w(() => [h(x(S(E)("Explorer la carte")), 1)]),
|