@datagouv/components-next 0.2.0 → 1.0.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 (140) hide show
  1. package/README.md +1 -1
  2. package/assets/main.css +56 -1
  3. package/dist/Control-BNCDn-8E.js +148 -0
  4. package/dist/{Datafair.client-x39O4yfF.js → Datafair.client-Dls5AHTE.js} +1 -1
  5. package/dist/Event-BOgJUhNR.js +738 -0
  6. package/dist/Image-BN-4XkIn.js +247 -0
  7. package/dist/{JsonPreview.client-BMsC5JcY.js → JsonPreview.client-DPDTs433.js} +14 -14
  8. package/dist/Map-BdT3i2C4.js +7609 -0
  9. package/dist/MapContainer.client-BdAzd7bj.js +105 -0
  10. package/dist/OSM-CamriM9b.js +71 -0
  11. package/dist/{PdfPreview.client-COOkEkRA.js → PdfPreview.client-CopqSDyt.js} +3 -3
  12. package/dist/{Pmtiles.client-BaiIo4VZ.js → Pmtiles.client-mF6xaOO_.js} +2 -2
  13. package/dist/ScaleLine-BiesrgOv.js +165 -0
  14. package/dist/Swagger.client-eJ7gpfZA.js +4 -0
  15. package/dist/Tile-DCuqwNOI.js +1206 -0
  16. package/dist/TileImage-CmZf8EdU.js +1067 -0
  17. package/dist/View-DcDc7N2K.js +2858 -0
  18. package/dist/{XmlPreview.client-CAdN0w_Y.js → XmlPreview.client-C0OgBkSq.js} +7 -7
  19. package/dist/common-C4rDcQpp.js +243 -0
  20. package/dist/components-next.css +1 -1
  21. package/dist/components-next.js +153 -117
  22. package/dist/components.css +1 -1
  23. package/dist/{MapContainer.client-DeSo8EvG.js → index-BRGqW8aQ.js} +4975 -21416
  24. package/dist/leaflet-src-7m1mB8LI.js +6338 -0
  25. package/dist/{main-Dgri3TQL.js → main-CNHxAJ8J.js} +56758 -51450
  26. package/dist/proj-CKwYjU38.js +1569 -0
  27. package/dist/tilecoord-YW3qEH_j.js +884 -0
  28. package/dist/{vue3-xml-viewer.common-D6skc_Ai.js → vue3-xml-viewer.common-CmAdQfIy.js} +1 -1
  29. package/package.json +5 -1
  30. package/src/components/ActivityList/ActivityList.vue +6 -2
  31. package/src/components/AppLink.vue +4 -1
  32. package/src/components/Avatar.vue +2 -2
  33. package/src/components/AvatarWithName.vue +8 -4
  34. package/src/components/BouncingDots.vue +21 -0
  35. package/src/components/BrandedButton.vue +2 -0
  36. package/src/components/CopyButton.vue +19 -7
  37. package/src/components/DataserviceCard.vue +83 -118
  38. package/src/components/DatasetCard.vue +110 -171
  39. package/src/components/DatasetInformation/DatasetEmbedSection.vue +43 -0
  40. package/src/components/DatasetInformation/DatasetInformationSection.vue +73 -0
  41. package/src/components/DatasetInformation/DatasetSchemaSection.vue +74 -0
  42. package/src/components/DatasetInformation/DatasetSpatialSection.vue +59 -0
  43. package/src/components/DatasetInformation/DatasetTemporalitySection.vue +45 -0
  44. package/src/components/DatasetInformation/index.ts +5 -0
  45. package/src/components/DatasetQualityTooltipContent.vue +3 -3
  46. package/src/components/DescriptionList.vue +1 -4
  47. package/src/components/DescriptionListDetails.vue +5 -0
  48. package/src/components/DescriptionListTerm.vue +5 -0
  49. package/src/components/DiscussionMessageCard.vue +63 -0
  50. package/src/components/ExtraAccordion.vue +4 -4
  51. package/src/components/Form/BadgeSelect.vue +35 -0
  52. package/src/components/Form/FormatSelect.vue +28 -0
  53. package/src/components/Form/GeozoneSelect.vue +52 -0
  54. package/src/components/Form/GranularitySelect.vue +29 -0
  55. package/src/components/Form/LicenseSelect.vue +30 -0
  56. package/src/components/Form/OrganizationSelect.vue +62 -0
  57. package/src/components/Form/OrganizationTypeSelect.vue +34 -0
  58. package/src/components/Form/ReuseTopicSelect.vue +29 -0
  59. package/src/components/Form/SchemaSelect.vue +30 -0
  60. package/src/components/Form/SearchableSelect.vue +334 -0
  61. package/src/components/Form/SelectGroup.vue +132 -0
  62. package/src/components/Form/TagSelect.vue +38 -0
  63. package/src/components/LeafletMap.vue +31 -0
  64. package/src/components/LicenseBadge.vue +24 -0
  65. package/src/components/LoadingBlock.vue +23 -2
  66. package/src/components/MarkdownViewer.vue +3 -1
  67. package/src/components/ObjectCard.vue +42 -0
  68. package/src/components/ObjectCardBadge.vue +22 -0
  69. package/src/components/ObjectCardHeader.vue +35 -0
  70. package/src/components/ObjectCardOwner.vue +43 -0
  71. package/src/components/ObjectCardShortDescription.vue +28 -0
  72. package/src/components/OrganizationCard.vue +35 -20
  73. package/src/components/OrganizationLogo.vue +1 -1
  74. package/src/components/OrganizationNameWithCertificate.vue +13 -7
  75. package/src/components/OwnerTypeIcon.vue +1 -0
  76. package/src/components/Pagination.vue +1 -1
  77. package/src/components/Placeholder.vue +5 -2
  78. package/src/components/PostCard.vue +62 -0
  79. package/src/components/RadioGroup.vue +32 -0
  80. package/src/components/RadioInput.vue +64 -0
  81. package/src/components/ResourceAccordion/EditButton.vue +2 -3
  82. package/src/components/ResourceAccordion/MapContainer.client.vue +20 -16
  83. package/src/components/ResourceAccordion/Metadata.vue +11 -24
  84. package/src/components/ResourceAccordion/Pmtiles.client.vue +1 -1
  85. package/src/components/ResourceAccordion/Preview.vue +1 -1
  86. package/src/components/ResourceAccordion/ResourceAccordion.vue +30 -20
  87. package/src/components/ResourceAccordion/ResourceIcon.vue +1 -0
  88. package/src/components/ResourceAccordion/SchemaBadge.vue +2 -2
  89. package/src/components/ResourceExplorer/ResourceExplorer.vue +243 -0
  90. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +116 -0
  91. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +361 -0
  92. package/src/components/ReuseCard.vue +8 -28
  93. package/src/components/ReuseHorizontalCard.vue +80 -0
  94. package/src/components/Search/BasicAndAdvancedFilters.vue +49 -0
  95. package/src/components/Search/Filter/AccessTypeFilter.vue +37 -0
  96. package/src/components/Search/Filter/DatasetBadgeFilter.vue +40 -0
  97. package/src/components/Search/Filter/FilterButtonGroup.vue +78 -0
  98. package/src/components/Search/Filter/FormatFamilyFilter.vue +39 -0
  99. package/src/components/Search/Filter/LastUpdateRangeFilter.vue +37 -0
  100. package/src/components/Search/Filter/ProducerTypeFilter.vue +39 -0
  101. package/src/components/Search/Filter/ReuseTypeFilter.vue +42 -0
  102. package/src/components/Search/GlobalSearch.vue +611 -0
  103. package/src/components/Search/SearchInput.vue +63 -0
  104. package/src/components/Search/Sidemenu.vue +38 -0
  105. package/src/components/StatBox.vue +5 -5
  106. package/src/components/Tag.vue +30 -0
  107. package/src/components/Toggletip.vue +6 -2
  108. package/src/components/Tooltip.vue +2 -3
  109. package/src/components/TopicCard.vue +134 -0
  110. package/src/components/radioGroupContext.ts +9 -0
  111. package/src/composables/useDebouncedRef.ts +31 -0
  112. package/src/composables/useMetrics.ts +4 -3
  113. package/src/composables/useResourceCapabilities.ts +118 -0
  114. package/src/composables/useRouteQueryBoolean.ts +10 -0
  115. package/src/composables/useSelectModelSync.ts +89 -0
  116. package/src/composables/useStableQueryParams.ts +84 -0
  117. package/src/config.ts +4 -0
  118. package/src/functions/api.ts +17 -6
  119. package/src/functions/api.types.ts +4 -2
  120. package/src/functions/datasets.ts +1 -29
  121. package/src/functions/description.ts +33 -0
  122. package/src/functions/helpers.ts +11 -0
  123. package/src/functions/markdown.ts +60 -16
  124. package/src/functions/metrics.ts +33 -0
  125. package/src/functions/organizations.ts +5 -5
  126. package/src/main.ts +89 -7
  127. package/src/types/dataservices.ts +14 -12
  128. package/src/types/datasets.ts +20 -7
  129. package/src/types/discussions.ts +20 -0
  130. package/src/types/licenses.ts +3 -3
  131. package/src/types/organizations.ts +13 -1
  132. package/src/types/owned.ts +4 -2
  133. package/src/types/pages.ts +70 -0
  134. package/src/types/posts.ts +27 -0
  135. package/src/types/resources.ts +6 -0
  136. package/src/types/reuses.ts +14 -5
  137. package/src/types/search.ts +379 -0
  138. package/src/types/users.ts +12 -3
  139. package/dist/Swagger.client-CpLgaLg6.js +0 -4
  140. package/src/components/DatasetInformationPanel.vue +0 -211
