@datagouv/components-next 0.1.0 → 0.1.1
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/dist/{JsonPreview.client-NQ9byxF5.js → JsonPreview.client-nkpNPvZb.js} +1 -1
- package/dist/{MapContainer.client-D7Y0OXMU.js → MapContainer.client-CrTw-ai8.js} +1 -1
- package/dist/{PdfPreview.client-DU6FbUh0.js → PdfPreview.client-JpAWf0A2.js} +1 -1
- package/dist/{Pmtiles.client-DCOxft6M.js → Pmtiles.client-B83l4Ft5.js} +2 -2
- package/dist/Swagger.client-D1TfRQjI.js +4 -0
- package/dist/{XmlPreview.client-BEOCeCP8.js → XmlPreview.client-DV8N1S9Y.js} +2 -2
- package/dist/components-next.js +1 -1
- package/dist/{main-DFEQrdg5.js → main-CN6IuSUA.js} +1086 -1082
- package/dist/{vue3-xml-viewer.common-RC76oYFu.js → vue3-xml-viewer.common-9hga4rGF.js} +1 -1
- package/package.json +1 -1
- package/src/components/DatasetLabelTag.vue +1 -1
- package/src/components/ResourceAccordion/Pmtiles.client.vue +1 -1
- package/src/components/StatBox.vue +7 -2
- package/src/composables/useTranslation.ts +2 -2
- package/src/types/datasets.ts +4 -0
- package/dist/Swagger.client-DTHhEAFT.js +0 -4
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { computedAsync } from '@vueuse/core'
|
|
23
23
|
import type { RouteLocationRaw } from 'vue-router'
|
|
24
24
|
import AppLink from './AppLink.vue'
|
|
25
|
-
import type { TranslatedBadge } from '
|
|
25
|
+
import type { TranslatedBadge } from '../types/badges'
|
|
26
26
|
|
|
27
27
|
const props = defineProps<{
|
|
28
28
|
badge: TranslatedBadge
|
|
@@ -116,7 +116,7 @@ async function displayMap() {
|
|
|
116
116
|
else {
|
|
117
117
|
const coordinates = e.lngLat
|
|
118
118
|
const description = Object.keys(e.features[0].properties).map((element) => {
|
|
119
|
-
return `<b>${DOMPurify.sanitize(element)} :</b> ${DOMPurify.sanitize(e.features[0].properties[element])}`
|
|
119
|
+
return `<b>${DOMPurify.sanitize(element, { USE_PROFILES: { html: false } })} :</b> ${DOMPurify.sanitize(e.features[0].properties[element], { USE_PROFILES: { html: false } })}`
|
|
120
120
|
}).join('<br>')
|
|
121
121
|
popup.setLngLat(coordinates).setHTML(description).addTo(map)
|
|
122
122
|
}
|
|
@@ -60,8 +60,12 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<template v-if="lastValue && lastMonth">
|
|
63
|
-
<p
|
|
64
|
-
|
|
63
|
+
<p
|
|
64
|
+
v-if="since"
|
|
65
|
+
class="mt-1 mb-0 text-xs"
|
|
66
|
+
>
|
|
67
|
+
{{ t("depuis ") }}
|
|
68
|
+
{{ formatDate(since, { dateStyle: undefined, year: 'numeric', month: 'short', day: undefined }) }}
|
|
65
69
|
</p>
|
|
66
70
|
<p class="mt-1 mb-0 text-xs text-success-darkest">
|
|
67
71
|
<strong>
|
|
@@ -161,6 +165,7 @@ const props = defineProps<{
|
|
|
161
165
|
type: 'line' | 'bar'
|
|
162
166
|
size?: 'sm'
|
|
163
167
|
summary?: number | null
|
|
168
|
+
since?: string | null
|
|
164
169
|
}>()
|
|
165
170
|
|
|
166
171
|
const { t } = useTranslation()
|
|
@@ -144,8 +144,8 @@ export const useTranslation = () => {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// Try to get translation from loaded translations first
|
|
147
|
-
if (translations.value && translations.value[locale]
|
|
148
|
-
result = translations.value[locale]
|
|
147
|
+
if (translations.value && translations.value[locale] && translations.value[locale][key]) {
|
|
148
|
+
result = translations.value[locale][key]
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
const count = options?.n ?? options?.count
|
package/src/types/datasets.ts
CHANGED