@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.
@@ -1,4 +1,4 @@
1
- import { g as Ke } from "./main-DFEQrdg5.js";
1
+ import { g as Ke } from "./main-CN6IuSUA.js";
2
2
  import We from "vue";
3
3
  function Fe(I, K) {
4
4
  for (var V = 0; V < K.length; V++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./src/main.ts",
@@ -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 '@/types/badges'
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 class="mt-1 mb-0 text-xs">
64
- {{ t('depuis juillet 2022') }}
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]![key]) {
148
- result = translations.value[locale]![key]
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
@@ -66,6 +66,10 @@ export type Dataset = BaseDataset & {
66
66
  created_at: string
67
67
  last_modified: string
68
68
  last_update: string
69
+ internal: {
70
+ created_at_internal: string
71
+ last_modified_internal: string
72
+ }
69
73
  uri: string
70
74
  slug: string
71
75
  quality: Quality
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./main-DFEQrdg5.js";
2
- export {
3
- f as default
4
- };