@@ -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 l, 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 { d as E, u as M, j as q, a as h, F as v } from "./main-Dgri3TQL.js";
2
+ import { u as E, a as M, g as q, _ as h, F as v } from "./main-CNHxAJ8J.js";
3
3
  const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
4
4
  key: 1,
5
5
  class: "text-gray-medium"
@@ -10,16 +10,16 @@ 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-D6skc_Ai.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
14
- ), g = k, x = E(), { t: r } = M(), n = o(null), c = o(!1), s = o(null), y = o(!1), _ = w(() => q(g.resource)), X = w(() => {
15
- const e = _.value;
13
+ () => import("./vue3-xml-viewer.common-CmAdQfIy.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
14
+ ), g = k, x = E(), { t: r } = M(), n = o(null), c = o(!1), s = o(null), _ = o(!1), y = w(() => q(g.resource)), X = w(() => {
15
+ const e = y.value;
16
16
  if (!e || !x.maxXmlPreviewCharSize)
17
17
  return !1;
18
18
  const a = x.maxXmlPreviewCharSize;
19
19
  return e <= a;
20
20
  }), C = async () => {
21
21
  if (!X.value) {
22
- y.value = !0;
22
+ _.value = !0;
23
23
  return;
24
24
  }
25
25
  c.value = !0, s.value = null;
@@ -40,14 +40,14 @@ const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
40
40
  }), (e, a) => (l(), p("div", B, [
41
41
  n.value ? (l(), p("div", S, [
42
42
  u(t(z), { xml: n.value }, null, 8, ["xml"])
43
- ])) : c.value ? (l(), p("div", V, i(t(r)("Chargement de l'aperçu XML...")), 1)) : y.value ? (l(), m(h, {
43
+ ])) : c.value ? (l(), p("div", V, i(t(r)("Chargement de l'aperçu XML...")), 1)) : _.value ? (l(), m(h, {
44
44
  key: 2,
45
45
  type: "warning",
46
46
  class: "flex items-center space-x-2"
47
47
  }, {
48
48
  default: f(() => [
49
49
  u(t(v), { class: "shink-0 size-6" }),
50
- d("span", null, i(_.value ? t(r)("Fichier XML 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.") : t(r)("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.")), 1)
50
+ d("span", null, i(y.value ? t(r)("Fichier XML 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.") : t(r)("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.")), 1)
51
51
  ]),
52
52
  _: 1
53
53
  })) : s.value === "network" ? (l(), m(h, {
@@ -0,0 +1,243 @@
1
+ import { q as w, aV as F, i as _, aW as I, m as O } from "./proj-CKwYjU38.js";
2
+ function X(n, u) {
3
+ if (!n)
4
+ throw new Error(u);
5
+ }
6
+ function q(n) {
7
+ return Math.pow(n, 3);
8
+ }
9
+ function Z(n) {
10
+ return 1 - q(1 - n);
11
+ }
12
+ function P(n) {
13
+ return 3 * n * n - 2 * n * n * n;
14
+ }
15
+ function V(n) {
16
+ return n;
17
+ }
18
+ const b = new Array(6);
19
+ function W() {
20
+ return [1, 0, 0, 1, 0, 0];
21
+ }
22
+ function z(n) {
23
+ return s(n, 1, 0, 0, 1, 0, 0);
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;
28
+ }
29
+ function s(n, u, i, e, c, t, r) {
30
+ return n[0] = u, n[1] = i, n[2] = e, n[3] = c, n[4] = t, n[5] = r, n;
31
+ }
32
+ function B(n, u) {
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
+ }
35
+ function G(n, u) {
36
+ const i = u[0], e = u[1];
37
+ return u[0] = n[0] * i + n[2] * e + n[4], u[1] = n[1] * i + n[3] * e + n[5], u;
38
+ }
39
+ function H(n, u, i) {
40
+ return v(n, s(b, u, 0, 0, i, 0, 0));
41
+ }
42
+ function J(n, u, i) {
43
+ return v(n, s(b, 1, 0, 0, 1, u, i));
44
+ }
45
+ function K(n, u, i, e, c, t, r, l) {
46
+ const g = Math.sin(t), h = Math.cos(t);
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
+ }
49
+ function N(n, u) {
50
+ const i = y(u);
51
+ X(i !== 0, "Transformation matrix cannot be inverted");
52
+ const e = u[0], c = u[1], t = u[2], r = u[3], l = u[4], g = u[5];
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
+ }
55
+ function y(n) {
56
+ return n[0] * n[3] - n[1] * n[2];
57
+ }
58
+ const D = [1e5, 1e5, 1e5, 1e5, 2, 2];
59
+ function Q(n) {
60
+ return "matrix(" + n.join(", ") + ")";
61
+ }
62
+ function R(n) {
63
+ return n.substring(7, n.length - 1).split(",").map(parseFloat);
64
+ }
65
+ function $(n, u) {
66
+ const i = R(n), e = R(u);
67
+ for (let c = 0; c < 6; ++c)
68
+ if (Math.round((i[c] - e[c]) * D[c]) !== 0)
69
+ return !1;
70
+ return !0;
71
+ }
72
+ function E(n, u, i, e, c) {
73
+ return !w(
74
+ c,
75
+ /**
76
+ * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
77
+ * @return {boolean} Contains (x, y).
78
+ */
79
+ function(r) {
80
+ return !a(
81
+ n,
82
+ u,
83
+ i,
84
+ e,
85
+ r[0],
86
+ r[1]
87
+ );
88
+ }
89
+ );
90
+ }
91
+ function a(n, u, i, e, c, t) {
92
+ let r = 0, l = n[i - e], g = n[i - e + 1];
93
+ for (; u < i; u += e) {
94
+ const h = n[u], p = n[u + 1];
95
+ g <= t ? p > t && (h - l) * (t - g) - (c - l) * (p - g) > 0 && r++ : p <= t && (h - l) * (t - g) - (c - l) * (p - g) < 0 && r--, l = h, g = p;
96
+ }
97
+ return r !== 0;
98
+ }
99
+ function T(n, u, i, e, c, t) {
100
+ if (i.length === 0 || !a(n, u, i[0], e, c, t))
101
+ return !1;
102
+ for (let r = 1, l = i.length; r < l; ++r)
103
+ if (a(n, i[r - 1], i[r], e, c, t))
104
+ return !1;
105
+ return !0;
106
+ }
107
+ function f(n, u, i, e, c, t) {
108
+ if (i.length === 0)
109
+ return !1;
110
+ for (let r = 0, l = i.length; r < l; ++r) {
111
+ const g = i[r];
112
+ if (T(n, u, g, e, c, t))
113
+ return !0;
114
+ u = g[g.length - 1];
115
+ }
116
+ return !1;
117
+ }
118
+ function Y(n, u, i, e, c) {
119
+ let t;
120
+ for (u += e; u < i; u += e)
121
+ if (t = c(
122
+ n.slice(u - e, u),
123
+ n.slice(u, u + e)
124
+ ), t)
125
+ return t;
126
+ return !1;
127
+ }
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 : Y(
130
+ n,
131
+ u,
132
+ i,
133
+ e,
134
+ /**
135
+ * @param {import("../../coordinate.js").Coordinate} point1 Start point.
136
+ * @param {import("../../coordinate.js").Coordinate} point2 End point.
137
+ * @return {boolean} `true` if the segment and the extent intersect,
138
+ * `false` otherwise.
139
+ */
140
+ function(r, l) {
141
+ return I(c, r, l);
142
+ }
143
+ ) : !1;
144
+ }
145
+ function o(n, u, i, e, c) {
146
+ for (let t = 0, r = i.length; t < r; ++t) {
147
+ if (A(n, u, i[t], e, c))
148
+ return !0;
149
+ u = i[t];
150
+ }
151
+ return !1;
152
+ }
153
+ function j(n, u, i, e, c) {
154
+ return !!(A(n, u, i, e, c) || a(
155
+ n,
156
+ u,
157
+ i,
158
+ e,
159
+ c[0],
160
+ c[1]
161
+ ) || a(
162
+ n,
163
+ u,
164
+ i,
165
+ e,
166
+ c[0],
167
+ c[3]
168
+ ) || a(
169
+ n,
170
+ u,
171
+ i,
172
+ e,
173
+ c[2],
174
+ c[1]
175
+ ) || a(
176
+ n,
177
+ u,
178
+ i,
179
+ e,
180
+ c[2],
181
+ c[3]
182
+ ));
183
+ }
184
+ function k(n, u, i, e, c) {
185
+ if (!j(n, u, i[0], e, c))
186
+ return !1;
187
+ if (i.length === 1)
188
+ return !0;
189
+ for (let t = 1, r = i.length; t < r; ++t)
190
+ if (E(
191
+ n,
192
+ i[t - 1],
193
+ i[t],
194
+ e,
195
+ c
196
+ ) && !A(
197
+ n,
198
+ i[t - 1],
199
+ i[t],
200
+ e,
201
+ c
202
+ ))
203
+ return !1;
204
+ return !0;
205
+ }
206
+ function C(n, u, i, e, c) {
207
+ for (let t = 0, r = i.length; t < r; ++t) {
208
+ const l = i[t];
209
+ if (k(n, u, l, e, c))
210
+ return !0;
211
+ u = l[l.length - 1];
212
+ }
213
+ return !1;
214
+ }
215
+ const x = 42, m = 256;
216
+ export {
217
+ x as D,
218
+ X as a,
219
+ o as b,
220
+ C as c,
221
+ K as d,
222
+ W as e,
223
+ Y as f,
224
+ G as g,
225
+ H as h,
226
+ A as i,
227
+ Z as j,
228
+ V as k,
229
+ f as l,
230
+ v as m,
231
+ N as n,
232
+ $ as o,
233
+ Q as p,
234
+ T as q,
235
+ z as r,
236
+ B as s,
237
+ J as t,
238
+ k as u,
239
+ P as v,
240
+ m as w,
241
+ j as x,
242
+ q as y
243
+ };