@datagouv/components-next 1.0.2-dev.20 → 1.0.2-dev.200

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 (165) hide show
  1. package/README.md +7 -6
  2. package/assets/main.css +4 -0
  3. package/dist/{Control-DuZJdKV_.js → Control-B9WQxlpJ.js} +1 -1
  4. package/dist/{Datafair.client-Ds3VQrRi.js → Datafair.client-CFTmBFoY.js} +9 -9
  5. package/dist/{Event--kp8kMdJ.js → Event-iXDrp-fy.js} +31 -31
  6. package/dist/{Image-34hvypZI.js → Image-mNMBOofs.js} +9 -9
  7. package/dist/ImagePreview.client-BvDM3qjE.js +36 -0
  8. package/dist/JsonPreview.client-BP6gPRxf.js +40 -0
  9. package/dist/{Map-BjUnLyj8.js → Map-BfqKMw0S.js} +1739 -1599
  10. package/dist/{MapContainer.client-B2BijMx5.js → MapContainer.client-D9N3664r.js} +41 -42
  11. package/dist/{OSM-s40W6sQ2.js → OSM-CcrUhItr.js} +15 -23
  12. package/dist/{PdfPreview.client-DJBMzrlC.js → PdfPreview.client-C6A6ZiKl.js} +835 -856
  13. package/dist/Pmtiles.client-B_sDZoqu.js +26333 -0
  14. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-DGLXBys_.js +60 -0
  15. package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-VGQ7nkMS.js} +2 -2
  16. package/dist/{Tile-DbNFNPfU.js → Tile-CSpn0Ca8.js} +160 -163
  17. package/dist/{TileImage-BsXBxMtq.js → TileImage-CpbaEFwd.js} +143 -131
  18. package/dist/{View-BR92hTWP.js → View-BYBpt-AU.js} +483 -422
  19. package/dist/XmlPreview.client-DFQ1T-LN.js +34 -0
  20. package/dist/{common-PJfpC179.js → common-BoeTUnDZ.js} +52 -52
  21. package/dist/components-next.css +1 -52
  22. package/dist/components-next.js +196 -150
  23. package/dist/components.css +2 -2
  24. package/dist/{index-BFQX7Ccz.js → index-B_tPYi5Z.js} +34094 -27864
  25. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-PeylHk0o.js} +162 -164
  26. package/dist/{main-vqhkVhVS.js → main-CVOZp_Nx.js} +41939 -73132
  27. package/dist/{proj-DsetBcW7.js → proj-DxGbobp7.js} +662 -626
  28. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  29. package/dist/{tilecoord-Db24Px13.js → tilecoord-DvX7WWiA.js} +273 -264
  30. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
  31. package/dist/{vue3-xml-viewer.common-BcNJo35o.js → vue3-xml-viewer.common-CcF3Xd23.js} +1 -1
  32. package/package.json +47 -38
  33. package/src/chart.ts +5 -0
  34. package/src/components/ActivityList/ActivityList.vue +24 -14
  35. package/src/components/AppLink.vue +3 -0
  36. package/src/components/BannerAction.vue +6 -2
  37. package/src/components/Chart/ChartViewer.vue +320 -0
  38. package/src/components/Chart/ChartViewerWrapper.vue +182 -0
  39. package/src/components/CopyButton.vue +6 -2
  40. package/src/components/DataserviceCard.vue +24 -5
  41. package/src/components/DataserviceQuality.vue +82 -0
  42. package/src/components/DataserviceQualityInline.vue +31 -0
  43. package/src/components/DataserviceQualityTooltipContent.vue +79 -0
  44. package/src/components/DatasetCard.vue +24 -9
  45. package/src/components/DatasetInformation/DatasetTemporalitySection.vue +7 -4
  46. package/src/components/DatasetQuality.vue +11 -11
  47. package/src/components/DatasetQualityInline.vue +2 -2
  48. package/src/components/DatasetQualityTooltipContent.vue +1 -1
  49. package/src/components/DiscussionMessageCard.vue +14 -15
  50. package/src/components/Form/Listbox.vue +101 -0
  51. package/src/components/Form/SchemaSelect.vue +2 -0
  52. package/src/components/FormattedDate.vue +81 -0
  53. package/src/components/InfiniteLoader.vue +53 -0
  54. package/src/components/LoadingBlock.vue +4 -1
  55. package/src/components/ObjectCardHeader.vue +11 -4
  56. package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
  57. package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
  58. package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
  59. package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
  60. package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
  61. package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
  62. package/src/components/OpenApiViewer/openapi.ts +150 -0
  63. package/src/components/OrganizationNameWithCertificate.vue +3 -2
  64. package/src/components/Pagination.vue +25 -62
  65. package/src/components/PostCard.vue +13 -15
  66. package/src/components/RadioInput.vue +7 -2
  67. package/src/components/ResourceAccordion/DataStructure.vue +11 -33
  68. package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
  69. package/src/components/ResourceAccordion/Downloads.vue +172 -0
  70. package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
  71. package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -104
  72. package/src/components/ResourceAccordion/MapContainer.client.vue +2 -11
  73. package/src/components/ResourceAccordion/Metadata.vue +4 -6
  74. package/src/components/ResourceAccordion/PdfPreview.client.vue +58 -97
  75. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  76. package/src/components/ResourceAccordion/Pmtiles.client.vue +28 -13
  77. package/src/components/ResourceAccordion/Preview.vue +19 -15
  78. package/src/components/ResourceAccordion/PreviewWrapper.vue +89 -0
  79. package/src/components/ResourceAccordion/ResourceAccordion.vue +36 -117
  80. package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -98
  81. package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -210
  82. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
  83. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
  84. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +143 -291
  85. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  86. package/src/components/ResourceExplorer/ResourceSelector.vue +51 -0
  87. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +122 -0
  88. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
  89. package/src/components/ResourceListItem.vue +168 -0
  90. package/src/components/ReuseCard.vue +28 -9
  91. package/src/components/ReuseDetails.vue +2 -2
  92. package/src/components/ReuseHorizontalCard.vue +2 -2
  93. package/src/components/SchemaCard.vue +10 -1
  94. package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
  95. package/src/components/Search/GlobalSearch.vue +229 -123
  96. package/src/components/Search/SearchInput.vue +5 -4
  97. package/src/components/Search/Sidemenu.vue +4 -3
  98. package/src/components/SmallChart.vue +11 -10
  99. package/src/components/StatBox.vue +13 -5
  100. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  101. package/src/components/TabularExplorer/TabularCell.vue +50 -0
  102. package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
  103. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  104. package/src/components/TabularExplorer/TabularExplorer.vue +299 -0
  105. package/src/components/TabularExplorer/TabularFilterContent.vue +362 -0
  106. package/src/components/TabularExplorer/TabularFilterPopover.vue +106 -0
  107. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  108. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  109. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  110. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  111. package/src/components/TabularExplorer/TabularTable.vue +481 -0
  112. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  113. package/src/components/TabularExplorer/types.ts +84 -0
  114. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  115. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  116. package/src/components/TopicCard.vue +13 -14
  117. package/src/composables/useActiveDescendant.ts +5 -0
  118. package/src/composables/useDatasetResources.ts +164 -0
  119. package/src/composables/useHasTabularData.ts +15 -1
  120. package/src/composables/useMetrics.ts +1 -1
  121. package/src/composables/useResizable.ts +46 -0
  122. package/src/composables/useResourceCapabilities.ts +48 -40
  123. package/src/composables/useSearchFilter.ts +120 -0
  124. package/src/composables/useStableQueryParams.ts +38 -6
  125. package/src/composables/useTabularProfile.ts +70 -0
  126. package/src/composables/useTranslation.ts +24 -9
  127. package/src/config.ts +21 -3
  128. package/src/functions/activities.ts +3 -3
  129. package/src/functions/api.ts +20 -42
  130. package/src/functions/api.types.ts +1 -0
  131. package/src/functions/charts.ts +99 -0
  132. package/src/functions/datasets.ts +0 -17
  133. package/src/functions/dates.ts +6 -7
  134. package/src/functions/helpers.ts +15 -0
  135. package/src/functions/metrics.ts +63 -60
  136. package/src/functions/paginate.ts +46 -0
  137. package/src/functions/resourceCapabilities.ts +34 -0
  138. package/src/functions/resources.ts +136 -1
  139. package/src/functions/schemas.ts +27 -0
  140. package/src/functions/scroll.ts +20 -0
  141. package/src/functions/tabular.ts +214 -0
  142. package/src/functions/tabularApi.ts +96 -11
  143. package/src/main.ts +119 -14
  144. package/src/types/dataservices.ts +17 -0
  145. package/src/types/organizations.ts +10 -0
  146. package/src/types/pages.ts +0 -5
  147. package/src/types/posts.ts +2 -2
  148. package/src/types/reports.ts +5 -1
  149. package/src/types/resources.ts +0 -1
  150. package/src/types/reuses.ts +12 -1
  151. package/src/types/search.ts +63 -1
  152. package/src/types/site.ts +5 -3
  153. package/src/types/ui.ts +2 -0
  154. package/src/types/users.ts +2 -1
  155. package/src/types/visualizations.ts +93 -0
  156. package/assets/swagger-themes/newspaper.css +0 -1670
  157. package/dist/JsonPreview.client-CYxmz0yV.js +0 -72
  158. package/dist/Pmtiles.client-C_hvRDuy.js +0 -25185
  159. package/dist/Swagger.client-B4y0hXME.js +0 -4
  160. package/dist/XmlPreview.client-LETEfNBH.js +0 -64
  161. package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
  162. package/src/functions/pagination.ts +0 -9
  163. /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
  164. /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
  165. /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
