@datagouv/components-next 1.0.2-dev.3 → 1.0.2-dev.30

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 (47) hide show
  1. package/dist/Datafair.client-CSUWxY1U.js +30 -0
  2. package/dist/{Event--kp8kMdJ.js → Event-B0pbfyAo.js} +1 -1
  3. package/dist/JsonPreview.client-DWP5adeD.js +72 -0
  4. package/dist/{Map-BjUnLyj8.js → Map-ByzoJvTf.js} +2 -2
  5. package/dist/MapContainer.client-B0oJPrx5.js +102 -0
  6. package/dist/{OSM-s40W6sQ2.js → OSM-FSBCBM2l.js} +1 -1
  7. package/dist/{PdfPreview.client-C-w6-w44.js → PdfPreview.client-B2E_IWUj.js} +533 -548
  8. package/dist/{Pmtiles.client-BR7_ldHY.js → Pmtiles.client-STSFvULL.js} +575 -580
  9. package/dist/Swagger.client-mrRTl6ll.js +4 -0
  10. package/dist/{Tile-DbNFNPfU.js → Tile-nykTnQlb.js} +4 -4
  11. package/dist/{TileImage-BsXBxMtq.js → TileImage-RLU-wMoy.js} +1 -1
  12. package/dist/{View-BR92hTWP.js → View-SHblmfOT.js} +1 -1
  13. package/dist/XmlPreview.client-C0zaJXWA.js +64 -0
  14. package/dist/components-next.css +4 -4
  15. package/dist/components-next.js +13 -13
  16. package/dist/components.css +1 -1
  17. package/dist/{index-SrYZwgCT.js → index-kxzw3Ssm.js} +1164 -1164
  18. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-DfyFSZpM.js} +185 -183
  19. package/dist/{main-B2kXxWRG.js → main-BMXOPzsN.js} +34653 -33895
  20. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  21. package/dist/{tilecoord-Db24Px13.js → tilecoord-BgTy1qJO.js} +5 -5
  22. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-BgCuOAH6.js} +10 -10
  23. package/dist/{vue3-xml-viewer.common-BRxsqI9j.js → vue3-xml-viewer.common-CwN-5lms.js} +16 -16
  24. package/package.json +9 -5
  25. package/src/components/Form/SearchableSelect.vue +2 -1
  26. package/src/components/ReadMore.vue +1 -1
  27. package/src/components/ResourceAccordion/Datafair.client.vue +4 -10
  28. package/src/components/ResourceAccordion/JsonPreview.client.vue +13 -30
  29. package/src/components/ResourceAccordion/MapContainer.client.vue +7 -11
  30. package/src/components/ResourceAccordion/PdfPreview.client.vue +13 -29
  31. package/src/components/ResourceAccordion/Pmtiles.client.vue +5 -10
  32. package/src/components/ResourceAccordion/Preview.vue +5 -10
  33. package/src/components/ResourceAccordion/PreviewLoader.vue +1 -2
  34. package/src/components/ResourceAccordion/PreviewUnavailable.vue +22 -0
  35. package/src/components/ResourceAccordion/XmlPreview.client.vue +13 -30
  36. package/src/components/ResourceExplorer/ResourceExplorer.vue +21 -10
  37. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +12 -1
  38. package/src/composables/useResourceCapabilities.ts +1 -1
  39. package/src/types/dataservices.ts +2 -0
  40. package/src/types/organizations.ts +1 -1
  41. package/src/types/users.ts +0 -1
  42. package/dist/Datafair.client-E5D6ePRC.js +0 -35
  43. package/dist/JsonPreview.client-C-6eBbPw.js +0 -87
  44. package/dist/MapContainer.client-DRkAmdOc.js +0 -105
  45. package/dist/Swagger.client-D4-F6yEf.js +0 -4
  46. package/dist/XmlPreview.client-Dl2VCgXF.js +0 -79
  47. /package/assets/illustrations/{_microscope.svg → microscope.svg} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as K, ref as C, reactive as P, computed as z, watch as g, createElementBlock as Q, nextTick as W, onUnmounted as X, onMounted as Y, openBlock as Z, normalizeStyle as ee, unref as H, createElementVNode as $, renderSlot as j } from "vue";
1
+ import { defineComponent as K, ref as C, reactive as P, computed as z, watch as g, nextTick as W, onUnmounted as Q, onMounted as X, openBlock as Y, createElementBlock as Z, normalizeStyle as ee, unref as H, createElementVNode as $, renderSlot as j } from "vue";
2
2
  var L = null;
