@datagouv/components-next 1.0.2-dev.2 → 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 (173) 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-CFTmBFoY.js +30 -0
  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-D9N3664r.js +101 -0
  11. package/dist/{OSM-s40W6sQ2.js → OSM-CcrUhItr.js} +15 -23
  12. package/dist/{PdfPreview.client-C-w6-w44.js → PdfPreview.client-C6A6ZiKl.js} +835 -871
  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-SrYZwgCT.js → index-B_tPYi5Z.js} +34094 -27864
  25. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-PeylHk0o.js} +162 -164
  26. package/dist/main-CVOZp_Nx.js +75398 -0
  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-BRxsqI9j.js → vue3-xml-viewer.common-CcF3Xd23.js} +1 -1
  32. package/package.json +50 -37
  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/Form/SearchableSelect.vue +2 -1
  53. package/src/components/FormattedDate.vue +81 -0
  54. package/src/components/InfiniteLoader.vue +53 -0
  55. package/src/components/LoadingBlock.vue +4 -1
  56. package/src/components/ObjectCardHeader.vue +11 -4
  57. package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
  58. package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
  59. package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
  60. package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
  61. package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
  62. package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
  63. package/src/components/OpenApiViewer/openapi.ts +150 -0
  64. package/src/components/OrganizationNameWithCertificate.vue +3 -2
  65. package/src/components/Pagination.vue +25 -62
  66. package/src/components/PostCard.vue +13 -15
  67. package/src/components/RadioInput.vue +7 -2
  68. package/src/components/ReadMore.vue +1 -1
  69. package/src/components/ResourceAccordion/DataStructure.vue +11 -33
  70. package/src/components/ResourceAccordion/Datafair.client.vue +4 -10
  71. package/src/components/ResourceAccordion/Downloads.vue +172 -0
  72. package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
  73. package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -121
  74. package/src/components/ResourceAccordion/MapContainer.client.vue +6 -19
  75. package/src/components/ResourceAccordion/Metadata.vue +4 -6
  76. package/src/components/ResourceAccordion/PdfPreview.client.vue +58 -113
  77. package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
  78. package/src/components/ResourceAccordion/Pmtiles.client.vue +33 -23
  79. package/src/components/ResourceAccordion/Preview.vue +24 -25
  80. package/src/components/ResourceAccordion/PreviewLoader.vue +1 -2
  81. package/src/components/ResourceAccordion/PreviewUnavailable.vue +22 -0
  82. package/src/components/ResourceAccordion/PreviewWrapper.vue +89 -0
  83. package/src/components/ResourceAccordion/ResourceAccordion.vue +36 -117
  84. package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -115
  85. package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -199
  86. package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
  87. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
  88. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +143 -280
  89. package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
  90. package/src/components/ResourceExplorer/ResourceSelector.vue +51 -0
  91. package/src/components/ResourceExplorer/ResourceViewerHeader.vue +122 -0
  92. package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
  93. package/src/components/ResourceListItem.vue +168 -0
  94. package/src/components/ReuseCard.vue +28 -9
  95. package/src/components/ReuseDetails.vue +2 -2
  96. package/src/components/ReuseHorizontalCard.vue +2 -2
  97. package/src/components/SchemaCard.vue +10 -1
  98. package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
  99. package/src/components/Search/GlobalSearch.vue +229 -123
  100. package/src/components/Search/SearchInput.vue +5 -4
  101. package/src/components/Search/Sidemenu.vue +4 -3
  102. package/src/components/SmallChart.vue +11 -10
  103. package/src/components/StatBox.vue +13 -5
  104. package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
  105. package/src/components/TabularExplorer/TabularCell.vue +50 -0
  106. package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
  107. package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
  108. package/src/components/TabularExplorer/TabularExplorer.vue +299 -0
  109. package/src/components/TabularExplorer/TabularFilterContent.vue +362 -0
  110. package/src/components/TabularExplorer/TabularFilterPopover.vue +106 -0
  111. package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
  112. package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
  113. package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
  114. package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
  115. package/src/components/TabularExplorer/TabularTable.vue +481 -0
  116. package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
  117. package/src/components/TabularExplorer/types.ts +84 -0
  118. package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
  119. package/src/components/TabularExplorer/useTabularContext.ts +82 -0
  120. package/src/components/TopicCard.vue +13 -14
  121. package/src/composables/useActiveDescendant.ts +5 -0
  122. package/src/composables/useDatasetResources.ts +164 -0
  123. package/src/composables/useHasTabularData.ts +15 -1
  124. package/src/composables/useMetrics.ts +1 -1
  125. package/src/composables/useResizable.ts +46 -0
  126. package/src/composables/useResourceCapabilities.ts +49 -41
  127. package/src/composables/useSearchFilter.ts +120 -0
  128. package/src/composables/useStableQueryParams.ts +38 -6
  129. package/src/composables/useTabularProfile.ts +70 -0
  130. package/src/composables/useTranslation.ts +24 -9
  131. package/src/config.ts +21 -3
  132. package/src/functions/activities.ts +3 -3
  133. package/src/functions/api.ts +20 -42
  134. package/src/functions/api.types.ts +1 -0
  135. package/src/functions/charts.ts +99 -0
  136. package/src/functions/datasets.ts +0 -17
  137. package/src/functions/dates.ts +6 -7
  138. package/src/functions/helpers.ts +15 -0
  139. package/src/functions/metrics.ts +63 -60
  140. package/src/functions/paginate.ts +46 -0
  141. package/src/functions/resourceCapabilities.ts +34 -0
  142. package/src/functions/resources.ts +136 -1
  143. package/src/functions/schemas.ts +27 -0
  144. package/src/functions/scroll.ts +20 -0
  145. package/src/functions/tabular.ts +214 -0
  146. package/src/functions/tabularApi.ts +96 -11
  147. package/src/main.ts +119 -14
  148. package/src/types/dataservices.ts +17 -0
  149. package/src/types/organizations.ts +11 -1
  150. package/src/types/pages.ts +0 -5
  151. package/src/types/posts.ts +2 -2
  152. package/src/types/reports.ts +5 -1
  153. package/src/types/resources.ts +0 -1
  154. package/src/types/reuses.ts +12 -1
  155. package/src/types/search.ts +63 -1
  156. package/src/types/site.ts +5 -3
  157. package/src/types/ui.ts +2 -0
  158. package/src/types/users.ts +2 -1
  159. package/src/types/visualizations.ts +93 -0
  160. package/assets/swagger-themes/newspaper.css +0 -1670
  161. package/dist/Datafair.client-E5D6ePRC.js +0 -35
  162. package/dist/JsonPreview.client-C-6eBbPw.js +0 -87
  163. package/dist/MapContainer.client-DRkAmdOc.js +0 -105
  164. package/dist/Pmtiles.client-BR7_ldHY.js +0 -25190
  165. package/dist/Swagger.client-D4-F6yEf.js +0 -4
  166. package/dist/XmlPreview.client-Dl2VCgXF.js +0 -79
  167. package/dist/main-B2kXxWRG.js +0 -105833
  168. package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
  169. package/src/functions/pagination.ts +0 -9
  170. /package/assets/illustrations/{_microscope.svg → microscope.svg} +0 -0
  171. /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
  172. /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
  173. /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
