@datagouv/components-next 1.3.0 → 1.4.0

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 (131) hide show
  1. package/dist/{Control-b-43UT2B.js → Control-B9WQxlpJ.js} +10 -10
  2. package/dist/{Datafair.client-BrjISlaZ.js → Datafair.client-D_6yzJUG.js} +9 -9
  3. package/dist/{Event-py_AAwJY.js → Event-iXDrp-fy.js} +15 -15
  4. package/dist/{Image-BHQYZWzH.js → Image-mNMBOofs.js} +22 -22
  5. package/dist/ImagePreview.client-B0iPhFm3.js +36 -0
  6. package/dist/{JsonPreview.client-DivFAnbN.js → JsonPreview.client-DSl1kiwC.js} +2 -2
  7. package/dist/{Map-CtP7leHl.js → Map-BfqKMw0S.js} +165 -165
  8. package/dist/{MapContainer.client-Cq8tNLZZ.js → MapContainer.client-BSfpk_rT.js} +17 -17
  9. package/dist/{OSM-gdDSIsDA.js → OSM-CcrUhItr.js} +1 -1
  10. package/dist/{PdfPreview.client-BNBgLsK2.js → PdfPreview.client-BANFeM6K.js} +438 -427
  11. package/dist/{Pmtiles.client-CQi5Rw8W.js → Pmtiles.client-DH9ZrsZR.js} +6177 -5967
  12. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-I8EZCgzp.js +60 -0
  13. package/dist/{ScaleLine-hG-FhNqy.js → ScaleLine-VGQ7nkMS.js} +2 -2
  14. package/dist/{Tile-D6rFonpT.js → Tile-CSpn0Ca8.js} +47 -47
  15. package/dist/{TileImage-cfrEgz5y.js → TileImage-CpbaEFwd.js} +44 -44
  16. package/dist/{View-vp7vDb9q.js → View-BYBpt-AU.js} +58 -58
  17. package/dist/{XmlPreview.client-XCsNvnsZ.js → XmlPreview.client-KCB5mwVf.js} +3 -3
  18. package/dist/{common-C8efyyuc.js → common-BoeTUnDZ.js} +58 -58
  19. package/dist/components-next.css +1 -1
  20. package/dist/components-next.js +199 -172
  21. package/dist/components.css +1 -1
  22. package/dist/{index-CXUamc8Z.js → index-DHWzX5vK.js} +4668 -4466
  23. package/dist/{leaflet-src-BRKv9Ksv.js → leaflet-src-pVQfonBI.js} +1 -1
  24. package/dist/{main-DKu5SOAl.js → main-BDcYkhOc.js} +41684 -33432
  25. package/dist/{proj-CsjVeojN.js → proj-DxGbobp7.js} +110 -110
  26. package/dist/{tilecoord-CPcQJnrF.js → tilecoord-DvX7WWiA.js} +94 -94
  27. package/dist/{vue3-xml-viewer.common-BIaEIFYG.js → vue3-xml-viewer.common-Bdcn54ST.js} +1 -1
  28. package/package.json +28 -27
  29. package/src/components/ActivityList/ActivityList.vue +21 -12
  30. package/src/components/AppLink.vue +3 -0
  31. package/src/components/BannerAction.vue +6 -2
  32. package/src/components/Chart/ChartViewer.vue +111 -17
  33. package/src/components/Chart/ChartViewerWrapper.vue +28 -16
  34. package/src/components/ChartCard.vue +112 -0
  35. package/src/components/CopyButton.vue +6 -2
  36. package/src/components/DataserviceCard.vue +23 -6
  37. package/src/components/DataserviceQuality.vue +82 -0
  38. package/src/components/DataserviceQualityInline.vue +31 -0
  39. package/src/components/DataserviceQualityTooltipContent.vue +79 -0
  40. package/src/components/DatasetCard.vue +17 -6
  41. package/src/components/DatasetInformation/DatasetTemporalitySection.vue +7 -4
  42. package/src/components/DatasetQuality.vue +11 -11
  43. package/src/components/DatasetQualityInline.vue +2 -2
  44. package/src/components/DatasetQualityTooltipContent.vue +1 -1
  45. package/src/components/DiscussionMessageCard.vue +14 -15
  46. package/src/components/Form/SchemaSelect.vue +2 -0
  47. package/src/components/FormattedDate.vue +69 -0
  48. package/src/components/LoadingBlock.vue +4 -1
  49. package/src/components/ObjectCard.vue +4 -1
  50. package/src/components/ObjectCardOwner.vue +13 -1
  51. package/src/components/Pagination.vue +18 -58
  52. package/src/components/Placeholder.vue +3 -2
  53. package/src/components/PostCard.vue +13 -15
  54. package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
  55. package/src/components/ResourceAccordion/Downloads.vue +19 -7
  56. package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
  57. package/src/components/ResourceAccordion/MapContainer.client.vue +1 -8
  58. package/src/components/ResourceAccordion/Metadata.vue +21 -5
  59. package/src/components/ResourceAccordion/PdfPreview.client.vue +36 -12
  60. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  61. package/src/components/ResourceAccordion/Pmtiles.client.vue +27 -18
  62. package/src/components/ResourceAccordion/Preview.vue +8 -4
  63. package/src/components/ResourceAccordion/PreviewWrapper.vue +17 -10
  64. package/src/components/ResourceAccordion/ResourceAccordion.vue +29 -9
  65. package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -209
  66. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
  67. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
  68. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +136 -183
  69. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  70. package/src/components/ResourceExplorer/ResourceSelector.vue +24 -86
  71. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +124 -0
  72. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +96 -0
  73. package/src/components/ResourceListItem.vue +168 -0
  74. package/src/components/ReuseCard.vue +18 -6
  75. package/src/components/ReuseDetails.vue +2 -2
  76. package/src/components/ReuseHorizontalCard.vue +4 -3
  77. package/src/components/SchemaCard.vue +10 -1
  78. package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
  79. package/src/components/Search/GlobalSearch.vue +12 -8
  80. package/src/components/Search/SearchInput.vue +1 -1
  81. package/src/components/Search/Sidemenu.vue +4 -3
  82. package/src/components/SmallChart.vue +11 -10
  83. package/src/components/StatBox.vue +13 -5
  84. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  85. package/src/components/TabularExplorer/TabularCell.vue +7 -8
  86. package/src/components/TabularExplorer/TabularCellPopover.vue +19 -3
  87. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  88. package/src/components/TabularExplorer/TabularDateField.vue +41 -0
  89. package/src/components/TabularExplorer/TabularDateFilter.vue +403 -0
  90. package/src/components/TabularExplorer/TabularExplorer.vue +122 -913
  91. package/src/components/TabularExplorer/TabularFilterContent.vue +33 -25
  92. package/src/components/TabularExplorer/TabularFilterPopover.vue +7 -7
  93. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  94. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  95. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  96. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  97. package/src/components/TabularExplorer/TabularTable.vue +484 -0
  98. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  99. package/src/components/TabularExplorer/types.ts +32 -20
  100. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  101. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  102. package/src/components/TopicCard.vue +15 -14
  103. package/src/composables/useActiveDescendant.ts +5 -0
  104. package/src/composables/useDatasetResources.ts +164 -0
  105. package/src/composables/useHasTabularData.ts +2 -1
  106. package/src/composables/useResizable.ts +46 -0
  107. package/src/composables/useResourceCapabilities.ts +47 -39
  108. package/src/composables/useTranslation.ts +24 -9
  109. package/src/config.ts +1 -0
  110. package/src/functions/charts.ts +32 -1
  111. package/src/functions/dates.ts +26 -7
  112. package/src/functions/helpers.ts +15 -0
  113. package/src/functions/metrics.ts +57 -56
  114. package/src/functions/owned.ts +21 -0
  115. package/src/functions/paginate.ts +46 -0
  116. package/src/functions/resourceCapabilities.ts +34 -0
  117. package/src/functions/resources.ts +83 -0
  118. package/src/functions/schemas.ts +27 -0
  119. package/src/functions/scroll.ts +20 -0
  120. package/src/functions/tabular.ts +119 -4
  121. package/src/functions/tabularApi.ts +1 -43
  122. package/src/main.ts +32 -6
  123. package/src/types/dataservices.ts +15 -0
  124. package/src/types/organizations.ts +10 -0
  125. package/src/types/reuses.ts +12 -1
  126. package/src/types/search.ts +2 -2
  127. package/src/types/visualizations.ts +5 -0
  128. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-C3dDzrIr.js +0 -61
  129. /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
  130. /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
  131. /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as o, aV as h, V as m, ax as c } from "./proj-CsjVeojN.js";