3
3
  function te(e) {
4
4
  return L || (L = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(r) {
@@ -197,11 +197,11 @@ var D = K({ __name: "text-clamp", props: { text: { type: String, required: !0 },
197
197
  W((() => {
198
198
  h();
199
199
  }));
200
- })), X((() => {
200
+ })), Q((() => {
201
201
  A();
202
- })), Y((() => {
202
+ })), X((() => {
203
203
  h();
204
- })), (a, c) => (Z(), Q("div", { ref_key: "textClampRef", ref: n, class: "text-clamp", style: ee({ overflow: "hidden", maxHeight: H(u) }) }, [$("span", { ref_key: "contentRef", ref: s }, [j(a.$slots, "before", { expand: O, collapse: T, toggle: F, clamped: H(l), expanded: i.localExpanded }), $("span", { ref_key: "textRef", ref: o, "aria-label": e.text }, null, 8, le), j(a.$slots, "after", { expand: O, collapse: T, toggle: F, clamped: H(l), expanded: i.localExpanded })], 512)], 4));
204
+ })), (a, c) => (Y(), Z("div", { ref_key: "textClampRef", ref: n, class: "text-clamp", style: ee({ overflow: "hidden", maxHeight: H(u) }) }, [$("span", { ref_key: "contentRef", ref: s }, [j(a.$slots, "before", { expand: O, collapse: T, toggle: F, clamped: H(l), expanded: i.localExpanded }), $("span", { ref_key: "textRef", ref: o, "aria-label": e.text }, null, 8, le), j(a.$slots, "after", { expand: O, collapse: T, toggle: F, clamped: H(l), expanded: i.localExpanded })], 512)], 4));
205
205
  } });
206
206
  D.__file = "package/text-clamp.vue";
