@datagouv/components-next 1.0.2-dev.173 → 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-DrxHU3d_.js → Datafair.client-BU2gspr8.js} +9 -9
  2. package/dist/ImagePreview.client-BU5QNqG_.js +36 -0
  3. package/dist/{JsonPreview.client-CvmhvpbB.js → JsonPreview.client-CvOpMCxW.js} +2 -2
  4. package/dist/{MapContainer.client-9VrKlUPt.js → MapContainer.client-DNOQ5XTT.js} +9 -9
  5. package/dist/{PdfPreview.client-CiPvfzzR.js → PdfPreview.client-DwAvLLq_.js} +438 -427
  6. package/dist/{Pmtiles.client-0R3Z5sYM.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-N2n5j4WI.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-D0JOBDBD.js → index-Dw1lR0oe.js} +1 -1
  13. package/dist/{leaflet-src-DxB74Wpp.js → leaflet-src-BoMqG6Yx.js} +1 -1
  14. package/dist/{main-QOs57DKh.js → main-I9G-L-lg.js} +16280 -15512
  15. package/dist/{vue3-xml-viewer.common-BnexQtzg.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 +63 -994
  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-DHrr-JCM.js +0 -36
  57. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-B0PyOeL6.js +0 -58
@@ -1,24 +1,24 @@
1
- import { defineComponent as l, computed as a, openBlock as t, createElementBlock as o, createElementVNode as u, createBlock as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as h } from "vue";
2
- import { a as x, _ as g } from "./main-QOs57DKh.js";
3
- const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE__ */ l({
1
+ import { defineComponent as u, computed as a, openBlock as t, createElementBlock as o, createElementVNode as l, createBlock as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as x } from "vue";
2
+ import { a as h, d as v } from "./main-I9G-L-lg.js";
3
+ const g = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], B = /* @__PURE__ */ u({
4
4
  __name: "Datafair.client",
5
5
  props: {
6
6
  resource: {},
7
7
  dataset: {}
8
8
  },
9
9
  setup(c) {
10
- const e = c, { t: i } = x(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), d = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${d.value}`);
11
- return (D, y) => (t(), o("div", v, [
10
+ const e = c, { t: i } = h(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), d = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${d.value}`);
11
+ return (D, y) => (t(), o("div", g, [
12
12
  n.value ? (t(), o("div", b, [
13
- u("iframe", {
13
+ l("iframe", {
14
14
  src: n.value,
15
15
  width: "100%",
16
16
  height: "500px",
17
17
  style: { "background-color": "transparent", border: "none" }
18
18
  }, null, 8, k)
19
- ])) : (t(), f(g, { key: 1 }, {
19
+ ])) : (t(), f(v, { key: 1 }, {
20
20
  default: p(() => [
21
- m(_(h(i)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
21
+ m(_(x(i)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
22
22
  ]),
23
23
  _: 1
24
24
  }))
@@ -26,5 +26,5 @@ const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE_
26
26
  }
27
27
  });
28
28
  export {
29
- $ as default
29
+ B as default
30
30
  };
@@ -0,0 +1,36 @@
1
+ import { defineComponent as _, ref as y, computed as o, openBlock as t, createElementBlock as u, createBlock as p, withCtx as f, createTextVNode as m, toDisplayString as d, unref as l } from "vue";
2
+ import { a as z, u as T, b as k, d as h } from "./main-I9G-L-lg.js";
3
+ const w = { class: "text-xs" }, B = ["src"], E = /* @__PURE__ */ _({
4
+ __name: "ImagePreview.client",
5
+ props: {
6
+ resource: {}
7
+ },
8
+ setup(a) {
9
+ const n = a, { t: r } = z(), v = T(), c = y(!1), g = o(() => n.resource.format?.toUpperCase() ?? r("Fichier")), i = o(() => k(n.resource)), x = o(() => {
10
+ const s = i.value, e = v.maxImagePreviewByteSize;
11
+ return !s || !e ? !1 : s <= e;
12
+ });
13
+ return (s, e) => (t(), u("div", w, [
14
+ x.value ? c.value ? (t(), p(h, { key: 1 }, {
15
+ default: f(() => [
16
+ m(d(l(r)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le pour le consulter.")), 1)
17
+ ]),
18
+ _: 1
19
+ })) : (t(), u("img", {
20
+ key: 2,
21
+ src: a.resource.url,
22
+ alt: "",
23
+ class: "block w-full h-auto max-w-[800px]",
24
+ onError: e[0] || (e[0] = (C) => c.value = !0)
25
+ }, null, 40, B)) : (t(), p(h, { key: 0 }, {
26
+ default: f(() => [
27
+ m(d(i.value ? l(r)("Le fichier {fileType} est trop volumineux pour être prévisualisé. Téléchargez-le pour le consulter.", { fileType: g.value }) : l(r)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le pour le consulter.")), 1)
28
+ ]),
29
+ _: 1
30
+ }))
31
+ ]));
32
+ }
33
+ });
34
+ export {
35
+ E as default
36
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as c, defineAsyncComponent as u, openBlock as m, createBlock as p, unref as r, withCtx as f, createVNode as l } from "vue";
2
- import { u as d } from "./main-QOs57DKh.js";
3
- import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-B0PyOeL6.js";
2
+ import { u as d } from "./main-I9G-L-lg.js";
3
+ import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-CrWEJnPl.js";
4
4
  const J = /* @__PURE__ */ c({
5
5
  __name: "JsonPreview.client",
6
6
  props: {
@@ -1,5 +1,5 @@
1
- import { defineComponent as E, useTemplateRef as G, ref as W, onMounted as B, openBlock as u, createBlock as N, withCtx as V, createTextVNode as z, toDisplayString as q, unref as A, createElementBlock as D } from "vue";
2
- import { a as F, _ as O } from "./main-QOs57DKh.js";
1
+ import { defineComponent as E, useTemplateRef as G, ref as W, onMounted as z, openBlock as u, createBlock as B, withCtx as N, createTextVNode as V, toDisplayString as q, unref as A, createElementBlock as D } from "vue";
2
+ import { a as F, d as O } from "./main-I9G-L-lg.js";
3
3
  const Z = /* @__PURE__ */ E({
4
4
  __name: "MapContainer.client",
5
5
  props: {
@@ -24,7 +24,7 @@ const Z = /* @__PURE__ */ E({
24
24
  import("./Tile-CSpn0Ca8.js").then((t) => t.d),
25
25
  import("./OSM-CcrUhItr.js"),
26
26
  // @ts-expect-error no types provided
27
- import("./index-D0JOBDBD.js")
27
+ import("./index-Dw1lR0oe.js")
28
28
  ]), { CRS: _, GeoportalAttribution: S, GeoportalFullScreen: g, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = C;
29
29
  await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), _.load(), e = new s({
30
30
  target: a.value,
@@ -81,18 +81,18 @@ const Z = /* @__PURE__ */ E({
81
81
  }
82
82
  setTimeout(c, l);
83
83
  }
84
- return B(() => {
84
+ return z(() => {
85
85
  d();
86
- }), (i, s) => n.value ? (u(), N(O, { key: 0 }, {
87
- default: V(() => [
88
- z(q(A(f)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
86
+ }), (i, s) => n.value ? (u(), B(O, { key: 0 }, {
87
+ default: N(() => [
88
+ V(q(A(f)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
89
89
  ]),
90
90
  _: 1
91
91
  })) : (u(), D("div", {
92
92
  key: 1,
93
- id: "map",
94
93
  ref_key: "mapRef",
95
- ref: a
94
+ ref: a,
95
+ class: "size-full"
96
96
  }, null, 512));
97
97
  }
98
98
  });