1
+ import { B as o, u as h, V as m, l as c } from "./proj-DxGbobp7.js";
2
2
  const g = {
3
3
  /**
4
4
  * Triggered after a map frame is rendered.
@@ -135,14 +135,14 @@ class v extends o {
135
135
  }
136
136
  }
137
137
  export {
138
- L as C,
138
+ v as C,
139
139
  g as M,
140
- y as a,
141
- p as b,
142
- f as c,
143
- u as d,
144
- S as e,
145
- v as f,
146
- r as g,
147
- C as h
140
+ u as a,
141
+ f as b,
142
+ y as c,
143
+ S as d,
144
+ L as e,
145
+ p as f,
146
+ C as g,
147
+ r as h
148
148
  };
@@ -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 { c6 as x, _ as g } from "./main-DKu5SOAl.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-BDcYkhOc.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
  };
@@ -1,7 +1,7 @@
1
- import { V as x } from "./View-vp7vDb9q.js";
2
- import { c as I } from "./common-C8efyyuc.js";
3
- import { a as C, p as h, d as m, aV as S, ax as p, E as N, aq as L, aN as P, B as Z } from "./proj-CsjVeojN.js";
4
- import { c as T } from "./Image-BHQYZWzH.js";
1
+ import { I as x } from "./View-BYBpt-AU.js";
2
+ import { a as I } from "./common-BoeTUnDZ.js";
3
+ import { B as C, a6 as h, al as m, u as S, l as p, E as N, i as L, a3 as P, G as Z } from "./proj-DxGbobp7.js";
4
+ import { c as T } from "./Image-mNMBOofs.js";
5
5
  const n = {
6
6
  OPACITY: "opacity",
7
7
  VISIBLE: "visible",
@@ -313,7 +313,7 @@ const K = {
313
313
  */
314
314
  RENDERCOMPLETE: "rendercomplete"
315
315
  };
