@datagouv/components-next 1.0.2-dev.172 → 1.0.2-dev.174

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.
Files changed (57) hide show
  1. package/dist/{Datafair.client-CES67S3v.js → Datafair.client-BU2gspr8.js} +9 -9
  2. package/dist/ImagePreview.client-BU5QNqG_.js +36 -0
  3. package/dist/{JsonPreview.client-DtCw5aCA.js → JsonPreview.client-CvOpMCxW.js} +2 -2
  4. package/dist/{MapContainer.client-Q3TmXpPR.js → MapContainer.client-DNOQ5XTT.js} +9 -9
  5. package/dist/{PdfPreview.client-BXJzS-Hm.js → PdfPreview.client-DwAvLLq_.js} +438 -427
  6. package/dist/{Pmtiles.client-DNiYcHH3.js → Pmtiles.client-CgaDrCHk.js} +1341 -1337
  7. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-CrWEJnPl.js +60 -0
  8. package/dist/{XmlPreview.client-CPfIZl9q.js → XmlPreview.client-B24FIhU7.js} +3 -3
  9. package/dist/components-next.css +1 -1
  10. package/dist/components-next.js +144 -138
  11. package/dist/components.css +1 -1
  12. package/dist/{index-CXeG6J6C.js → index-Dw1lR0oe.js} +1 -1
  13. package/dist/{leaflet-src-BwEce6uO.js → leaflet-src-BoMqG6Yx.js} +1 -1
  14. package/dist/{main-D7EaQcIR.js → main-I9G-L-lg.js} +16280 -15511
  15. package/dist/{vue3-xml-viewer.common-DznVepCg.js → vue3-xml-viewer.common-PTUJZpH4.js} +1 -1
  16. package/package.json +1 -1
  17. package/src/components/AppLink.vue +3 -0
  18. package/src/components/CopyButton.vue +6 -2
  19. package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
  20. package/src/components/ResourceAccordion/ImagePreview.client.vue +3 -3
  21. package/src/components/ResourceAccordion/MapContainer.client.vue +1 -8
  22. package/src/components/ResourceAccordion/PdfPreview.client.vue +36 -12
  23. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  24. package/src/components/ResourceAccordion/Pmtiles.client.vue +25 -12
  25. package/src/components/ResourceAccordion/PreviewWrapper.vue +17 -10
  26. package/src/components/ResourceAccordion/ResourceAccordion.vue +4 -1
  27. package/src/components/ResourceExplorer/ResourceExplorer.vue +98 -209
  28. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +74 -0
  29. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +103 -71
  30. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +123 -187
  31. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  32. package/src/components/ResourceExplorer/ResourceSelector.vue +24 -86
  33. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +115 -0
  34. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
  35. package/src/components/ResourceListItem.vue +154 -0
  36. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  37. package/src/components/TabularExplorer/TabularCell.vue +2 -4
  38. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  39. package/src/components/TabularExplorer/TabularExplorer.vue +68 -995
  40. package/src/components/TabularExplorer/TabularFilterContent.vue +2 -10
  41. package/src/components/TabularExplorer/TabularFilterPopover.vue +5 -6
  42. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  43. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  44. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  45. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  46. package/src/components/TabularExplorer/TabularTable.vue +481 -0
  47. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  48. package/src/components/TabularExplorer/types.ts +0 -5
  49. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  50. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  51. package/src/composables/useDatasetResources.ts +164 -0
  52. package/src/composables/useResizable.ts +46 -0
  53. package/src/composables/useResourceCapabilities.ts +20 -7
  54. package/src/functions/resources.ts +19 -0
  55. package/src/main.ts +8 -0
  56. package/dist/ImagePreview.client-c_SJXLpr.js +0 -36
  57. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-B3ByRwHK.js +0 -58
