@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.
- package/README.md +7 -6
- package/assets/main.css +4 -0
- package/dist/{Control-DuZJdKV_.js → Control-B9WQxlpJ.js} +1 -1
- package/dist/{Datafair.client-Ds3VQrRi.js → Datafair.client-CFTmBFoY.js} +9 -9
- package/dist/{Event--kp8kMdJ.js → Event-iXDrp-fy.js} +31 -31
- package/dist/{Image-34hvypZI.js → Image-mNMBOofs.js} +9 -9
- package/dist/ImagePreview.client-BvDM3qjE.js +36 -0
- package/dist/JsonPreview.client-BP6gPRxf.js +40 -0
- package/dist/{Map-BjUnLyj8.js → Map-BfqKMw0S.js} +1739 -1599
- package/dist/{MapContainer.client-B2BijMx5.js → MapContainer.client-D9N3664r.js} +41 -42
- package/dist/{OSM-s40W6sQ2.js → OSM-CcrUhItr.js} +15 -23
- package/dist/{PdfPreview.client-DJBMzrlC.js → PdfPreview.client-C6A6ZiKl.js} +835 -856
- package/dist/Pmtiles.client-B_sDZoqu.js +26333 -0
- package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-DGLXBys_.js +60 -0
- package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-VGQ7nkMS.js} +2 -2
- package/dist/{Tile-DbNFNPfU.js → Tile-CSpn0Ca8.js} +160 -163
- package/dist/{TileImage-BsXBxMtq.js → TileImage-CpbaEFwd.js} +143 -131
- package/dist/{View-BR92hTWP.js → View-BYBpt-AU.js} +483 -422
- package/dist/XmlPreview.client-DFQ1T-LN.js +34 -0
- package/dist/{common-PJfpC179.js → common-BoeTUnDZ.js} +52 -52
- package/dist/components-next.css +1 -52
- package/dist/components-next.js +196 -150
- package/dist/components.css +2 -2
- package/dist/{index-BFQX7Ccz.js → index-B_tPYi5Z.js} +34094 -27864
- package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-PeylHk0o.js} +162 -164
- package/dist/{main-vqhkVhVS.js → main-CVOZp_Nx.js} +41939 -73132
- package/dist/{proj-DsetBcW7.js → proj-DxGbobp7.js} +662 -626
- package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
- package/dist/{tilecoord-Db24Px13.js → tilecoord-DvX7WWiA.js} +273 -264
- package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
- package/dist/{vue3-xml-viewer.common-BcNJo35o.js → vue3-xml-viewer.common-CcF3Xd23.js} +1 -1
- package/package.json +47 -38
- package/src/chart.ts +5 -0
- package/src/components/ActivityList/ActivityList.vue +24 -14
- package/src/components/AppLink.vue +3 -0
- package/src/components/BannerAction.vue +6 -2
- package/src/components/Chart/ChartViewer.vue +320 -0
- package/src/components/Chart/ChartViewerWrapper.vue +182 -0
- package/src/components/CopyButton.vue +6 -2
- package/src/components/DataserviceCard.vue +24 -5
- package/src/components/DataserviceQuality.vue +82 -0
- package/src/components/DataserviceQualityInline.vue +31 -0
- package/src/components/DataserviceQualityTooltipContent.vue +79 -0
- package/src/components/DatasetCard.vue +24 -9
- package/src/components/DatasetInformation/DatasetTemporalitySection.vue +7 -4
- package/src/components/DatasetQuality.vue +11 -11
- package/src/components/DatasetQualityInline.vue +2 -2
- package/src/components/DatasetQualityTooltipContent.vue +1 -1
- package/src/components/DiscussionMessageCard.vue +14 -15
- package/src/components/Form/Listbox.vue +101 -0
- package/src/components/Form/SchemaSelect.vue +2 -0
- package/src/components/FormattedDate.vue +81 -0
- package/src/components/InfiniteLoader.vue +53 -0
- package/src/components/LoadingBlock.vue +4 -1
- package/src/components/ObjectCardHeader.vue +11 -4
- package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
- package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
- package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
- package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
- package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
- package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
- package/src/components/OpenApiViewer/openapi.ts +150 -0
- package/src/components/OrganizationNameWithCertificate.vue +3 -2
- package/src/components/Pagination.vue +25 -62
- package/src/components/PostCard.vue +13 -15
- package/src/components/RadioInput.vue +7 -2
- package/src/components/ResourceAccordion/DataStructure.vue +11 -33
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/Downloads.vue +172 -0
- package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
- package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -104
- package/src/components/ResourceAccordion/MapContainer.client.vue +2 -11
- package/src/components/ResourceAccordion/Metadata.vue +4 -6
- package/src/components/ResourceAccordion/PdfPreview.client.vue +58 -97
- package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
- package/src/components/ResourceAccordion/Pmtiles.client.vue +28 -13
- package/src/components/ResourceAccordion/Preview.vue +19 -15
- package/src/components/ResourceAccordion/PreviewWrapper.vue +89 -0
- package/src/components/ResourceAccordion/ResourceAccordion.vue +36 -117
- package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -98
- package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -210
- package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +143 -291
- package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
- package/src/components/ResourceExplorer/ResourceSelector.vue +51 -0
- package/src/components/ResourceExplorer/ResourceViewerHeader.vue +122 -0
- package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
- package/src/components/ResourceListItem.vue +168 -0
- package/src/components/ReuseCard.vue +28 -9
- package/src/components/ReuseDetails.vue +2 -2
- package/src/components/ReuseHorizontalCard.vue +2 -2
- package/src/components/SchemaCard.vue +10 -1
- package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
- package/src/components/Search/GlobalSearch.vue +229 -123
- package/src/components/Search/SearchInput.vue +5 -4
- package/src/components/Search/Sidemenu.vue +4 -3
- package/src/components/SmallChart.vue +11 -10
- package/src/components/StatBox.vue +13 -5
- package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
- package/src/components/TabularExplorer/TabularCell.vue +50 -0
- package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
- package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
- package/src/components/TabularExplorer/TabularExplorer.vue +299 -0
- package/src/components/TabularExplorer/TabularFilterContent.vue +362 -0
- package/src/components/TabularExplorer/TabularFilterPopover.vue +106 -0
- package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
- package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
- package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
- package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
- package/src/components/TabularExplorer/TabularTable.vue +481 -0
- package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
- package/src/components/TabularExplorer/types.ts +84 -0
- package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
- package/src/components/TabularExplorer/useTabularContext.ts +82 -0
- package/src/components/TopicCard.vue +13 -14
- package/src/composables/useActiveDescendant.ts +5 -0
- package/src/composables/useDatasetResources.ts +164 -0
- package/src/composables/useHasTabularData.ts +15 -1
- package/src/composables/useMetrics.ts +1 -1
- package/src/composables/useResizable.ts +46 -0
- package/src/composables/useResourceCapabilities.ts +48 -40
- package/src/composables/useSearchFilter.ts +120 -0
- package/src/composables/useStableQueryParams.ts +38 -6
- package/src/composables/useTabularProfile.ts +70 -0
- package/src/composables/useTranslation.ts +24 -9
- package/src/config.ts +21 -3
- package/src/functions/activities.ts +3 -3
- package/src/functions/api.ts +20 -42
- package/src/functions/api.types.ts +1 -0
- package/src/functions/charts.ts +99 -0
- package/src/functions/datasets.ts +0 -17
- package/src/functions/dates.ts +6 -7
- package/src/functions/helpers.ts +15 -0
- package/src/functions/metrics.ts +63 -60
- package/src/functions/paginate.ts +46 -0
- package/src/functions/resourceCapabilities.ts +34 -0
- package/src/functions/resources.ts +136 -1
- package/src/functions/schemas.ts +27 -0
- package/src/functions/scroll.ts +20 -0
- package/src/functions/tabular.ts +214 -0
- package/src/functions/tabularApi.ts +96 -11
- package/src/main.ts +119 -14
- package/src/types/dataservices.ts +17 -0
- package/src/types/organizations.ts +10 -0
- package/src/types/pages.ts +0 -5
- package/src/types/posts.ts +2 -2
- package/src/types/reports.ts +5 -1
- package/src/types/resources.ts +0 -1
- package/src/types/reuses.ts +12 -1
- package/src/types/search.ts +63 -1
- package/src/types/site.ts +5 -3
- package/src/types/ui.ts +2 -0
- package/src/types/users.ts +2 -1
- package/src/types/visualizations.ts +93 -0
- package/assets/swagger-themes/newspaper.css +0 -1670
- package/dist/JsonPreview.client-CYxmz0yV.js +0 -72
- package/dist/Pmtiles.client-C_hvRDuy.js +0 -25185
- package/dist/Swagger.client-B4y0hXME.js +0 -4
- package/dist/XmlPreview.client-LETEfNBH.js +0 -64
- package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
- package/src/functions/pagination.ts +0 -9
- /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
- /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
- /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, ref as k, onMounted as J, h as g, watch as F, computed as O, inject as $, provide as q,
|
|
1
|
+
import { defineComponent as T, ref as k, onMounted as J, h as g, watch as F, computed as O, inject as $, provide as q, openBlock as _, createElementBlock as N, toDisplayString as A, normalizeClass as S, resolveComponent as ie, createElementVNode as z, renderSlot as ce, createTextVNode as pe, createCommentVNode as Y, createVNode as fe, nextTick as de } from "vue";
|
|
2
2
|
const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/, X = T({
|
|
3
3
|
name: "JsonString",
|
|
4
4
|
props: {
|
|
@@ -66,7 +66,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
66
66
|
},
|
|
67
67
|
setup(e) {
|
|
68
68
|
const y = e, c = O(() => y.jsonValue === null ? "null" : "undefined");
|
|
69
|
-
return (p, d) => (
|
|
69
|
+
return (p, d) => (_(), N("span", ye, A(c.value), 1));
|
|
70
70
|
}
|
|
71
71
|
}), he = /* @__PURE__ */ T({
|
|
72
72
|
__name: "json-number",
|
|
@@ -79,7 +79,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
79
79
|
},
|
|
80
80
|
setup(e) {
|
|
81
81
|
const y = e, c = O(() => Number.isInteger(y.jsonValue));
|
|
82
|
-
return (p, d) => (
|
|
82
|
+
return (p, d) => (_(), N("span", {
|
|
83
83
|
class: S(["jv-item", "jv-number", c.value ? "jv-number-integer" : "jv-number-float"])
|
|
84
84
|
}, A(e.jsonValue.toString()), 3));
|
|
85
85
|
}
|
|
@@ -95,7 +95,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
setup(e) {
|
|
98
|
-
return (y, c) => (
|
|
98
|
+
return (y, c) => (_(), N("span", ge, A(e.jsonValue.toString()), 1));
|
|
99
99
|
}
|
|
100
100
|
}), je = T({
|
|
101
101
|
name: "JsonObject",
|
|
@@ -277,7 +277,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
setup(e) {
|
|
280
|
-
return (y, c) => (
|
|
280
|
+
return (y, c) => (_(), N("span", {
|
|
281
281
|
class: S(["jv-item", "jv-function"]),
|
|
282
282
|
title: e.jsonValue.toString()
|
|
283
283
|
}, " <function> ", 8, Ee));
|
|
@@ -295,7 +295,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
295
295
|
},
|
|
296
296
|
setup(e) {
|
|
297
297
|
const y = e, c = $("timeformat", (d) => d.toLocaleString()), p = O(() => c(y.jsonValue));
|
|
298
|
-
return (d, i) => (
|
|
298
|
+
return (d, i) => (_(), N("span", ke, ' "' + A(p.value) + '" ', 1));
|
|
299
299
|
}
|
|
300
300
|
}), Te = {
|
|
301
301
|
class: /* @__PURE__ */ S(["jv-item", "jv-regexp"])
|
|
@@ -309,7 +309,7 @@ const ve = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)
|
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
setup(e) {
|
|
312
|
-
return (y, c) => (
|
|
312
|
+
return (y, c) => (_(), N("span", Te, A(e.jsonValue.toString()), 1));
|
|
313
313
|
}
|
|
314
314
|
}), I = T({
|
|
315
315
|
name: "JsonBox",
|
|
@@ -421,12 +421,6 @@ function _e(e) {
|
|
|
421
421
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
422
422
|
}
|
|
423
423
|
var H = { exports: {} };
|
|
424
|
-
/*!
|
|
425
|
-
* clipboard.js v2.0.11
|
|
426
|
-
* https://clipboardjs.com/
|
|
427
|
-
*
|
|
428
|
-
* Licensed MIT © Zeno Rocha
|
|
429
|
-
*/
|
|
430
424
|
var Ne = H.exports, Z;
|
|
431
425
|
function Oe() {
|
|
432
426
|
return Z || (Z = 1, (function(e, y) {
|
|
@@ -1041,10 +1035,10 @@ const Me = /* @__PURE__ */ _e(Ae), Ve = function(e, y) {
|
|
|
1041
1035
|
};
|
|
1042
1036
|
function Re(e, y, c, p, d, i) {
|
|
1043
1037
|
const n = ie("json-box");
|
|
1044
|
-
return
|
|
1038
|
+
return _(), N("div", {
|
|
1045
1039
|
class: S(e.jvClass)
|
|
1046
1040
|
}, [
|
|
1047
|
-
e.copyable ? (
|
|
1041
|
+
e.copyable ? (_(), N("div", {
|
|
1048
1042
|
key: 0,
|
|
1049
1043
|
class: S(`jv-tooltip ${e.copyText.align || "right"}`)
|
|
1050
1044
|
}, [
|
|
@@ -1067,7 +1061,7 @@ function Re(e, y, c, p, d, i) {
|
|
|
1067
1061
|
"preview-mode": e.previewMode
|
|
1068
1062
|
}, null, 8, ["value", "sort", "preview-mode"])
|
|
1069
1063
|
], 2),
|
|
1070
|
-
e.expandableCode && e.boxed ? (
|
|
1064
|
+
e.expandableCode && e.boxed ? (_(), N("div", {
|
|
1071
1065
|
key: 1,
|
|
1072
1066
|
class: "jv-more",
|
|
1073
1067
|
onClick: y[0] || (y[0] = (...t) => e.toggleExpandCode && e.toggleExpandCode(...t))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagouv/components-next",
|
|
3
|
-
"version": "1.0.2-dev.
|
|
3
|
+
"version": "1.0.2-dev.200",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -10,29 +10,37 @@
|
|
|
10
10
|
"yarn": "use-pnpm-instead"
|
|
11
11
|
},
|
|
12
12
|
"main": "./src/main.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./src/main.ts",
|
|
15
|
+
"./chart": "./src/chart.ts",
|
|
16
|
+
"./assets/*": "./assets/*",
|
|
17
|
+
"./dist/*": "./dist/*"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false,
|
|
13
20
|
"files": [
|
|
14
21
|
"assets",
|
|
15
22
|
"dist",
|
|
16
23
|
"src"
|
|
17
24
|
],
|
|
18
25
|
"dependencies": {
|
|
19
|
-
"@floating-ui/vue": "^
|
|
26
|
+
"@floating-ui/vue": "^2.0.1",
|
|
20
27
|
"@headlessui/vue": "^1.7.23",
|
|
21
|
-
"@remixicon/vue": "^4.
|
|
28
|
+
"@remixicon/vue": "^4.9.0",
|
|
22
29
|
"@types/hast": "^3.0.4",
|
|
23
|
-
"@types/leaflet": "^1.9.
|
|
24
|
-
"@vueuse/core": "^
|
|
25
|
-
"@vueuse/router": "^
|
|
26
|
-
"chart.js": "^4.
|
|
27
|
-
"dompurify": "^3.
|
|
28
|
-
"
|
|
30
|
+
"@types/leaflet": "^1.9.21",
|
|
31
|
+
"@vueuse/core": "^14.3.0",
|
|
32
|
+
"@vueuse/router": "^14.3.0",
|
|
33
|
+
"chart.js": "^4.5.1",
|
|
34
|
+
"dompurify": "^3.4.13",
|
|
35
|
+
"echarts": "^6.1.0",
|
|
36
|
+
"geopf-extensions-openlayers": "1.0.0-beta.11",
|
|
29
37
|
"leaflet": "^1.9.4",
|
|
30
|
-
"maplibre-gl": "^5.
|
|
31
|
-
"ofetch": "^1.
|
|
32
|
-
"ol": "^10.
|
|
38
|
+
"maplibre-gl": "^5.24.0",
|
|
39
|
+
"ofetch": "^1.5.1",
|
|
40
|
+
"ol": "^10.9.0",
|
|
33
41
|
"pdfjs-dist": "^4.10.38",
|
|
34
|
-
"pmtiles": "^4.
|
|
35
|
-
"popmotion": "^11.0",
|
|
42
|
+
"pmtiles": "^4.4.1",
|
|
43
|
+
"popmotion": "^11.0.5",
|
|
36
44
|
"rehype-highlight": "^7.0.2",
|
|
37
45
|
"rehype-raw": "^7.0.0",
|
|
38
46
|
"rehype-sanitize": "^6.0.0",
|
|
@@ -45,42 +53,43 @@
|
|
|
45
53
|
"remark-rehype": "^11.1.2",
|
|
46
54
|
"strip-markdown": "^6.0.0",
|
|
47
55
|
"stylefire": "^7.0.3",
|
|
48
|
-
"swagger-ui-dist": "^5.27.1",
|
|
49
56
|
"unified": "^11.0.5",
|
|
50
|
-
"unist-util-visit": "^5.
|
|
57
|
+
"unist-util-visit": "^5.1.0",
|
|
51
58
|
"vue-content-loader": "^2.0.1",
|
|
52
59
|
"vue-sonner": "^2.0.9",
|
|
53
60
|
"vue3-json-viewer": "^2.4.1",
|
|
54
61
|
"vue3-text-clamp": "^0.1.2",
|
|
55
|
-
"vue3-xml-viewer": "^0.0.14"
|
|
62
|
+
"vue3-xml-viewer": "^0.0.14",
|
|
63
|
+
"yaml": "^2.9.0"
|
|
56
64
|
},
|
|
57
65
|
"devDependencies": {
|
|
58
|
-
"@
|
|
59
|
-
"@tailwindcss/
|
|
60
|
-
"@
|
|
61
|
-
"@tsconfig/node22": "^22.0.0",
|
|
66
|
+
"@tailwindcss/cli": "^4.3.0",
|
|
67
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
68
|
+
"@tsconfig/node22": "^22.0.5",
|
|
62
69
|
"@types/geojson": "^7946.0.16",
|
|
63
|
-
"@types/node": "^22.
|
|
64
|
-
"@vitejs/plugin-vue": "^6.0",
|
|
70
|
+
"@types/node": "^22.19.19",
|
|
71
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
65
72
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
66
|
-
"@vue/eslint-config-typescript": "^14.
|
|
67
|
-
"@vue/tsconfig": "^0.8.
|
|
68
|
-
"eslint": "^9.
|
|
69
|
-
"eslint-plugin-vue": "^10.
|
|
70
|
-
"jiti": "^2.
|
|
71
|
-
"npm-run-all2": "^8.0",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"vite
|
|
77
|
-
"vue": "^
|
|
78
|
-
"vue
|
|
79
|
-
"vue-
|
|
73
|
+
"@vue/eslint-config-typescript": "^14.7.0",
|
|
74
|
+
"@vue/tsconfig": "^0.8.1",
|
|
75
|
+
"eslint": "^9.39.4",
|
|
76
|
+
"eslint-plugin-vue": "^10.9.1",
|
|
77
|
+
"jiti": "^2.7.0",
|
|
78
|
+
"npm-run-all2": "^8.0.4",
|
|
79
|
+
"openapi-types": "^12.1.3",
|
|
80
|
+
"prettier": "^3.8.3",
|
|
81
|
+
"tailwindcss": "^4.3.0",
|
|
82
|
+
"typescript": "^5.9.3",
|
|
83
|
+
"vite": "^7.3.3",
|
|
84
|
+
"vite-plugin-vue-devtools": "^8.1.2",
|
|
85
|
+
"vue": "^3.5.40",
|
|
86
|
+
"vue-router": "^5.0.7",
|
|
87
|
+
"vue-tsc": "^3.3.2"
|
|
80
88
|
},
|
|
81
89
|
"peerDependencies": {
|
|
82
90
|
"vue": "^3.5.13",
|
|
83
|
-
"vue-router": "^4.5.0"
|
|
91
|
+
"vue-router": "^4.5.0 || ^5.0.0",
|
|
92
|
+
"echarts": "^6.0.0"
|
|
84
93
|
},
|
|
85
94
|
"scarfSettings": {
|
|
86
95
|
"enabled": false
|
package/src/chart.ts
ADDED
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
class="my-1"
|
|
13
13
|
>
|
|
14
14
|
<p class="pl-3 mb-1 text-xs text-gray-medium">
|
|
15
|
-
|
|
15
|
+
<FormattedDate
|
|
16
|
+
:date="month"
|
|
17
|
+
:options="{ dateStyle: undefined, year: 'numeric', month: 'long', day: undefined }"
|
|
18
|
+
/>
|
|
16
19
|
</p>
|
|
17
20
|
<ul
|
|
18
21
|
class="space-y-2 p-0 m-0"
|
|
@@ -77,11 +80,20 @@
|
|
|
77
80
|
v-bind="{ class: '', activity }"
|
|
78
81
|
>
|
|
79
82
|
{{ getActivityTranslation(activity) }}
|
|
83
|
+
<template v-if="'resource_id' in activity.extras">
|
|
84
|
+
{{ activity.extras.resource_id }}
|
|
85
|
+
</template>
|
|
80
86
|
</slot>
|
|
81
87
|
</p>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
<TranslationT
|
|
89
|
+
tag="p"
|
|
90
|
+
class="m-0 flex-none text-xs text-gray-medium"
|
|
91
|
+
keypath="le {date}"
|
|
92
|
+
>
|
|
93
|
+
<template #date>
|
|
94
|
+
<FormattedDate :date="activity.created_at" />
|
|
95
|
+
</template>
|
|
96
|
+
</TranslationT>
|
|
85
97
|
</div>
|
|
86
98
|
</li>
|
|
87
99
|
</ul>
|
|
@@ -90,7 +102,6 @@
|
|
|
90
102
|
:total-results="activities.total"
|
|
91
103
|
:page-size="activities.page_size"
|
|
92
104
|
:page="activities.page"
|
|
93
|
-
:link="getLink"
|
|
94
105
|
@change="(newPage: number) => page = newPage"
|
|
95
106
|
/>
|
|
96
107
|
</template>
|
|
@@ -116,14 +127,14 @@ import { useRoute } from 'vue-router'
|
|
|
116
127
|
import { useTranslation } from '../../composables/useTranslation'
|
|
117
128
|
import { getActivityTranslation } from '../../functions/activities'
|
|
118
129
|
import { useFetch } from '../../functions/api'
|
|
119
|
-
import { useFormatDate } from '../../functions/dates'
|
|
120
|
-
import { getLink } from '../../functions/pagination'
|
|
121
130
|
import type { PaginatedArray } from '../../types/api'
|
|
122
131
|
import type { Activity } from '../../types/activity'
|
|
123
132
|
import Avatar from '../Avatar.vue'
|
|
124
133
|
import LoadingBlock from '../LoadingBlock.vue'
|
|
125
134
|
import Pagination from '../Pagination.vue'
|
|
126
135
|
import PaddedContainer from '../PaddedContainer.vue'
|
|
136
|
+
import FormattedDate from '../FormattedDate.vue'
|
|
137
|
+
import TranslationT from '../TranslationT.vue'
|
|
127
138
|
import listSrc from '../../../assets/illustrations/list.svg?url'
|
|
128
139
|
|
|
129
140
|
const props = defineProps<{
|
|
@@ -132,7 +143,6 @@ const props = defineProps<{
|
|
|
132
143
|
}>()
|
|
133
144
|
|
|
134
145
|
const route = useRoute()
|
|
135
|
-
const { formatDate } = useFormatDate()
|
|
136
146
|
const { t } = useTranslation()
|
|
137
147
|
|
|
138
148
|
const page = ref(parseInt(route.query.page as string | undefined ?? '1', 10))
|
|
@@ -145,13 +155,13 @@ const { data: activities, status } = await useFetch<PaginatedArray<Activity>>('/
|
|
|
145
155
|
},
|
|
146
156
|
})
|
|
147
157
|
|
|
158
|
+
// Grouping on a month read in the reader's timezone would change both the number of
|
|
159
|
+
// groups and their keys between the server render and the browser's — a mismatch on
|
|
160
|
+
// the children themselves, which no `data-allow-mismatch` covers. The `YYYY-MM` the
|
|
161
|
+
// timestamp starts with is the same string for everyone; the month is worded from it
|
|
162
|
+
// at render time.
|
|
148
163
|
const groupedActivities = computed(() => activities.value?.data.reduce((grouped, activity) => {
|
|
149
|
-
const activityMonth =
|
|
150
|
-
dateStyle: undefined,
|
|
151
|
-
day: undefined,
|
|
152
|
-
month: 'long',
|
|
153
|
-
year: 'numeric',
|
|
154
|
-
})
|
|
164
|
+
const activityMonth = activity.created_at.slice(0, 7)
|
|
155
165
|
if (!grouped[activityMonth]) {
|
|
156
166
|
grouped[activityMonth] = []
|
|
157
167
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:is="config?.appLink"
|
|
4
4
|
v-if="config.appLink"
|
|
5
5
|
:to
|
|
6
|
+
:replace
|
|
6
7
|
>
|
|
7
8
|
<slot />
|
|
8
9
|
</component>
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
<RouterLink
|
|
19
20
|
v-else
|
|
20
21
|
:to
|
|
22
|
+
:replace
|
|
21
23
|
><slot /></RouterLink>
|
|
22
24
|
</template>
|
|
23
25
|
|
|
@@ -33,6 +35,7 @@ const { locale } = useTranslation()
|
|
|
33
35
|
|
|
34
36
|
const props = defineProps<{
|
|
35
37
|
to: string | RouteLocationRaw | null | undefined
|
|
38
|
+
replace?: boolean
|
|
36
39
|
}>()
|
|
37
40
|
|
|
38
41
|
const isExternal = computed(() => {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
>
|
|
11
11
|
<div>
|
|
12
12
|
<div class="text-gray-900">
|
|
13
|
-
|
|
13
|
+
<slot name="title">
|
|
14
|
+
{{ title }}
|
|
15
|
+
</slot>
|
|
14
16
|
</div>
|
|
15
17
|
<div
|
|
16
18
|
v-if="$slots.default"
|
|
@@ -34,7 +36,9 @@ export const bannerActionTypeKey = Symbol() as InjectionKey<'primary' | 'danger'
|
|
|
34
36
|
<script setup lang="ts">
|
|
35
37
|
const props = defineProps<{
|
|
36
38
|
type: 'primary' | 'danger' | 'warning'
|
|
37
|
-
title
|
|
39
|
+
// Optional so the title can be a slot, for instance to make it the toggle of a
|
|
40
|
+
// disclosure whose panel lives in the banner
|
|
41
|
+
title?: string
|
|
38
42
|
}>()
|
|
39
43
|
|
|
40
44
|
provide(bannerActionTypeKey, props.type)
|