316
- class G extends D {
316
+ class q extends D {
317
317
  /**
318
318
  * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.
319
319
  */
@@ -588,9 +588,9 @@ function X(t, e) {
588
588
  const s = e.zoom;
589
589
  return s > t.minZoom && s <= t.maxZoom;
590
590
  }
591
- const V = [NaN, NaN, NaN, 0];
591
+ const U = [NaN, NaN, NaN, 0];
592
592
  let _;
593
- function U() {
593
+ function V() {
594
594
  return _ || (_ = T(1, 1, void 0, {
595
595
  willReadFrequently: !0,
596
596
  desynchronized: !0
@@ -628,7 +628,7 @@ function A(t) {
628
628
  }
629
629
  l(t);
630
630
  }
631
- const e = U();
631
+ const e = V();
632
632
  e.fillStyle = "#abcdef";
633
633
  let r = e.fillStyle;
634
634
  e.fillStyle = t, e.fillStyle === r && (e.fillStyle = "#fedcba", r = e.fillStyle, e.fillStyle = t, e.fillStyle === r && l(t));
@@ -682,7 +682,7 @@ function ee(t) {
682
682
  }
683
683
  function j(t) {
684
684
  if (t === "none")
685
- return V;
685
+ return U;
686
686
  if (d.hasOwnProperty(t))
687
687
  return d[t];
688
688
  if (R >= k) {
@@ -723,12 +723,12 @@ class re extends Z {
723
723
  }
724
724
  export {
725
725
  D as B,
726
- G as L,
727
- V as N,
728
- re as R,
729
- K as a,
730
- te as b,
731
- v as c,
726
+ q as L,
727
+ U as N,
728
+ K as R,
729
+ te as a,
730
+ v as b,
731
+ re as c,
732
732
  j as f,
733
733
  X as i,
734
734
  ee as l,
@@ -1,7 +1,7 @@
1
- import { c as v, E as f, aO as C, ay as h, aV as R } from "./proj-CsjVeojN.js";
1
+ import { aD as v, E as f, ar as C, aC as h, u as R } from "./proj-DxGbobp7.js";
2
2
  const r = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", I = r.includes("safari") && !r.includes("chrom");
3
3
  I && (r.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(r));
4
- const L = r.includes("webkit") && !r.includes("edge"), D = r.includes("macintosh"), w = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, y = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u = typeof Image < "u" && Image.prototype.decode, p = typeof createImageBitmap == "function", O = (function() {
4
+ const D = r.includes("webkit") && !r.includes("edge"), L = r.includes("macintosh"), w = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, y = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u = typeof Image < "u" && Image.prototype.decode, p = typeof createImageBitmap == "function", O = (function() {
5
5
  let e = !1;
6
6
  try {
7
7
  const t = Object.defineProperty({}, "passive", {
@@ -132,10 +132,10 @@ function W(e) {
132
132
  function b(e) {
133
133
  return e[0] > 0 && e[1] > 0;
134
134
  }
135
- function V(e, t, n) {
135
+ function H(e, t, n) {
136
136
  return n === void 0 && (n = [0, 0]), n[0] = e[0] * t + 0.5 | 0, n[1] = e[1] * t + 0.5 | 0, n;
137
137
  }
138
- function H(e, t) {
138
+ function V(e, t) {
139
139
  return Array.isArray(e) ? e : (t === void 0 ? t = [e, e] : (t[0] = e, t[1] = e), t);
140
140
  }
141
141
  const a = {
@@ -277,27 +277,27 @@ function Y(e, t) {
277
277
  }
278
278
  export {
279
279
  w as D,
280
- a as I,
281
- D as M,
280
+ F as I,
281
+ L as M,
282
282
  O as P,
283
283
  _ as T,
284
- L as W,
285
- F as a,
286
- y as b,
284
+ D as W,
285
+ M as a,
286
+ T as b,
287
287
  m as c,
288
- G as d,
288
+ a as d,
289
289
  Y as e,
290
- g as f,
290
+ P as f,
291
291
  N as g,
292
- b as h,
293
- W as i,
294
- S as j,
295
- k,
296
- K as l,
297
- B as m,
298
- P as n,
299
- M as o,
300
- T as r,
301
- V as s,
302
- H as t
292
+ g as h,
293
+ y as i,
294
+ G as j,
295
+ B as k,
296
+ W as l,
297
+ b as m,
298
+ K as n,
299
+ S as o,
300
+ k as r,
301
+ H as s,
302
+ V as t
303
303
  };
@@ -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-BDcYkhOc.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 { bT as d } from "./main-DKu5SOAl.js";
3
- import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-C3dDzrIr.js";
2
+ import { u as d } from "./main-BDcYkhOc.js";
3
+ import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-I8EZCgzp.js";
4
4
  const J = /* @__PURE__ */ c({
5
5
  __name: "JsonPreview.client",
6
6
  props: {