207
207
  const ce = (e) => (e.install = function(r) {
@@ -1,6 +1,6 @@
1
1
  import { T as _, W as nt, n as xt, c as H, b as et } from "./Image-34hvypZI.js";
2
2
  import { z as Tt, g as pt } from "./common-PJfpC179.js";
3
- import { aC as It, E as ft, al as Xt, U as dt, g as at, X as Wt, w as Mt, F as b, n as _t, L, an as gt, aS as vt, x as Yt, r as Lt, aT as Ft, ak as wt, aI as yt, az as Dt, aJ as Ot, aU as st, ae as ot, i as Ct, W as z, a1 as $, d as V, l as Pt, u as rt, a7 as ht, I as At, a as Rt } from "./proj-DsetBcW7.js";
3
+ import { aC as It, E as ft, al as Xt, U as dt, g as at, X as Wt, w as Mt, F as b, L, an as _t, aS as vt, n as gt, x as Yt, r as Lt, aT as Ft, ak as wt, aI as yt, az as Dt, aJ as Ot, aU as st, ae as ot, i as Ct, W as z, a1 as $, d as V, l as Pt, u as rt, a7 as ht, I as At, a as Rt } from "./proj-DsetBcW7.js";
4
4
  class mt extends It {
5
5
  /**
6
6
  * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
@@ -369,7 +369,7 @@ function St(a, t, e, s, n, i, c, m, g, T, X, x, F, w) {
369
369
  return Math.round(o * e) / e;
370
370
  }
371
371
  r.globalCompositeOperation = "lighter";
372
- const E = _t();
372
+ const E = gt();
373
373
  g.forEach(function(o, y, C) {
374
374
  Mt(E, o.extent);
375
375
  });
@@ -405,7 +405,7 @@ function St(a, t, e, s, n, i, c, m, g, T, X, x, F, w) {
405
405
  ), o.clipExtent && l.restore();
406
406
  }
407
407
  }));
408
- const u = gt(c);
408
+ const u = _t(c);
409
409
  return m.getTriangles().forEach(function(o, y, C) {
410
410
  const p = o.source, I = o.target;
411
411
  let v = p[0][0], Y = p[0][1], W = p[1][0], M = p[1][1], D = p[2][0], A = p[2][1];
@@ -490,7 +490,7 @@ class Kt {
490
490
  const u = d[0] + "/" + d[1];
491
491
  return g[u] || (g[u] = T(d)), g[u];
492
492
  }, this.maxSourceExtent_ = n, this.errorThresholdSquared_ = i * i, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!n && !!this.sourceProj_.getExtent() && L(n) >= L(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? L(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? L(this.targetProj_.getExtent()) : null;
493
- const X = gt(s), x = yt(s), F = Dt(s), w = Ot(s), r = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(F), l = this.transformInv_(w), f = Zt + (c ? Math.max(
493
+ const X = _t(s), x = yt(s), F = Dt(s), w = Ot(s), r = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(F), l = this.transformInv_(w), f = Zt + (c ? Math.max(
494
494
  0,
495
495
  Math.ceil(
496
496
  Math.log2(
@@ -670,7 +670,7 @@ class Kt {
670
670
  * @return {import("../extent.js").Extent} Calculated extent.
671
671
  */
672
672
  calculateSourceExtent() {
673
- const t = _t();
673
+ const t = gt();
674
674
  return this.triangles_.forEach(function(e, s, n) {
675
675
  const i = e.source;
676
676
  $(t, i[0]), $(t, i[1]), $(t, i[2]);
@@ -1,4 +1,4 @@
1
- import { defineComponent as T, ref as k, onMounted as J, h as g, watch as F, computed as O, inject as $, provide as q, createElementBlock as _, openBlock as N, normalizeClass as S, toDisplayString as A, resolveComponent as ie, createCommentVNode as Y, createElementVNode as z, renderSlot as ce, createTextVNode as pe, createVNode as fe, nextTick as de } from "vue";
1
+ import { defineComponent as T, ref as k, onMounted as J, h as g, watch as F, computed as O, inject as $, provide as q, openBlock as _, createElementBlock as N, toDisplayString as A, normalizeClass as S, resolveComponent as ie, createElementVNode as z, renderSlot as ce, createTextVNode as pe, createCommentVNode as Y, createVNode as fe, nextTick as de } from "vue";
2
2
  const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/, X = T({
3
3
  name: "JsonString",
4
4
  props: {
@@ -66,7 +66,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
66
66
  },
67
67
  setup(e) {
68
68
  const y = e, c = O(() => y.jsonValue === null ? "null" : "undefined");
69
- return (p, d) => (N(), _("span", ye, A(c.value), 1));
69
+ return (p, d) => (_(), N("span", ye, A(c.value), 1));
70
70
  }
71
71
  }), he = /* @__PURE__ */ T({
72
72
  __name: "json-number",
@@ -79,7 +79,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
79
79
  },
80
80
  setup(e) {
81
81
  const y = e, c = O(() => Number.isInteger(y.jsonValue));
82
- return (p, d) => (N(), _("span", {
82
+ return (p, d) => (_(), N("span", {
83
83
  class: S(["jv-item", "jv-number", c.value ? "jv-number-integer" : "jv-number-float"])
84
84
  }, A(e.jsonValue.toString()), 3));
85
85
  }
@@ -95,7 +95,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
95
95
  }
96
96
  },
97
97
  setup(e) {
98
- return (y, c) => (N(), _("span", ge, A(e.jsonValue.toString()), 1));
98
+ return (y, c) => (_(), N("span", ge, A(e.jsonValue.toString()), 1));
99
99
  }
100
100
  }), je = T({
101
101
  name: "JsonObject",
@@ -277,7 +277,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
277
277
  }
278
278
  },
279
279
  setup(e) {
280
- return (y, c) => (N(), _("span", {
280
+ return (y, c) => (_(), N("span", {
281
281
  class: S(["jv-item", "jv-function"]),
282
282
  title: e.jsonValue.toString()
283
283
  }, " <function> ", 8, Ee));
@@ -295,7 +295,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
295
295
  },
296
296
  setup(e) {
297
297
  const y = e, c = $("timeformat", (d) => d.toLocaleString()), p = O(() => c(y.jsonValue));
298
- return (d, i) => (N(), _("span", ke, ' "' + A(p.value) + '" ', 1));
298
+ return (d, i) => (_(), N("span", ke, ' "' + A(p.value) + '" ', 1));
299
299
  }
300
300
  }), Te = {
301
301
  class: /* @__PURE__ */ S(["jv-item", "jv-regexp"])
@@ -309,7 +309,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
309
309
  }
310
310
  },
311
311
  setup(e) {
312
- return (y, c) => (N(), _("span", Te, A(e.jsonValue.toString()), 1));
312
+ return (y, c) => (_(), N("span", Te, A(e.jsonValue.toString()), 1));
313
313
  }
314
314
  }), I = T({
315
315
  name: "JsonBox",
@@ -1041,10 +1041,10 @@ const Me = /* @__PURE__ */ _e(Ae), Ve = function(e, y) {
1041
1041
  };
1042
1042
  function Re(e, y, c, p, d, i) {
1043
1043
  const n = ie("json-box");
1044
- return N(), _("div", {
1044
+ return _(), N("div", {
1045
1045
  class: S(e.jvClass)
1046
1046
  }, [
1047
- e.copyable ? (N(), _("div", {
1047
+ e.copyable ? (_(), N("div", {
1048
1048
  key: 0,
1049
1049
  class: S(`jv-tooltip ${e.copyText.align || "right"}`)
1050
1050
  }, [
@@ -1067,7 +1067,7 @@ function Re(e, y, c, p, d, i) {
1067
1067
  "preview-mode": e.previewMode
1068
1068
  }, null, 8, ["value", "sort", "preview-mode"])
1069
1069
  ], 2),
1070
- e.expandableCode && e.boxed ? (N(), _("div", {
1070
+ e.expandableCode && e.boxed ? (_(), N("div", {
1071
1071
  key: 1,
1072
1072
  class: "jv-more",
1073
1073
  onClick: y[0] || (y[0] = (...t) => e.toggleExpandCode && e.toggleExpandCode(...t))
@@ -1,24 +1,24 @@
1
- import { b as Ke } from "./main-B2kXxWRG.js";
1
+ import { g as Ke } from "./main-BMXOPzsN.js";
2
2
  import We from "vue";
3
- function Fe(I, K) {
3
+ function Fe($, K) {
4
4
  for (var V = 0; V < K.length; V++) {
5
5
  const p = K[V];
6
6
  if (typeof p != "string" && !Array.isArray(p)) {
7
7
  for (const X in p)
8
- if (X !== "default" && !(X in I)) {
8
+ if (X !== "default" && !(X in $)) {
9
9
  const _ = Object.getOwnPropertyDescriptor(p, X);
10
- _ && Object.defineProperty(I, X, _.get ? _ : {
10
+ _ && Object.defineProperty($, X, _.get ? _ : {
11
11
  enumerable: !0,
12
12
  get: () => p[X]
13
13
  });
14
14
  }
15
15
  }
16
16
  }
17
- return Object.freeze(Object.defineProperty(I, Symbol.toStringTag, { value: "Module" }));
17
+ return Object.freeze(Object.defineProperty($, Symbol.toStringTag, { value: "Module" }));
18
18
  }
19
19
  var Y = { exports: {} }, ee;
20
20
  function ze() {
21
- return ee || (ee = 1, (function(I) {
21
+ return ee || (ee = 1, (function($) {
22
22
  (function() {
23
23
  var K = {
24
24
  /***/
@@ -426,7 +426,7 @@ function ze() {
426
426
  default: function() {
427
427
  return (
428
428
  /* binding */
429
- Ie
429
+ $e
430
430
  );
431
431
  }
432
432
  }), typeof window < "u") {
@@ -466,7 +466,7 @@ function ze() {
466
466
  class: "bracket"
467
467
  }, ">", -1));
468
468
  function G(o, v, g, E, h, b) {
469
- const y = (0, e.resolveComponent)("CaretDown"), S = (0, e.resolveComponent)("CaretRight"), $ = (0, e.resolveComponent)("XmlElementName"), Q = (0, e.resolveComponent)("XmlAttributeLine"), q = (0, e.resolveComponent)("XmlElement", !0), B = (0, e.resolveComponent)("XmlElementContent"), je = (0, e.resolveComponent)("XmlCDataSection"), Ue = (0, e.resolveComponent)("XmlRemark");
469
+ const y = (0, e.resolveComponent)("CaretDown"), S = (0, e.resolveComponent)("CaretRight"), I = (0, e.resolveComponent)("XmlElementName"), Q = (0, e.resolveComponent)("XmlAttributeLine"), q = (0, e.resolveComponent)("XmlElement", !0), B = (0, e.resolveComponent)("XmlElementContent"), je = (0, e.resolveComponent)("XmlCDataSection"), Ue = (0, e.resolveComponent)("XmlRemark");
470
470
  return (0, e.openBlock)(), (0, e.createElementBlock)("div", r, [(0, e.createElementVNode)("div", null, [o.selfClosing ? (0, e.createCommentVNode)("", !0) : ((0, e.openBlock)(), (0, e.createElementBlock)(e.Fragment, {
471
471
  key: 0
472
472
  }, [o.collapsed ? ((0, e.openBlock)(), (0, e.createBlock)(S, {
@@ -477,7 +477,7 @@ function ze() {
477
477
  key: 0,
478
478
  class: "caret",
479
479
  onClick: o.toggleCollapsed
480
- }, null, 8, ["onClick"]))], 64)), u, (0, e.createVNode)($, {
480
+ }, null, 8, ["onClick"]))], 64)), u, (0, e.createVNode)(I, {
481
481
  class: "clickable",
482
482
  name: o.name,
483
483
  onClick: o.toggleCollapsed
@@ -496,7 +496,7 @@ function ze() {
496
496
  }, null, 8, ["cdataSection"]))), 128)), ((0, e.openBlock)(!0), (0, e.createElementBlock)(e.Fragment, null, (0, e.renderList)(o.remarks, (L, N) => ((0, e.openBlock)(), (0, e.createBlock)(Ue, {
497
497
  key: `r${N}`,
498
498
  remark: L
499
- }, null, 8, ["remark"]))), 128))])])), !o.selfClosing && !o.collapsed ? ((0, e.openBlock)(), (0, e.createElementBlock)("div", w, [O, (0, e.createVNode)($, {
499
+ }, null, 8, ["remark"]))), 128))])])), !o.selfClosing && !o.collapsed ? ((0, e.openBlock)(), (0, e.createElementBlock)("div", w, [O, (0, e.createVNode)(I, {
500
500
  name: o.name,
501
501
  closing: !0
502
502
  }, null, 8, ["name"]), f])) : (0, e.createCommentVNode)("", !0)]);
@@ -549,8 +549,8 @@ function ze() {
549
549
  var c = /* @__PURE__ */ (0, M.A)(d, [["render", m], ["__scopeId", "data-v-75f773a5"]]);
550
550
  function D(o, v, g, E, h, b) {
551
551
  const y = (0, e.resolveComponent)("XmlAttribute");
552
- return (0, e.openBlock)(), (0, e.createElementBlock)("span", null, [((0, e.openBlock)(!0), (0, e.createElementBlock)(e.Fragment, null, (0, e.renderList)(o.attributes, (S, $) => ((0, e.openBlock)(), (0, e.createBlock)(y, {
553
- key: $,
552
+ return (0, e.openBlock)(), (0, e.createElementBlock)("span", null, [((0, e.openBlock)(!0), (0, e.createElementBlock)(e.Fragment, null, (0, e.renderList)(o.attributes, (S, I) => ((0, e.openBlock)(), (0, e.createBlock)(y, {
553
+ key: I,
554
554
  attribute: S
555
555
  }, null, 8, ["attribute"]))), 128))]);
556
556
  }
@@ -705,12 +705,12 @@ function ze() {
705
705
  node: Element
706
706
  },
707
707
  setup(o) {
708
- const v = (0, e.ref)(!1), g = (0, e.computed)(() => o.node.nodeName), E = (0, e.computed)(() => Array.from(o.node.childNodes)), h = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 1)), b = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 3)), y = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 4)), S = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 8)), $ = (0, e.computed)(() => o.node.attributes && Array.from(o.node.attributes) || []), Q = !h.value.length && !b.value.length && !y.value.length && !S.value.length;
708
+ const v = (0, e.ref)(!1), g = (0, e.computed)(() => o.node.nodeName), E = (0, e.computed)(() => Array.from(o.node.childNodes)), h = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 1)), b = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 3)), y = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 4)), S = (0, e.computed)(() => E.value && E.value.filter((B) => B.nodeType === 8)), I = (0, e.computed)(() => o.node.attributes && Array.from(o.node.attributes) || []), Q = !h.value.length && !b.value.length && !y.value.length && !S.value.length;
709
709
  return {
710
710
  name: g,
711
711
  childElements: h,
712
712
  childContents: b,
713
- attributes: $,
713
+ attributes: I,
714
714
  cdataSections: y,
715
715
  remarks: S,
716
716
  selfClosing: Q,
@@ -744,8 +744,8 @@ function ze() {
744
744
  rootNode: g
745
745
  };
746
746
  }
747
- }), Ve = /* @__PURE__ */ (0, M.A)(Ne, [["render", t]]), $e = Ve, Ie = $e;
748
- })(), I.exports = X;
747
+ }), Ve = /* @__PURE__ */ (0, M.A)(Ne, [["render", t]]), Ie = Ve, $e = Ie;
748
+ })(), $.exports = X;
749
749
  })();
750
750
  })(Y)), Y.exports;