@@ -1,35 +0,0 @@
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";
3
- const k = { class: "fr-text--xs" }, b = { key: 0 }, y = ["src"], B = /* @__PURE__ */ f({
4
- __name: "Datafair.client",
5
- props: {
6
- resource: {},
7
- dataset: {}
8
- },
9
- setup(d) {
10
- const e = d, { t: l } = h(), r = a(() => e.resource.extras.datafairOrigin || e.dataset.extras.datafairOrigin), s = a(() => e.resource.extras.datafairDatasetId || e.dataset.extras.datafairDatasetId), u = a(() => e.resource.extras.datafairEmbed), n = a(() => !r.value || !s.value ? null : `${r.value}/embed/dataset/${s.value}/${u.value}`);
11
- return (D, E) => (t(), o("div", k, [
12
- n.value ? (t(), o("div", b, [
13
- i("iframe", {
14
- src: n.value,
15
- width: "100%",
16
- height: "500px",
17
- style: { "background-color": "transparent", border: "none" }
18
- }, null, 8, y)
19
- ])) : (t(), p(v, {
20
- key: 1,
21
- type: "warning",
22
- class: "flex items-center space-x-2"
23
- }, {
24
- default: m(() => [
25
- _(c(g), { class: "shrink-0 size-6" }),
26
- i("span", null, x(c(l)("Erreur lors de l'affichage de l'aperçu.")), 1)
27
- ]),
28
- _: 1
29
- }))
30
- ]));
31
- }
32
- });
33
- export {
34
- B as default
35
- };
@@ -1,87 +0,0 @@
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";
3
- const B = { class: "fr-text--xs" }, O = { key: 0 }, V = {
4
- key: 1,
5
- class: "text-gray-medium"
6
- }, L = /* @__PURE__ */ S({
7
- __name: "JsonPreview.client",
8
- props: {
9
- resource: {}
10
- },
11
- setup(k) {
12
- const z = b(
13
- () => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
14
- ), g = k, x = P(), { t: s } = E(), l = o(null), c = o(!1), n = o(null), _ = o(!1), y = w(() => q(g.resource)), J = w(() => {
15
- const e = y.value;
16
- if (!e || !x.maxJsonPreviewCharSize)
17
- return !1;
18
- const a = x.maxJsonPreviewCharSize;
19
- return e <= a;
20
- }), C = async () => {
21
- if (!J.value) {
22
- _.value = !0;
23
- return;
24
- }
25
- c.value = !0, n.value = null;
26
- try {
27
- const e = await fetch(g.resource.url);
28
- if (!e.ok)
29
- throw new Error(`HTTP error! status: ${e.status}`);
30
- const a = await e.json();
31
- l.value = a;
32
- } catch (e) {
33
- console.error("Error loading JSON:", e), e instanceof TypeError ? n.value = "network" : n.value = "generic", l.value = null;
34
- } finally {
35
- c.value = !1;
36
- }
37
- };
38
- return N(() => {
39
- C();
40
- }), (e, a) => (r(), p("div", B, [
41
- l.value ? (r(), p("div", O, [
42
- u(t(z), {
43
- value: l.value,
44
- boxed: "",
45
- sort: "",
46
- theme: "light",
47
- "max-depth": 3,
48
- "expand-depth": 2,
49
- "indent-width": 2
50
- }, null, 8, ["value"])
51
- ])) : c.value ? (r(), p("div", V, i(t(s)("Chargement de l'aperçu JSON...")), 1)) : _.value ? (r(), f(m, {
52
- key: 2,
53
- type: "warning",
54
- class: "flex items-center space-x-2"
55
- }, {
56
- default: d(() => [
57
- u(t(v), { class: "shrink-0 size-6" }),
58
- h("span", null, i(y.value ? t(s)("Fichier JSON 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(s)("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)
59
- ]),
60
- _: 1
61
- })) : n.value === "network" ? (r(), f(m, {
62
- key: 3,
63
- type: "warning",
64
- class: "flex items-center space-x-2"
65
- }, {
66
- default: d(() => [
67
- u(t(v), { class: "shrink-0 size-6" }),
68
- h("span", null, i(t(s)("Ce fichier JSON ne peut pas être prévisualisé, peut-être parce qu'il est hébergé sur un autre site qui ne l'autorise pas. Pour le consulter, téléchargez-le en cliquant sur le bouton bleu ou depuis l'onglet Téléchargements.")), 1)
69
- ]),
70
- _: 1
71
- })) : n.value ? (r(), f(m, {
72
- key: 4,
73
- type: "warning",
74
- class: "flex items-center space-x-2"
75
- }, {
76
- default: d(() => [
77
- u(t(v), { class: "shrink-0 size-6" }),
78
- h("span", null, i(t(s)("Erreur lors du chargement de l'aperçu JSON.")), 1)
79
- ]),
80
- _: 1
81
- })) : T("", !0)
82
- ]));
83
- }
84
- });
85
- export {
86
- L as default
87
- };
@@ -1,105 +0,0 @@
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";
3
- const j = /* @__PURE__ */ G({
4
- __name: "MapContainer.client",
5
- props: {
6
- resource: {}
7
- },
8
- setup(f) {
9
- const a = f, { t: d } = D();
10
- let e = null;
11
- const r = W("mapRef"), n = z(!1);
12
- async function w() {
13
- const [
14
- { default: i },
15
- { default: s },
16
- { default: y },
17
- { default: h },
18
- { default: C },
19
- _
20
- ] = await Promise.all([
21
- import("./View-BR92hTWP.js").then((t) => t.M),
22
- import("./Map-BjUnLyj8.js").then((t) => t.U),
23
- import("./ScaleLine-KW-nXqp3.js"),
24
- import("./Tile-DbNFNPfU.js").then((t) => t.d),
25
- import("./OSM-s40W6sQ2.js"),
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({
30
- target: r.value,
31
- layers: [
32
- new h({
33
- source: new C()
34
- })
35
- ],
36
- view: new i({
37
- center: [288074.8449901076, 6247982515792289e-9],
38
- zoom: 8,
39
- constrainResolution: !0
40
- })
41
- });
42
- const R = new y({
43
- units: "metric",
44
- bar: !1
45
- });
46
- e.addControl(R);
47
- const k = new M({
48
- position: "top-right"
49
- });
50
- e.addControl(k);
51
- const T = new b({
52
- position: "bottom-left"
53
- });
54
- e.addControl(T);
55
- const x = new L({
56
- options: {
57
- position: "top-right"
58
- }
59
- });
60
- e.addControl(x);
61
- const E = new S({
62
- position: "bottom-right"
63
- });
64
- e.addControl(E);
65
- const o = new v({
66
- position: "bottom-left",
67
- listable: !0,
68
- layerTypes: ["WMS"]
69
- });
70
- 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() {
74
- if (!o._getCapResponseWMSLayers)
75
- p--, p > 0 ? setTimeout(c, l) : n.value = !0;
76
- else {
77
- const t = o._getCapResponseWMSLayers.filter((I) => I.Name == a.resource.title)[0];
78
- o._addGetCapWMSLayer(t);
79
- }
80
- }
81
- setTimeout(c, l);
82
- }
83
- return B(() => {
84
- w();
85
- }), (i, s) => n.value ? (u(), F(O, {
86
- key: 0,
87
- type: "warning",
88
- class: "flex items-center space-x-2"
89
- }, {
90
- 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
- ]),
94
- _: 1
95
- })) : (u(), N("div", {
96
- key: 1,
97
- id: "map",
98
- ref_key: "mapRef",
99
- ref: r
100
- }, null, 512));
101
- }
102
- });
103
- export {
104
- j as default
105
- };