@datagouv/components-next 1.0.2-dev.146 → 1.0.2-dev.148
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/package.json
CHANGED
|
@@ -30,6 +30,12 @@ const { locale } = useTranslation()
|
|
|
30
30
|
const chartContainer = ref<HTMLElement | null>(null)
|
|
31
31
|
let echartsInstance: EChartsType | null = null
|
|
32
32
|
|
|
33
|
+
function capture(): string | null {
|
|
34
|
+
return echartsInstance?.getDataURL() ?? null
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
defineExpose({ capture })
|
|
38
|
+
|
|
33
39
|
function mapXAxisType(xAxis: XAxis | XAxisForm): 'category' | 'value' {
|
|
34
40
|
if (!xAxis) return 'category'
|
|
35
41
|
return xAxis.type === 'continuous' ? 'value' : 'category'
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<template #default="{ data }">
|
|
7
7
|
<ChartViewer
|
|
8
|
+
ref="chartViewerRef"
|
|
8
9
|
:chart="chart"
|
|
9
10
|
:series="data"
|
|
10
11
|
/>
|
|
@@ -33,6 +34,13 @@ const props = defineProps<{
|
|
|
33
34
|
}>()
|
|
34
35
|
|
|
35
36
|
const { t } = useTranslation()
|
|
37
|
+
const chartViewerRef = ref<InstanceType<typeof ChartViewer> | null>(null)
|
|
38
|
+
|
|
39
|
+
function capture(): string | null {
|
|
40
|
+
return chartViewerRef.value?.capture() ?? null
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
defineExpose({ capture })
|
|
36
44
|
const config = useComponentsConfig()
|
|
37
45
|
const getProfile = useGetProfile()
|
|
38
46
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { User } from './users'
|
|
2
2
|
import type { Badges } from './badges'
|
|
3
|
+
import type { PageBloc } from './pages'
|
|
3
4
|
|
|
4
5
|
export type MemberRole = 'admin' | 'editor' | 'partial_editor'
|
|
5
6
|
|
|
@@ -68,4 +69,13 @@ export type Organization = {
|
|
|
68
69
|
reuses_by_months: Record<string, number>
|
|
69
70
|
views: number
|
|
70
71
|
}
|
|
72
|
+
// Editorial blocs powering the organization "Présentation" tab. Excluded from
|
|
73
|
+
// the default API read mask, so only present when requested with X-Fields.
|
|
74
|
+
// Read through the API's `public_presentation_blocs`: hidden from the public until
|
|
75
|
+
// published, but always returned to organization administrators.
|
|
76
|
+
presentation_blocs?: Array<PageBloc>
|
|
77
|
+
// Publication date of the blocs. `null` means draft (never public); a set date
|
|
78
|
+
// means published. Like `presentation_blocs`, only present when requested with
|
|
79
|
+
// X-Fields.
|
|
80
|
+
presentation_blocs_published_at?: string | null
|
|
71
81
|
}
|