@datagouv/components-next 1.0.2-dev.92 → 1.0.2-dev.93
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/{Datafair.client-CyZRNADr.js → Datafair.client-CQNz2GL7.js} +1 -1
- package/dist/{JsonPreview.client-C9iaPSmQ.js → JsonPreview.client-DQh095Dl.js} +2 -2
- package/dist/{MapContainer.client-BuoZ69XO.js → MapContainer.client-CszeqIWr.js} +2 -2
- package/dist/{PdfPreview.client-MI0bDghc.js → PdfPreview.client-DKpKZprd.js} +2 -2
- package/dist/{Pmtiles.client-CaKEYQBc.js → Pmtiles.client-BnPqJIsF.js} +1 -1
- package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-BKqb6TMw.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-7Q6USQh2.js} +1 -1
- package/dist/{XmlPreview.client-BVAeNK4n.js → XmlPreview.client-C75QZMsm.js} +3 -3
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +1 -1
- package/dist/{index-BBdS8QKx.js → index-DfFbOdzV.js} +1 -1
- package/dist/{main-Dk_66g-3.js → main-DEpfIocP.js} +5852 -5840
- package/dist/{vue3-xml-viewer.common-B8dNNkOU.js → vue3-xml-viewer.common-ByPlyYhy.js} +1 -1
- package/package.json +1 -1
- package/src/components/DataserviceCard.vue +3 -0
- package/src/components/DatasetCard.vue +3 -0
- package/src/components/ObjectCardHeader.vue +11 -4
- package/src/components/ReuseCard.vue +12 -4
- package/src/types/ui.ts +2 -0
package/package.json
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
<ObjectCardHeader
|
|
54
54
|
:icon="isTabularApi ? RiSparklingLine : RiTerminalLine"
|
|
55
55
|
:url="dataserviceUrl || dataservice.self_web_url"
|
|
56
|
+
:title-tag="titleTag"
|
|
56
57
|
>
|
|
57
58
|
{{ dataservice.title }}
|
|
58
59
|
</ObjectCardHeader>
|
|
@@ -115,6 +116,7 @@ import { useComponentsConfig } from '../config'
|
|
|
115
116
|
import { useFormatDate } from '../functions/dates'
|
|
116
117
|
import { summarize } from '../functions/helpers'
|
|
117
118
|
import type { Dataservice } from '../types/dataservices'
|
|
119
|
+
import type { TitleTag } from '../types/ui'
|
|
118
120
|
import { useTranslation } from '../composables/useTranslation'
|
|
119
121
|
import OrganizationLogo from './OrganizationLogo.vue'
|
|
120
122
|
import Avatar from './Avatar.vue'
|
|
@@ -130,6 +132,7 @@ type Props = {
|
|
|
130
132
|
dataserviceUrl?: RouteLocationRaw
|
|
131
133
|
organizationUrl?: RouteLocationRaw
|
|
132
134
|
showDescription?: boolean
|
|
135
|
+
titleTag?: TitleTag
|
|
133
136
|
}
|
|
134
137
|
|
|
135
138
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:icon="RiDatabase2Line"
|
|
37
37
|
:url="datasetUrl || dataset.page"
|
|
38
38
|
:target="datasetUrlInNewTab ? '_blank' : undefined"
|
|
39
|
+
:title-tag="titleTag"
|
|
39
40
|
>
|
|
40
41
|
{{ dataset.title }}
|
|
41
42
|
<template
|
|
@@ -117,6 +118,7 @@
|
|
|
117
118
|
import type { RouteLocationRaw } from 'vue-router'
|
|
118
119
|
import { RiArchiveLine, RiDatabase2Line, RiDownloadLine, RiEyeLine, RiLineChartLine, RiLockLine, RiStarLine, RiSubtractLine } from '@remixicon/vue'
|
|
119
120
|
import type { Dataset, DatasetV2 } from '../types/datasets'
|
|
121
|
+
import type { TitleTag } from '../types/ui'
|
|
120
122
|
import { summarize } from '../functions/helpers'
|
|
121
123
|
import { useFormatDate } from '../functions/dates'
|
|
122
124
|
import { getDescriptionShort } from '../functions/description'
|
|
@@ -137,6 +139,7 @@ type Props = {
|
|
|
137
139
|
datasetUrlInNewTab?: boolean
|
|
138
140
|
organizationUrl?: RouteLocationRaw
|
|
139
141
|
showDescriptionShort?: boolean
|
|
142
|
+
titleTag?: TitleTag
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="titleTag"
|
|
4
|
+
class="w-full text-base flex"
|
|
5
|
+
>
|
|
3
6
|
<AppLink
|
|
4
7
|
:to="url"
|
|
5
8
|
class="text-gray-title text-base bg-none flex items-center w-full truncate gap-1"
|
|
@@ -19,17 +22,21 @@
|
|
|
19
22
|
<slot name="extra" />
|
|
20
23
|
<span class="absolute inset-0" />
|
|
21
24
|
</AppLink>
|
|
22
|
-
</
|
|
25
|
+
</component>
|
|
23
26
|
</template>
|
|
24
27
|
|
|
25
28
|
<script setup lang="ts">
|
|
26
29
|
import type { Component } from 'vue'
|
|
27
30
|
import type { RouteLocationRaw } from 'vue-router'
|
|
31
|
+
import type { TitleTag } from '../types/ui'
|
|
28
32
|
import AppLink from './AppLink.vue'
|
|
29
33
|
|
|
30
|
-
defineProps<{
|
|
34
|
+
withDefaults(defineProps<{
|
|
31
35
|
icon: Component
|
|
32
36
|
url: RouteLocationRaw
|
|
33
37
|
target?: string
|
|
34
|
-
|
|
38
|
+
titleTag?: TitleTag
|
|
39
|
+
}>(), {
|
|
40
|
+
titleTag: 'h3',
|
|
41
|
+
})
|
|
35
42
|
</script>
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
<article class="fr-enlarge-link group/reuse-card bg-white border border-gray-default hover:bg-gray-some flex flex-col relative">
|
|
3
3
|
<div class="flex flex-col h-full flex-1 order-2 px-8">
|
|
4
4
|
<div class="order-1 flex flex-col px-4 py-1 h-full -mx-8">
|
|
5
|
-
<
|
|
5
|
+
<component
|
|
6
|
+
:is="titleTag"
|
|
7
|
+
class="font-bold text-base mt-1 mb-0 truncate"
|
|
8
|
+
>
|
|
6
9
|
<AppLink
|
|
7
10
|
class="text-gray-title overflow-hidden"
|
|
8
11
|
:to="reuseUrl"
|
|
9
12
|
>
|
|
10
13
|
{{ reuse.title }}
|
|
11
14
|
</AppLink>
|
|
12
|
-
</
|
|
15
|
+
</component>
|
|
13
16
|
<div class="order-3 text-sm m-0 text-gray-medium">
|
|
14
17
|
<div class="text-sm mb-0 flex items-center">
|
|
15
18
|
<ObjectCardOwner
|
|
@@ -66,13 +69,14 @@ import { computed } from 'vue'
|
|
|
66
69
|
import type { RouteLocationRaw } from 'vue-router'
|
|
67
70
|
import { useFormatDate } from '../functions/dates'
|
|
68
71
|
import type { Reuse } from '../types/reuses'
|
|
72
|
+
import type { TitleTag } from '../types/ui'
|
|
69
73
|
import { useTranslation } from '../composables/useTranslation'
|
|
70
74
|
import AppLink from './AppLink.vue'
|
|
71
75
|
import ObjectCardOwner from './ObjectCardOwner.vue'
|
|
72
76
|
import ReuseDetails from './ReuseDetails.vue'
|
|
73
77
|
import Placeholder from './Placeholder.vue'
|
|
74
78
|
|
|
75
|
-
const props = defineProps<{
|
|
79
|
+
const props = withDefaults(defineProps<{
|
|
76
80
|
reuse: Reuse
|
|
77
81
|
|
|
78
82
|
/**
|
|
@@ -86,7 +90,11 @@ const props = defineProps<{
|
|
|
86
90
|
* It is used as a separate prop to allow other sites using the package to define their own organization pages.
|
|
87
91
|
*/
|
|
88
92
|
organizationUrl?: RouteLocationRaw
|
|
89
|
-
|
|
93
|
+
|
|
94
|
+
titleTag?: TitleTag
|
|
95
|
+
}>(), {
|
|
96
|
+
titleTag: 'h3',
|
|
97
|
+
})
|
|
90
98
|
|
|
91
99
|
const { t } = useTranslation()
|
|
92
100
|
const { formatRelativeIfRecentDate } = useFormatDate()
|