@datagouv/components-next 1.2.0 → 1.3.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 (47) hide show
  1. package/README.md +7 -6
  2. package/dist/{Control-ZFh5ta_U.js → Control-b-43UT2B.js} +10 -10
  3. package/dist/{Datafair.client-rf4T1IkA.js → Datafair.client-BrjISlaZ.js} +4 -4
  4. package/dist/{Event-DSQcW7OF.js → Event-py_AAwJY.js} +18 -18
  5. package/dist/{Image-BijNEG0p.js → Image-BHQYZWzH.js} +23 -23
  6. package/dist/{JsonPreview.client-dzar6iuh.js → JsonPreview.client-DivFAnbN.js} +5 -5
  7. package/dist/{Map-BUtPf5GN.js → Map-CtP7leHl.js} +1313 -1173
  8. package/dist/{MapContainer.client-D-MoRNhG.js → MapContainer.client-Cq8tNLZZ.js} +17 -17
  9. package/dist/{OSM-D4MTdBtk.js → OSM-gdDSIsDA.js} +15 -23
  10. package/dist/{PdfPreview.client-DoDYLmJD.js → PdfPreview.client-BNBgLsK2.js} +6 -10
  11. package/dist/Pmtiles.client-CQi5Rw8W.js +26123 -0
  12. package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-BRNYswg3.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-C3dDzrIr.js} +2 -2
  13. package/dist/{ScaleLine-hJQIqcZm.js → ScaleLine-hG-FhNqy.js} +2 -2
  14. package/dist/{Tile-Dcl7oIVu.js → Tile-D6rFonpT.js} +163 -166
  15. package/dist/{TileImage-BJeHipMX.js → TileImage-cfrEgz5y.js} +131 -119
  16. package/dist/{View-xp_P_OHw.js → View-vp7vDb9q.js} +169 -119
  17. package/dist/{XmlPreview.client-cOhwff6P.js → XmlPreview.client-XCsNvnsZ.js} +5 -5
  18. package/dist/{common-BjQlan3k.js → common-C8efyyuc.js} +49 -49
  19. package/dist/components-next.css +1 -52
  20. package/dist/components-next.js +157 -153
  21. package/dist/components.css +2 -2
  22. package/dist/{index-NofRBuyf.js → index-CXUamc8Z.js} +6382 -6057
  23. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-BRKv9Ksv.js} +162 -164
  24. package/dist/{main-Iz1ZCL6k.js → main-DKu5SOAl.js} +20671 -21654
  25. package/dist/{proj-CsNo9yH1.js → proj-CsjVeojN.js} +322 -306
  26. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  27. package/dist/{tilecoord-A0fLnBZr.js → tilecoord-CPcQJnrF.js} +270 -261
  28. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
  29. package/dist/{vue3-xml-viewer.common-tVI9uXUz.js → vue3-xml-viewer.common-BIaEIFYG.js} +1 -1
  30. package/package.json +34 -34
  31. package/src/components/ResourceAccordion/Pmtiles.client.vue +3 -1
  32. package/src/components/ResourceAccordion/ResourceAccordion.vue +2 -2
  33. package/src/components/ResourceExplorer/ResourceExplorer.vue +8 -9
  34. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +4 -1
  35. package/src/components/Search/GlobalSearch.vue +16 -2
  36. package/src/components/TabularExplorer/TabularCellPopover.vue +2 -2
  37. package/src/components/TabularExplorer/TabularExplorer.vue +212 -74
  38. package/src/components/TabularExplorer/TabularFilterContent.vue +15 -13
  39. package/src/components/TabularExplorer/TabularFilterPopover.vue +21 -26
  40. package/src/components/TabularExplorer/types.ts +9 -9
  41. package/src/composables/useResourceCapabilities.ts +1 -1
  42. package/src/composables/useSearchFilter.ts +7 -5
  43. package/src/functions/api.ts +13 -7
  44. package/src/functions/resources.ts +5 -0
  45. package/src/functions/tabular.ts +103 -1
  46. package/src/types/resources.ts +0 -1
  47. package/dist/Pmtiles.client-Dzm01Zfm.js +0 -25185
