@datagouv/components-next 1.0.2-dev.8 → 1.0.2-dev.9

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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as f, computed as a, createElementBlock as o, openBlock as t, createBlock as p, createElementVNode as i, withCtx as m, createVNode as _, unref as c, toDisplayString as x } from "vue";
2
- import { a as h, _ as v, F as g } from "./main-B2kXxWRG.js";
2
+ import { a as h, _ as v, F as g } from "./main-qc4CO9Kn.js";
3
3
  const k = { class: "fr-text--xs" }, b = { key: 0 }, y = ["src"], B = /* @__PURE__ */ f({
4
4
  __name: "Datafair.client",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, defineAsyncComponent as b, ref as o, computed as w, onMounted as N, createElementBlock as p, openBlock as r, createBlock as f, createCommentVNode as T, createVNode as u, unref as t, toDisplayString as i, withCtx as d, createElementVNode as h } from "vue";
2
- import { u as P, a as E, g as q, _ as m, F as v } from "./main-B2kXxWRG.js";
2
+ import { u as P, a as E, g as q, _ as m, F as v } from "./main-qc4CO9Kn.js";
3
3
  const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
4
4
  key: 1,
5
5
  class: "text-gray-medium"
@@ -1,22 +1,22 @@
1
- import { defineComponent as G, useTemplateRef as W, ref as z, onMounted as B, createBlock as F, createElementBlock as N, openBlock as u, withCtx as V, createVNode as U, createElementVNode as q, unref as m, toDisplayString as A } from "vue";
2
- import { a as D, _ as O, F as P } from "./main-B2kXxWRG.js";
1
+ import { defineComponent as G, useTemplateRef as W, ref as z, onMounted as B, createBlock as F, createElementBlock as N, openBlock as m, withCtx as V, createVNode as U, createElementVNode as q, unref as f, toDisplayString as A } from "vue";
2
+ import { a as D, _ as O, F as P } from "./main-qc4CO9Kn.js";
3
3
  const j = /* @__PURE__ */ G({
4
4
  __name: "MapContainer.client",
5
5
  props: {
6
6
  resource: {}
7
7
  },
8
- setup(f) {
9
- const a = f, { t: d } = D();
8
+ setup(d) {
9
+ const a = d, { t: w } = D();
10
10
  let e = null;
11
11
  const r = W("mapRef"), n = z(!1);
12
- async function w() {
12
+ async function y() {
13
13
  const [
14
- { default: i },
15
14
  { default: s },
16
- { default: y },
15
+ { default: i },
17
16
  { default: h },
18
17
  { default: C },
19
- _
18
+ { default: _ },
19
+ g
20
20
  ] = await Promise.all([
21
21
  import("./View-BR92hTWP.js").then((t) => t.M),
22
22
  import("./Map-BjUnLyj8.js").then((t) => t.U),
@@ -24,75 +24,77 @@ const j = /* @__PURE__ */ G({
24
24
  import("./Tile-DbNFNPfU.js").then((t) => t.d),
25
25
  import("./OSM-s40W6sQ2.js"),
26
26
  // @ts-expect-error no types provided
27
- import("./index-SrYZwgCT.js")
28
- ]), { CRS: g, GeoportalAttribution: S, GeoportalFullScreen: M, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = _;
29
- await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), g.load(), e = new s({
27
+ import("./index-BZsAZ7iw.js")
28
+ ]), { CRS: S, GeoportalAttribution: M, GeoportalFullScreen: b, GeoportalZoom: v, LayerImport: L, LayerSwitcher: R } = g;
29
+ await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), S.load(), e = new i({
30
30
  target: r.value,
31
31
  layers: [
32
- new h({
33
- source: new C()
32
+ new C({
33
+ source: new _()
34
34
  })
35
35
  ],
36
- view: new i({
36
+ view: new s({
37
37
  center: [288074.8449901076, 6247982515792289e-9],
38
38
  zoom: 8,
39
39
  constrainResolution: !0
40
40
  })
41
41
  });
42
- const R = new y({
42
+ const k = new h({
43
43
  units: "metric",
44
44
  bar: !1
45
45
  });
46
- e.addControl(R);
47
- const k = new M({
48
- position: "top-right"
49
- });
50
46
  e.addControl(k);
51
47
  const T = new b({
52
- position: "bottom-left"
48
+ position: "top-right"
53
49
  });
54
50
  e.addControl(T);
55
- const x = new L({
51
+ const x = new v({
52
+ position: "bottom-left"
53
+ });
54
+ e.addControl(x);
55
+ const E = new R({
56
56
  options: {
57
57
  position: "top-right"
58
58
  }
59
59
  });
60
- e.addControl(x);
61
- const E = new S({
60
+ e.addControl(E);
61
+ const l = new M({
62
62
  position: "bottom-right"
63
+ // collapsed option is ignored by the library, thus the override below
64
+ // see https://github.com/IGNF/geopf-extensions-openlayers/issues/497
63
65
  });
64
- e.addControl(E);
65
- const o = new v({
66
+ l.setCollapsed(!1), e.addControl(l);
67
+ const o = new L({
66
68
  position: "bottom-left",
67
69
  listable: !0,
68
70
  layerTypes: ["WMS"]
69
71
  });
70
72
  o._serviceUrlImportInput.value = a.resource.url, o._formContainer.dispatchEvent(new CustomEvent("submit", { cancelable: !0 })), e.addControl(o);
71
- const l = 500;
72
- let p = 20;
73
- function c() {
73
+ const p = 500;
74
+ let c = 20;
75
+ function u() {
74
76
  if (!o._getCapResponseWMSLayers)
75
- p--, p > 0 ? setTimeout(c, l) : n.value = !0;
77
+ c--, c > 0 ? setTimeout(u, p) : n.value = !0;
76
78
  else {
77
79
  const t = o._getCapResponseWMSLayers.filter((I) => I.Name == a.resource.title)[0];
78
80
  o._addGetCapWMSLayer(t);
79
81
  }
80
82
  }
81
- setTimeout(c, l);
83
+ setTimeout(u, p);
82
84
  }
83
85
  return B(() => {
84
- w();
85
- }), (i, s) => n.value ? (u(), F(O, {
86
+ y();
87
+ }), (s, i) => n.value ? (m(), F(O, {
86
88
  key: 0,
87
89
  type: "warning",
88
90
  class: "flex items-center space-x-2"
89
91
  }, {
90
92
  default: V(() => [
91
- U(m(P), { class: "shrink-0 size-6" }),
92
- q("span", null, A(m(d)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
93
+ U(f(P), { class: "shrink-0 size-6" }),
94
+ q("span", null, A(f(w)("L'aperçu cartographique de ce fichier n'a pas pu être chargé.")), 1)
93
95
  ]),
94
96
  _: 1
95
- })) : (u(), N("div", {
97
+ })) : (m(), N("div", {
96
98
  key: 1,
97
99
  id: "map",
98
100
  ref_key: "mapRef",
@@ -12,7 +12,7 @@ var TZ = (R, l, U, Z) => ({
12
12
  }
13
13
  });
14
14
  import { defineComponent as id, ref as rl, computed as SZ, onMounted as Md, onBeforeUnmount as Jd, createElementBlock as $l, openBlock as el, createBlock as EU, createCommentVNode as Gd, Fragment as Td, renderList as Sd, toDisplayString as aU, unref as pl, withCtx as CU, createVNode as wU, createElementVNode as xU, nextTick as Xd } from "vue";
15
- import { u as Yd, a as Bd, g as ed, _ as jU, F as OU } from "./main-B2kXxWRG.js";
15
+ import { u as Yd, a as Bd, g as ed, _ as jU, F as OU } from "./main-qc4CO9Kn.js";
16
16
  var VU = {};
17
17
  VU.d = (R, l) => {
18
18
  for (var U in l)
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ly, ref as cy, computed as dc, useTemplateRef as uy, onMounted as hy, createElementBlock as Mp, openBlock as eh, createBlock as py, withCtx as rm, createVNode as nm, createElementVNode as Sa, unref as rs, toDisplayString as fc, createCommentVNode as dy, createTextVNode as fy } from "vue";
2
- import { b as my, a as gy, c as _y, u as yy, d as xy, e as vy, _ as by, F as wy, f as Ty, h as Sy, K as Py, t as Iy } from "./main-B2kXxWRG.js";
2
+ import { b as my, a as gy, c as _y, u as yy, d as xy, e as vy, _ as by, F as wy, f as Ty, h as Sy, K as Py, t as Iy } from "./main-qc4CO9Kn.js";
3
3
  var fn = Uint8Array, Wo = Uint16Array, My = Int32Array, mm = new fn([
4
4
  0,
5
5
  0,
@@ -0,0 +1,4 @@
1
+ import { i as f } from "./main-qc4CO9Kn.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, defineAsyncComponent as L, ref as o, computed as w, onMounted as T, createElementBlock as p, openBlock as r, createBlock as m, createCommentVNode as P, createVNode as u, unref as t, toDisplayString as i, withCtx as f, createElementVNode as d } from "vue";
2
- import { u as E, a as M, g as q, _ as h, F as v } from "./main-B2kXxWRG.js";
2
+ import { u as E, a as M, g as q, _ as h, F as v } from "./main-qc4CO9Kn.js";
3
3
  const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
4
4
  key: 1,
5
5
  class: "text-gray-medium"
@@ -10,7 +10,7 @@ const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
10
10
  },
11
11
  setup(k) {
12
12
  const z = L(
13
- () => import("./vue3-xml-viewer.common-BRxsqI9j.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
13
+ () => import("./vue3-xml-viewer.common-CCOV_ohP.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
14
14
  ), g = k, x = E(), { t: l } = M(), n = o(null), c = o(!1), s = o(null), _ = o(!1), y = w(() => q(g.resource)), X = w(() => {
15
15
  const e = y.value;
16
16
  if (!e || !x.maxXmlPreviewCharSize)
@@ -1,4 +1,4 @@
1
- import { aU as e, bd as t, w as r, x as o, y as i, z as n, A as c, B as l, h as g, bb as u, be as b, C as d, aT as T, aS as S, D as p, E as C, L as m, G as D, P as O, Q as R, R as E, S as I, T as y, J as f, I as A, H as h, U as M, N as v, M as z, O as L, V as w, aA as G, bf as P, W as N, X as _, Y as k, Z as B, a0 as H, bu as U, bg as x, a1 as F, a2 as V, a3 as Q, a4 as W, a5 as Y, a6 as q, bc as X, a7 as j, a8 as J, a9 as Z, ab as $, aa as K, bs as aa, ac as sa, ad as ea, ae as ta, af as ra, ag as oa, ah as ia, ai as na, aj as ca, ak as la, al as ga, am as ua, an as ba, aB as da, aC as Ta, aD as Sa, _ as pa, ao as Ca, ap as ma, i as Da, aq as Oa, ar as Ra, as as Ea, at as Ia, au as ya, $ as fa, aE as Aa, aw as ha, av as Ma, ax as va, ay as za, bh as La, az as wa, bF as Ga, bH as Pa, b8 as Na, b6 as _a, v as ka, bG as Ba, q as Ha, p as Ua, s as xa, r as Fa, bv as Va, aY as Qa, aJ as Wa, aW as Ya, bl as qa, bB as Xa, aZ as ja, aO as Ja, b9 as Za, b7 as $a, aP as Ka, l as as, k as ss, o as es, n as ts, m as rs, aV as os, bp as is, b3 as ns, b5 as cs, bo as ls, bm as gs, bk as us, e as bs, d as ds, aR as Ts, g as Ss, bq as ps, bt as Cs, br as ms, ba as Ds, bA as Os, by as Rs, bx as Es, bj as Is, aQ as ys, bn as fs, bi as As, aL as hs, b0 as Ms, b1 as vs, b2 as zs, aK as Ls, a_ as ws, a_ as Gs, a$ as Ps, aX as Ns, aM as _s, t as ks, aF as Bs, b4 as Hs, aG as Us, u as xs, bw as Fs, c as Vs, bz as Qs, bC as Ws, bD as Ys, bE as qs, aN as Xs, aH as js, aI as Js, a as Zs } from "./main-B2kXxWRG.js";
1
+ import { aU as e, bd as t, w as r, x as o, y as i, z as n, A as c, B as l, h as g, bb as u, be as b, C as d, aT as T, aS as S, D as p, E as C, L as m, G as D, P as O, Q as R, R as E, S as I, T as y, J as f, I as A, H as h, U as M, N as v, M as z, O as L, V as w, aA as G, bf as P, W as N, X as _, Y as k, Z as B, a0 as H, bu as U, bg as x, a1 as F, a2 as V, a3 as Q, a4 as W, a5 as Y, a6 as q, bc as X, a7 as j, a8 as J, a9 as Z, ab as $, aa as K, bs as aa, ac as sa, ad as ea, ae as ta, af as ra, ag as oa, ah as ia, ai as na, aj as ca, ak as la, al as ga, am as ua, an as ba, aB as da, aC as Ta, aD as Sa, _ as pa, ao as Ca, ap as ma, i as Da, aq as Oa, ar as Ra, as as Ea, at as Ia, au as ya, $ as fa, aE as Aa, aw as ha, av as Ma, ax as va, ay as za, bh as La, az as wa, bF as Ga, bH as Pa, b8 as Na, b6 as _a, v as ka, bG as Ba, q as Ha, p as Ua, s as xa, r as Fa, bv as Va, aY as Qa, aJ as Wa, aW as Ya, bl as qa, bB as Xa, aZ as ja, aO as Ja, b9 as Za, b7 as $a, aP as Ka, l as as, k as ss, o as es, n as ts, m as rs, aV as os, bp as is, b3 as ns, b5 as cs, bo as ls, bm as gs, bk as us, e as bs, d as ds, aR as Ts, g as Ss, bq as ps, bt as Cs, br as ms, ba as Ds, bA as Os, by as Rs, bx as Es, bj as Is, aQ as ys, bn as fs, bi as As, aL as hs, b0 as Ms, b1 as vs, b2 as zs, aK as Ls, a_ as ws, a_ as Gs, a$ as Ps, aX as Ns, aM as _s, t as ks, aF as Bs, b4 as Hs, aG as Us, u as xs, bw as Fs, c as Vs, bz as Qs, bC as Ws, bD as Ys, bE as qs, aN as Xs, aH as js, aI as Js, a as Zs } from "./main-qc4CO9Kn.js";
2
2
  export {
3
3
  e as AI_SUGGESTION_MIN_DESCRIPTION_LENGTH,
4
4
  t as ASSOCIATION,
@@ -6,7 +6,7 @@ import { a as TileGrid, U as UrlTile, e as extentFromProjection, c as createXYZ,
6
6
  import { D as DEFAULT_MAX_ZOOM, a as assert, f as forEach, i as intersectsLineString, b as intersectsLineStringArray, l as linearRingssContainsXY, c as intersectsLinearRingMultiArray, d as compose, e as create, g as apply, s as setFromArray, m as multiply, h as scale, r as reset, t as translate } from "./common-PJfpC179.js";
7
7
  import { R as RBush$1, C as Collection, a as CollectionEventType, b as asColorLike, d as defaultFillStyle, c as defaultStrokeStyle, e as defaultLineCap, f as defaultLineDash, g as defaultLineDashOffset, h as defaultLineJoin, i as defaultLineWidth, j as defaultMiterLimit, k as defaultPadding, l as defaultTextBaseline, m as defaultTextAlign, n as defaultFont, r as registerFont, o as getTextDimensions, p as drawImageOrLabel, q as measureAndCacheTextWidth, I as Icon, B as BaseVectorLayer, P as PointerInteraction, s as noModifierKeys, t as always, u as shiftKeyOnly, v as InteractionProperty, M as MapBrowserEventType, w as MapBrowserEvent, x as never, y as createEditingStyle, z as primaryAction, A as altKeyOnly, D as singleClick, E as Interaction, F as Fill, S as Stroke, T as Text, G as Style$1, H as CircleStyle, J as checkedFonts, K as Map$1, L as pointerMove, N as ImageStyle, O as Attribution, Z as Zoom, Q as MapProperty } from "./Map-BjUnLyj8.js";
8
8
  import { S as SimpleGeometry, d as deflateCoordinate, r as rotate, G as Geometry, m as maxSquaredDelta, a as assignClosestPoint, i as inflateCoordinates, b as douglasPeucker, c as deflateCoordinates, e as arrayMaxSquaredDelta, f as assignClosestArrayPoint, g as inflateCoordinatesArray, h as douglasPeuckerArray, j as deflateCoordinatesArray, P as Point$1, k as multiArrayMaxSquaredDelta, l as assignClosestMultiArrayPoint, n as linearRingss$1, o as orientLinearRingsArray, p as inflateMultiCoordinatesArray, q as getInteriorPointsOfMultiArray, s as linearRingssAreOriented, t as quantizeMultiArray, u as Polygon, v as deflateMultiCoordinatesArray, w as getInteriorPointOfArray, x as inflateEnds, y as transform2D, z as quantizeArray, A as snap, B as transformGeom2D, V as ViewHint, C as getStrideForLayout, D as linearRingsAreOriented, E as orientLinearRings, F as getLayoutForStride, L as LinearRing, H as View, I as ViewProperty, J as fromExtent } from "./View-BR92hTWP.js";
9
- import { j as commonjsGlobal, b as getDefaultExportFromCjs$1 } from "./main-B2kXxWRG.js";
9
+ import { j as commonjsGlobal, b as getDefaultExportFromCjs$1 } from "./main-qc4CO9Kn.js";
10
10
  import { E as EventType$1, a as asArray } from "./Event--kp8kMdJ.js";
11
11
  import { Z as ZIndexContext, C as CanvasLayerRenderer, c as canvasPool$1, T as TileLayer, a as CanvasTileLayerRenderer, b as TileProperty } from "./Tile-DbNFNPfU.js";
12
12
  function padNumber(i, e, t) {
@@ -92997,7 +92997,7 @@ const SVe = /* @__PURE__ */ ep(zD), bVe = /* @__PURE__ */ Doe({
92997
92997
  canEdit: { type: Boolean, default: !1 }
92998
92998
  },
92999
92999
  setup(e) {
93000
- const r = ["parquet", "pmtiles", "geojson"], n = ["url", "doi", "www:link", " www:link-1.0-http--link", "www:link-1.0-http--partners", "www:link-1.0-http--related", "www:link-1.0-http--samples"], o = e, u = jn(), g = pa(() => import("./Swagger.client-D4-F6yEf.js")), c = pa(() => import("./MapContainer.client-DRkAmdOc.js")), d = pa(() => import("./Pmtiles.client-BR7_ldHY.js")), a = pa(() => import("./JsonPreview.client-C-6eBbPw.js")), h = pa(() => import("./PdfPreview.client-C-w6-w44.js")), f = pa(() => import("./XmlPreview.client-Dl2VCgXF.js")), C = pa(() => import("./Datafair.client-E5D6ePRC.js")), { t: w } = y2(), { formatRelativeIfRecentDate: v } = Ia(), x = HD(), H = o1(() => {
93000
+ const r = ["parquet", "pmtiles", "geojson"], n = ["url", "doi", "www:link", " www:link-1.0-http--link", "www:link-1.0-http--partners", "www:link-1.0-http--related", "www:link-1.0-http--samples"], o = e, u = jn(), g = pa(() => import("./Swagger.client-2Yn7iF0A.js")), c = pa(() => import("./MapContainer.client-CUmKyByc.js")), d = pa(() => import("./Pmtiles.client-CRJ56yX2.js")), a = pa(() => import("./JsonPreview.client-BrTMBWHZ.js")), h = pa(() => import("./PdfPreview.client-BVjPxlPu.js")), f = pa(() => import("./XmlPreview.client-DxqlVnKu.js")), C = pa(() => import("./Datafair.client-0UYUu5yf.js")), { t: w } = y2(), { formatRelativeIfRecentDate: v } = Ia(), x = HD(), H = o1(() => {
93001
93001
  const d1 = o.resource.format?.toLowerCase();
93002
93002
  return d1 === "json" || d1 === "pdf" || d1 === "xml";
93003
93003
  }), E = o1(() => x(o.resource)), z = o1(() => o.resource.extras["analysis:parsing:pmtiles_url"] || o.resource.format === "pmtiles"), Z = o1(() => Rh(o.dataset.organization) && o.resource.extras.datafairEmbed), R = o1(() => Rh(o.dataset.organization) && o.resource.extras.apidocUrl), T = o1(() => Db(o.resource.format) ? o.resource.format : w("Fichier")), B = o1(() => bD(o.resource)), P = o1(() => B.value === "wms"), U = o1(() => {
@@ -93615,19 +93615,19 @@ const TMe = { class: "border border-gray-default" }, OMe = { class: "p-4 flex fl
93615
93615
  },
93616
93616
  setup(e) {
93617
93617
  const r = pa(
93618
- () => import("./JsonPreview.client-C-6eBbPw.js")
93618
+ () => import("./JsonPreview.client-BrTMBWHZ.js")
93619
93619
  ), n = pa(
93620
- () => import("./PdfPreview.client-C-w6-w44.js")
93620
+ () => import("./PdfPreview.client-BVjPxlPu.js")
93621
93621
  ), o = pa(
93622
- () => import("./XmlPreview.client-Dl2VCgXF.js")
93622
+ () => import("./XmlPreview.client-DxqlVnKu.js")
93623
93623
  ), u = pa(
93624
- () => import("./Datafair.client-E5D6ePRC.js")
93624
+ () => import("./Datafair.client-0UYUu5yf.js")
93625
93625
  ), g = pa(
93626
- () => import("./MapContainer.client-DRkAmdOc.js")
93626
+ () => import("./MapContainer.client-CUmKyByc.js")
93627
93627
  ), c = pa(
93628
- () => import("./Pmtiles.client-BR7_ldHY.js")
93628
+ () => import("./Pmtiles.client-CRJ56yX2.js")
93629
93629
  ), d = pa(
93630
- () => import("./Swagger.client-D4-F6yEf.js")
93630
+ () => import("./Swagger.client-2Yn7iF0A.js")
93631
93631
  ), a = e, { t: h } = y2(), f = jn(), { formatRelativeIfRecentDate: C } = Ia(), {
93632
93632
  hasTabularData: w,
93633
93633
  hasPmtiles: v,
@@ -1,4 +1,4 @@
1
- import { b as Ke } from "./main-B2kXxWRG.js";
1
+ import { b as Ke } from "./main-qc4CO9Kn.js";
2
2
  import We from "vue";
3
3
  function Fe(I, K) {
4
4
  for (var V = 0; V < K.length; V++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.0.2-dev.8",
3
+ "version": "1.0.2-dev.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -96,7 +96,10 @@ async function displayMap() {
96
96
 
97
97
  const attributions = new GeoportalAttribution({
98
98
  position: 'bottom-right',
99
+ // collapsed option is ignored by the library, thus the override below
100
+ // see https://github.com/IGNF/geopf-extensions-openlayers/issues/497
99
101
  })
102
+ attributions.setCollapsed(false)
100
103
  map.addControl(attributions)
101
104
 
102
105
  const layerImport = new LayerImport({
@@ -1,4 +0,0 @@
1
- import { i as f } from "./main-B2kXxWRG.js";
2
- export {
3
- f as default
4
- };