@datagouv/components-next 1.0.2-dev.230 → 1.0.2-dev.232
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/{ImagePreview.client-Db0MdI5N.js → ImagePreview.client-CSRz7eUF.js} +2 -2
- package/dist/{JsonPreview.client-DRCq40Q-.js → JsonPreview.client-wT2hfYLv.js} +2 -2
- package/dist/{Map-D17BKcyK.js → Map-QeL96qbQ.js} +1 -1
- package/dist/{MapContainer.client-DdPY_Iri.js → MapContainer.client-UC7wQOBj.js} +10 -10
- package/dist/{PdfPreview.client-DtKCBgGZ.js → PdfPreview.client-DifxM8Th.js} +2 -2
- package/dist/{Pmtiles.client-DSZ_4FXc.js → Pmtiles.client-OyXiX_7g.js} +2104 -2905
- package/dist/{PreviewWrapper-DegSQbMM.js → PreviewWrapper-D7yfQyyH.js} +1 -1
- package/dist/{XmlPreview.client-D9R_YF5s.js → XmlPreview.client-BkPGZLn6.js} +2 -2
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +10149 -9989
- package/dist/components.css +1 -1
- package/dist/{france-Bu5x7PSp.js → france-BNatwStf.js} +1 -1
- package/dist/purify.es-CeeOHdER.js +805 -0
- package/dist/{resources-BOKIyTJV.js → resources-kuI_FosB.js} +18 -21
- package/dist/src-C0XyM3eg.js +68979 -0
- package/dist/{vue-D62CcCib.js → vue-D5eMxsCr.js} +78 -74
- package/package.json +2 -2
- package/src/components/ResourceAccordion/EditButton.vue +1 -4
- package/src/components/ResourceAccordion/MapContainer.client.vue +18 -7
- package/src/components/ResourceAccordion/ResourceAccordion.vue +1 -6
- package/src/components/ResourceExplorer/ResourceExplorer.vue +8 -2
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +140 -90
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +17 -2
- package/src/components/ResourceExplorer/ResourceSelector.vue +3 -0
- package/src/components/ResourceExplorer/ResourceViewerHeader.vue +3 -5
- package/src/components/ResourceIconBadge.vue +28 -0
- package/src/components/ResourceListItem.vue +83 -27
- package/src/components/TabularExplorer/TabularActiveFilters.vue +94 -54
- package/src/components/TabularExplorer/TabularExplorer.vue +58 -18
- package/src/components/TabularExplorer/TabularSearchInput.vue +40 -0
- package/src/components/TabularExplorer/TabularSkeleton.vue +14 -6
- package/src/components/TabularExplorer/TabularTable.vue +12 -5
- package/src/components/TabularExplorer/TabularToolbar.vue +7 -4
- package/src/components/TabularExplorer/useTabularContext.ts +10 -0
- package/src/composables/useResourceCapabilities.ts +5 -0
- package/src/functions/resources.ts +0 -4
- package/src/main.ts +2 -0
- package/src/types/resources.ts +0 -6
- package/dist/src-DbFybTVs.js +0 -66090
|
@@ -42,7 +42,17 @@ export type TabularContext = {
|
|
|
42
42
|
filters: Ref<Record<string, ColumnFilters>>
|
|
43
43
|
activeFilters: ComputedRef<ActiveFilter[]>
|
|
44
44
|
removeFilter: (column: string) => void
|
|
45
|
+
// Also empties the global search.
|
|
45
46
|
clearAllFilters: () => void
|
|
47
|
+
|
|
48
|
+
// Global search across all columns, and whether the toolbar shows its field
|
|
49
|
+
globalSearch: Ref<string>
|
|
50
|
+
searchInput: ComputedRef<boolean>
|
|
51
|
+
// The last request was rejected after a first successful load: the controls stay,
|
|
52
|
+
// the rows are replaced by the error.
|
|
53
|
+
queryFailed: ComputedRef<boolean>
|
|
54
|
+
// CSV export of the rows matching the filters and search
|
|
55
|
+
filteredDownloadUrl: ComputedRef<string>
|
|
46
56
|
hasFilterForColumn: (col: string) => boolean
|
|
47
57
|
|
|
48
58
|
// Columns visibility
|
|
@@ -82,6 +82,10 @@ export function useResourceCapabilities(
|
|
|
82
82
|
return 'unavailable'
|
|
83
83
|
})
|
|
84
84
|
|
|
85
|
+
// Whether opening the resource shows its content (a preview or a map), not just
|
|
86
|
+
// its metadata.
|
|
87
|
+
const hasPreview = computed(() => previewKind.value !== 'unavailable' || !!hasPmtiles.value || ogcWms.value)
|
|
88
|
+
|
|
85
89
|
const tabsOptions = computed(() => {
|
|
86
90
|
const r = toValue(resource)
|
|
87
91
|
const options = []
|
|
@@ -122,6 +126,7 @@ export function useResourceCapabilities(
|
|
|
122
126
|
|
|
123
127
|
return {
|
|
124
128
|
previewKind,
|
|
129
|
+
hasPreview,
|
|
125
130
|
hasTabularData,
|
|
126
131
|
hasPmtiles,
|
|
127
132
|
hasPmtilesError,
|
|
@@ -179,10 +179,6 @@ export function getResourceExternalUrl(dataset: Dataset | DatasetV2 | Omit<Datas
|
|
|
179
179
|
return `${dataset.page}${isCommunityResource(resource) ? '/community-resources' : ''}?resource_id=${resource.id}`
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
export function isGeopfSynced(resource: Resource | CommunityResource): boolean {
|
|
183
|
-
return resource.geopf?.push_status != null || typeof resource.geopf?.offering_id === 'string'
|
|
184
|
-
}
|
|
185
|
-
|
|
186
182
|
export function resolveResourceExternalUrl<R extends Resource | CommunityResource>(
|
|
187
183
|
dataset: Dataset | DatasetV2 | Omit<Dataset, 'resources' | 'community_resources'>,
|
|
188
184
|
resource: R,
|
package/src/main.ts
CHANGED
|
@@ -109,6 +109,7 @@ import SearchableSelect from './components/Form/SearchableSelect.vue'
|
|
|
109
109
|
import SelectGroup from './components/Form/SelectGroup.vue'
|
|
110
110
|
import Listbox from './components/Form/Listbox.vue'
|
|
111
111
|
import InfiniteLoader from './components/InfiniteLoader.vue'
|
|
112
|
+
import TabularActiveFilters from './components/TabularExplorer/TabularActiveFilters.vue'
|
|
112
113
|
import TabularExplorer from './components/TabularExplorer/TabularExplorer.vue'
|
|
113
114
|
import TabularMobileFilters from './components/TabularExplorer/TabularMobileFilters.vue'
|
|
114
115
|
import TabularTable from './components/TabularExplorer/TabularTable.vue'
|
|
@@ -422,6 +423,7 @@ export {
|
|
|
422
423
|
SelectGroup,
|
|
423
424
|
Listbox,
|
|
424
425
|
InfiniteLoader,
|
|
426
|
+
TabularActiveFilters,
|
|
425
427
|
TabularExplorer,
|
|
426
428
|
TabularMobileFilters,
|
|
427
429
|
TabularTable,
|
package/src/types/resources.ts
CHANGED
|
@@ -12,11 +12,6 @@ export type FileResourceFileType = 'file'
|
|
|
12
12
|
|
|
13
13
|
export type ResourceFileType = RemoteResourceFileType | FileResourceFileType
|
|
14
14
|
|
|
15
|
-
export type GeopfResourceMetadata = {
|
|
16
|
-
push_status?: 'pending' | 'done' | 'error' | 'timeout' | null
|
|
17
|
-
offering_id?: string | null
|
|
18
|
-
}
|
|
19
|
-
|
|
20
15
|
export type Resource = {
|
|
21
16
|
id: string
|
|
22
17
|
title: string
|
|
@@ -27,7 +22,6 @@ export type Resource = {
|
|
|
27
22
|
extras: Record<string, unknown>
|
|
28
23
|
metrics: { views: number }
|
|
29
24
|
harvest: Harvest
|
|
30
|
-
geopf: GeopfResourceMetadata | null
|
|
31
25
|
filesize: number | null
|
|
32
26
|
filetype: ResourceFileType
|
|
33
27
|
format: string
|