@@ -0,0 +1,34 @@
1
+ import { defineComponent as i, defineAsyncComponent as m, openBlock as u, createBlock as f, unref as t, withCtx as l, createVNode as p } from "vue";
2
+ import { u as x } from "./main-CVOZp_Nx.js";
3
+ import { _ as w } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-DGLXBys_.js";
4
+ const X = /* @__PURE__ */ i({
5
+ __name: "XmlPreview.client",
6
+ props: {
7
+ resource: {}
8
+ },
9
+ setup(r) {
10
+ const o = m(
11
+ () => import("./vue3-xml-viewer.common-CcF3Xd23.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
12
+ ), n = r, s = x(), c = async () => {
13
+ const e = await fetch(n.resource.url);
14
+ if (!e.ok) throw new Error(`HTTP error! status: ${e.status}`);
15
+ return e.text();
16
+ };
17
+ return (e, _) => (u(), f(w, {
18
+ "file-type": "XML",
19
+ resource: r.resource,
20
+ "max-size": t(s).maxXmlPreviewCharSize,
21
+ load: c
22
+ }, {
23
+ default: l(({ data: a }) => [
24
+ p(t(o), {
25
+ xml: a
26
+ }, null, 8, ["xml"])
27
+ ]),
28
+ _: 1
29
+ }, 8, ["resource", "max-size"]));
30
+ }
31
+ });
32
+ export {
33
+ X as default
34
+ };
@@ -1,13 +1,13 @@
1
- import { r as w, aV as F, i as _, aW as I, n as O } from "./proj-DsetBcW7.js";
1
+ import { S as w, aY as F, i as _, aZ as I, v as O } from "./proj-DxGbobp7.js";
2
2
  function X(n, u) {
3
3
  if (!n)
4
4
  throw new Error(u);
5
5
  }
6
- function y(n) {
6
+ function Y(n) {
7
7
  return Math.pow(n, 3);
8
8
  }
9
- function Z(n) {
10
- return 1 - y(1 - n);
9
+ function U(n) {
10
+ return 1 - Y(1 - n);
11
11
  }
12
12
  function z(n) {
13
13
  return 3 * n * n - 2 * n * n * n;
@@ -15,61 +15,61 @@ function z(n) {
15
15
  function P(n) {
16
16
  return n;
17
17
  }
18
- const b = new Array(6);
19
- function V() {
18
+ const R = new Array(6);
19
+ function B() {
20
20
  return [1, 0, 0, 1, 0, 0];
21
21
  }
22
- function W(n) {
22
+ function G(n) {
23
23
  return s(n, 1, 0, 0, 1, 0, 0);
24
24
  }
25
- function v(n, u) {
26
- const i = n[0], e = n[1], c = n[2], t = n[3], r = n[4], l = n[5], g = u[0], h = u[1], p = u[2], L = u[3], S = u[4], M = u[5];
27
- return n[0] = i * g + c * h, n[1] = e * g + t * h, n[2] = i * p + c * L, n[3] = e * p + t * L, n[4] = i * S + c * M + r, n[5] = e * S + t * M + l, n;
25
+ function b(n, u) {
26
+ const i = n[0], e = n[1], c = n[2], t = n[3], r = n[4], l = n[5], g = u[0], h = u[1], p = u[2], S = u[3], L = u[4], v = u[5];
27
+ return n[0] = i * g + c * h, n[1] = e * g + t * h, n[2] = i * p + c * S, n[3] = e * p + t * S, n[4] = i * L + c * v + r, n[5] = e * L + t * v + l, n;
28
28
  }
29
29
  function s(n, u, i, e, c, t, r) {
30
30
  return n[0] = u, n[1] = i, n[2] = e, n[3] = c, n[4] = t, n[5] = r, n;
31
31
  }
32
- function B(n, u) {
32
+ function H(n, u) {
33
33
  return n[0] = u[0], n[1] = u[1], n[2] = u[2], n[3] = u[3], n[4] = u[4], n[5] = u[5], n;
34
34
  }
35
- function G(n, u) {
35
+ function J(n, u) {
36
36
  const i = u[0], e = u[1];
37
37
  return u[0] = n[0] * i + n[2] * e + n[4], u[1] = n[1] * i + n[3] * e + n[5], u;
38
38
  }
39
- function H(n, u, i) {
40
- return v(n, s(b, u, 0, 0, i, 0, 0));
39
+ function K(n, u, i) {
40
+ return b(n, s(R, u, 0, 0, i, 0, 0));
41
41
  }
42
- function J(n, u, i) {
43
- return v(n, s(b, 1, 0, 0, 1, u, i));
42
+ function N(n, u, i) {
43
+ return b(n, s(R, 1, 0, 0, 1, u, i));
44
44
  }
45
- function K(n, u, i, e, c, t, r, l) {
45
+ function Q(n, u, i, e, c, t, r, l) {
46
46
  const g = Math.sin(t), h = Math.cos(t);
47
47
  return n[0] = e * h, n[1] = c * g, n[2] = -e * g, n[3] = c * h, n[4] = r * e * h - l * e * g + u, n[5] = r * c * g + l * c * h + i, n;
48
48
  }
49
- function N(n, u) {
50
- const i = D(u);
49
+ function V(n, u) {
50
+ const i = y(u);
51
51
  X(i !== 0, "Transformation matrix cannot be inverted");
52
52
  const e = u[0], c = u[1], t = u[2], r = u[3], l = u[4], g = u[5];
53
53
  return n[0] = r / i, n[1] = -c / i, n[2] = -t / i, n[3] = e / i, n[4] = (t * g - r * l) / i, n[5] = -(e * g - c * l) / i, n;
54
54
  }
55
- function D(n) {
55
+ function y(n) {
56
56
  return n[0] * n[3] - n[1] * n[2];
57
57
  }
58
- const E = [1e5, 1e5, 1e5, 1e5, 2, 2];
59
- function Q(n) {
58
+ const D = [1e5, 1e5, 1e5, 1e5, 2, 2];
59
+ function W(n) {
60
60
  return "matrix(" + n.join(", ") + ")";
61
61
  }
62
- function R(n) {
62
+ function M(n) {
63
63
  return n.substring(7, n.length - 1).split(",").map(parseFloat);
64
64
  }
65
65
  function $(n, u) {
66
- const i = R(n), e = R(u);
66
+ const i = M(n), e = M(u);
67
67
  for (let c = 0; c < 6; ++c)
68
- if (Math.round((i[c] - e[c]) * E[c]) !== 0)
68
+ if (Math.round((i[c] - e[c]) * D[c]) !== 0)
69
69
  return !1;
70
70
  return !0;
71
71
  }
72
- function T(n, u, i, e, c) {
72
+ function E(n, u, i, e, c) {
73
73
  return !w(
74
74
  c,
75
75
  /**
@@ -96,7 +96,7 @@ function a(n, u, i, e, c, t) {
96
96
  }
97
97
  return r !== 0;
98
98
  }
99
- function Y(n, u, i, e, c, t) {
99
+ function T(n, u, i, e, c, t) {
100
100
  if (i.length === 0 || !a(n, u, i[0], e, c, t))
101
101
  return !1;
102
102
  for (let r = 1, l = i.length; r < l; ++r)
@@ -109,13 +109,13 @@ function f(n, u, i, e, c, t) {
109
109
  return !1;
110
110
  for (let r = 0, l = i.length; r < l; ++r) {
111
111
  const g = i[r];
112
- if (Y(n, u, g, e, c, t))
112
+ if (T(n, u, g, e, c, t))
113
113
  return !0;
114
114
  u = g[g.length - 1];
115
115
  }
116
116
  return !1;
117
117
  }
118
- function j(n, u, i, e, c) {
118
+ function Z(n, u, i, e, c) {
119
119
  let t;
120
120
  for (u += e; u < i; u += e)
121
121
  if (t = c(
@@ -126,7 +126,7 @@ function j(n, u, i, e, c) {
126
126
  return !1;
127
127
  }
128
128
  function A(n, u, i, e, c, t) {
129
- return t = t ?? F(O(), n, u, i, e), _(c, t) ? t[0] >= c[0] && t[2] <= c[2] || t[1] >= c[1] && t[3] <= c[3] ? !0 : j(
129
+ return t = t ?? F(O(), n, u, i, e), _(c, t) ? t[0] >= c[0] && t[2] <= c[2] || t[1] >= c[1] && t[3] <= c[3] ? !0 : Z(
130
130
  n,
131
131
  u,
132
132
  i,
@@ -150,7 +150,7 @@ function o(n, u, i, e, c) {
150
150
  }
151
151
  return !1;
152
152
  }
153
- function k(n, u, i, e, c) {
153
+ function j(n, u, i, e, c) {
154
154
  return !!(A(n, u, i, e, c) || a(
155
155
  n,
156
156
  u,
@@ -181,13 +181,13 @@ function k(n, u, i, e, c) {
181
181
  c[3]
182
182
  ));
183
183
  }
184
- function q(n, u, i, e, c) {
185
- if (!k(n, u, i[0], e, c))
184
+ function k(n, u, i, e, c) {
185
+ if (!j(n, u, i[0], e, c))
186
186
  return !1;
187
187
  if (i.length === 1)
188
188
  return !0;
189
189
  for (let t = 1, r = i.length; t < r; ++t)
190
- if (T(
190
+ if (E(
191
191
  n,
192
192
  i[t - 1],
193
193
  i[t],
@@ -206,7 +206,7 @@ function q(n, u, i, e, c) {
206
206
  function C(n, u, i, e, c) {
207
207
  for (let t = 0, r = i.length; t < r; ++t) {
208
208
  const l = i[t];
209
- if (q(n, u, l, e, c))
209
+ if (k(n, u, l, e, c))
210
210
  return !0;
211
211
  u = l[l.length - 1];
212
212
  }
@@ -218,27 +218,27 @@ export {
218
218
  X as a,
219
219
  o as b,
220
220
  C as c,
221
- K as d,
222
- V as e,
223
- j as f,
224
- G as g,
225
- H as h,
221
+ Q as d,
222
+ B as e,
223
+ Z as f,
224
+ J as g,
225
+ K as h,
226
226
  A as i,
227
- Z as j,
227
+ U as j,
228
228
  P as k,
229
229
  f as l,
230
- v as m,
231
- N as n,
232
- R as o,
230
+ b as m,
231
+ V as n,
232
+ M as o,
233
233
  $ as p,
234
- Q as q,
235
- W as r,
236
- B as s,
237
- J as t,
238
- Y as u,
239
- q as v,
234
+ W as q,
235
+ G as r,
236
+ H as s,
237
+ N as t,
238
+ T as u,
239
+ k as v,
240
240
  z as w,
241
241
  m as x,
242
- k as y,
243
- y as z
242
+ j as y,
243
+ Y as z
244
244
  };