geonetwork-ui 2.9.0-dev.fc19cbfed → 2.10.0-dev.896c4b637

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.
Files changed (28) hide show
  1. package/fesm2022/geonetwork-ui.mjs +50 -14
  2. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  3. package/index.d.ts +117 -24
  4. package/index.d.ts.map +1 -1
  5. package/package.json +1 -1
  6. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -0
  7. package/src/libs/common/domain/src/index.ts +2 -0
  8. package/src/libs/common/domain/src/lib/model/index.ts +3 -0
  9. package/src/libs/common/domain/src/lib/model/record/index.ts +2 -2
  10. package/src/libs/common/domain/src/lib/model/search/index.ts +1 -1
  11. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +3 -3
  12. package/src/libs/feature/editor/src/index.ts +2 -0
  13. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +6 -1
  14. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +16 -1
  15. package/src/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts +8 -4
  16. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +5 -3
  17. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +1 -1
  18. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +4 -1
  19. package/src/libs/util/app-config/src/lib/app-config.ts +2 -0
  20. package/src/libs/util/app-config/src/lib/model.ts +1 -0
  21. package/translations/de.json +1 -0
  22. package/translations/en.json +1 -0
  23. package/translations/es.json +1 -0
  24. package/translations/fr.json +1 -0
  25. package/translations/it.json +1 -0
  26. package/translations/nl.json +1 -0
  27. package/translations/pt.json +1 -0
  28. package/translations/sk.json +1 -0
