@datagouv/components-next 1.0.2-dev.11 → 1.0.2-dev.111

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 (104) hide show
  1. package/assets/main.css +4 -0
  2. package/dist/{Control-DuZJdKV_.js → Control-ZFh5ta_U.js} +1 -1
  3. package/dist/{Datafair.client-8haHXl47.js → Datafair.client-CKB2P_X1.js} +1 -1
  4. package/dist/{Event--kp8kMdJ.js → Event-DSQcW7OF.js} +24 -24
  5. package/dist/{Image-34hvypZI.js → Image-BijNEG0p.js} +6 -6
  6. package/dist/JsonPreview.client-Bx11-jfT.js +40 -0
  7. package/dist/{Map-BjUnLyj8.js → Map-BUtPf5GN.js} +756 -756
  8. package/dist/{MapContainer.client-l6HuXTHR.js → MapContainer.client-CdZSeT_L.js} +37 -38
  9. package/dist/{OSM-s40W6sQ2.js → OSM-D4MTdBtk.js} +2 -2
  10. package/dist/{PdfPreview.client-4OueK-2Z.js → PdfPreview.client-Bh9lP-qU.js} +822 -850
  11. package/dist/{Pmtiles.client-4j3VTYkz.js → Pmtiles.client-Bi46wN14.js} +1 -1
  12. package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-BnC7vWGP.js +61 -0
  13. package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-hJQIqcZm.js} +2 -2
  14. package/dist/{Tile-DbNFNPfU.js → Tile-Dcl7oIVu.js} +35 -35
  15. package/dist/{TileImage-BsXBxMtq.js → TileImage-BJeHipMX.js} +4 -4
  16. package/dist/{View-BR92hTWP.js → View-xp_P_OHw.js} +412 -401
  17. package/dist/XmlPreview.client-oFAOv828.js +34 -0
  18. package/dist/{common-PJfpC179.js → common-BjQlan3k.js} +36 -36
  19. package/dist/components-next.css +6 -6
  20. package/dist/components-next.js +165 -142
  21. package/dist/components.css +1 -1
  22. package/dist/{index-CVTIoZQ0.js → index-CxCuKQ81.js} +32886 -27183
  23. package/dist/main-CQ9ZQG7n.js +73607 -0
  24. package/dist/{proj-DsetBcW7.js → proj-CsNo9yH1.js} +532 -512
  25. package/dist/{tilecoord-Db24Px13.js → tilecoord-A0fLnBZr.js} +28 -28
  26. package/dist/{vue3-xml-viewer.common-CWer_T5-.js → vue3-xml-viewer.common-B9qp90K_.js} +1 -1
  27. package/package.json +25 -11
  28. package/src/chart.ts +5 -0
  29. package/src/components/ActivityList/ActivityList.vue +3 -2
  30. package/src/components/Chart/ChartViewer.vue +226 -0
  31. package/src/components/Chart/ChartViewerWrapper.vue +170 -0
  32. package/src/components/DataserviceCard.vue +3 -0
  33. package/src/components/DatasetCard.vue +9 -4
  34. package/src/components/Form/Listbox.vue +101 -0
  35. package/src/components/Form/SearchableSelect.vue +2 -1
  36. package/src/components/InfiniteLoader.vue +53 -0
  37. package/src/components/ObjectCardHeader.vue +11 -4
  38. package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
  39. package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
  40. package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
  41. package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
  42. package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
  43. package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
  44. package/src/components/OpenApiViewer/openapi.ts +150 -0
  45. package/src/components/OrganizationNameWithCertificate.vue +3 -2
  46. package/src/components/Pagination.vue +8 -5
  47. package/src/components/RadioInput.vue +7 -2
  48. package/src/components/ReadMore.vue +1 -1
  49. package/src/components/ResourceAccordion/DataStructure.vue +11 -33
  50. package/src/components/ResourceAccordion/Downloads.vue +160 -0
  51. package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -104
  52. package/src/components/ResourceAccordion/MapContainer.client.vue +1 -3
  53. package/src/components/ResourceAccordion/Metadata.vue +1 -2
  54. package/src/components/ResourceAccordion/PdfPreview.client.vue +24 -87
  55. package/src/components/ResourceAccordion/Preview.vue +11 -11
  56. package/src/components/ResourceAccordion/PreviewWrapper.vue +82 -0
  57. package/src/components/ResourceAccordion/ResourceAccordion.vue +11 -110
  58. package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -98
  59. package/src/components/ResourceExplorer/ResourceExplorer.vue +14 -10
  60. package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +2 -2
  61. package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +50 -148
  62. package/src/components/ResourceExplorer/ResourceSelector.vue +113 -0
  63. package/src/components/ReuseCard.vue +12 -4
  64. package/src/components/Search/GlobalSearch.vue +201 -113
  65. package/src/components/Search/SearchInput.vue +5 -4
  66. package/src/components/TabularExplorer/TabularCell.vue +51 -0
  67. package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
  68. package/src/components/TabularExplorer/TabularExplorer.vue +973 -0
  69. package/src/components/TabularExplorer/TabularFilterContent.vue +351 -0
  70. package/src/components/TabularExplorer/TabularFilterPopover.vue +111 -0
  71. package/src/components/TabularExplorer/types.ts +83 -0
  72. package/src/composables/useHasTabularData.ts +13 -0
  73. package/src/composables/useMetrics.ts +1 -1
  74. package/src/composables/useResourceCapabilities.ts +1 -1
  75. package/src/composables/useSearchFilter.ts +118 -0
  76. package/src/composables/useStableQueryParams.ts +38 -6
  77. package/src/composables/useTabularProfile.ts +70 -0
  78. package/src/config.ts +20 -3
  79. package/src/functions/activities.ts +3 -3
  80. package/src/functions/api.ts +9 -37
  81. package/src/functions/api.types.ts +1 -0
  82. package/src/functions/charts.ts +68 -0
  83. package/src/functions/datasets.ts +0 -17
  84. package/src/functions/metrics.ts +6 -4
  85. package/src/functions/resources.ts +56 -1
  86. package/src/functions/tabular.ts +60 -0
  87. package/src/functions/tabularApi.ts +138 -11
  88. package/src/main.ts +90 -9
  89. package/src/types/dataservices.ts +2 -0
  90. package/src/types/pages.ts +0 -5
  91. package/src/types/posts.ts +2 -2
  92. package/src/types/reports.ts +5 -1
  93. package/src/types/search.ts +63 -1
  94. package/src/types/site.ts +5 -3
  95. package/src/types/ui.ts +2 -0
  96. package/src/types/users.ts +2 -1
  97. package/src/types/visualizations.ts +89 -0
  98. package/assets/swagger-themes/newspaper.css +0 -1670
  99. package/dist/JsonPreview.client-D53pj9Cw.js +0 -72
  100. package/dist/Swagger.client-DPBmsH9q.js +0 -4
  101. package/dist/XmlPreview.client-XElkoA4F.js +0 -64
  102. package/dist/main-BbT-LUXy.js +0 -105854
  103. package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
  104. package/src/functions/pagination.ts +0 -9