751
751
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.0.2-dev.3",
3
+ "version": "1.0.2-dev.30",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -16,11 +16,11 @@
16
16
  "src"
17
17
  ],
18
18
  "dependencies": {
19
- "@floating-ui/vue": "^1.1.8",
20
- "@types/leaflet": "^1.9.17",
19
+ "@floating-ui/vue": "^1.1.11",
21
20
  "@headlessui/vue": "^1.7.23",
22
21
  "@remixicon/vue": "^4.5.0",
23
22
  "@types/hast": "^3.0.4",
23
+ "@types/leaflet": "^1.9.17",
24
24
  "@vueuse/core": "^13.1.0",
25
25
  "@vueuse/router": "^13.1.0",
26
26
  "chart.js": "^4.4.8",
@@ -48,9 +48,7 @@
48
48
  "swagger-ui-dist": "^5.27.1",
49
49
  "unified": "^11.0.5",
50
50
  "unist-util-visit": "^5.0.0",
51
- "vue": "^3.5.13",
52
51
  "vue-content-loader": "^2.0.1",
53
- "vue-router": "^4.5.0",
54
52
  "vue-sonner": "^2.0.9",
55
53
  "vue3-json-viewer": "^2.4.1",
56
54
  "vue3-text-clamp": "^0.1.2",
@@ -76,8 +74,14 @@
76
74
  "typescript": "^5.7.3",
77
75
  "vite": "^7.0",
78
76
  "vite-plugin-vue-devtools": "^8.0",
77
+ "vue": "^3.5.30",
78
+ "vue-router": "^4.6.4",
79
79
  "vue-tsc": "^3.0"
80
80
  },