@@ -20,8 +20,8 @@ export interface Label {
20
20
  export interface FormatProduit {
21
21
  title: string
22
22
  update: string
23
- format: Array<TermBucket>
24
- zone: Array<TermBucket>
23
+ format: Array<GpfApiDlTermBucket>
24
+ zone: Array<GpfApiDlTermBucket>
25
25
  }
26
26
 
27
27
  export interface FormatSortieProduit {
@@ -39,7 +39,7 @@ export interface ListChoice {
39
39
  crs: Choice[]
40
40
  }
41
41
 
42
- export interface TermBucket {
42
+ export interface GpfApiDlTermBucket {
43
43
  term: string
44
44
  label: string | number
45
45
  }
@@ -77,7 +77,11 @@ export class GpfApiDlComponent implements OnInit {
77
77
  page$ = new BehaviorSubject(1)
78
78
  url =
79
79
  'https://data.geopf.fr/telechargement/capabilities?outputFormat=application/json'
80
- choices: { zone: TermBucket[]; format: TermBucket[]; category: TermBucket[] }
80
+ choices: {
81
+ zone: GpfApiDlTermBucket[]
82
+ format: GpfApiDlTermBucket[]
83
+ category: GpfApiDlTermBucket[]
84
+ }
81
85
  bucketPromisesZone: Choice[]
82
86
  bucketPromisesFormat: Choice[]
83
87
  bucketPromisesCrs: Choice[]
@@ -2,8 +2,8 @@ import {
2
2
  ChangeDetectionStrategy,
3
3
  ChangeDetectorRef,
4
4
  Component,
5
- Input,
6
5
  inject,
6
+ Input,
7
7
  } from '@angular/core'
8
8
  import { TranslateDirective, TranslateService } from '@ngx-translate/core'
9
9
  import { marker } from '@biesbjerg/ngx-translate-extract-marker'
@@ -67,13 +67,15 @@ export class DownloadsListComponent {
67
67
  ): DatasetDownloadDistribution[] {
68
68
  const preferredLinks = new Map<string, DatasetDownloadDistribution>()
69
69
 
70
- links.forEach((link) => {
70
+ links.forEach((link, index) => {
71
71
  const format = getFileFormat(link)
72
72
  const withoutNameSpace = (link.name || link.description || '').replace(
73
73
  /^.*?:/,
74
74
  ''
75
75
  )
76
- const uniqueKey = `${format}-${withoutNameSpace}`
76
+ const uniqueKey = link.accessServiceProtocol
77
+ ? `${format}-${withoutNameSpace}`
78
+ : index.toString() // direct download links should not be deduplicated
77
79
  if (!preferredLinks.has(uniqueKey)) {
78
80
  preferredLinks.set(uniqueKey, link)
79
81
  } else {
@@ -102,7 +102,7 @@ export class DropdownSelectorComponent implements OnInit {
102
102
  }
103
103
 
104
104
  getChoiceLabel(): string {
105
- return this.selectedChoice?.label
105
+ return this.selectedChoice?.label ?? '\u00A0'
106
106
  }
107
107
 
108
108
  ngOnInit(): void {
@@ -62,7 +62,10 @@ export class UrlInputComponent implements OnChanges {
62
62
  inputValue = ''
63
63
 
64
64
  ngOnChanges(changes: SimpleChanges) {
65
- if (changes['resetUrlOnChange']) {
65
+ if (
66
+ changes['resetUrlOnChange'] &&
67
+ !changes['resetUrlOnChange'].firstChange
68
+ ) {
66
69
  this.inputValue = ''
67
70
  }
68
71
  }
@@ -97,6 +97,7 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
97
97
  ['geonetwork4_api_url'],
98
98
  [
99
99
  'datahub_url',
100
+ 'edit_url_template',
100
101
  'proxy_path',
101
102
  'metadata_language',
102
103
  'login_url',
@@ -122,6 +123,7 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
122
123
  : ({
123
124
  GN4_API_URL: parsedGlobalSection.geonetwork4_api_url,
124
125
  DATAHUB_URL: parsedGlobalSection.datahub_url,
126
+ EDIT_URL_TEMPLATE: parsedGlobalSection.edit_url_template,
125
127
  PROXY_PATH: parsedGlobalSection.proxy_path,
126
128
  METADATA_LANGUAGE: parsedGlobalSection.metadata_language
127
129
  ? (
@@ -3,6 +3,7 @@ import { Geometry } from 'geojson'
3
3
  export interface GlobalConfig {
4
4
  GN4_API_URL: string
5
5
  DATAHUB_URL?: string
6
+ EDIT_URL_TEMPLATE?: string
6
7
  PROXY_PATH?: string
7
8
  METADATA_LANGUAGE?: string
8
9
  LOGIN_URL?: string
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "Benutzername",
39
39
  "dashboard.records.users": "{count, plural, =1{Benutzer} other{Benutzer}}",
40
40
  "datahub.header.datasets": "Katalog",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "Die neuesten",
42
43
  "datahub.header.myfavorites": "Meine Favoriten",
43
44
  "datahub.header.news": "Startseite",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "Username",
39
39
  "dashboard.records.users": "{count, plural, =1{user} other{users}}",
40
40
  "datahub.header.datasets": "Catalog",
41
+ "datahub.header.edit.url.open": "Edit",
41
42
  "datahub.header.lastRecords": "The latest",
42
43
  "datahub.header.myfavorites": "My favorites",
43
44
  "datahub.header.news": "Home",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "",
39
39
  "dashboard.records.users": "",
40
40
  "datahub.header.datasets": "Catálogo",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "",
42
43
  "datahub.header.myfavorites": "",
43
44
  "datahub.header.news": "",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "Nom d'utilisateur",
39
39
  "dashboard.records.users": "{count, plural, =1{utilisateur} other{utilisateurs}}",
40
40
  "datahub.header.datasets": "Catalogue",
41
+ "datahub.header.edit.url.open": "Editer",
41
42
  "datahub.header.lastRecords": "Les plus récentes",
42
43
  "datahub.header.myfavorites": "Mes favoris",
43
44
  "datahub.header.news": "Accueil",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "Nome utente",
39
39
  "dashboard.records.users": "utenti",
40
40
  "datahub.header.datasets": "Catalogo",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "Ultimi",
42
43
  "datahub.header.myfavorites": "Miei preferiti",
43
44
  "datahub.header.news": "Home",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "",
39
39
  "dashboard.records.users": "",
40
40
  "datahub.header.datasets": "Catalog",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "",
42
43
  "datahub.header.myfavorites": "",
43
44
  "datahub.header.news": "",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "",
39
39
  "dashboard.records.users": "",
40
40
  "datahub.header.datasets": "Catálogo",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "",
42
43
  "datahub.header.myfavorites": "",
43
44
  "datahub.header.news": "",
@@ -38,6 +38,7 @@
38
38
  "dashboard.records.username": "Užívateľské meno",
39
39
  "dashboard.records.users": "{count, plural, =1{užívateľ} other{užívatelia}}",
40
40
  "datahub.header.datasets": "Katalóg",
41
+ "datahub.header.edit.url.open": "",
41
42
  "datahub.header.lastRecords": "Najnovšie",
42
43
  "datahub.header.myfavorites": "Moje obľúbené",
43
44
  "datahub.header.news": "Domov",