@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1399.g35c3eb9f
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/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
- package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-CQNxPvZt.js} +1 -1
- package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
- package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-DbkBb47d.js} +1 -1
- package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-Ba-_lUCj.js} +2 -2
- package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
- package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
- package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-BsJGdnP2.js} +7 -7
- package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
- package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-CJbZbXds.js} +3 -3
- package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-sY8nI3Lv.js} +1 -1
- package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-Wea3YvTU.js} +9997 -9276
- package/dist/{PreviewError-EeaGx3SL.js → PreviewError-BzUvwX47.js} +329 -290
- package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CwOJqQSn.js} +1 -1
- package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
- package/dist/Tile-DfivRbb3.js +479 -0
- package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
- package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
- package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
- package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-xXdnrUCW.js} +2 -2
- package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +11889 -10504
- package/dist/components.css +2 -2
- package/dist/{france-BtSQqcqV.js → france-BYzDEL-I.js} +23 -23
- package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
- package/dist/purify.es-D-UgLNEK.js +848 -0
- package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
- package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
- package/package.json +18 -18
- package/src/components/AccessTypeBadge.vue +46 -0
- package/src/components/Badge.vue +74 -0
- package/src/components/ChartBadge.vue +17 -0
- package/src/components/ChartCard.vue +4 -17
- package/src/components/DataserviceBadge.vue +17 -0
- package/src/components/DataserviceCard.vue +12 -31
- package/src/components/DatasetBadge.vue +17 -0
- package/src/components/DatasetCard.vue +11 -15
- package/src/components/DatasetInformation/DatasetInformationSection.vue +3 -7
- package/src/components/DatasetInformation/DatasetSchemaSection.vue +1 -4
- package/src/components/DatasetLabelTag.vue +4 -15
- package/src/components/Form/SelectGroup.vue +0 -2
- package/src/components/LicenseBadge.vue +7 -12
- package/src/components/ObjectStatusBadge.vue +47 -0
- package/src/components/OrganizationBadge.vue +24 -0
- package/src/components/OrganizationTypeBadge.vue +5 -4
- package/src/components/ResourceAccordion/SchemaBadge.vue +6 -2
- package/src/components/ReuseBadge.vue +17 -0
- package/src/components/ReuseCard.vue +5 -20
- package/src/components/SchemaCard.vue +1 -5
- package/src/components/StatBox.vue +5 -3
- package/src/components/Tag.vue +61 -15
- package/src/functions/objectStatus.ts +34 -0
- package/src/main.ts +25 -3
- package/src/types/ui.ts +2 -0
- package/dist/Tile-Bu5lF4M5.js +0 -463
- package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
- package/dist/purify.es-eElsWhh7.js +0 -876
- package/src/components/ObjectCardBadge.vue +0 -33
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Badge
|
|
3
3
|
v-if="organizationType.type !== OTHER"
|
|
4
4
|
:icon="organizationType.icon"
|
|
5
|
-
:tone="type === PUBLIC_SERVICE || type === LOCAL_AUTHORITY ? '
|
|
5
|
+
:tone="type === PUBLIC_SERVICE || type === LOCAL_AUTHORITY ? 'primary' : 'neutral'"
|
|
6
|
+
medium
|
|
6
7
|
>
|
|
7
8
|
{{ organizationType.label }}
|
|
8
|
-
</
|
|
9
|
+
</Badge>
|
|
9
10
|
</template>
|
|
10
11
|
|
|
11
12
|
<script setup lang="ts">
|
|
12
13
|
import { computed } from 'vue'
|
|
13
14
|
import { findOrganizationType, LOCAL_AUTHORITY, OTHER, PUBLIC_SERVICE, type OrganizationTypes } from '../functions/organizations'
|
|
14
|
-
import
|
|
15
|
+
import Badge from './Badge.vue'
|
|
15
16
|
|
|
16
17
|
const props = defineProps<{
|
|
17
18
|
type: OrganizationTypes
|
|
@@ -81,8 +81,11 @@
|
|
|
81
81
|
</template>
|
|
82
82
|
</Toggletip>
|
|
83
83
|
<span class="mr-1 text-gray-medium">{{ t("Schéma:") }}</span>
|
|
84
|
-
<span
|
|
85
|
-
|
|
84
|
+
<span
|
|
85
|
+
class="flex items-center rounded-xl"
|
|
86
|
+
:class="{ 'bg-danger-lightest': validataStatus === 'warnings' || validataStatus === 'ko' }"
|
|
87
|
+
>
|
|
88
|
+
<Tag>{{ title }}</Tag>
|
|
86
89
|
<span
|
|
87
90
|
v-if="validataStatus === 'warnings'"
|
|
88
91
|
class="flex items-center padding-sm"
|
|
@@ -105,6 +108,7 @@
|
|
|
105
108
|
import { RiInformationLine } from '@remixicon/vue'
|
|
106
109
|
import { computed, onMounted, ref } from 'vue'
|
|
107
110
|
import type { Resource } from '../../types/resources'
|
|
111
|
+
import Tag from '../Tag.vue'
|
|
108
112
|
import Toggletip from '../Toggletip.vue'
|
|
109
113
|
import { findSchemaInCatalog, useGetCatalog, useGetSchemaDocumentation, useGetSchemaValidationUrl } from '../../functions/schemas'
|
|
110
114
|
import { useTranslation } from '../../composables/useTranslation'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ObjectStatusBadge
|
|
3
|
+
:status="getReuseStatus(reuse)"
|
|
4
|
+
:size
|
|
5
|
+
/>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { getReuseStatus } from '../functions/objectStatus'
|
|
10
|
+
import type { Reuse, ReuseV2 } from '../types/reuses'
|
|
11
|
+
import ObjectStatusBadge from './ObjectStatusBadge.vue'
|
|
12
|
+
|
|
13
|
+
defineProps<{
|
|
14
|
+
reuse: Reuse | ReuseV2
|
|
15
|
+
size?: 'xs' | 'sm'
|
|
16
|
+
}>()
|
|
17
|
+
</script>
|
|
@@ -32,23 +32,10 @@
|
|
|
32
32
|
{{ reuse.title }}
|
|
33
33
|
</template>
|
|
34
34
|
<template
|
|
35
|
-
v-if="reuse
|
|
35
|
+
v-if="getReuseStatus(reuse) !== 'public'"
|
|
36
36
|
#badge
|
|
37
37
|
>
|
|
38
|
-
<
|
|
39
|
-
<ObjectCardBadge
|
|
40
|
-
v-if="reuse.private"
|
|
41
|
-
:icon="RiLockLine"
|
|
42
|
-
>
|
|
43
|
-
{{ t('Brouillon') }}
|
|
44
|
-
</ObjectCardBadge>
|
|
45
|
-
<ObjectCardBadge
|
|
46
|
-
v-if="reuse.archived"
|
|
47
|
-
:icon="RiArchiveLine"
|
|
48
|
-
>
|
|
49
|
-
{{ t('Archivé') }}
|
|
50
|
-
</ObjectCardBadge>
|
|
51
|
-
</span>
|
|
38
|
+
<ReuseBadge :reuse />
|
|
52
39
|
</template>
|
|
53
40
|
|
|
54
41
|
<ObjectCardOwner
|
|
@@ -85,18 +72,18 @@
|
|
|
85
72
|
</template>
|
|
86
73
|
|
|
87
74
|
<script setup lang="ts">
|
|
88
|
-
import {
|
|
75
|
+
import { RiLineChartLine } from '@remixicon/vue'
|
|
89
76
|
import type { RouteLocationRaw } from 'vue-router'
|
|
77
|
+
import { getReuseStatus } from '../functions/objectStatus'
|
|
90
78
|
import type { Reuse, ReuseV2 } from '../types/reuses'
|
|
91
79
|
import type { TitleTag } from '../types/ui'
|
|
92
|
-
import { useTranslation } from '../composables/useTranslation'
|
|
93
80
|
import CardMedia from './CardMedia.vue'
|
|
94
81
|
import FormattedDate from './FormattedDate.vue'
|
|
95
82
|
import ObjectCard from './ObjectCard.vue'
|
|
96
83
|
import ObjectCardShortDescription from './ObjectCardShortDescription.vue'
|
|
97
|
-
import ObjectCardBadge from './ObjectCardBadge.vue'
|
|
98
84
|
import ObjectCardMeta from './ObjectCardMeta.vue'
|
|
99
85
|
import ObjectCardOwner from './ObjectCardOwner.vue'
|
|
86
|
+
import ReuseBadge from './ReuseBadge.vue'
|
|
100
87
|
import ReuseDetails from './ReuseDetails.vue'
|
|
101
88
|
import TranslationT from './TranslationT.vue'
|
|
102
89
|
|
|
@@ -129,6 +116,4 @@ withDefaults(
|
|
|
129
116
|
titleTag: 'h3',
|
|
130
117
|
},
|
|
131
118
|
)
|
|
132
|
-
|
|
133
|
-
const { t } = useTranslation()
|
|
134
119
|
</script>
|
|
@@ -21,14 +21,10 @@
|
|
|
21
21
|
<Tag
|
|
22
22
|
v-for="label in schema.labels"
|
|
23
23
|
:key="label"
|
|
24
|
-
type="secondary"
|
|
25
24
|
>
|
|
26
25
|
{{ t('Label :') }} {{ label }}
|
|
27
26
|
</Tag>
|
|
28
|
-
<Tag
|
|
29
|
-
v-if="schema.schema_type"
|
|
30
|
-
type="secondary"
|
|
31
|
-
>
|
|
27
|
+
<Tag v-if="schema.schema_type">
|
|
32
28
|
{{ t('Standard :') }} {{ schema.schema_type }}
|
|
33
29
|
</Tag>
|
|
34
30
|
</div>
|
|
@@ -144,9 +144,10 @@
|
|
|
144
144
|
/>
|
|
145
145
|
</div>
|
|
146
146
|
</div>
|
|
147
|
-
<
|
|
147
|
+
<Badge
|
|
148
148
|
v-if="lastValue && lastMonth"
|
|
149
|
-
|
|
149
|
+
tone="success"
|
|
150
|
+
class="mt-2"
|
|
150
151
|
>
|
|
151
152
|
<strong>
|
|
152
153
|
+ {{ summarize(lastValue, 2) }}
|
|
@@ -156,13 +157,14 @@
|
|
|
156
157
|
:date="lastMonth"
|
|
157
158
|
:options="{ dateStyle: undefined, year: 'numeric', month: 'short', day: undefined }"
|
|
158
159
|
/>
|
|
159
|
-
</
|
|
160
|
+
</Badge>
|
|
160
161
|
</div>
|
|
161
162
|
</template>
|
|
162
163
|
|
|
163
164
|
<script setup lang="ts">
|
|
164
165
|
import { computed } from 'vue'
|
|
165
166
|
import { ContentLoader } from 'vue-content-loader'
|
|
167
|
+
import Badge from './Badge.vue'
|
|
166
168
|
import FormattedDate from './FormattedDate.vue'
|
|
167
169
|
import { summarize } from '../functions/helpers'
|
|
168
170
|
import { useTranslation } from '../composables/useTranslation'
|
package/src/components/Tag.vue
CHANGED
|
@@ -1,30 +1,76 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:
|
|
2
|
+
<component
|
|
3
|
+
:is="to ? AppLink : isButton ? 'button' : 'span'"
|
|
4
|
+
:to
|
|
5
|
+
:type="isButton ? 'button' : undefined"
|
|
6
|
+
:aria-pressed="pressed"
|
|
7
|
+
@click="toggle"
|
|
8
|
+
class="inline-flex items-center gap-1 max-w-full min-h-6 py-0.5 rounded-xl shadow-[inset_0_0_0_1px_var(--border-default-grey)] text-xs/[18px] font-normal"
|
|
9
|
+
:class="[stateClasses, displayedIcon && typeof displayedIcon !== 'string' ? 'pl-1.5 pr-2' : 'px-2']"
|
|
5
10
|
>
|
|
11
|
+
<img
|
|
12
|
+
v-if="typeof displayedIcon === 'string'"
|
|
13
|
+
:src="displayedIcon"
|
|
14
|
+
alt=""
|
|
15
|
+
class="size-3.5 flex-none object-contain"
|
|
16
|
+
>
|
|
6
17
|
<component
|
|
7
|
-
:is="
|
|
8
|
-
v-if="
|
|
9
|
-
class="size-3"
|
|
18
|
+
:is="displayedIcon"
|
|
19
|
+
v-else-if="displayedIcon"
|
|
20
|
+
class="size-3.5 flex-none"
|
|
21
|
+
aria-hidden="true"
|
|
10
22
|
/>
|
|
11
|
-
<span class="-
|
|
23
|
+
<span class="min-w-0 [overflow-wrap:anywhere] [text-box:trim-both_cap_alphabetic]">
|
|
24
|
+
<!-- Gives the button an accessible name built from its own content: "Supprimer transport" -->
|
|
25
|
+
<span
|
|
26
|
+
v-if="dismissible"
|
|
27
|
+
class="sr-only"
|
|
28
|
+
>{{ `${t('Supprimer')} ` }}</span>
|
|
12
29
|
<slot />
|
|
13
30
|
</span>
|
|
14
|
-
</
|
|
31
|
+
</component>
|
|
15
32
|
</template>
|
|
16
33
|
|
|
17
34
|
<script setup lang="ts">
|
|
18
|
-
import {
|
|
35
|
+
import { RiCloseLine } from '@remixicon/vue'
|
|
36
|
+
import { computed, useAttrs, type Component } from 'vue'
|
|
37
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
38
|
+
import { useTranslation } from '../composables/useTranslation'
|
|
39
|
+
import AppLink from './AppLink.vue'
|
|
19
40
|
|
|
20
41
|
const props = defineProps<{
|
|
21
|
-
|
|
22
|
-
|
|
42
|
+
// A string is an image URL, e.g. the SVG of a dataset label
|
|
43
|
+
icon?: Component | string
|
|
44
|
+
to?: RouteLocationRaw
|
|
45
|
+
// Removes the tag on click: shows a cross in place of the icon
|
|
46
|
+
dismissible?: boolean
|
|
23
47
|
}>()
|
|
24
48
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
// Left unbound, the tag is not a toggle and gets no aria-pressed at all
|
|
50
|
+
const pressed = defineModel<boolean | undefined>('pressed', { default: undefined })
|
|
51
|
+
|
|
52
|
+
const { t } = useTranslation()
|
|
53
|
+
const attrs = useAttrs()
|
|
54
|
+
const isButton = computed(() => !props.to && (props.dismissible || !!attrs.onClick || pressed.value !== undefined))
|
|
55
|
+
const displayedIcon = computed(() => props.dismissible ? RiCloseLine : props.icon)
|
|
56
|
+
|
|
57
|
+
function toggle() {
|
|
58
|
+
if (pressed.value !== undefined) pressed.value = !pressed.value
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const stateClasses = computed(() => {
|
|
62
|
+
if (pressed.value) {
|
|
63
|
+
return 'text-(--text-inverted-blue-france) bg-(--background-action-high-blue-france) focus-visible:outline-(--border-active-blue-france)'
|
|
64
|
+
}
|
|
65
|
+
if (props.to || isButton.value) {
|
|
66
|
+
return [
|
|
67
|
+
'text-(--text-label-grey) bg-transparent bg-none',
|
|
68
|
+
'hover:text-(--text-action-high-blue-france) hover:bg-(--background-action-low-blue-france)',
|
|
69
|
+
'focus-visible:text-(--text-action-high-blue-france) focus-visible:bg-(--background-action-low-blue-france) focus-visible:outline-(--border-active-blue-france)',
|
|
70
|
+
'active:bg-(--background-action-low-blue-france-active)',
|
|
71
|
+
'disabled:text-(--text-disabled-grey) disabled:bg-(--background-disabled-grey)',
|
|
72
|
+
].join(' ')
|
|
73
|
+
}
|
|
74
|
+
return 'text-(--text-label-grey) bg-transparent'
|
|
29
75
|
})
|
|
30
76
|
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Dataset, DatasetV2, DatasetV2WithFullObject } from '../types/datasets'
|
|
2
|
+
import type { Dataservice } from '../types/dataservices'
|
|
3
|
+
import type { Reuse, ReuseV2 } from '../types/reuses'
|
|
4
|
+
import type { Chart } from '../types/visualizations'
|
|
5
|
+
|
|
6
|
+
// Publication status shared by every published object, from the most to the least prominent
|
|
7
|
+
export type ObjectStatus = 'deleted' | 'archived' | 'private' | 'public'
|
|
8
|
+
|
|
9
|
+
export function getDatasetStatus(dataset: Dataset | DatasetV2 | DatasetV2WithFullObject): ObjectStatus {
|
|
10
|
+
if (dataset.deleted) return 'deleted'
|
|
11
|
+
if (dataset.archived) return 'archived'
|
|
12
|
+
if (dataset.private) return 'private'
|
|
13
|
+
return 'public'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function getDataserviceStatus(dataservice: Dataservice): ObjectStatus {
|
|
17
|
+
if (dataservice.deleted_at) return 'deleted'
|
|
18
|
+
if (dataservice.archived_at) return 'archived'
|
|
19
|
+
if (dataservice.private) return 'private'
|
|
20
|
+
return 'public'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getReuseStatus(reuse: Reuse | ReuseV2): ObjectStatus {
|
|
24
|
+
if (reuse.deleted) return 'deleted'
|
|
25
|
+
if (reuse.archived) return 'archived'
|
|
26
|
+
if (reuse.private) return 'private'
|
|
27
|
+
return 'public'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function getChartStatus(chart: Chart): ObjectStatus {
|
|
31
|
+
if (chart.deleted_at) return 'deleted'
|
|
32
|
+
if (chart.private) return 'private'
|
|
33
|
+
return 'public'
|
|
34
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { App, Plugin } from 'vue'
|
|
|
2
2
|
import type { Activity, ActivityKey } from './types/activity.js'
|
|
3
3
|
import type { PaginatedArray } from './types/api.js'
|
|
4
4
|
import type { ContactPoint, ContactPointRole } from './types/contact_point.js'
|
|
5
|
-
import type { Badge, Badges, TranslatedBadge } from './types/badges'
|
|
5
|
+
import type { Badge as BadgeObject, Badges, TranslatedBadge } from './types/badges'
|
|
6
6
|
import type { DatasetReference, Dataset, DatasetV2, DatasetV2WithFullObject, NewDataset, Quality, Rel } from './types/datasets'
|
|
7
7
|
import type { DataserviceReference, NewDataservice, Dataservice } from './types/dataservices'
|
|
8
8
|
import type { AccessType, AccessAudience, AccessAudienceCondition, AccessAudienceType, WithAccessType, AccessTypeForm } from './types/access_types'
|
|
@@ -20,7 +20,7 @@ import type { RegisteredSchema, Schema, SchemaDetails, SchemaField, SchemaPath,
|
|
|
20
20
|
import type { TopicV2, TopicElement, TopicElementClass, TopicElementRel } from './types/topics'
|
|
21
21
|
import type { CommunityResource, FileResourceFileType, RemoteResourceFileType, ResourceFileType, ResourceGroup, ResourceType, Resource } from './types/resources'
|
|
22
22
|
import type { Site } from './types/site'
|
|
23
|
-
import type { Weight, WellType } from './types/ui'
|
|
23
|
+
import type { BadgeTone, Weight, WellType } from './types/ui'
|
|
24
24
|
import type { User, UserReference } from './types/users'
|
|
25
25
|
import type { Report, ReportSubject, ReportReason } from './types/reports'
|
|
26
26
|
import type { Chart, ChartForm, ChartForApi, FilterCondition, Filter, AndFilters, OrFilters, GenericFilter, XAxisType, XAxisSortBy, SortDirection, XAxis, XAxisForm, UnitPosition, YAxis, DataSeriesType, DataSeries, DataSeriesForm, CombinedSort, ColumnDefinition, ColumnsDefinition } from './types/visualizations'
|
|
@@ -30,6 +30,7 @@ import { getDefaultDatasetConfig, getDefaultDataserviceConfig, getDefaultReuseCo
|
|
|
30
30
|
import { useSearchFilter } from './composables/useSearchFilter'
|
|
31
31
|
import type { UseSearchFilterOptions } from './composables/useSearchFilter'
|
|
32
32
|
|
|
33
|
+
import AccessTypeBadge from './components/AccessTypeBadge.vue'
|
|
33
34
|
import ActivityActor from './components/ActivityList/ActivityActor.vue'
|
|
34
35
|
import ActivityList from './components/ActivityList/ActivityList.vue'
|
|
35
36
|
import UserActivityList from './components/ActivityList/UserActivityList.vue'
|
|
@@ -37,14 +38,18 @@ import AnimatedLoader from './components/AnimatedLoader.vue'
|
|
|
37
38
|
import AppLink from './components/AppLink.vue'
|
|
38
39
|
import Avatar from './components/Avatar.vue'
|
|
39
40
|
import AvatarWithName from './components/AvatarWithName.vue'
|
|
41
|
+
import Badge from './components/Badge.vue'
|
|
40
42
|
import BannerAction from './components/BannerAction.vue'
|
|
41
43
|
import BrandedButton from './components/BrandedButton.vue'
|
|
44
|
+
import ChartBadge from './components/ChartBadge.vue'
|
|
42
45
|
import ChartCard from './components/ChartCard.vue'
|
|
43
46
|
import CopyButton from './components/CopyButton.vue'
|
|
47
|
+
import DataserviceBadge from './components/DataserviceBadge.vue'
|
|
44
48
|
import DataserviceCard from './components/DataserviceCard.vue'
|
|
45
49
|
import DataserviceQuality from './components/DataserviceQuality.vue'
|
|
46
50
|
import DataserviceQualityInline from './components/DataserviceQualityInline.vue'
|
|
47
51
|
import DataserviceQualityTooltipContent from './components/DataserviceQualityTooltipContent.vue'
|
|
52
|
+
import DatasetBadge from './components/DatasetBadge.vue'
|
|
48
53
|
import DatasetCard from './components/DatasetCard.vue'
|
|
49
54
|
import DataStructure from './components/ResourceAccordion/DataStructure.vue'
|
|
50
55
|
import Downloads from './components/ResourceAccordion/Downloads.vue'
|
|
@@ -68,7 +73,10 @@ import ExtraAccordion from './components/ExtraAccordion.vue'
|
|
|
68
73
|
import LabelTag from './components/DatasetLabelTag.vue'
|
|
69
74
|
import LoadingBlock from './components/LoadingBlock.vue'
|
|
70
75
|
import MarkdownViewer from './components/MarkdownViewer.vue'
|
|
76
|
+
import ObjectStatusBadge from './components/ObjectStatusBadge.vue'
|
|
77
|
+
import OrganizationBadge from './components/OrganizationBadge.vue'
|
|
71
78
|
import OrganizationCard from './components/OrganizationCard.vue'
|
|
79
|
+
import OrganizationTypeBadge from './components/OrganizationTypeBadge.vue'
|
|
72
80
|
import ObjectCardOwner from './components/ObjectCardOwner.vue'
|
|
73
81
|
import OrganizationLogo from './components/OrganizationLogo.vue'
|
|
74
82
|
import OrganizationNameWithCertificate from './components/OrganizationNameWithCertificate.vue'
|
|
@@ -88,6 +96,7 @@ import ResourceExplorer from './components/ResourceExplorer/ResourceExplorer.vue
|
|
|
88
96
|
import ResourceExplorerSidebar from './components/ResourceExplorer/ResourceExplorerSidebar.vue'
|
|
89
97
|
import ResourceExplorerViewer from './components/ResourceExplorer/ResourceExplorerViewer.vue'
|
|
90
98
|
import OpenApiViewer from './components/OpenApiViewer/OpenApiViewer.vue'
|
|
99
|
+
import ReuseBadge from './components/ReuseBadge.vue'
|
|
91
100
|
import ReuseCard from './components/ReuseCard.vue'
|
|
92
101
|
import ReuseDetails from './components/ReuseDetails.vue'
|
|
93
102
|
import SchemaCard from './components/SchemaCard.vue'
|
|
@@ -121,6 +130,9 @@ import { useTranslation } from './composables/useTranslation'
|
|
|
121
130
|
|
|
122
131
|
export type { SegmentedControlOption } from './components/SegmentedControl.vue'
|
|
123
132
|
|
|
133
|
+
// Same name as the Badge component on purpose: as a type, `Badge` is the udata badge (spd, hvd, certified…)
|
|
134
|
+
export type Badge = BadgeObject
|
|
135
|
+
|
|
124
136
|
export { Toaster, toast } from 'vue-sonner'
|
|
125
137
|
|
|
126
138
|
export * from './composables/useActiveDescendant'
|
|
@@ -143,6 +155,7 @@ export * from './functions/markdown'
|
|
|
143
155
|
export * from './functions/matomo'
|
|
144
156
|
export * from './functions/metrics'
|
|
145
157
|
export * from './functions/never'
|
|
158
|
+
export * from './functions/objectStatus'
|
|
146
159
|
export * from './functions/organizations'
|
|
147
160
|
export * from './functions/owned'
|
|
148
161
|
export * from './functions/previewErrors'
|
|
@@ -182,7 +195,7 @@ export type {
|
|
|
182
195
|
AccessTypeForm,
|
|
183
196
|
Activity,
|
|
184
197
|
ActivityKey,
|
|
185
|
-
|
|
198
|
+
BadgeTone,
|
|
186
199
|
Badges,
|
|
187
200
|
CommunityResource,
|
|
188
201
|
ContactPoint,
|
|
@@ -356,20 +369,25 @@ const datagouv: Plugin<PluginConfig> = {
|
|
|
356
369
|
export {
|
|
357
370
|
datagouv,
|
|
358
371
|
useComponentsConfig,
|
|
372
|
+
AccessTypeBadge,
|
|
359
373
|
ActivityActor,
|
|
360
374
|
ActivityList,
|
|
361
375
|
AnimatedLoader,
|
|
362
376
|
AppLink,
|
|
363
377
|
Avatar,
|
|
364
378
|
AvatarWithName,
|
|
379
|
+
Badge,
|
|
365
380
|
BannerAction,
|
|
366
381
|
BrandedButton,
|
|
382
|
+
ChartBadge,
|
|
367
383
|
ChartCard,
|
|
368
384
|
CopyButton,
|
|
385
|
+
DataserviceBadge,
|
|
369
386
|
DataserviceCard,
|
|
370
387
|
DataserviceQuality,
|
|
371
388
|
DataserviceQualityInline,
|
|
372
389
|
DataserviceQualityTooltipContent,
|
|
390
|
+
DatasetBadge,
|
|
373
391
|
DatasetCard,
|
|
374
392
|
DataStructure,
|
|
375
393
|
Downloads,
|
|
@@ -396,7 +414,10 @@ export {
|
|
|
396
414
|
LoadingBlock,
|
|
397
415
|
Tag,
|
|
398
416
|
MarkdownViewer,
|
|
417
|
+
ObjectStatusBadge,
|
|
418
|
+
OrganizationBadge,
|
|
399
419
|
OrganizationCard,
|
|
420
|
+
OrganizationTypeBadge,
|
|
400
421
|
OrganizationLogo,
|
|
401
422
|
OrganizationNameWithCertificate,
|
|
402
423
|
OwnerType,
|
|
@@ -416,6 +437,7 @@ export {
|
|
|
416
437
|
ObjectCardOwner,
|
|
417
438
|
ResourceIcon,
|
|
418
439
|
ResourceSelector,
|
|
440
|
+
ReuseBadge,
|
|
419
441
|
ReuseCard,
|
|
420
442
|
ReuseDetails,
|
|
421
443
|
SchemaCard,
|
package/src/types/ui.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type WellType = 'primary' | 'secondary'
|
|
2
2
|
|
|
3
|
+
export type BadgeTone = 'neutral' | 'primary' | 'success' | 'warning' | 'yellow' | 'danger' | 'pink' | 'teal'
|
|
4
|
+
|
|
3
5
|
export type Weight = 'light' | 'regular' | 'semi-bold' | 'bold' | 'heavy'
|
|
4
6
|
|
|
5
7
|
export type TitleTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p'
|