81
+ "peerDependencies": {
82
+ "vue": "^3.5.13",
83
+ "vue-router": "^4.5.0"
84
+ },
81
85
  "scarfSettings": {
82
86
  "enabled": false
83
87
  },
@@ -10,8 +10,9 @@
10
10
  :class="{ 'sr-only': hideLabel }"
11
11
  >
12
12
  {{ label }}
13
+ <!-- $props needed: in generic components, vue-tsc resolves `required` to the Nuxt auto-imported function instead of the prop -->
13
14
  <span
14
- v-if="required"
15
+ v-if="$props.required"
15
16
  class="text-new-primary"
16
17
  >*</span>
17
18
  <span
@@ -3,7 +3,7 @@
3
3
  <div
4
4
  ref="readMoreRef"
5
5
  class="overflow-hidden"
6
- :style="{ height: containerHeight + 'px' }"
6
+ :style="{ height: readMoreRequired ? containerHeight + 'px' : 'auto' }"
7
7
  >
8
8
  <div ref="containerRef">
9
9
  <slot />
@@ -9,21 +9,15 @@
9
9
  border: none;"
10
10
  />
11
11
  </div>
12
- <SimpleBanner
13
- v-else
14
- type="warning"
15
- class="flex items-center space-x-2"
16
- >
17
- <RiErrorWarningLine class="shrink-0 size-6" />
18
- <span>{{ t("Erreur lors de l'affichage de l'aperçu.") }}</span>
19
- </SimpleBanner>
12
+ <PreviewUnavailable v-else>
13
+ {{ t("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.") }}
14
+ </PreviewUnavailable>
20
15
  </div>