package/README.md CHANGED
@@ -65,7 +65,7 @@ app.vueApp.use(datagouv, {
65
65
  `@datagouv/components` is using [TailwindCSS](https://tailwindcss.com/docs) and some [DSFR](https://www.systeme-de-design.gouv.fr/) right now. The user needs to provide the correct version of the DSFR. Concerning TailwindCSS, there are two modes:
66
66
 
67
67
  1. If the user is using TailwindCSS, it can import a full TailwindCSS config with `@import "@datagouv/components-next/assets/main.css";`, then build the CSS via TailwindCSS CLI or Vite plugin.
68
- 2. If the user is not using TailwindCSS, it can import an already built CSS file with `@import '@datagouv/components-next/dist/components.css';`. Note @dev, this file should be built before publishing the package to NPM with `npm run css`. For more details on the [technology stack](../README.md#-technology-stack), see the main README.
68
+ 2. If the user is not using TailwindCSS, it can import an already built CSS file with `@import '@datagouv/components-next/dist/components.css';`. Note @dev, this file should be built before publishing the package to PNPM with `pnpm run css`. For more details on the [technology stack](../README.md#-technology-stack), see the main README.
69
69
 
70
70
  ### I18n
71
71
 
@@ -94,8 +94,8 @@ For general development guidelines and contributing, see the [contributing secti
94
94
  This component library uses both ESLint and Prettier for code quality and formatting:
95
95
 
96
96
  ```bash
97
- npm run lint # Lint and auto-fix ESLint issues
98
- npm run format # Format code with Prettier
97
+ pnpm run lint # Lint and auto-fix ESLint issues
98
+ pnpm run format # Format code with Prettier
99
99
  ```
100
100
 
101
101
  **Note:** Make sure to run both commands before submitting contributions to ensure consistent code style.
@@ -172,10 +172,10 @@ To make a new release, you have to :
172
172
 
173
173
  ### Update the version
174
174
 
175
- Use the dedicated npm command, with the correct parameter :
175
+ Use the dedicated pnpm command, with the correct parameter :
176
176
 
177
177
  ```
178
- npm version VERSION
178
+ pnpm version VERSION
179
179
  ```
180
180
 
181
181
  Where VERSION is :
@@ -187,7 +187,8 @@ Additional labels for pre-release and build metadata are available as extensions
187
187
  ### Publish to NPM
188
188
 
189
189
  ```
190
- npm run publish-stable
190
+ pnpm login
191
+ pnpm run publish-stable
191
192
  ```
192
193
 
193
194
  ## 📄 License
@@ -1,4 +1,4 @@
1
- import { B as o, u as h, V as m, l as c } from "./proj-CsNo9yH1.js";
1
+ import { a as o, aV as h, V as m, ax as c } from "./proj-CsjVeojN.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
- v as C,
138
+ L as C,
139
139
  g as M,
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
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
148
148
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as l, computed as a, createElementBlock as o, openBlock as t, createBlock as u, createElementVNode as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as h } from "vue";
2
- import { a as x, _ as g } from "./main-Iz1ZCL6k.js";
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
3
  const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE__ */ l({
4
4
  __name: "Datafair.client",
5
5
  props: {
@@ -10,13 +10,13 @@ const v = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], $ = /* @__PURE_
10
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
11
  return (D, y) => (t(), o("div", v, [
12
12
  n.value ? (t(), o("div", b, [
13
- f("iframe", {
13
+ u("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(), u(g, { key: 1 }, {
19
+ ])) : (t(), f(g, { key: 1 }, {
20
20
  default: p(() => [
21
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)
22
22
  ]),
@@ -1,7 +1,7 @@
1
- import { I as x } from "./View-xp_P_OHw.js";
2
- import { a as I } from "./common-BjQlan3k.js";
3
- import { B as C, a7 as h, al as m, u as S, l as p, E as N, i as L, a4 as P, J as Z } from "./proj-CsNo9yH1.js";
4
- import { c as T } from "./Image-BijNEG0p.js";
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";
5
5
  const n = {
6
6
  OPACITY: "opacity",
7
7
  VISIBLE: "visible",
@@ -16,7 +16,7 @@ const n = {
16
16
  };
17
17
  class D extends C {
18
18
  /**
19
- * @param {Options} options Layer options.
19
+ * @param {Options<NoInfer<Properties>>} options Layer options.
20
20
  */
21
21
  constructor(e) {
22
22
  super(), this.on, this.once, this.un, this.background_ = e.background;
@@ -315,7 +315,7 @@ const K = {
315
315
  };
316
316
  class G extends D {
317
317
  /**
318
- * @param {Options<SourceType>} options Layer options.
318
+ * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.
319
319
  */
320
320
  constructor(e) {
321
321
  const r = Object.assign({}, e);
@@ -393,15 +393,15 @@ class G extends D {
393
393
  }, 0))), this.changed();
394
394
  }
395
395
  /**
396
- * @param {import("../pixel").Pixel} pixel Pixel.
397
- * @return {Promise<Array<import("../Feature").FeatureLike>>} Promise that resolves with
396
+ * @param {import("../pixel.js").Pixel} pixel Pixel.
397
+ * @return {Promise<Array<import("../Feature.js").FeatureLike>>} Promise that resolves with
398
398
  * an array of features.
399
399
  */
400
400
  getFeatures(e) {
401
401
  return this.renderer_ ? this.renderer_.getFeatures(e) : Promise.resolve([]);
402
402
  }
403
403
  /**
404
- * @param {import("../pixel").Pixel} pixel Pixel.
404
+ * @param {import("../pixel.js").Pixel} pixel Pixel.
405
405
  * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
406
406
  */
407
407
  getData(e) {
@@ -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 U = [NaN, NaN, NaN, 0];
591
+ const V = [NaN, NaN, NaN, 0];
592
592
  let _;
593
- function V() {
593
+ function U() {
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 = V();
631
+ const e = U();
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 U;
685
+ return V;
686
686
  if (d.hasOwnProperty(t))
687
687
  return d[t];
688
688
  if (R >= k) {
@@ -724,11 +724,11 @@ class re extends Z {
724
724
  export {
725
725
  D as B,
726
726
  G as L,
727
- U as N,
728
- K as R,
729
- te as a,
730
- v as b,
731
- re as c,
727
+ V as N,
728
+ re as R,
729
+ K as a,
730
+ te as b,
731
+ v as c,
732
732
  j as f,
733
733
  X as i,
734
734
  ee as l,
@@ -1,7 +1,7 @@
1
- import { aD as v, E as f, ar as C, aC as h, u as R } from "./proj-CsNo9yH1.js";
1
+ import { c as v, E as f, aO as C, ay as h, aV as R } from "./proj-CsjVeojN.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 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() {
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() {
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 H(e, t, n) {
135
+ function V(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 V(e, t) {
138
+ function H(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
- F as I,
281
- L as M,
280
+ a as I,
281
+ D as M,
282
282
  O as P,
283
283
  _ as T,
284
- y as W,
285
- M as a,
286
- T as b,
284
+ L as W,
285
+ F as a,
286
+ y as b,
287
287
  m as c,
288
- a as d,
288
+ G as d,
289
289
  Y as e,
290
- P as f,
291
- D as g,
292
- N as h,
293
- g 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
290
+ g as f,
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
303
303
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as c, defineAsyncComponent as u, createBlock as m, openBlock as p, unref as r, withCtx as f, createVNode as l } from "vue";
2
- import { u as d } from "./main-Iz1ZCL6k.js";
3
- import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-BRNYswg3.js";
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";
4
4
  const J = /* @__PURE__ */ c({
5
5
  __name: "JsonPreview.client",
6
6
  props: {
@@ -8,13 +8,13 @@ const J = /* @__PURE__ */ c({
8
8
  },
9
9
  setup(o) {
10
10
  const t = u(
11
- () => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
11
+ () => import("./vue3-json-viewer-CJLQFzXZ.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
12
12
  ), n = o, s = d(), i = async () => {
13
13
  const e = await fetch(n.resource.url);
14
14
  if (!e.ok) throw new Error(`HTTP error! status: ${e.status}`);
15
15
  return e.json();
16
16
  };
17
- return (e, w) => (p(), m(h, {
17
+ return (e, w) => (m(), p(h, {
18
18
  "file-type": "JSON",
19
19
  resource: o.resource,
20
20
  "max-size": r(s).maxJsonPreviewCharSize,