@datagouv/components-next 0.2.0 → 1.0.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/README.md +1 -1
- package/assets/main.css +49 -22
- package/dist/Control-BNCDn-8E.js +148 -0
- package/dist/{Datafair.client-x39O4yfF.js → Datafair.client-B5lBpOl8.js} +2 -2
- package/dist/Event-BOgJUhNR.js +738 -0
- package/dist/Image-BN-4XkIn.js +247 -0
- package/dist/{JsonPreview.client-BMsC5JcY.js → JsonPreview.client-Doz1Z0BS.js} +23 -23
- package/dist/Map-BdT3i2C4.js +7609 -0
- package/dist/MapContainer.client-oiieO8H-.js +105 -0
- package/dist/OSM-CamriM9b.js +71 -0
- package/dist/PdfPreview.client-CdAhkDFJ.js +14513 -0
- package/dist/{Pmtiles.client-BaiIo4VZ.js → Pmtiles.client-B0v8tGJQ.js} +3 -3
- package/dist/ScaleLine-BiesrgOv.js +165 -0
- package/dist/Swagger.client-CsK65JnG.js +4 -0
- package/dist/Tile-DCuqwNOI.js +1206 -0
- package/dist/TileImage-CmZf8EdU.js +1067 -0
- package/dist/View-DcDc7N2K.js +2858 -0
- package/dist/{XmlPreview.client-CAdN0w_Y.js → XmlPreview.client-CrjHf74q.js} +17 -17
- package/dist/common-C4rDcQpp.js +243 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +158 -117
- package/dist/components.css +1 -1
- package/dist/{MapContainer.client-DeSo8EvG.js → index-Bbu9rOHt.js} +4975 -21416
- package/dist/leaflet-src-7m1mB8LI.js +6338 -0
- package/dist/{main-Dgri3TQL.js → main-CiH8ZmBI.js} +56973 -51462
- package/dist/proj-CKwYjU38.js +1569 -0
- package/dist/tilecoord-YW3qEH_j.js +884 -0
- package/dist/{vue3-xml-viewer.common-D6skc_Ai.js → vue3-xml-viewer.common-Bi_bsV6C.js} +1 -1
- package/package.json +6 -2
- package/src/components/ActivityList/ActivityList.vue +6 -2
- package/src/components/AppLink.vue +4 -1
- package/src/components/Avatar.vue +2 -2
- package/src/components/AvatarWithName.vue +8 -4
- package/src/components/BouncingDots.vue +21 -0
- package/src/components/BrandedButton.vue +2 -0
- package/src/components/CopyButton.vue +19 -7
- package/src/components/DataserviceCard.vue +85 -120
- package/src/components/DatasetCard.vue +110 -171
- package/src/components/DatasetInformation/DatasetEmbedSection.vue +43 -0
- package/src/components/DatasetInformation/DatasetInformationSection.vue +73 -0
- package/src/components/DatasetInformation/DatasetSchemaSection.vue +74 -0
- package/src/components/DatasetInformation/DatasetSpatialSection.vue +59 -0
- package/src/components/DatasetInformation/DatasetTemporalitySection.vue +45 -0
- package/src/components/DatasetInformation/index.ts +5 -0
- package/src/components/DatasetQuality.vue +23 -16
- package/src/components/DatasetQualityInline.vue +13 -17
- package/src/components/DatasetQualityScore.vue +12 -15
- package/src/components/DatasetQualityTooltipContent.vue +3 -3
- package/src/components/DescriptionList.vue +1 -4
- package/src/components/DescriptionListDetails.vue +5 -0
- package/src/components/DescriptionListTerm.vue +5 -0
- package/src/components/DiscussionMessageCard.vue +63 -0
- package/src/components/ExtraAccordion.vue +4 -4
- package/src/components/Form/BadgeSelect.vue +35 -0
- package/src/components/Form/FormatSelect.vue +28 -0
- package/src/components/Form/GeozoneSelect.vue +52 -0
- package/src/components/Form/GranularitySelect.vue +29 -0
- package/src/components/Form/LicenseSelect.vue +30 -0
- package/src/components/Form/OrganizationSelect.vue +62 -0
- package/src/components/Form/OrganizationTypeSelect.vue +34 -0
- package/src/components/Form/ReuseTopicSelect.vue +29 -0
- package/src/components/Form/SchemaSelect.vue +30 -0
- package/src/components/Form/SearchableSelect.vue +334 -0
- package/src/components/Form/SelectGroup.vue +132 -0
- package/src/components/Form/TagSelect.vue +38 -0
- package/src/components/LeafletMap.vue +31 -0
- package/src/components/LicenseBadge.vue +24 -0
- package/src/components/LoadingBlock.vue +23 -2
- package/src/components/MarkdownViewer.vue +3 -1
- package/src/components/ObjectCard.vue +42 -0
- package/src/components/ObjectCardBadge.vue +22 -0
- package/src/components/ObjectCardHeader.vue +35 -0
- package/src/components/ObjectCardOwner.vue +43 -0
- package/src/components/ObjectCardShortDescription.vue +28 -0
- package/src/components/OrganizationCard.vue +35 -20
- package/src/components/OrganizationHorizontalCard.vue +87 -0
- package/src/components/OrganizationLogo.vue +1 -1
- package/src/components/OrganizationNameWithCertificate.vue +12 -6
- package/src/components/OwnerTypeIcon.vue +1 -0
- package/src/components/Pagination.vue +1 -1
- package/src/components/Placeholder.vue +5 -2
- package/src/components/PostCard.vue +62 -0
- package/src/components/ProgressBar.vue +31 -0
- package/src/components/RadioGroup.vue +32 -0
- package/src/components/RadioInput.vue +64 -0
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/EditButton.vue +2 -3
- package/src/components/ResourceAccordion/JsonPreview.client.vue +3 -3
- package/src/components/ResourceAccordion/MapContainer.client.vue +21 -17
- package/src/components/ResourceAccordion/Metadata.vue +11 -24
- package/src/components/ResourceAccordion/PdfPreview.client.vue +70 -74
- package/src/components/ResourceAccordion/Pmtiles.client.vue +2 -2
- package/src/components/ResourceAccordion/Preview.vue +2 -2
- package/src/components/ResourceAccordion/ResourceAccordion.vue +35 -28
- package/src/components/ResourceAccordion/ResourceIcon.vue +1 -0
- package/src/components/ResourceAccordion/SchemaBadge.vue +2 -2
- package/src/components/ResourceAccordion/XmlPreview.client.vue +3 -3
- package/src/components/ResourceExplorer/ResourceExplorer.vue +243 -0
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +116 -0
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +410 -0
- package/src/components/ReuseCard.vue +8 -28
- package/src/components/ReuseHorizontalCard.vue +80 -0
- package/src/components/Search/BasicAndAdvancedFilters.vue +49 -0
- package/src/components/Search/Filter/AccessTypeFilter.vue +37 -0
- package/src/components/Search/Filter/DatasetBadgeFilter.vue +40 -0
- package/src/components/Search/Filter/FilterButtonGroup.vue +78 -0
- package/src/components/Search/Filter/FormatFamilyFilter.vue +39 -0
- package/src/components/Search/Filter/LastUpdateRangeFilter.vue +37 -0
- package/src/components/Search/Filter/ProducerTypeFilter.vue +49 -0
- package/src/components/Search/Filter/ReuseTypeFilter.vue +42 -0
- package/src/components/Search/GlobalSearch.vue +707 -0
- package/src/components/Search/SearchInput.vue +63 -0
- package/src/components/Search/Sidemenu.vue +38 -0
- package/src/components/StatBox.vue +5 -5
- package/src/components/Tag.vue +30 -0
- package/src/components/Toggletip.vue +11 -4
- package/src/components/Tooltip.vue +2 -3
- package/src/components/TopicCard.vue +134 -0
- package/src/components/radioGroupContext.ts +9 -0
- package/src/composables/useDebouncedRef.ts +31 -0
- package/src/composables/useHasTabularData.ts +15 -0
- package/src/composables/useMetrics.ts +4 -3
- package/src/composables/useResourceCapabilities.ts +131 -0
- package/src/composables/useRouteQueryBoolean.ts +10 -0
- package/src/composables/useSelectModelSync.ts +89 -0
- package/src/composables/useStableQueryParams.ts +84 -0
- package/src/composables/useTranslation.ts +2 -1
- package/src/config.ts +4 -0
- package/src/functions/api.ts +25 -6
- package/src/functions/api.types.ts +5 -3
- package/src/functions/datasets.ts +1 -29
- package/src/functions/description.ts +33 -0
- package/src/functions/helpers.ts +11 -0
- package/src/functions/markdown.ts +60 -16
- package/src/functions/metrics.ts +33 -0
- package/src/functions/organizations.ts +5 -5
- package/src/functions/resourceCapabilities.ts +55 -0
- package/src/main.ts +96 -7
- package/src/types/dataservices.ts +14 -12
- package/src/types/datasets.ts +20 -7
- package/src/types/discussions.ts +20 -0
- package/src/types/licenses.ts +3 -3
- package/src/types/organizations.ts +13 -1
- package/src/types/owned.ts +4 -2
- package/src/types/pages.ts +70 -0
- package/src/types/posts.ts +27 -0
- package/src/types/resources.ts +16 -0
- package/src/types/reuses.ts +14 -5
- package/src/types/search.ts +407 -0
- package/src/types/users.ts +12 -3
- package/dist/PdfPreview.client-COOkEkRA.js +0 -107
- package/dist/Swagger.client-CpLgaLg6.js +0 -4
- package/dist/pdf-vue3-IkJO65RH.js +0 -273
- package/dist/pdf.min-f72cfa08-CdgJTooZ.js +0 -9501
- package/src/components/DatasetInformationPanel.vue +0 -211
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<RadioGroup
|
|
3
|
+
:model-value="modelValue ?? ''"
|
|
4
|
+
:name="name"
|
|
5
|
+
:legend="label"
|
|
6
|
+
@update:model-value="emit('update:modelValue', $event === '' ? undefined : $event)"
|
|
7
|
+
>
|
|
8
|
+
<RadioInput
|
|
9
|
+
value=""
|
|
10
|
+
:count="totalCount"
|
|
11
|
+
:loading="loading"
|
|
12
|
+
>
|
|
13
|
+
{{ allLabel }}
|
|
14
|
+
</RadioInput>
|
|
15
|
+
<RadioInput
|
|
16
|
+
v-for="option in options"
|
|
17
|
+
:key="option.value"
|
|
18
|
+
:value="option.value"
|
|
19
|
+
:count="getCount(option.value)"
|
|
20
|
+
:loading="loading"
|
|
21
|
+
:highlighted="props.highlightActive && !!props.modelValue"
|
|
22
|
+
>
|
|
23
|
+
<span class="flex items-center gap-1 min-w-0 overflow-hidden">
|
|
24
|
+
<span
|
|
25
|
+
class="shrink min-w-0 truncate"
|
|
26
|
+
:title="option.description ? `${option.label} (${option.description})` : option.label"
|
|
27
|
+
>{{ option.label }}</span>
|
|
28
|
+
<span
|
|
29
|
+
v-if="option.description"
|
|
30
|
+
class="flex-1 basis-0 min-w-0 text-gray-400 text-xs truncate"
|
|
31
|
+
:title="option.description"
|
|
32
|
+
>
|
|
33
|
+
{{ option.description }}
|
|
34
|
+
</span>
|
|
35
|
+
</span>
|
|
36
|
+
</RadioInput>
|
|
37
|
+
</RadioGroup>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { computed } from 'vue'
|
|
42
|
+
import type { FacetItem } from '../../../types/search'
|
|
43
|
+
import RadioGroup from '../../RadioGroup.vue'
|
|
44
|
+
import RadioInput from '../../RadioInput.vue'
|
|
45
|
+
|
|
46
|
+
export interface FilterOption {
|
|
47
|
+
value: string
|
|
48
|
+
label: string
|
|
49
|
+
description?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const props = withDefaults(defineProps<{
|
|
53
|
+
modelValue: string | undefined
|
|
54
|
+
options: FilterOption[]
|
|
55
|
+
label: string
|
|
56
|
+
name: string
|
|
57
|
+
allLabel?: string
|
|
58
|
+
facets?: FacetItem[]
|
|
59
|
+
loading?: boolean
|
|
60
|
+
highlightActive?: boolean
|
|
61
|
+
}>(), {
|
|
62
|
+
allLabel: 'Tous',
|
|
63
|
+
loading: false,
|
|
64
|
+
highlightActive: false,
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const emit = defineEmits<{
|
|
68
|
+
'update:modelValue': [value: string | undefined]
|
|
69
|
+
}>()
|
|
70
|
+
|
|
71
|
+
function getCount(value: string): number | undefined {
|
|
72
|
+
if (!props.facets) return undefined
|
|
73
|
+
const facet = props.facets.find(f => f.name === value)
|
|
74
|
+
return facet?.count ?? 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const totalCount = computed(() => getCount('all'))
|
|
78
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FilterButtonGroup
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:options="options"
|
|
5
|
+
:label="t('Format de données')"
|
|
6
|
+
:all-label="t('Tous')"
|
|
7
|
+
:facets="facets"
|
|
8
|
+
:loading="loading"
|
|
9
|
+
name="format_family"
|
|
10
|
+
highlight-active
|
|
11
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { FacetItem } from '../../../types/search'
|
|
17
|
+
import { useTranslation } from '../../../composables/useTranslation'
|
|
18
|
+
import FilterButtonGroup from './FilterButtonGroup.vue'
|
|
19
|
+
|
|
20
|
+
defineProps<{
|
|
21
|
+
modelValue: string | undefined
|
|
22
|
+
facets?: FacetItem[]
|
|
23
|
+
loading?: boolean
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
'update:modelValue': [value: string | undefined]
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const { t } = useTranslation()
|
|
31
|
+
|
|
32
|
+
const options = [
|
|
33
|
+
{ value: 'tabular', label: t('Tabulaires'), description: 'csv, xls, xlsx, ods, parquet...' },
|
|
34
|
+
{ value: 'machine_readable', label: t('Structurées'), description: 'json, rdf, xml, sql...' },
|
|
35
|
+
{ value: 'geographical', label: t('Géographiques'), description: 'geojson, shp, kml...' },
|
|
36
|
+
{ value: 'documents', label: t('Documents'), description: 'pdf, doc, docx, md, txt, html...' },
|
|
37
|
+
{ value: 'other', label: t('Autre') },
|
|
38
|
+
]
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FilterButtonGroup
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:options="options"
|
|
5
|
+
:label="t('Date de mise à jour')"
|
|
6
|
+
:all-label="t('Toutes')"
|
|
7
|
+
:facets="facets"
|
|
8
|
+
:loading="loading"
|
|
9
|
+
name="last_update_range"
|
|
10
|
+
highlight-active
|
|
11
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { FacetItem } from '../../../types/search'
|
|
17
|
+
import { useTranslation } from '../../../composables/useTranslation'
|
|
18
|
+
import FilterButtonGroup from './FilterButtonGroup.vue'
|
|
19
|
+
|
|
20
|
+
defineProps<{
|
|
21
|
+
modelValue: string | undefined
|
|
22
|
+
facets?: FacetItem[]
|
|
23
|
+
loading?: boolean
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
'update:modelValue': [value: string | undefined]
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const { t } = useTranslation()
|
|
31
|
+
|
|
32
|
+
const options = [
|
|
33
|
+
{ value: 'last_30_days', label: t('Les 30 derniers jours') },
|
|
34
|
+
{ value: 'last_12_months', label: t('Les 12 derniers mois') },
|
|
35
|
+
{ value: 'last_3_years', label: t('Les 3 dernières années') },
|
|
36
|
+
]
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FilterButtonGroup
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:options="options"
|
|
5
|
+
:label="t(`Type d'organisation`)"
|
|
6
|
+
:all-label="t('Toutes')"
|
|
7
|
+
:facets="facets"
|
|
8
|
+
:loading="loading"
|
|
9
|
+
name="producer_type"
|
|
10
|
+
highlight-active
|
|
11
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { computed } from 'vue'
|
|
17
|
+
import type { FacetItem } from '../../../types/search'
|
|
18
|
+
import { useTranslation } from '../../../composables/useTranslation'
|
|
19
|
+
import FilterButtonGroup from './FilterButtonGroup.vue'
|
|
20
|
+
|
|
21
|
+
const props = withDefaults(defineProps<{
|
|
22
|
+
modelValue: string | undefined
|
|
23
|
+
facets?: FacetItem[]
|
|
24
|
+
loading?: boolean
|
|
25
|
+
exclude?: string[]
|
|
26
|
+
}>(), {
|
|
27
|
+
exclude: () => [],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
'update:modelValue': [value: string | undefined]
|
|
32
|
+
}>()
|
|
33
|
+
|
|
34
|
+
const { t } = useTranslation()
|
|
35
|
+
|
|
36
|
+
const allOptions = [
|
|
37
|
+
{ value: 'public-service', label: t('Service public') },
|
|
38
|
+
{ value: 'local-authority', label: t('Collectivité territoriale') },
|
|
39
|
+
{ value: 'company', label: t('Entreprise') },
|
|
40
|
+
{ value: 'association', label: t('Association') },
|
|
41
|
+
{ value: 'user', label: t('Utilisateur') },
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
const options = computed(() =>
|
|
45
|
+
props.exclude.length > 0
|
|
46
|
+
? allOptions.filter(o => !props.exclude.includes(o.value))
|
|
47
|
+
: allOptions,
|
|
48
|
+
)
|
|
49
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FilterButtonGroup
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:options="options"
|
|
5
|
+
:label="t('Type de réutilisation')"
|
|
6
|
+
:all-label="t('Tous')"
|
|
7
|
+
:facets="facets"
|
|
8
|
+
:loading="loading"
|
|
9
|
+
name="type"
|
|
10
|
+
highlight-active
|
|
11
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { FacetItem } from '../../../types/search'
|
|
17
|
+
import { useTranslation } from '../../../composables/useTranslation'
|
|
18
|
+
import FilterButtonGroup from './FilterButtonGroup.vue'
|
|
19
|
+
|
|
20
|
+
defineProps<{
|
|
21
|
+
modelValue: string | undefined
|
|
22
|
+
facets?: FacetItem[]
|
|
23
|
+
loading?: boolean
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const emit = defineEmits<{
|
|
27
|
+
'update:modelValue': [value: string | undefined]
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const { t } = useTranslation()
|
|
31
|
+
|
|
32
|
+
const options = [
|
|
33
|
+
{ value: 'visualization', label: t('Visualisation') },
|
|
34
|
+
{ value: 'application', label: t('Application') },
|
|
35
|
+
{ value: 'post', label: t('Article de blog') },
|
|
36
|
+
{ value: 'news_article', label: t('Article de presse') },
|
|
37
|
+
{ value: 'api', label: 'API' },
|
|
38
|
+
{ value: 'paper', label: t('Publication scientifique') },
|
|
39
|
+
{ value: 'idea', label: t('Idée') },
|
|
40
|
+
{ value: 'hardware', label: t('Matériel connecté') },
|
|
41
|
+
]
|
|
42
|
+
</script>
|