21
16
  </template>
22
17
 
23
18
  <script setup lang="ts">
24
19
  import { computed } from 'vue'
25
- import { RiErrorWarningLine } from '@remixicon/vue'
26
- import SimpleBanner from '../SimpleBanner.vue'
20
+ import PreviewUnavailable from './PreviewUnavailable.vue'
27
21
  import type { Resource } from '../../types/resources'
28
22
  import type { Dataset, DatasetV2 } from '../../types/datasets'
29
23
  import { useTranslation } from '../../composables/useTranslation'
@@ -17,42 +17,25 @@
17
17
  >
18
18
  {{ t("Chargement de l'aperçu JSON...") }}
19
19
  </div>
20
- <SimpleBanner
21
- v-else-if="fileTooLarge"
22
- type="warning"
23
- class="flex items-center space-x-2"
24
- >
25
- <RiErrorWarningLine class="shrink-0 size-6" />
26
- <span>{{ fileSizeBytes
27
- ? t("Fichier JSON 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.")
28
- : t("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.")
29
- }}</span>
30
- </SimpleBanner>
31
- <SimpleBanner
32
- v-else-if="error === 'network'"
33
- type="warning"
34
- class="flex items-center space-x-2"
35
- >
36
- <RiErrorWarningLine class="shrink-0 size-6" />
37
- <span>{{ t("Ce fichier JSON 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.") }}</span>
38
- </SimpleBanner>
39
- <SimpleBanner
40
- v-else-if="error"
41
- type="warning"
42
- class="flex items-center space-x-2"
43
- >
44
- <RiErrorWarningLine class="shrink-0 size-6" />
45
- <span>{{ t("Erreur lors du chargement de l'aperçu JSON.") }}</span>
46
- </SimpleBanner>
20
+ <PreviewUnavailable v-else-if="fileTooLarge">
21
+ {{ fileSizeBytes
22
+ ? t("Le fichier JSON est trop volumineux pour être prévisualisé. Téléchargez-le depuis l'onglet Téléchargements.")
23
+ : t("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le depuis l'onglet Téléchargements.")
24
+ }}
25
+ </PreviewUnavailable>
26
+ <PreviewUnavailable v-else-if="error === 'network'">
27
+ {{ t("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le depuis l'onglet Téléchargements.") }}
28
+ </PreviewUnavailable>
29
+ <PreviewUnavailable v-else-if="error">
30
+ {{ t("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.") }}
31
+ </PreviewUnavailable>
47
32
  </div>
48
33
  </template>
49
34
 
50
35
  <script setup lang="ts">
51
36
  import { computed, defineAsyncComponent, onMounted, ref } from 'vue'