@@ -0,0 +1,60 @@
1
+ import { defineComponent as C, ref as v, computed as y, onMounted as S, nextTick as w, openBlock as a, createElementBlock as b, normalizeClass as B, renderSlot as x, createElementVNode as _, toDisplayString as i, unref as t, createBlock as s, withCtx as n, createTextVNode as u, createCommentVNode as E } from "vue";
2
+ import { a as L, b as N, c as R, d as c } from "./main-I9G-L-lg.js";
3
+ const V = { class: "text-gray-medium" }, F = /* @__PURE__ */ C({
4
+ __name: "PreviewWrapper",
5
+ props: {
6
+ fileType: {},
7
+ resource: {},
8
+ maxSize: {},
9
+ load: { type: Function },
10
+ fill: { type: Boolean }
11
+ },
12
+ emits: ["loaded"],
13
+ setup(r, { emit: k }) {
14
+ const o = r, z = k, { t: l } = L(), p = v(null), f = v(!1), d = v(null), h = y(() => N(o.resource)), T = y(() => R(o.resource)), g = y(() => {
15
+ const e = h.value, m = o.maxSize;
16
+ return !e || !m ? !1 : e <= m;
17
+ });
18
+ return S(async () => {
19
+ if (!(!g.value || T.value === "blocked")) {
20
+ f.value = !0;
21
+ try {
22
+ p.value = await o.load(), await w(), z("loaded");
23
+ } catch (e) {
24
+ console.error("Error loading preview:", e), d.value = e instanceof TypeError ? "network" : "generic";
25
+ } finally {
26
+ f.value = !1;
27
+ }
28
+ }
29
+ }), (e, m) => (a(), b("div", {
30
+ class: B(["text-xs", r.fill ? "flex min-h-0 flex-1 flex-col" : ""])
31
+ }, [
32
+ p.value !== null ? x(e.$slots, "default", { data: p.value }, void 0, void 0, 0) : f.value ? x(e.$slots, "loading", {}, () => [
33
+ _("div", V, i(t(l)("Chargement de l'aperçu {fileType}...", { fileType: r.fileType })), 1)
34
+ ], void 0, 1) : g.value ? T.value === "blocked" ? (a(), s(c, { key: 3 }, {
35
+ default: n(() => [
36
+ u(i(t(l)("Ce fichier {fileType} ne peut pas être prévisualisé car il est hébergé sur un site distant qui restreint l'accès (CORS). Téléchargez-le pour le consulter.", { fileType: r.fileType })), 1)
37
+ ]),
38
+ _: 1
39
+ })) : d.value === "network" ? (a(), s(c, { key: 4 }, {
40
+ default: n(() => [
41
+ u(i(t(l)("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le pour le consulter.")), 1)
42
+ ]),
43
+ _: 1
44
+ })) : d.value ? (a(), s(c, { key: 5 }, {
45
+ default: n(() => [
46
+ u(i(t(l)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
47
+ ]),
48
+ _: 1
49
+ })) : E("", !0) : (a(), s(c, { key: 2 }, {
50
+ default: n(() => [
51
+ u(i(h.value ? t(l)("Le fichier {fileType} est trop volumineux pour être prévisualisé. Téléchargez-le pour le consulter.", { fileType: r.fileType }) : t(l)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le pour le consulter.")), 1)
52
+ ]),
53
+ _: 1
54
+ }))
55
+ ], 2));
56
+ }
57
+ });
58
+ export {
59
+ F as _
60
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, defineAsyncComponent as m, openBlock as u, createBlock as f, unref as t, withCtx as l, createVNode as p } from "vue";
2
- import { u as x } from "./main-D7EaQcIR.js";
3
- import { _ as w } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-B3ByRwHK.js";
2
+ import { u as x } from "./main-I9G-L-lg.js";
3
+ import { _ as w } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-CrWEJnPl.js";
4
4
  const X = /* @__PURE__ */ i({
5
5
  __name: "XmlPreview.client",
6
6
  props: {
@@ -8,7 +8,7 @@ const X = /* @__PURE__ */ i({
8
8
  },
9
9
  setup(r) {
10
10
  const o = m(
11
- () => import("./vue3-xml-viewer.common-DznVepCg.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
11
+ () => import("./vue3-xml-viewer.common-PTUJZpH4.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
12
12
  ), n = r, s = x(), c = async () => {
13
13
  const e = await fetch(n.resource.url);
14
14
  if (!e.ok) throw new Error(`HTTP error! status: ${e.status}`);