@@ -1,72 +0,0 @@
1
- import { defineComponent as z, defineAsyncComponent as C, ref as l, computed as x, onMounted as J, createElementBlock as c, openBlock as t, createBlock as p, createCommentVNode as S, createVNode as N, unref as r, toDisplayString as i, withCtx as d, createTextVNode as f } from "vue";
2
- import { u as B, a as L, g as V, _ as h } from "./main-BbT-LUXy.js";
3
- const E = { class: "fr-text--xs" }, P = { key: 0 }, b = {
4
- key: 1,
5
- class: "text-gray-medium"
6
- }, j = /* @__PURE__ */ z({
7
- __name: "JsonPreview.client",
8
- props: {
9
- resource: {}
10
- },
11
- setup(y) {
12
- const T = C(
13
- () => import("./vue3-json-viewer-BXwup7nO.js").then((e) => (Promise.resolve({ }), e.JsonViewer))
14
- ), m = y, v = B(), { t: n } = L(), s = l(null), u = l(!1), a = l(null), g = l(!1), _ = x(() => V(m.resource)), w = x(() => {
15
- const e = _.value;
16
- if (!e || !v.maxJsonPreviewCharSize)
17
- return !1;
18
- const o = v.maxJsonPreviewCharSize;
19
- return e <= o;
20
- }), k = async () => {
21
- if (!w.value) {
22
- g.value = !0;
23
- return;
24
- }
25
- u.value = !0, a.value = null;
26
- try {
27
- const e = await fetch(m.resource.url);
28
- if (!e.ok)
29
- throw new Error(`HTTP error! status: ${e.status}`);
30
- const o = await e.json();
31
- s.value = o;
32
- } catch (e) {
33
- console.error("Error loading JSON:", e), e instanceof TypeError ? a.value = "network" : a.value = "generic", s.value = null;
34
- } finally {
35
- u.value = !1;
36
- }
37
- };
38
- return J(() => {
39
- k();
40
- }), (e, o) => (t(), c("div", E, [
41
- s.value ? (t(), c("div", P, [
42
- N(r(T), {
43
- value: s.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
- ])) : u.value ? (t(), c("div", b, i(r(n)("Chargement de l'aperçu JSON...")), 1)) : g.value ? (t(), p(h, { key: 2 }, {
52
- default: d(() => [
53
- f(i(_.value ? r(n)("Le fichier JSON est trop volumineux pour être prévisualisé. Téléchargez-le depuis l'onglet Téléchargements.") : r(n)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
54
- ]),
55
- _: 1
56
- })) : a.value === "network" ? (t(), p(h, { key: 3 }, {
57
- default: d(() => [
58
- f(i(r(n)("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
59
- ]),
60
- _: 1
61
- })) : a.value ? (t(), p(h, { key: 4 }, {
62
- default: d(() => [
63
- f(i(r(n)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
64
- ]),
65
- _: 1
66
- })) : S("", !0)
67
- ]));
68
- }
69
- });
70
- export {
71
- j as default
72
- };
@@ -1,4 +0,0 @@
1
- import { i as f } from "./main-BbT-LUXy.js";
2
- export {
3
- f as default
4
- };
@@ -1,64 +0,0 @@
1
- import { defineComponent as z, defineAsyncComponent as C, ref as o, computed as x, onMounted as X, createElementBlock as c, openBlock as t, createBlock as f, createCommentVNode as L, createVNode as B, unref as r, toDisplayString as i, withCtx as m, createTextVNode as p } from "vue";
2
- import { u as S, a as V, g as E, _ as d } from "./main-BbT-LUXy.js";
3
- const M = { class: "fr-text--xs" }, P = { key: 0 }, D = {
4
- key: 1,
5
- class: "text-gray-medium"
6
- }, $ = /* @__PURE__ */ z({
7
- __name: "XmlPreview.client",
8
- props: {
9
- resource: {}
10
- },
11
- setup(y) {
12
- const T = C(
13
- () => import("./vue3-xml-viewer.common-CWer_T5-.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
14
- ), h = y, v = S(), { t: a } = V(), n = o(null), u = o(!1), l = o(null), g = o(!1), _ = x(() => E(h.resource)), w = x(() => {
15
- const e = _.value;
16
- if (!e || !v.maxXmlPreviewCharSize)
17
- return !1;
18
- const s = v.maxXmlPreviewCharSize;
19
- return e <= s;
20
- }), k = async () => {
21
- if (!w.value) {
22
- g.value = !0;
23
- return;
24
- }
25
- u.value = !0, l.value = null;
26
- try {
27
- const e = await fetch(h.resource.url);
28
- if (!e.ok)
29
- throw new Error(`HTTP error! status: ${e.status}`);
30
- const s = await e.text();
31
- n.value = s;
32
- } catch (e) {
33
- console.error("Error loading XML:", e), e instanceof TypeError ? l.value = "network" : l.value = "generic", n.value = null;
34
- } finally {
35
- u.value = !1;
36
- }
37
- };
38
- return X(() => {
39
- k();
40
- }), (e, s) => (t(), c("div", M, [
41
- n.value ? (t(), c("div", P, [
42
- B(r(T), { xml: n.value }, null, 8, ["xml"])
43
- ])) : u.value ? (t(), c("div", D, i(r(a)("Chargement de l'aperçu XML...")), 1)) : g.value ? (t(), f(d, { key: 2 }, {
44
- default: m(() => [
45
- p(i(_.value ? r(a)("Le fichier XML est trop volumineux pour être prévisualisé. Téléchargez-le depuis l'onglet Téléchargements.") : r(a)("La taille du fichier est inconnue, l'aperçu n'est pas disponible. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
46
- ]),
47
- _: 1
48
- })) : l.value === "network" ? (t(), f(d, { key: 3 }, {
49
- default: m(() => [
50
- p(i(r(a)("Ce fichier est hébergé sur un site externe qui ne permet pas la prévisualisation. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
51
- ]),
52
- _: 1
53
- })) : l.value ? (t(), f(d, { key: 4 }, {
54
- default: m(() => [
55
- p(i(r(a)("L'aperçu de ce fichier n'a pas pu être chargé. Téléchargez-le depuis l'onglet Téléchargements.")), 1)
56
- ]),
57
- _: 1
58
- })) : L("", !0)
59
- ]));
60
- }
61
- });
62
- export {
63
- $ as default
64
- };