52
- import { RiErrorWarningLine } from '@remixicon/vue'
53
-
54
37
  import { useComponentsConfig } from '../../config'
55
- import SimpleBanner from '../SimpleBanner.vue'
38
+ import PreviewUnavailable from './PreviewUnavailable.vue'
56
39
  import type { Resource } from '../../types/resources'
57
40
  import { useTranslation } from '../../composables/useTranslation'
58
41
  import { getResourceFilesize } from '../../functions/datasets'
@@ -1,12 +1,7 @@
1
1
  <template>
2
- <SimpleBanner
3
- v-if="hasError"
4
- type="warning"
5
- class="flex items-center space-x-2"
6
- >
7
- <RiErrorWarningLine class="shrink-0 size-6" />
8
- <span>{{ t("L'aperçu cartographique de ce fichier n'a pas pu être chargé.") }}</span>
9
- </SimpleBanner>
2
+ <PreviewUnavailable v-if="hasError">
3
+ {{ t("L'aperçu cartographique de ce fichier n'a pas pu être chargé.") }}
4
+ </PreviewUnavailable>
10
5
  <div
11
6
  v-else
12
7
  id="map"
@@ -16,9 +11,7 @@
16
11
 
17
12
  <script setup lang = "ts">
18
13
  import { onMounted, ref, useTemplateRef } from 'vue'
19
- import { RiErrorWarningLine } from '@remixicon/vue'
20
-
21
- import SimpleBanner from '../SimpleBanner.vue'
14
+ import PreviewUnavailable from './PreviewUnavailable.vue'
22
15
  import type { Resource } from '../../types/resources'
23
16
  import { useTranslation } from '../../composables/useTranslation'
24
17
 
