@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1398.g03d927e4
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.
- package/dist/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
- package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-Dy9xu8CW.js} +1 -1
- package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
- package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-CwAd1LgO.js} +1 -1
- package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-B_3llbkW.js} +2 -2
- package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
- package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
- package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-AMALm4aj.js} +7 -7
- package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
- package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-BzcjEgi5.js} +3 -3
- package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-CEK7DOge.js} +1 -1
- package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-C8SVSeQV.js} +9992 -9271
- package/dist/{PreviewError-EeaGx3SL.js → PreviewError-DOcS8Jau.js} +83 -46
- package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CdSsdB9s.js} +1 -1
- package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
- package/dist/Tile-DfivRbb3.js +479 -0
- package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
- package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
- package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
- package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-BnIm8NMm.js} +2 -2
- package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +11524 -10316
- package/dist/components.css +2 -2
- package/dist/{france-BtSQqcqV.js → france-DjD07ZB4.js} +1 -1
- package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
- package/dist/purify.es-D-UgLNEK.js +848 -0
- package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
- package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
- package/package.json +18 -18
- package/src/components/Form/SelectGroup.vue +0 -2
- package/dist/Tile-Bu5lF4M5.js +0 -463
- package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
- package/dist/purify.es-eElsWhh7.js +0 -876
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as e, cn as t, un as n, zt as r } from "./proj-0ED4AWuV.js";
|
|
2
2
|
// ../node_modules/ol/MapEventType.js
|
|
3
3
|
var i = {
|
|
4
4
|
POSTRENDER: "postrender",
|
|
@@ -31,7 +31,7 @@ var i = {
|
|
|
31
31
|
r !== void 0 && (n[f[e]] = typeof r == "string" ? r.trim() : r);
|
|
32
32
|
}
|
|
33
33
|
return isNaN(Number(n.weight)) && n.weight in p && (n.weight = p[n.weight]), n.families = n.family.split(/,\s?/).map((e) => e.trim().replace(/^['"]|['"]$/g, "")), n;
|
|
34
|
-
}, h = class extends
|
|
34
|
+
}, h = class extends r {
|
|
35
35
|
constructor(e) {
|
|
36
36
|
super();
|
|
37
37
|
let t = e.element;
|
|
@@ -43,12 +43,12 @@ var i = {
|
|
|
43
43
|
getMap() {
|
|
44
44
|
return this.map_;
|
|
45
45
|
}
|
|
46
|
-
setMap(
|
|
46
|
+
setMap(r) {
|
|
47
47
|
this.map_ && this.element?.remove();
|
|
48
|
-
for (let e = 0,
|
|
49
|
-
if (this.listenerKeys.length = 0, this.map_ =
|
|
50
|
-
let
|
|
51
|
-
this.element &&
|
|
48
|
+
for (let e = 0, t = this.listenerKeys.length; e < t; ++e) n(this.listenerKeys[e]);
|
|
49
|
+
if (this.listenerKeys.length = 0, this.map_ = r, r) {
|
|
50
|
+
let n = this.target_ ?? r.getOverlayContainerStopEvent();
|
|
51
|
+
this.element && n && n.appendChild(this.element), this.render !== e && this.listenerKeys.push(t(r, i.POSTRENDER, this.render, this)), r.render();
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
render(e) {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, t } from "./PreviewError-
|
|
1
|
+
import { a as e, t } from "./PreviewError-DOcS8Jau.js";
|
|
2
2
|
import { computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, defineComponent as o, openBlock as s } from "vue";
|
|
3
3
|
// src/components/ResourceAccordion/Datafair.client.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var c = { class: "fr-text--xs" }, l = { key: 0 }, u = ["src"], d = /* @__PURE__ */ o({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ht as e, Jt as t, ln as n, sn as r, un as i } from "./proj-0ED4AWuV.js";
|
|
2
2
|
// ../node_modules/ol/has.js
|
|
3
3
|
var a = typeof navigator < "u" && navigator.userAgent !== void 0 ? navigator.userAgent.toLowerCase() : "";
|
|
4
4
|
a.includes("safari") && !a.includes("chrom") && (a.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(a));
|
|
@@ -105,7 +105,7 @@ var O = {
|
|
|
105
105
|
super(), this.extent = e, this.pixelRatio_ = n, this.resolution = t, this.state = typeof r == "function" ? O.IDLE : r, this.image_ = null, this.loader = typeof r == "function" ? r : null;
|
|
106
106
|
}
|
|
107
107
|
changed() {
|
|
108
|
-
this.dispatchEvent(
|
|
108
|
+
this.dispatchEvent(r.CHANGE);
|
|
109
109
|
}
|
|
110
110
|
getExtent() {
|
|
111
111
|
return this.extent;
|
|
@@ -123,14 +123,17 @@ var O = {
|
|
|
123
123
|
return this.state;
|
|
124
124
|
}
|
|
125
125
|
load() {
|
|
126
|
-
if (this.state == O.IDLE
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
if (this.state == O.IDLE) {
|
|
127
|
+
let e = this.loader;
|
|
128
|
+
if (e) {
|
|
129
|
+
this.state = O.LOADING, this.changed();
|
|
130
|
+
let n = this.getResolution(), r = Array.isArray(n) ? n[0] : n;
|
|
131
|
+
t(() => e(this.getExtent(), r, this.getPixelRatio())).then((e) => {
|
|
132
|
+
"image" in e && (this.image_ = e.image), "extent" in e && e.extent && (this.extent = e.extent), "resolution" in e && e.resolution !== void 0 && (this.resolution = e.resolution), "pixelRatio" in e && e.pixelRatio !== void 0 && (this.pixelRatio_ = e.pixelRatio), (e instanceof HTMLImageElement || d && e instanceof ImageBitmap || e instanceof HTMLCanvasElement || e instanceof HTMLVideoElement) && (this.image_ = e), this.state = O.LOADED;
|
|
133
|
+
}).catch((e) => {
|
|
134
|
+
this.state = O.ERROR, console.error(e);
|
|
135
|
+
}).finally(() => this.changed());
|
|
136
|
+
}
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
139
|
setImage(e) {
|
|
@@ -141,15 +144,15 @@ var O = {
|
|
|
141
144
|
}
|
|
142
145
|
};
|
|
143
146
|
function A(e, t, a) {
|
|
144
|
-
let o = e, s = !0, c = !1, l = !1, d = [
|
|
147
|
+
let o = e, s = !0, c = !1, l = !1, d = [n(o, r.LOAD, function() {
|
|
145
148
|
l = !0, c || t();
|
|
146
149
|
})];
|
|
147
150
|
return o.src && u ? (c = !0, o.decode().then(function() {
|
|
148
151
|
s && t();
|
|
149
152
|
}).catch(function(e) {
|
|
150
153
|
s && (l ? t() : a());
|
|
151
|
-
})) : d.push(
|
|
152
|
-
s = !1, d.forEach(
|
|
154
|
+
})) : d.push(n(o, r.ERROR, a)), function() {
|
|
155
|
+
s = !1, d.forEach(i);
|
|
153
156
|
};
|
|
154
157
|
}
|
|
155
158
|
function j(e, t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as e, L as t, _ as n, i as r, t as i } from "./PreviewError-
|
|
1
|
+
import { H as e, L as t, _ as n, i as r, t as i } from "./PreviewError-DOcS8Jau.js";
|
|
2
2
|
import { computed as a, createBlock as o, createElementBlock as s, defineComponent as c, openBlock as l, ref as u } from "vue";
|
|
3
3
|
// src/components/ResourceAccordion/ImagePreview.client.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var d = { class: "text-xs" }, f = ["src"], p = /* @__PURE__ */ c({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as e } from "./PreviewError-
|
|
2
|
-
import { t } from "./PreviewWrapper-
|
|
1
|
+
import { L as e } from "./PreviewError-DOcS8Jau.js";
|
|
2
|
+
import { t } from "./PreviewWrapper-CdSsdB9s.js";
|
|
3
3
|
import { createBlock as n, createVNode as r, defineAsyncComponent as i, defineComponent as a, openBlock as o, unref as s, withCtx as c } from "vue";
|
|
4
4
|
// src/components/ResourceAccordion/JsonPreview.client.vue
|
|
5
5
|
var l = /* @__PURE__ */ a({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as l } from "./Image-
|
|
3
|
-
import { S as u } from "./transform-
|
|
4
|
-
import { t as d } from "./View-
|
|
1
|
+
import { At as e, Ut as t, V as n, Y as r, Yt as i, cn as a, sn as o, un as s, zt as c } from "./proj-0ED4AWuV.js";
|
|
2
|
+
import { u as l } from "./Image-umPJvSA8.js";
|
|
3
|
+
import { S as u } from "./transform-bRfffInI.js";
|
|
4
|
+
import { t as d } from "./View-44C9US2-.js";
|
|
5
5
|
// ../node_modules/ol/render/EventType.js
|
|
6
6
|
var f = {
|
|
7
7
|
PRERENDER: "prerender",
|
|
@@ -28,45 +28,45 @@ function b(e, t) {
|
|
|
28
28
|
function x(e) {
|
|
29
29
|
throw Error("failed to parse \"" + e + "\" as color");
|
|
30
30
|
}
|
|
31
|
-
function S(
|
|
32
|
-
if (
|
|
33
|
-
let t =
|
|
31
|
+
function S(e) {
|
|
32
|
+
if (e.toLowerCase().startsWith("rgb")) {
|
|
33
|
+
let t = e.match(_) || e.match(g) || e.match(v);
|
|
34
34
|
if (t) {
|
|
35
|
-
let
|
|
35
|
+
let e = t[4], r = 100 / 255;
|
|
36
36
|
return [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
n(b(t[1], r) + .5 | 0, 0, 255),
|
|
38
|
+
n(b(t[2], r) + .5 | 0, 0, 255),
|
|
39
|
+
n(b(t[3], r) + .5 | 0, 0, 255),
|
|
40
|
+
e === void 0 ? 1 : n(b(e, 100), 0, 1)
|
|
41
41
|
];
|
|
42
42
|
}
|
|
43
|
-
x(
|
|
43
|
+
x(e);
|
|
44
44
|
}
|
|
45
|
-
if (
|
|
46
|
-
if (y.test(
|
|
47
|
-
let
|
|
45
|
+
if (e.startsWith("#")) {
|
|
46
|
+
if (y.test(e)) {
|
|
47
|
+
let t = e.substring(1), n = t.length <= 4 ? 1 : 2, r = [
|
|
48
48
|
0,
|
|
49
49
|
0,
|
|
50
50
|
0,
|
|
51
51
|
255
|
|
52
52
|
];
|
|
53
|
-
for (let
|
|
54
|
-
let i = parseInt(
|
|
55
|
-
|
|
53
|
+
for (let e = 0, i = t.length; e < i; e += n) {
|
|
54
|
+
let i = parseInt(t.substring(e, e + n), 16);
|
|
55
|
+
n === 1 && (i += i << 4), r[e / n] = i;
|
|
56
56
|
}
|
|
57
57
|
return r[3] /= 255, r;
|
|
58
58
|
}
|
|
59
|
-
x(
|
|
59
|
+
x(e);
|
|
60
60
|
}
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
let i =
|
|
64
|
-
|
|
65
|
-
let a =
|
|
61
|
+
let t = h();
|
|
62
|
+
t.fillStyle = "#abcdef";
|
|
63
|
+
let i = t.fillStyle;
|
|
64
|
+
t.fillStyle = e, t.fillStyle === i && (t.fillStyle = "#fedcba", i = t.fillStyle, t.fillStyle = e, t.fillStyle === i && x(e));
|
|
65
|
+
let a = t.fillStyle;
|
|
66
66
|
if (a.startsWith("#") || a.startsWith("rgba")) return S(a);
|
|
67
|
-
|
|
68
|
-
let o = Array.from(
|
|
69
|
-
return o[3] =
|
|
67
|
+
t.clearRect(0, 0, 1, 1), t.fillRect(0, 0, 1, 1);
|
|
68
|
+
let o = Array.from(t.getImageData(0, 0, 1, 1).data);
|
|
69
|
+
return o[3] = r(o[3] / 255, 3), o;
|
|
70
70
|
}
|
|
71
71
|
function C(e) {
|
|
72
72
|
return typeof e == "string" ? e : I(e);
|
|
@@ -98,13 +98,13 @@ function M(e) {
|
|
|
98
98
|
e[3]
|
|
99
99
|
];
|
|
100
100
|
}
|
|
101
|
-
function N(
|
|
102
|
-
let
|
|
101
|
+
function N(e) {
|
|
102
|
+
let t = (e[0] + 16) / 116, r = e[1], i = e[2] * Math.PI / 180, a = k(t), o = k(t + r / 500 * Math.cos(i)), s = k(t - r / 200 * Math.sin(i)), c = O(o * 3.021973625 - a * 1.617392459 - s * .404875592), l = O(o * -.943766287 + a * 1.916279586 + s * .027607165), u = O(o * .069407491 - a * .22898585 + s * 1.159737864);
|
|
103
103
|
return [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
n(c + .5 | 0, 0, 255),
|
|
105
|
+
n(l + .5 | 0, 0, 255),
|
|
106
|
+
n(u + .5 | 0, 0, 255),
|
|
107
|
+
e[3]
|
|
108
108
|
];
|
|
109
109
|
}
|
|
110
110
|
function P(e) {
|
|
@@ -133,9 +133,9 @@ function I(e) {
|
|
|
133
133
|
return "rgba(" + t + "," + n + "," + r + "," + i + ")";
|
|
134
134
|
}
|
|
135
135
|
// ../node_modules/ol/render/Event.js
|
|
136
|
-
var L = class extends
|
|
136
|
+
var L = class extends t {
|
|
137
137
|
constructor(e, t, n, r) {
|
|
138
|
-
super(e), this.inversePixelTransform = t, this.frameState = n, this.context = r;
|
|
138
|
+
super(e), this.inversePixelTransform = t, this.frameState = n, this.context = r ?? void 0;
|
|
139
139
|
}
|
|
140
140
|
}, R = {
|
|
141
141
|
OPACITY: "opacity",
|
|
@@ -148,7 +148,7 @@ var L = class extends r {
|
|
|
148
148
|
MIN_ZOOM: "minZoom",
|
|
149
149
|
SOURCE: "source",
|
|
150
150
|
MAP: "map"
|
|
151
|
-
}, z = class extends
|
|
151
|
+
}, z = class extends c {
|
|
152
152
|
constructor(e) {
|
|
153
153
|
super(), this.on, this.once, this.un, this.background_ = e.background;
|
|
154
154
|
let t = Object.assign({}, e);
|
|
@@ -160,18 +160,18 @@ var L = class extends r {
|
|
|
160
160
|
getClassName() {
|
|
161
161
|
return this.className_;
|
|
162
162
|
}
|
|
163
|
-
getLayerState(
|
|
164
|
-
let
|
|
163
|
+
getLayerState(e) {
|
|
164
|
+
let t = this.state_ || {
|
|
165
165
|
layer: this,
|
|
166
|
-
managed:
|
|
166
|
+
managed: e === void 0 || e
|
|
167
167
|
}, r = this.getZIndex();
|
|
168
|
-
return
|
|
168
|
+
return t.opacity = n(Math.round(this.getOpacity() * 100) / 100, 0, 1), t.visible = this.getVisible(), t.extent = this.getExtent(), t.zIndex = r === void 0 && !t.managed ? Infinity : r, t.maxResolution = this.getMaxResolution(), t.minResolution = Math.max(this.getMinResolution(), 0), t.minZoom = this.getMinZoom(), t.maxZoom = this.getMaxZoom(), this.state_ = t, t;
|
|
169
169
|
}
|
|
170
170
|
getLayersArray(e) {
|
|
171
|
-
return
|
|
171
|
+
return i();
|
|
172
172
|
}
|
|
173
173
|
getLayerStatesArray(e) {
|
|
174
|
-
return
|
|
174
|
+
return i();
|
|
175
175
|
}
|
|
176
176
|
getExtent() {
|
|
177
177
|
return this.get(R.EXTENT);
|
|
@@ -192,7 +192,7 @@ var L = class extends r {
|
|
|
192
192
|
return this.get(R.OPACITY);
|
|
193
193
|
}
|
|
194
194
|
getSourceState() {
|
|
195
|
-
return
|
|
195
|
+
return i();
|
|
196
196
|
}
|
|
197
197
|
getVisible() {
|
|
198
198
|
return this.get(R.VISIBLE);
|
|
@@ -254,12 +254,14 @@ var L = class extends r {
|
|
|
254
254
|
return e ? e.getState() : "undefined";
|
|
255
255
|
}
|
|
256
256
|
handleSourceChange_() {
|
|
257
|
-
this.changed()
|
|
257
|
+
this.changed();
|
|
258
|
+
let e = this.getSource();
|
|
259
|
+
e && !this.sourceReady_ && e.getState() === "ready" && (this.sourceReady_ = !0, this.dispatchEvent("sourceready"));
|
|
258
260
|
}
|
|
259
261
|
handleSourcePropertyChange_() {
|
|
260
|
-
this.sourceChangeKey_ &&= (
|
|
262
|
+
this.sourceChangeKey_ &&= (s(this.sourceChangeKey_), null), this.sourceReady_ = !1;
|
|
261
263
|
let e = this.getSource();
|
|
262
|
-
e && (this.sourceChangeKey_ =
|
|
264
|
+
e && (this.sourceChangeKey_ = a(e, o.CHANGE, this.handleSourceChange_, this), e.getState() === "ready" && (this.sourceReady_ = !0, setTimeout(() => {
|
|
263
265
|
this.dispatchEvent("sourceready");
|
|
264
266
|
}, 0))), this.changed();
|
|
265
267
|
}
|
|
@@ -269,18 +271,20 @@ var L = class extends r {
|
|
|
269
271
|
getData(e) {
|
|
270
272
|
return !this.renderer_ || !this.rendered ? null : this.renderer_.getData(e);
|
|
271
273
|
}
|
|
272
|
-
isVisible(
|
|
273
|
-
let
|
|
274
|
-
!
|
|
275
|
-
viewState:
|
|
276
|
-
extent:
|
|
277
|
-
} :
|
|
278
|
-
let
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
274
|
+
isVisible(t) {
|
|
275
|
+
let n, r = this.getMapInternal();
|
|
276
|
+
!t && r && (t = r.getView()), n = t instanceof d ? {
|
|
277
|
+
viewState: t.getState(),
|
|
278
|
+
extent: t.calculateExtent()
|
|
279
|
+
} : t;
|
|
280
|
+
let i = n;
|
|
281
|
+
!i.layerStatesArray && r && (i.layerStatesArray = r.getLayerGroup().getLayerStatesArray());
|
|
282
|
+
let a;
|
|
283
|
+
if (i.layerStatesArray) {
|
|
284
|
+
if (a = i.layerStatesArray.find((e) => e.layer === this), !a) return !1;
|
|
285
|
+
} else a = this.getLayerState();
|
|
286
|
+
let o = this.getExtent();
|
|
287
|
+
return V(a, i.viewState) && (!o || e(o, i.extent));
|
|
284
288
|
}
|
|
285
289
|
getAttributions(e) {
|
|
286
290
|
if (!this.isVisible(e)) return [];
|
|
@@ -309,10 +313,12 @@ var L = class extends r {
|
|
|
309
313
|
return this.get(R.MAP);
|
|
310
314
|
}
|
|
311
315
|
setMap(e) {
|
|
312
|
-
this.mapPrecomposeKey_ &&= (
|
|
316
|
+
this.mapPrecomposeKey_ &&= (s(this.mapPrecomposeKey_), null), e || this.changed(), this.mapRenderKey_ &&= (s(this.mapRenderKey_), null), e && (this.mapPrecomposeKey_ = a(e, f.PRECOMPOSE, this.handlePrecompose_, this), this.mapRenderKey_ = a(this, o.CHANGE, e.render, e), this.changed());
|
|
313
317
|
}
|
|
314
318
|
handlePrecompose_(e) {
|
|
315
|
-
let t = e.frameState
|
|
319
|
+
let t = e.frameState?.layerStatesArray;
|
|
320
|
+
if (!t) return;
|
|
321
|
+
let n = this.getLayerState(!1);
|
|
316
322
|
u(!t.some((e) => e.layer === n.layer), "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."), t.push(n);
|
|
317
323
|
}
|
|
318
324
|
setSource(e) {
|