@datagouv/components-next 1.0.2-dev.18 → 1.0.2-dev.180
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 +7 -6
- package/assets/main.css +4 -0
- package/dist/{Control-DuZJdKV_.js → Control-B9WQxlpJ.js} +1 -1
- package/dist/{Datafair.client-Ds3VQrRi.js → Datafair.client-CaxMyNif.js} +9 -9
- package/dist/{Event--kp8kMdJ.js → Event-iXDrp-fy.js} +31 -31
- package/dist/{Image-34hvypZI.js → Image-mNMBOofs.js} +9 -9
- package/dist/ImagePreview.client-CPmCyisP.js +36 -0
- package/dist/JsonPreview.client-CKOU-LBs.js +40 -0
- package/dist/{Map-BjUnLyj8.js → Map-BfqKMw0S.js} +1739 -1599
- package/dist/{MapContainer.client-B2BijMx5.js → MapContainer.client-IGYJWP5m.js} +41 -42
- package/dist/{OSM-s40W6sQ2.js → OSM-CcrUhItr.js} +15 -23
- package/dist/{PdfPreview.client-DJBMzrlC.js → PdfPreview.client-csUebU3A.js} +835 -856
- package/dist/Pmtiles.client-CLq7UHBg.js +26333 -0
- package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-DeoHZXW1.js +60 -0
- package/dist/{ScaleLine-KW-nXqp3.js → ScaleLine-VGQ7nkMS.js} +2 -2
- package/dist/{Tile-DbNFNPfU.js → Tile-CSpn0Ca8.js} +160 -163
- package/dist/{TileImage-BsXBxMtq.js → TileImage-CpbaEFwd.js} +143 -131
- package/dist/{View-BR92hTWP.js → View-BYBpt-AU.js} +483 -422
- package/dist/XmlPreview.client-C1toAbQ0.js +34 -0
- package/dist/{common-PJfpC179.js → common-BoeTUnDZ.js} +52 -52
- package/dist/components-next.css +1 -52
- package/dist/components-next.js +193 -149
- package/dist/components.css +2 -2
- package/dist/{index-BFQX7Ccz.js → index-CaUlhl3k.js} +21842 -15810
- package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-ByYGrf8H.js} +185 -187
- package/dist/{main-vqhkVhVS.js → main-DD4ieUAo.js} +41500 -73223
- package/dist/{proj-DsetBcW7.js → proj-DxGbobp7.js} +662 -626
- package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
- package/dist/{tilecoord-Db24Px13.js → tilecoord-DvX7WWiA.js} +273 -264
- package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
- package/dist/{vue3-xml-viewer.common-BcNJo35o.js → vue3-xml-viewer.common-B1KPK4L4.js} +16 -16
- package/package.json +47 -38
- package/src/chart.ts +5 -0
- package/src/components/ActivityList/ActivityList.vue +3 -2
- package/src/components/AppLink.vue +3 -0
- package/src/components/BannerAction.vue +6 -2
- package/src/components/Chart/ChartViewer.vue +320 -0
- package/src/components/Chart/ChartViewerWrapper.vue +182 -0
- package/src/components/CopyButton.vue +6 -2
- package/src/components/DataserviceCard.vue +9 -0
- package/src/components/DataserviceQuality.vue +82 -0
- package/src/components/DataserviceQualityInline.vue +31 -0
- package/src/components/DataserviceQualityTooltipContent.vue +79 -0
- package/src/components/DatasetCard.vue +9 -4
- package/src/components/DatasetQuality.vue +11 -11
- package/src/components/DatasetQualityInline.vue +2 -2
- package/src/components/DatasetQualityTooltipContent.vue +1 -1
- package/src/components/Form/Listbox.vue +101 -0
- package/src/components/Form/SchemaSelect.vue +2 -0
- package/src/components/InfiniteLoader.vue +53 -0
- package/src/components/ObjectCardHeader.vue +11 -4
- package/src/components/OpenApiViewer/ContentTypeSelect.vue +48 -0
- package/src/components/OpenApiViewer/EndpointRequest.vue +164 -0
- package/src/components/OpenApiViewer/EndpointResponses.vue +149 -0
- package/src/components/OpenApiViewer/OpenApiViewer.vue +308 -0
- package/src/components/OpenApiViewer/SchemaPanel.vue +53 -0
- package/src/components/OpenApiViewer/SchemaTree.vue +77 -0
- package/src/components/OpenApiViewer/openapi.ts +150 -0
- package/src/components/OrganizationNameWithCertificate.vue +3 -2
- package/src/components/Pagination.vue +8 -5
- package/src/components/RadioInput.vue +7 -2
- package/src/components/ResourceAccordion/DataStructure.vue +11 -33
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/Downloads.vue +160 -0
- package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
- package/src/components/ResourceAccordion/JsonPreview.client.vue +23 -104
- package/src/components/ResourceAccordion/MapContainer.client.vue +2 -11
- package/src/components/ResourceAccordion/Metadata.vue +1 -2
- package/src/components/ResourceAccordion/PdfPreview.client.vue +58 -97
- package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
- package/src/components/ResourceAccordion/Pmtiles.client.vue +28 -13
- package/src/components/ResourceAccordion/Preview.vue +11 -11
- package/src/components/ResourceAccordion/PreviewWrapper.vue +89 -0
- package/src/components/ResourceAccordion/ResourceAccordion.vue +23 -114
- package/src/components/ResourceAccordion/XmlPreview.client.vue +16 -98
- package/src/components/ResourceExplorer/ResourceExplorer.vue +102 -210
- package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +74 -0
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +103 -71
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +143 -291
- package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
- package/src/components/ResourceExplorer/ResourceSelector.vue +51 -0
- package/src/components/ResourceExplorer/ResourceViewerHeader.vue +115 -0
- package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +94 -0
- package/src/components/ResourceListItem.vue +154 -0
- package/src/components/ReuseCard.vue +14 -6
- package/src/components/ReuseDetails.vue +2 -2
- package/src/components/ReuseHorizontalCard.vue +2 -2
- package/src/components/SchemaCard.vue +10 -1
- package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
- package/src/components/Search/GlobalSearch.vue +219 -117
- package/src/components/Search/SearchInput.vue +5 -4
- package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
- package/src/components/TabularExplorer/TabularCell.vue +50 -0
- package/src/components/TabularExplorer/TabularCellPopover.vue +170 -0
- package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
- package/src/components/TabularExplorer/TabularExplorer.vue +299 -0
- package/src/components/TabularExplorer/TabularFilterContent.vue +362 -0
- package/src/components/TabularExplorer/TabularFilterPopover.vue +106 -0
- package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
- package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
- package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
- package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
- package/src/components/TabularExplorer/TabularTable.vue +481 -0
- package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
- package/src/components/TabularExplorer/types.ts +81 -0
- package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
- package/src/components/TabularExplorer/useTabularContext.ts +82 -0
- package/src/composables/useActiveDescendant.ts +5 -0
- package/src/composables/useDatasetResources.ts +164 -0
- package/src/composables/useHasTabularData.ts +15 -1
- package/src/composables/useMetrics.ts +1 -1
- package/src/composables/useResizable.ts +46 -0
- package/src/composables/useResourceCapabilities.ts +47 -21
- package/src/composables/useSearchFilter.ts +120 -0
- package/src/composables/useStableQueryParams.ts +38 -6
- package/src/composables/useTabularProfile.ts +70 -0
- package/src/config.ts +21 -3
- package/src/functions/activities.ts +3 -3
- package/src/functions/api.ts +20 -42
- package/src/functions/api.types.ts +1 -0
- package/src/functions/charts.ts +99 -0
- package/src/functions/datasets.ts +0 -17
- package/src/functions/dates.ts +3 -2
- package/src/functions/metrics.ts +6 -4
- package/src/functions/resources.ts +136 -1
- package/src/functions/schemas.ts +27 -0
- package/src/functions/tabular.ts +214 -0
- package/src/functions/tabularApi.ts +96 -11
- package/src/main.ts +117 -14
- package/src/types/dataservices.ts +17 -0
- package/src/types/organizations.ts +10 -0
- package/src/types/pages.ts +0 -5
- package/src/types/posts.ts +2 -2
- package/src/types/reports.ts +5 -1
- package/src/types/resources.ts +0 -1
- package/src/types/reuses.ts +12 -1
- package/src/types/search.ts +63 -1
- package/src/types/site.ts +5 -3
- package/src/types/ui.ts +2 -0
- package/src/types/users.ts +2 -1
- package/src/types/visualizations.ts +93 -0
- package/assets/swagger-themes/newspaper.css +0 -1670
- package/dist/JsonPreview.client-CYxmz0yV.js +0 -72
- package/dist/Pmtiles.client-C_hvRDuy.js +0 -25185
- package/dist/Swagger.client-B4y0hXME.js +0 -4
- package/dist/XmlPreview.client-LETEfNBH.js +0 -64
- package/src/components/ResourceAccordion/Swagger.client.vue +0 -48
- package/src/functions/pagination.ts +0 -9
- /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
- /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
- /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
package/src/main.ts
CHANGED
|
@@ -13,9 +13,9 @@ import type { License } from './types/licenses'
|
|
|
13
13
|
import type { Member, MemberRole, NewOrganization, Organization, OrganizationOrSuggest, OrganizationReference, OrganizationSuggest } from './types/organizations'
|
|
14
14
|
import type { Owned, OwnedWithFullObject, OwnedWithId } from './types/owned'
|
|
15
15
|
import type { Comment, Thread } from './types/discussions'
|
|
16
|
-
import type {
|
|
16
|
+
import type { PageBloc, ContentBloc, BlocWithTitle, DatasetsListBloc, DataservicesListBloc, ReusesListBloc, LinkInBloc, LinksListBloc, MarkdownBloc, AccordionItemBloc, AccordionListBloc, HeroBloc } from './types/pages'
|
|
17
17
|
import type { Post } from './types/posts'
|
|
18
|
-
import type { ReuseReference, NewReuse, Reuse, ReuseTopic, ReuseType } from './types/reuses'
|
|
18
|
+
import type { ReuseReference, NewReuse, Reuse, ReuseV2, ReuseTopic, ReuseType } from './types/reuses'
|
|
19
19
|
import type { RegisteredSchema, Schema, SchemaDetails, SchemaField, SchemaPath, SchemaPublicationMode, SchemaResponseData, SchemaVersion, ValidataError } from './types/schemas'
|
|
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'
|
|
@@ -23,8 +23,12 @@ import type { Site } from './types/site'
|
|
|
23
23
|
import type { 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
|
-
import type {
|
|
27
|
-
import {
|
|
26
|
+
import type { Chart, ChartForm, ChartForApi, FilterCondition, Filter, AndFilters, GenericFilter, XAxisType, XAxisSortBy, SortDirection, XAxis, XAxisForm, UnitPosition, YAxis, DataSeriesType, DataSeries, DataSeriesForm, CombinedSort, ColumnDefinition, ColumnsDefinition } from './types/visualizations'
|
|
27
|
+
import type { ColumnFilters, ColumnType, TabularRow } from './components/TabularExplorer/types'
|
|
28
|
+
import type { GlobalSearchConfig, SearchType, SearchTypeConfig, SortOption, HiddenFilter, BuiltInFilterKey, DatasetSearchConfig, DatasetSearchFilters, DataserviceSearchConfig, DataserviceSearchFilters, ReuseSearchConfig, ReuseSearchFilters, OrganizationSearchConfig, OrganizationSearchFilters, TopicSearchConfig, TopicSearchFilters } from './types/search'
|
|
29
|
+
import { getDefaultDatasetConfig, getDefaultDataserviceConfig, getDefaultReuseConfig, getDefaultOrganizationConfig, getDefaultTopicConfig, getDefaultGlobalSearchConfig, defaultDatasetSortOptions, defaultDataserviceSortOptions, defaultReuseSortOptions, defaultOrganizationSortOptions } from './types/search'
|
|
30
|
+
import { useSearchFilter } from './composables/useSearchFilter'
|
|
31
|
+
import type { UseSearchFilterOptions } from './composables/useSearchFilter'
|
|
28
32
|
|
|
29
33
|
import ActivityList from './components/ActivityList/ActivityList.vue'
|
|
30
34
|
import UserActivityList from './components/ActivityList/UserActivityList.vue'
|
|
@@ -36,7 +40,13 @@ import BannerAction from './components/BannerAction.vue'
|
|
|
36
40
|
import BrandedButton from './components/BrandedButton.vue'
|
|
37
41
|
import CopyButton from './components/CopyButton.vue'
|
|
38
42
|
import DataserviceCard from './components/DataserviceCard.vue'
|
|
43
|
+
import DataserviceQuality from './components/DataserviceQuality.vue'
|
|
44
|
+
import DataserviceQualityInline from './components/DataserviceQualityInline.vue'
|
|
45
|
+
import DataserviceQualityTooltipContent from './components/DataserviceQualityTooltipContent.vue'
|
|
39
46
|
import DatasetCard from './components/DatasetCard.vue'
|
|
47
|
+
import DataStructure from './components/ResourceAccordion/DataStructure.vue'
|
|
48
|
+
import Downloads from './components/ResourceAccordion/Downloads.vue'
|
|
49
|
+
import Metadata from './components/ResourceAccordion/Metadata.vue'
|
|
40
50
|
import DescriptionListTerm from './components/DescriptionListTerm.vue'
|
|
41
51
|
import DescriptionListDetails from './components/DescriptionListDetails.vue'
|
|
42
52
|
import DiscussionMessageCard from './components/DiscussionMessageCard.vue'
|
|
@@ -47,8 +57,8 @@ import LicenseBadge from './components/LicenseBadge.vue'
|
|
|
47
57
|
import Tag from './components/Tag.vue'
|
|
48
58
|
import DatasetQuality from './components/DatasetQuality.vue'
|
|
49
59
|
import DatasetQualityInline from './components/DatasetQualityInline.vue'
|
|
50
|
-
import
|
|
51
|
-
import
|
|
60
|
+
import QualityItem from './components/QualityItem.vue'
|
|
61
|
+
import QualityScore from './components/QualityScore.vue'
|
|
52
62
|
import ProgressBar from './components/ProgressBar.vue'
|
|
53
63
|
import DatasetQualityTooltipContent from './components/DatasetQualityTooltipContent.vue'
|
|
54
64
|
import ExtraAccordion from './components/ExtraAccordion.vue'
|
|
@@ -57,6 +67,7 @@ import LoadingBlock from './components/LoadingBlock.vue'
|
|
|
57
67
|
import MarkdownViewer from './components/MarkdownViewer.vue'
|
|
58
68
|
import OrganizationCard from './components/OrganizationCard.vue'
|
|
59
69
|
import OrganizationHorizontalCard from './components/OrganizationHorizontalCard.vue'
|
|
70
|
+
import ObjectCardOwner from './components/ObjectCardOwner.vue'
|
|
60
71
|
import OrganizationLogo from './components/OrganizationLogo.vue'
|
|
61
72
|
import OrganizationNameWithCertificate from './components/OrganizationNameWithCertificate.vue'
|
|
62
73
|
import OwnerType from './components/OwnerType.vue'
|
|
@@ -70,16 +81,16 @@ import PostCard from './components/PostCard.vue'
|
|
|
70
81
|
import ReadMore from './components/ReadMore.vue'
|
|
71
82
|
import ResourceAccordion from './components/ResourceAccordion/ResourceAccordion.vue'
|
|
72
83
|
import ResourceIcon from './components/ResourceAccordion/ResourceIcon.vue'
|
|
84
|
+
import ResourceSelector from './components/ResourceExplorer/ResourceSelector.vue'
|
|
73
85
|
import ResourceExplorer from './components/ResourceExplorer/ResourceExplorer.vue'
|
|
74
86
|
import ResourceExplorerSidebar from './components/ResourceExplorer/ResourceExplorerSidebar.vue'
|
|
75
87
|
import ResourceExplorerViewer from './components/ResourceExplorer/ResourceExplorerViewer.vue'
|
|
76
|
-
import
|
|
88
|
+
import OpenApiViewer from './components/OpenApiViewer/OpenApiViewer.vue'
|
|
77
89
|
import ReuseCard from './components/ReuseCard.vue'
|
|
78
90
|
import ReuseHorizontalCard from './components/ReuseHorizontalCard.vue'
|
|
79
91
|
import ReuseDetails from './components/ReuseDetails.vue'
|
|
80
92
|
import SchemaCard from './components/SchemaCard.vue'
|
|
81
93
|
import SimpleBanner from './components/SimpleBanner.vue'
|
|
82
|
-
import SmallChart from './components/SmallChart.vue'
|
|
83
94
|
import StatBox from './components/StatBox.vue'
|
|
84
95
|
import Tab from './components/Tabs/Tab.vue'
|
|
85
96
|
import TabGroup from './components/Tabs/TabGroup.vue'
|
|
@@ -94,16 +105,29 @@ import GlobalSearch from './components/Search/GlobalSearch.vue'
|
|
|
94
105
|
import SearchInput from './components/Search/SearchInput.vue'
|
|
95
106
|
import SearchableSelect from './components/Form/SearchableSelect.vue'
|
|
96
107
|
import SelectGroup from './components/Form/SelectGroup.vue'
|
|
108
|
+
import Listbox from './components/Form/Listbox.vue'
|
|
109
|
+
import InfiniteLoader from './components/InfiniteLoader.vue'
|
|
110
|
+
import TabularExplorer from './components/TabularExplorer/TabularExplorer.vue'
|
|
111
|
+
import TabularMobileFilters from './components/TabularExplorer/TabularMobileFilters.vue'
|
|
112
|
+
import TabularTable from './components/TabularExplorer/TabularTable.vue'
|
|
113
|
+
import TabularToolbar from './components/TabularExplorer/TabularToolbar.vue'
|
|
97
114
|
import type { UseFetchFunction } from './functions/api.types'
|
|
98
115
|
import { configKey, useComponentsConfig, type PluginConfig } from './config.js'
|
|
116
|
+
import { ofetch } from 'ofetch'
|
|
117
|
+
import { useTranslation } from './composables/useTranslation'
|
|
99
118
|
|
|
100
119
|
export { Toaster, toast } from 'vue-sonner'
|
|
101
120
|
|
|
102
121
|
export * from './composables/useActiveDescendant'
|
|
122
|
+
export * from './composables/useDebouncedRef'
|
|
103
123
|
export * from './composables/useMetrics'
|
|
104
124
|
export * from './composables/useReuseType'
|
|
105
125
|
export * from './composables/useTranslation'
|
|
106
126
|
export * from './composables/useHasTabularData'
|
|
127
|
+
export * from './composables/useResourceCapabilities'
|
|
128
|
+
export * from './composables/useTabularProfile'
|
|
129
|
+
export * from './composables/useDatasetResources'
|
|
130
|
+
export * from './composables/useResizable'
|
|
107
131
|
|
|
108
132
|
export * from './functions/activities'
|
|
109
133
|
export * from './functions/datasets'
|
|
@@ -116,17 +140,33 @@ export * from './functions/metrics'
|
|
|
116
140
|
export * from './functions/never'
|
|
117
141
|
export * from './functions/organizations'
|
|
118
142
|
export * from './functions/owned'
|
|
119
|
-
export * from './functions/pagination'
|
|
120
143
|
export * from './functions/resources'
|
|
121
144
|
export * from './functions/reuses'
|
|
122
145
|
export * from './functions/schemas'
|
|
146
|
+
export * from './functions/tabular'
|
|
123
147
|
export * from './functions/users'
|
|
148
|
+
export * from './functions/tabularApi'
|
|
149
|
+
export * from './functions/charts'
|
|
124
150
|
export * from './types/access_types'
|
|
125
151
|
|
|
126
152
|
export type {
|
|
127
153
|
GlobalSearchConfig,
|
|
128
154
|
SearchType,
|
|
155
|
+
SearchTypeConfig,
|
|
129
156
|
SortOption,
|
|
157
|
+
HiddenFilter,
|
|
158
|
+
BuiltInFilterKey,
|
|
159
|
+
DatasetSearchConfig,
|
|
160
|
+
DatasetSearchFilters,
|
|
161
|
+
DataserviceSearchConfig,
|
|
162
|
+
DataserviceSearchFilters,
|
|
163
|
+
ReuseSearchConfig,
|
|
164
|
+
ReuseSearchFilters,
|
|
165
|
+
OrganizationSearchConfig,
|
|
166
|
+
OrganizationSearchFilters,
|
|
167
|
+
TopicSearchConfig,
|
|
168
|
+
TopicSearchFilters,
|
|
169
|
+
UseSearchFilterOptions,
|
|
130
170
|
UseFetchFunction,
|
|
131
171
|
AccessType,
|
|
132
172
|
AccessAudience,
|
|
@@ -168,7 +208,6 @@ export type {
|
|
|
168
208
|
Owned,
|
|
169
209
|
OwnedWithFullObject,
|
|
170
210
|
OwnedWithId,
|
|
171
|
-
Page,
|
|
172
211
|
PageBloc,
|
|
173
212
|
ContentBloc,
|
|
174
213
|
BlocWithTitle,
|
|
@@ -197,6 +236,7 @@ export type {
|
|
|
197
236
|
ResourceType,
|
|
198
237
|
ReuseReference,
|
|
199
238
|
Reuse,
|
|
239
|
+
ReuseV2,
|
|
200
240
|
ReuseTopic,
|
|
201
241
|
ReuseType,
|
|
202
242
|
Schema,
|
|
@@ -218,6 +258,29 @@ export type {
|
|
|
218
258
|
ValidataError,
|
|
219
259
|
Weight,
|
|
220
260
|
WellType,
|
|
261
|
+
Chart,
|
|
262
|
+
ChartForm,
|
|
263
|
+
ChartForApi,
|
|
264
|
+
CombinedSort,
|
|
265
|
+
ColumnDefinition,
|
|
266
|
+
ColumnFilters,
|
|
267
|
+
ColumnType,
|
|
268
|
+
ColumnsDefinition,
|
|
269
|
+
TabularRow,
|
|
270
|
+
FilterCondition,
|
|
271
|
+
Filter,
|
|
272
|
+
AndFilters,
|
|
273
|
+
GenericFilter,
|
|
274
|
+
XAxisType,
|
|
275
|
+
XAxisSortBy,
|
|
276
|
+
SortDirection,
|
|
277
|
+
XAxis,
|
|
278
|
+
XAxisForm,
|
|
279
|
+
UnitPosition,
|
|
280
|
+
YAxis,
|
|
281
|
+
DataSeriesType,
|
|
282
|
+
DataSeries,
|
|
283
|
+
DataSeriesForm,
|
|
221
284
|
}
|
|
222
285
|
|
|
223
286
|
export {
|
|
@@ -225,16 +288,43 @@ export {
|
|
|
225
288
|
getDefaultDataserviceConfig,
|
|
226
289
|
getDefaultReuseConfig,
|
|
227
290
|
getDefaultOrganizationConfig,
|
|
291
|
+
getDefaultTopicConfig,
|
|
228
292
|
getDefaultGlobalSearchConfig,
|
|
229
293
|
defaultDatasetSortOptions,
|
|
230
294
|
defaultDataserviceSortOptions,
|
|
231
295
|
defaultReuseSortOptions,
|
|
232
296
|
defaultOrganizationSortOptions,
|
|
297
|
+
useSearchFilter,
|
|
233
298
|
}
|
|
234
299
|
|
|
235
300
|
// Vue Plugin
|
|
236
301
|
const datagouv: Plugin<PluginConfig> = {
|
|
237
302
|
async install(app: App, options) {
|
|
303
|
+
// Default `$fetch` to an ofetch instance carrying the datagouv API specifics + the consumer's
|
|
304
|
+
// auth hooks, so everything downstream (the default `useFetch`, imperative helpers) can rely on
|
|
305
|
+
// a single configured fetch. A consumer that provides its own `$fetch` keeps full control.
|
|
306
|
+
if (!options.$fetch) {
|
|
307
|
+
options.$fetch = ofetch.create({
|
|
308
|
+
baseURL: options.apiBase,
|
|
309
|
+
onRequest(context) {
|
|
310
|
+
if (options.onRequest) {
|
|
311
|
+
if (Array.isArray(options.onRequest)) options.onRequest.forEach(hook => hook(context))
|
|
312
|
+
else options.onRequest(context)
|
|
313
|
+
}
|
|
314
|
+
context.options.headers.set('Content-Type', 'application/json')
|
|
315
|
+
context.options.headers.set('Accept', 'application/json')
|
|
316
|
+
if (options.devApiKey) context.options.headers.set('X-API-KEY', options.devApiKey)
|
|
317
|
+
const { locale } = useTranslation()
|
|
318
|
+
if (locale) {
|
|
319
|
+
context.options.params ??= {}
|
|
320
|
+
context.options.params['lang'] = locale
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
onRequestError: options.onRequestError,
|
|
324
|
+
onResponse: options.onResponse,
|
|
325
|
+
onResponseError: options.onResponseError,
|
|
326
|
+
})
|
|
327
|
+
}
|
|
238
328
|
app.provide(configKey, options)
|
|
239
329
|
if (!options.textClamp) {
|
|
240
330
|
const textClamp = await import('vue3-text-clamp')
|
|
@@ -255,7 +345,13 @@ export {
|
|
|
255
345
|
BrandedButton,
|
|
256
346
|
CopyButton,
|
|
257
347
|
DataserviceCard,
|
|
348
|
+
DataserviceQuality,
|
|
349
|
+
DataserviceQualityInline,
|
|
350
|
+
DataserviceQualityTooltipContent,
|
|
258
351
|
DatasetCard,
|
|
352
|
+
DataStructure,
|
|
353
|
+
Downloads,
|
|
354
|
+
Metadata,
|
|
259
355
|
DatasetInformationSection,
|
|
260
356
|
DatasetTemporalitySection,
|
|
261
357
|
DatasetSpatialSection,
|
|
@@ -266,8 +362,8 @@ export {
|
|
|
266
362
|
DiscussionMessageCard,
|
|
267
363
|
DatasetQuality,
|
|
268
364
|
DatasetQualityInline,
|
|
269
|
-
|
|
270
|
-
|
|
365
|
+
QualityItem,
|
|
366
|
+
QualityScore,
|
|
271
367
|
DatasetQualityTooltipContent,
|
|
272
368
|
DateRangeDetails,
|
|
273
369
|
ExtraAccordion,
|
|
@@ -295,15 +391,16 @@ export {
|
|
|
295
391
|
ResourceExplorer,
|
|
296
392
|
ResourceExplorerSidebar,
|
|
297
393
|
ResourceExplorerViewer,
|
|
394
|
+
ObjectCardOwner,
|
|
298
395
|
ResourceIcon,
|
|
396
|
+
ResourceSelector,
|
|
299
397
|
ReuseCard,
|
|
300
398
|
ReuseDetails,
|
|
301
399
|
ReuseHorizontalCard,
|
|
302
400
|
SchemaCard,
|
|
303
401
|
SimpleBanner,
|
|
304
|
-
SmallChart,
|
|
305
402
|
StatBox,
|
|
306
|
-
|
|
403
|
+
OpenApiViewer,
|
|
307
404
|
Tab,
|
|
308
405
|
TabGroup,
|
|
309
406
|
TabList,
|
|
@@ -318,4 +415,10 @@ export {
|
|
|
318
415
|
SearchInput,
|
|
319
416
|
SearchableSelect,
|
|
320
417
|
SelectGroup,
|
|
418
|
+
Listbox,
|
|
419
|
+
InfiniteLoader,
|
|
420
|
+
TabularExplorer,
|
|
421
|
+
TabularMobileFilters,
|
|
422
|
+
TabularTable,
|
|
423
|
+
TabularToolbar,
|
|
321
424
|
}
|
|
@@ -24,12 +24,27 @@ export type BaseDataservice = Owned & WithAccessType & {
|
|
|
24
24
|
license: string | null
|
|
25
25
|
private: boolean
|
|
26
26
|
rate_limiting: string
|
|
27
|
+
rate_limiting_url: string | null
|
|
27
28
|
title: DataserviceReference['title']
|
|
28
29
|
contact_points: Array<ContactPoint>
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export type NewDataservice = Omit<BaseDataservice, keyof OwnedWithId> & OwnedWithId
|
|
32
33
|
|
|
34
|
+
export type DataserviceQuality = {
|
|
35
|
+
has_description: boolean
|
|
36
|
+
has_machine_documentation: boolean
|
|
37
|
+
has_technical_documentation: boolean
|
|
38
|
+
has_business_documentation: boolean
|
|
39
|
+
license: boolean
|
|
40
|
+
has_contact_point: boolean
|
|
41
|
+
has_base_api_url: boolean
|
|
42
|
+
availability_documented: boolean
|
|
43
|
+
rate_limiting_documented: boolean
|
|
44
|
+
access_conditions_clear: boolean
|
|
45
|
+
score: number
|
|
46
|
+
}
|
|
47
|
+
|
|
33
48
|
export type Dataservice = Owned & WithAccessType & {
|
|
34
49
|
acronym: string
|
|
35
50
|
archived_at: string | null
|
|
@@ -65,9 +80,11 @@ export type Dataservice = Owned & WithAccessType & {
|
|
|
65
80
|
permissions: { edit: boolean, delete: boolean }
|
|
66
81
|
private: boolean
|
|
67
82
|
rate_limiting: string
|
|
83
|
+
rate_limiting_url: string | null
|
|
68
84
|
self_api_url: DataserviceReference['self_api_url']
|
|
69
85
|
self_web_url: DataserviceReference['self_web_url']
|
|
70
86
|
slug: string
|
|
71
87
|
tags: Array<string>
|
|
72
88
|
title: string
|
|
89
|
+
quality?: DataserviceQuality
|
|
73
90
|
}
|
|
@@ -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
|
}
|
package/src/types/pages.ts
CHANGED
|
@@ -2,11 +2,6 @@ import type { DatasetV2 } from './datasets'
|
|
|
2
2
|
import type { Dataservice } from './dataservices'
|
|
3
3
|
import type { Reuse } from './reuses'
|
|
4
4
|
|
|
5
|
-
export type Page = {
|
|
6
|
-
id: string
|
|
7
|
-
blocs: Array<PageBloc>
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
export type BlocWithTitle = {
|
|
11
6
|
title: string
|
|
12
7
|
subtitle: string | null
|
package/src/types/posts.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Dataset } from './datasets'
|
|
2
|
-
import type {
|
|
2
|
+
import type { PageBloc } from './pages'
|
|
3
3
|
import type { Reuse } from './reuses'
|
|
4
4
|
import type { User } from './users'
|
|
5
5
|
|
|
6
6
|
export type Post = {
|
|
7
7
|
body_type: 'markdown' | 'html' | 'blocs'
|
|
8
|
+
blocs: Array<PageBloc>
|
|
8
9
|
content: string
|
|
9
|
-
content_as_page: Page | null
|
|
10
10
|
created_at: string
|
|
11
11
|
credit_to: string
|
|
12
12
|
credit_url: string
|
package/src/types/reports.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { User } from './users'
|
|
2
2
|
|
|
3
3
|
export type ReportSubject = {
|
|
4
|
-
class: 'Discussion' | 'Dataservice' | 'Dataset' | 'Organization' | 'Reuse'
|
|
4
|
+
class: 'Discussion' | 'Dataservice' | 'Dataset' | 'Organization' | 'Reuse' | 'User'
|
|
5
5
|
id: string
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -16,11 +16,15 @@ export type Report = {
|
|
|
16
16
|
id: string
|
|
17
17
|
by: User | null
|
|
18
18
|
subject: ReportSubject | null
|
|
19
|
+
subject_embed_id: string | null
|
|
19
20
|
reason: ReportReasonValue
|
|
20
21
|
message: string
|
|
21
22
|
reported_at: string
|
|
22
23
|
self_api_url: string
|
|
23
24
|
subject_deleted_at: string | null
|
|
25
|
+
subject_deleted_by: User | null
|
|
26
|
+
subject_label: string | null
|
|
24
27
|
dismissed_at: string | null
|
|
25
28
|
dismissed_by: User | null
|
|
29
|
+
callbacks_count: number
|
|
26
30
|
}
|
package/src/types/resources.ts
CHANGED
package/src/types/reuses.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Owned, OwnedWithId } from './owned'
|
|
2
|
-
import type { Dataset } from './datasets'
|
|
2
|
+
import type { Dataset, Rel } from './datasets'
|
|
3
3
|
import type { Badges } from './badges'
|
|
4
4
|
import type { Dataservice } from './dataservices'
|
|
5
5
|
|
|
@@ -51,6 +51,17 @@ export type Reuse = BaseReuse & {
|
|
|
51
51
|
permissions: { edit: boolean, delete: boolean }
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Lightweight reuse returned by the listing endpoints (`/api/2/reuses/` and
|
|
56
|
+
* `/api/2/reuses/search/`): the `datasets` and `dataservices` reference lists
|
|
57
|
+
* are replaced by links to their respective listing endpoints filtered on this
|
|
58
|
+
* reuse, so that listing reuses does not dereference every linked dataset.
|
|
59
|
+
*/
|
|
60
|
+
export type ReuseV2 = Owned & Omit<Reuse, 'datasets' | 'dataservices'> & {
|
|
61
|
+
datasets: Rel
|
|
62
|
+
dataservices: Rel
|
|
63
|
+
}
|
|
64
|
+
|
|
54
65
|
export type ReuseType = {
|
|
55
66
|
id: string
|
|
56
67
|
label: string
|
package/src/types/search.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import type { Component } from 'vue'
|
|
1
2
|
import type { PaginatedArray } from './api'
|
|
2
3
|
import type { AccessType } from './access_types'
|
|
4
|
+
import type { Dataset } from './datasets'
|
|
5
|
+
import type { Dataservice } from './dataservices'
|
|
6
|
+
import type { Organization } from './organizations'
|
|
7
|
+
import type { ReuseV2 } from './reuses'
|
|
8
|
+
import type { TopicV2 } from './topics'
|
|
3
9
|
import type {
|
|
4
10
|
CERTIFIED,
|
|
5
11
|
PUBLIC_SERVICE,
|
|
@@ -291,46 +297,86 @@ export type SortOption<Sort extends string> = {
|
|
|
291
297
|
|
|
292
298
|
export type DatasetSearchConfig = {
|
|
293
299
|
class: 'datasets'
|
|
300
|
+
key?: string
|
|
294
301
|
name?: string
|
|
302
|
+
icon?: Component | string
|
|
303
|
+
placeholder?: string | null
|
|
295
304
|
hiddenFilters?: HiddenFilter<DatasetSearchFilters>[]
|
|
296
305
|
basicFilters?: (keyof DatasetSearchFilters)[]
|
|
297
306
|
advancedFilters?: (keyof DatasetSearchFilters)[]
|
|
298
307
|
sortOptions?: SortOption<DatasetSearchSort>[]
|
|
308
|
+
defaultSort?: DatasetSearchSort
|
|
299
309
|
}
|
|
300
310
|
|
|
301
311
|
export type DataserviceSearchConfig = {
|
|
302
312
|
class: 'dataservices'
|
|
313
|
+
key?: string
|
|
303
314
|
name?: string
|
|
315
|
+
icon?: Component | string
|
|
316
|
+
placeholder?: string | null
|
|
304
317
|
hiddenFilters?: HiddenFilter<DataserviceSearchFilters>[]
|
|
305
318
|
basicFilters?: (keyof DataserviceSearchFilters)[]
|
|
306
319
|
advancedFilters?: (keyof DataserviceSearchFilters)[]
|
|
307
320
|
sortOptions?: SortOption<DataserviceSearchSort>[]
|
|
321
|
+
defaultSort?: DataserviceSearchSort
|
|
308
322
|
}
|
|
309
323
|
|
|
310
324
|
export type ReuseSearchConfig = {
|
|
311
325
|
class: 'reuses'
|
|
326
|
+
key?: string
|
|
312
327
|
name?: string
|
|
328
|
+
icon?: Component | string
|
|
329
|
+
placeholder?: string | null
|
|
313
330
|
hiddenFilters?: HiddenFilter<ReuseSearchFilters>[]
|
|
314
331
|
basicFilters?: (keyof ReuseSearchFilters)[]
|
|
315
332
|
advancedFilters?: (keyof ReuseSearchFilters)[]
|
|
316
333
|
sortOptions?: SortOption<ReuseSearchSort>[]
|
|
334
|
+
defaultSort?: ReuseSearchSort
|
|
317
335
|
}
|
|
318
336
|
|
|
319
337
|
export type OrganizationSearchConfig = {
|
|
320
338
|
class: 'organizations'
|
|
339
|
+
key?: string
|
|
321
340
|
name?: string
|
|
341
|
+
icon?: Component | string
|
|
342
|
+
placeholder?: string | null
|
|
322
343
|
hiddenFilters?: HiddenFilter<OrganizationSearchFilters>[]
|
|
323
344
|
basicFilters?: (keyof OrganizationSearchFilters)[]
|
|
324
345
|
advancedFilters?: (keyof OrganizationSearchFilters)[]
|
|
325
346
|
sortOptions?: SortOption<OrganizationSearchSort>[]
|
|
347
|
+
defaultSort?: OrganizationSearchSort
|
|
326
348
|
}
|
|
327
349
|
|
|
328
|
-
export type
|
|
350
|
+
export type TopicSearchConfig = {
|
|
351
|
+
class: 'topics'
|
|
352
|
+
key?: string
|
|
353
|
+
name?: string
|
|
354
|
+
icon?: Component | string
|
|
355
|
+
placeholder?: string | null
|
|
356
|
+
hiddenFilters?: HiddenFilter<TopicSearchFilters>[]
|
|
357
|
+
basicFilters?: (keyof TopicSearchFilters)[]
|
|
358
|
+
advancedFilters?: (keyof TopicSearchFilters)[]
|
|
359
|
+
sortOptions?: SortOption<TopicSearchSort>[]
|
|
360
|
+
defaultSort?: TopicSearchSort
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export type SearchTypeConfig = DatasetSearchConfig | DataserviceSearchConfig | ReuseSearchConfig | OrganizationSearchConfig | TopicSearchConfig
|
|
364
|
+
|
|
365
|
+
export type BuiltInFilterKey = keyof DatasetSearchFilters | keyof DataserviceSearchFilters | keyof ReuseSearchFilters | keyof OrganizationSearchFilters | keyof TopicSearchFilters
|
|
329
366
|
|
|
330
367
|
export type SearchType = SearchTypeConfig['class']
|
|
331
368
|
|
|
332
369
|
export type GlobalSearchConfig = SearchTypeConfig[]
|
|
333
370
|
|
|
371
|
+
// Maps each search class to its concrete response shape.
|
|
372
|
+
export type SearchResponseByClass = {
|
|
373
|
+
datasets: DatasetSearchResponse<Dataset>
|
|
374
|
+
dataservices: DataserviceSearchResponse<Dataservice>
|
|
375
|
+
reuses: ReuseSearchResponse<ReuseV2>
|
|
376
|
+
organizations: OrganizationSearchResponse<Organization>
|
|
377
|
+
topics: TopicSearchResponse<TopicV2>
|
|
378
|
+
}
|
|
379
|
+
|
|
334
380
|
// Helper functions for default configs
|
|
335
381
|
|
|
336
382
|
export const defaultDatasetSortOptions: SortOption<DatasetSearchSort>[] = [
|
|
@@ -397,11 +443,27 @@ export function getDefaultOrganizationConfig(overrides?: Partial<Omit<Organizati
|
|
|
397
443
|
}
|
|
398
444
|
}
|
|
399
445
|
|
|
446
|
+
export const defaultTopicSortOptions: SortOption<TopicSearchSort>[] = [
|
|
447
|
+
{ value: '-created', label: 'Date de création' },
|
|
448
|
+
{ value: '-last_modified', label: 'Dernière mise à jour' },
|
|
449
|
+
]
|
|
450
|
+
|
|
451
|
+
export function getDefaultTopicConfig(overrides?: Partial<Omit<TopicSearchConfig, 'class'>>): TopicSearchConfig {
|
|
452
|
+
return {
|
|
453
|
+
class: 'topics',
|
|
454
|
+
basicFilters: ['last_update_range', 'producer_type'],
|
|
455
|
+
advancedFilters: ['organization', 'tag'],
|
|
456
|
+
sortOptions: defaultTopicSortOptions,
|
|
457
|
+
...overrides,
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
400
461
|
export function getDefaultGlobalSearchConfig(): GlobalSearchConfig {
|
|
401
462
|
return [
|
|
402
463
|
getDefaultDatasetConfig(),
|
|
403
464
|
getDefaultDataserviceConfig(),
|
|
404
465
|
getDefaultReuseConfig(),
|
|
405
466
|
getDefaultOrganizationConfig(),
|
|
467
|
+
getDefaultTopicConfig(),
|
|
406
468
|
]
|
|
407
469
|
}
|
package/src/types/site.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { PageBloc } from './pages'
|
|
2
|
+
|
|
1
3
|
export type Site = {
|
|
2
4
|
id: string
|
|
3
5
|
title: string
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
datasets_blocs: Array<PageBloc>
|
|
7
|
+
reuses_blocs: Array<PageBloc>
|
|
8
|
+
dataservices_blocs: Array<PageBloc>
|
|
7
9
|
version: string
|
|
8
10
|
metrics: {
|
|
9
11
|
'dataservices': number
|
package/src/types/ui.ts
CHANGED
package/src/types/users.ts
CHANGED
|
@@ -21,13 +21,14 @@ export type User = {
|
|
|
21
21
|
page: UserReference['page']
|
|
22
22
|
avatar: UserReference['avatar']
|
|
23
23
|
avatar_thumbnail: UserReference['avatar_thumbnail']
|
|
24
|
-
apikey?: string
|
|
25
24
|
email?: string
|
|
26
25
|
about: string
|
|
27
26
|
website?: string
|
|
28
27
|
roles?: Array<string>
|
|
29
28
|
organizations: Array<OrganizationReference>
|
|
30
29
|
last_login_at: string | null
|
|
30
|
+
password_rotation_demanded: string | null
|
|
31
|
+
password_rotation_performed: string | null
|
|
31
32
|
since: string | null
|
|
32
33
|
metrics: {
|
|
33
34
|
datasets: number
|