@@ -96,7 +89,10 @@ async function displayMap() {
96
89
 
97
90
  const attributions = new GeoportalAttribution({
98
91
  position: 'bottom-right',
92
+ // collapsed option is ignored by the library, thus the override below
93
+ // see https://github.com/IGNF/geopf-extensions-openlayers/issues/497
99
94
  })
95
+ attributions.setCollapsed(false)
100
96
  map.addControl(attributions)
101
97
 
102
98
  const layerImport = new LayerImport({
@@ -18,43 +18,27 @@
18
18
  >
19
19
  {{ t("Chargement de l'aperçu PDF...") }}
20
20
  </div>
21
- <SimpleBanner
22
- v-else-if="fileTooLarge"
23
- type="warning"
24
- class="flex items-center space-x-2"
25
- >
26
- <RiErrorWarningLine class="flex-none size-6" />
27
- <span>{{ fileSizeBytes
28
- ? t("Fichier PDF 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.")
29
- : t("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.")
30
- }}</span>
31
- </SimpleBanner>
32
- <SimpleBanner
33
- v-else-if="error === 'network'"
34
- type="warning"
35
- class="flex items-center space-x-2"
36
- >
37
- <RiErrorWarningLine class="flex-none size-6" />
38
- <span>{{ t("Ce fichier PDF 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.") }}</span>
39
- </SimpleBanner>
40
- <SimpleBanner
41
- v-else-if="error"
42
- type="warning"
43
- class="flex items-center space-x-2"
44
- >
45
- <RiErrorWarningLine class="flex-none size-6" />
46
- <span>{{ t("Erreur lors du chargement de l'aperçu PDF. Pour consulter le fichier, téléchargez-le depuis l'onglet Téléchargements.") }}</span>
47
- </SimpleBanner>
21
+ <PreviewUnavailable v-else-if="fileTooLarge">
22
+ {{ fileSizeBytes
23
+ ? t("Le fichier PDF est trop volumineux pour être prévisualisé. Téléchargez-le depuis l'onglet Téléchargements.")
24
+ : t("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le depuis l'onglet Téléchargements.")
25
+ }}
26
+ </PreviewUnavailable>
27
+ <PreviewUnavailable v-else-if="error === 'network'">
28
+ {{ t("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le depuis l'onglet Téléchargements.") }}
29
+ </PreviewUnavailable>
30
+ <PreviewUnavailable v-else-if="error">
31
+ {{ t("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.") }}
32
+ </PreviewUnavailable>
48
33
  </div>
49
34
  </template>
50
35
 
51
36
  <script setup lang="ts">
52
37
  import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
53
- import { RiErrorWarningLine } from '@remixicon/vue'
54
38
  import * as pdfjsLib from 'pdfjs-dist'
55
39
  import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.min.mjs?url'
56
40
  import type { PDFDocumentProxy } from 'pdfjs-dist'
57
- import SimpleBanner from '../SimpleBanner.vue'
41
+ import PreviewUnavailable from './PreviewUnavailable.vue'
58
42
  import { useComponentsConfig } from '../../config'
59
43
  import type { Resource } from '../../types/resources'
60
44
  import { useTranslation } from '../../composables/useTranslation'
@@ -1,13 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <SimpleBanner
4
- v-if="hasError"
5
- type="warning"
6
- class="flex items-center space-x-2"
7
- >
8
- <RiErrorWarningLine class="shrink-0 size-6" />
9
- <span>{{ t("L'aperçu cartographique de ce fichier n'a pas pu être chargé.") }}</span>
10
- </SimpleBanner>
3
+ <PreviewUnavailable v-if="hasError">
4
+ {{ t("L'aperçu cartographique de ce fichier n'a pas pu être chargé.") }}
5
+ </PreviewUnavailable>
11
6
  <div
12
7
  v-else
13
8
  class="-mx-4"
@@ -53,7 +48,7 @@
53
48
 
54
49
  <script setup lang="ts">
55
50
  import { computed, onMounted, ref, useTemplateRef } from 'vue'
56
- import { RiErrorWarningLine, RiExternalLinkFill } from '@remixicon/vue'
51
+ import { RiExternalLinkFill } from '@remixicon/vue'
57
52
  import { Protocol, PMTiles } from 'pmtiles'
58
53
  import maplibregl from 'maplibre-gl'
59
54
  import DOMPurify from 'dompurify'
@@ -64,7 +59,7 @@ import type { Resource } from '../../types/resources'
64
59
  import type { Dataset, DatasetV2 } from '../../types/datasets'
65
60
  import BrandedButton from '../BrandedButton.vue'
66
61
  import styleVector from '../../../assets/json/vector.json'
67
- import SimpleBanner from '../SimpleBanner.vue'
62
+ import PreviewUnavailable from './PreviewUnavailable.vue'
68
63
  import { useTranslation } from '../../composables/useTranslation'
69
64
  import franceSvg from './france.svg?raw'
70
65
  import { getOwnerName, getOwnerPage } from '../../functions/owned'
@@ -1,13 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <SimpleBanner
4
- v-if="hasError"
5
- type="warning"
6
- class="flex items-center space-x-2"
7
- >
8
- <RiErrorWarningLine class="shrink-0 size-6" />
9
- <span>{{ t("L'aperçu de ce fichier n'a pas pu être chargé.") }}</span>
10
- </SimpleBanner>
3
+ <PreviewUnavailable v-if="hasError">
4
+ {{ t("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.") }}
5
+ </PreviewUnavailable>
11
6
  <PreviewLoader v-else-if="loading" />
12
7
  <div
13
8
  v-else
@@ -105,7 +100,7 @@
105
100
 
106
101
  <script setup lang="ts">
107
102
  import { computed, onMounted, ref } from 'vue'
108
- import { RiArrowDownLine, RiArrowUpLine, RiErrorWarningLine, RiExternalLinkFill } from '@remixicon/vue'
103
+ import { RiArrowDownLine, RiArrowUpLine, RiExternalLinkFill } from '@remixicon/vue'
109
104
  import Pagination from '../Pagination.vue'
110
105
  import { getData, type SortConfig } from '../../functions/tabularApi'
111
106
  import { useFormatDate } from '../../functions/dates'
@@ -113,7 +108,7 @@ import { trackEvent } from '../../functions/matomo'
113
108
  import type { Resource } from '../../types/resources'
114
109
  import { useComponentsConfig } from '../../config'
115
110
  import BrandedButton from '../BrandedButton.vue'
116
- import SimpleBanner from '../SimpleBanner.vue'
111
+ import PreviewUnavailable from './PreviewUnavailable.vue'
117
112
  import { useTranslation } from '../../composables/useTranslation'
118
113
  import franceSvg from './france.svg?raw'
119
114
  import PreviewLoader from './PreviewLoader.vue'
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <ContentLoader
3
- :width="1124"
4
- :height="300"
3
+ viewBox="0 0 1124 300"
5
4
  :speed="2"
6
5
  primary-color="#f3f3f3"
7
6
  secondary-color="#ecebeb"
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div class="flex flex-col items-center py-12">
3
+ <img
4
+ :src="microscopeSrc"
5
+ class="h-20 mb-3"
6
+ alt=""
7
+ >
8
+ <p class="fr-text--bold mb-1">
9
+ {{ t("Aucun aperçu disponible") }}
10
+ </p>
11
+ <p class="text-sm text-gray-medium mb-0 text-center max-w-lg">
12
+ <slot />
13
+ </p>
14
+ </div>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import { useTranslation } from '../../composables/useTranslation'
19
+ import microscopeSrc from '../../../assets/illustrations/microscope.svg?url'
20
+
21
+ const { t } = useTranslation()
22
+ </script>