geonetwork-ui 2.9.0-dev.fc19cbfed → 2.10.0-dev.0d4a494fa
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/fesm2022/geonetwork-ui.mjs +876 -820
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +121 -25
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +15 -2
- package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +6 -1
- package/src/libs/common/domain/src/index.ts +2 -0
- package/src/libs/common/domain/src/lib/model/index.ts +3 -0
- package/src/libs/common/domain/src/lib/model/record/index.ts +2 -2
- package/src/libs/common/domain/src/lib/model/search/index.ts +1 -1
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +3 -3
- package/src/libs/feature/editor/src/index.ts +2 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +0 -1
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +6 -1
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +16 -1
- package/src/libs/feature/record/src/lib/gpf-api-dl/gpf-api-dl.component.ts +8 -4
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +5 -3
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +4 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +2 -0
- package/src/libs/util/app-config/src/lib/model.ts +1 -0
- package/translations/de.json +1 -0
- package/translations/en.json +1 -0
- package/translations/es.json +1 -0
- package/translations/fr.json +1 -0
- package/translations/it.json +1 -0
- package/translations/nl.json +1 -0
- package/translations/pt.json +1 -0
- package/translations/sk.json +1 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
[disabled]="disabled"
|
|
21
21
|
(change)="resetAllFormFields()"
|
|
22
22
|
>
|
|
23
|
-
@for (protocolOption of
|
|
23
|
+
@for (protocolOption of availableProtocolOptions; track protocolOption) {
|
|
24
24
|
<mat-radio-button [value]="protocolOption.value">
|
|
25
25
|
{{ protocolOption.label | translate }}
|
|
26
26
|
</mat-radio-button>
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
}
|
|
46
46
|
</gn-ui-url-input>
|
|
47
47
|
|
|
48
|
+
@if (loading) {
|
|
49
|
+
<div class="flex justify-center w-full py-4">
|
|
50
|
+
<gn-ui-spinning-loader></gn-ui-spinning-loader>
|
|
51
|
+
</div>
|
|
52
|
+
}
|
|
48
53
|
@if (errorMessage) {
|
|
49
54
|
<p class="text-sm text-red-500 pl-4" translate>
|
|
50
55
|
editor.record.form.field.onlineResource.edit.identifier.error
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
TextInputComponent,
|
|
23
23
|
UrlInputComponent,
|
|
24
24
|
} from '../../../../../../../libs/ui/inputs/src'
|
|
25
|
+
import { SpinningLoaderComponent } from '../../../../../../../libs/ui/widgets/src'
|
|
25
26
|
import { createFuzzyFilter, getLayers } from '../../../../../../../libs/util/shared/src'
|
|
26
27
|
import {
|
|
27
28
|
NgIconComponent,
|
|
@@ -57,6 +58,7 @@ marker(
|
|
|
57
58
|
MatTooltipModule,
|
|
58
59
|
MatRadioModule,
|
|
59
60
|
NgIconComponent,
|
|
61
|
+
SpinningLoaderComponent,
|
|
60
62
|
TextInputComponent,
|
|
61
63
|
TranslateDirective,
|
|
62
64
|
TranslatePipe,
|
|
@@ -79,17 +81,19 @@ export class OnlineServiceResourceInputComponent {
|
|
|
79
81
|
@Input() protocolHint?: string
|
|
80
82
|
@Input() disabled? = false
|
|
81
83
|
@Input() modifyMode? = false
|
|
84
|
+
@Input() protocolOptions?: ServiceProtocol[]
|
|
82
85
|
@Output() serviceChange: EventEmitter<DatasetServiceDistribution> =
|
|
83
86
|
new EventEmitter()
|
|
84
87
|
|
|
85
88
|
errorMessage = false
|
|
89
|
+
loading = false
|
|
86
90
|
resetUrlOnChange = Math.random()
|
|
87
91
|
|
|
88
92
|
layersSubject = new BehaviorSubject<{ name?: string; title?: string }[]>([])
|
|
89
93
|
layers$: Observable<{ name?: string; title?: string }[]> =
|
|
90
94
|
this.layersSubject.asObservable()
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
allProtocolOptions: {
|
|
93
97
|
label: string
|
|
94
98
|
value: ServiceProtocol
|
|
95
99
|
}[] = [
|
|
@@ -123,6 +127,13 @@ export class OnlineServiceResourceInputComponent {
|
|
|
123
127
|
},
|
|
124
128
|
]
|
|
125
129
|
|
|
130
|
+
get availableProtocolOptions() {
|
|
131
|
+
if (!this.protocolOptions) return this.allProtocolOptions
|
|
132
|
+
return this.protocolOptions.flatMap(
|
|
133
|
+
(v) => this.allProtocolOptions.find((o) => o.value === v) ?? []
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
126
137
|
get activeLayerSuggestion() {
|
|
127
138
|
return !['wps', 'GPFDL', 'esriRest', 'other'].includes(
|
|
128
139
|
this._service.accessServiceProtocol
|
|
@@ -135,6 +146,8 @@ export class OnlineServiceResourceInputComponent {
|
|
|
135
146
|
}
|
|
136
147
|
|
|
137
148
|
async handleUploadClick(url: string) {
|
|
149
|
+
this.loading = true
|
|
150
|
+
this.cdr.detectChanges()
|
|
138
151
|
try {
|
|
139
152
|
const layers = await getLayers(url, this._service.accessServiceProtocol)
|
|
140
153
|
|
|
@@ -148,6 +161,7 @@ export class OnlineServiceResourceInputComponent {
|
|
|
148
161
|
this.layersSubject.next([])
|
|
149
162
|
}
|
|
150
163
|
|
|
164
|
+
this.loading = false
|
|
151
165
|
this.cdr.detectChanges()
|
|
152
166
|
}
|
|
153
167
|
|
|
@@ -159,6 +173,7 @@ export class OnlineServiceResourceInputComponent {
|
|
|
159
173
|
|
|
160
174
|
resetLayersSuggestion() {
|
|
161
175
|
this.errorMessage = false
|
|
176
|
+
this.loading = false
|
|
162
177
|
this.layersSubject.next([])
|
|
163
178
|
this._service.identifierInService = null
|
|
164
179
|
}
|
|
@@ -20,8 +20,8 @@ export interface Label {
|
|
|
20
20
|
export interface FormatProduit {
|
|
21
21
|
title: string
|
|
22
22
|
update: string
|
|
23
|
-
format: Array<
|
|
24
|
-
zone: Array<
|
|
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
|
|
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: {
|
|
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 =
|
|
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 {
|
|
@@ -62,7 +62,10 @@ export class UrlInputComponent implements OnChanges {
|
|
|
62
62
|
inputValue = ''
|
|
63
63
|
|
|
64
64
|
ngOnChanges(changes: SimpleChanges) {
|
|
65
|
-
if (
|
|
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
|
? (
|
package/translations/de.json
CHANGED
|
@@ -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",
|
package/translations/en.json
CHANGED
|
@@ -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",
|
package/translations/es.json
CHANGED
package/translations/fr.json
CHANGED
|
@@ -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",
|
package/translations/it.json
CHANGED
|
@@ -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",
|
package/translations/nl.json
CHANGED
package/translations/pt.json
CHANGED
package/translations/sk.json
CHANGED
|
@@ -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",
|