geonetwork-ui 2.8.0-dev.398701d7f → 2.8.0-dev.6ea037ab6
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/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +3 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +2 -1
- package/esm2022/libs/api/repository/src/lib/gn4/auth/auth.service.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +7 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +10 -10
- package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +3 -2
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +2 -1
- package/esm2022/libs/common/domain/src/lib/model/search/sort-by.model.mjs +6 -1
- package/esm2022/libs/data-access/gn4/src/openapi/model/user.api.model.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +2 -1
- package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +5 -1
- package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +9 -7
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +8 -12
- package/esm2022/libs/ui/elements/src/lib/error/error.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/external-link-card/external-link-card.component.mjs +11 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +2 -3
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +3 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +12 -1
- package/esm2022/libs/util/shared/src/lib/services/proxy.service.mjs +9 -11
- package/esm2022/libs/util/shared/src/lib/utils/sort-by.mjs +9 -6
- package/esm2022/translations/de.json +6 -2
- package/esm2022/translations/en.json +7 -4
- package/esm2022/translations/es.json +6 -2
- package/esm2022/translations/fr.json +7 -3
- package/esm2022/translations/it.json +7 -3
- package/esm2022/translations/nl.json +6 -2
- package/esm2022/translations/pt.json +6 -2
- package/esm2022/translations/sk.json +6 -2
- package/fesm2022/geonetwork-ui.mjs +133 -69
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/auth/auth.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +7 -7
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/sort-by.model.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/model/user.api.model.d.ts +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.service.d.ts +2 -0
- package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/router.effects.d.ts +3 -1
- package/libs/feature/router/src/lib/default/state/router.effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts +4 -3
- package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +3 -2
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +6 -0
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/proxy.service.d.ts +5 -4
- package/libs/util/shared/src/lib/services/proxy.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/sort-by.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -0
- package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +12 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +37 -36
- package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -2
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +2 -0
- package/src/libs/common/domain/src/lib/model/search/sort-by.model.ts +5 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +9 -0
- package/src/libs/data-access/gn4/src/openapi/model/user.api.model.ts +1 -1
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +1 -0
- package/src/libs/feature/router/src/lib/default/router.service.ts +8 -0
- package/src/libs/feature/router/src/lib/default/state/router.effects.ts +6 -7
- package/src/libs/feature/search/src/lib/sort-by/sort-by.component.ts +8 -12
- package/src/libs/ui/elements/src/lib/error/error.component.html +5 -1
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.html +43 -22
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.ts +12 -3
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +2 -2
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +4 -2
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +2 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +11 -0
- package/src/libs/util/shared/src/lib/services/proxy.service.ts +6 -2
- package/src/libs/util/shared/src/lib/utils/sort-by.ts +8 -5
- package/translations/de.json +6 -2
- package/translations/en.json +7 -4
- package/translations/es.json +6 -2
- package/translations/fr.json +7 -3
- package/translations/it.json +7 -3
- package/translations/nl.json +6 -2
- package/translations/pt.json +6 -2
- package/translations/sk.json +6 -2
|
@@ -259,4 +259,13 @@ export const aSetOfLinksFixture = () => ({
|
|
|
259
259
|
accessServiceProtocol: 'wms',
|
|
260
260
|
type: 'endpoint',
|
|
261
261
|
}) as ServiceEndpoint,
|
|
262
|
+
postgisLink: () =>
|
|
263
|
+
({
|
|
264
|
+
name: 'France_Regions',
|
|
265
|
+
description:
|
|
266
|
+
'Boundaries for the administrative regions of metropolitan France.',
|
|
267
|
+
url: new URL('http://geo.local:5432/france_demo'),
|
|
268
|
+
type: 'service',
|
|
269
|
+
accessServiceProtocol: 'postgis',
|
|
270
|
+
}) as DatasetServiceDistribution,
|
|
262
271
|
})
|
|
@@ -21,7 +21,7 @@ export interface UserApiModel {
|
|
|
21
21
|
emailAddresses?: Set<string>
|
|
22
22
|
addresses?: Set<AddressApiModel>
|
|
23
23
|
primaryAddress?: AddressApiModel
|
|
24
|
-
|
|
24
|
+
organisation?: string
|
|
25
25
|
kind?: string
|
|
26
26
|
lastLoginDate?: string
|
|
27
27
|
authorities?: Array<GrantedAuthorityApiModel>
|
|
@@ -114,6 +114,7 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
114
114
|
_styleFromConfig = null
|
|
115
115
|
|
|
116
116
|
linkMap: Map<string, DatasetOnlineResource> = new Map()
|
|
117
|
+
// FIXME the map view component should not need a selectedView
|
|
117
118
|
@Input() set selectedView(value: string) {
|
|
118
119
|
this.selectedView$.next(value)
|
|
119
120
|
}
|
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
} from '.'
|
|
9
9
|
import { Router, Routes } from '@angular/router'
|
|
10
10
|
import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
|
|
11
|
+
import {
|
|
12
|
+
SortByEnum,
|
|
13
|
+
SortByField,
|
|
14
|
+
} from '../../../../../../libs/common/domain/src/lib/model/search'
|
|
11
15
|
|
|
12
16
|
@Injectable({
|
|
13
17
|
providedIn: 'root',
|
|
@@ -58,4 +62,8 @@ export class RouterService {
|
|
|
58
62
|
getOrganizationPageRoute(): string {
|
|
59
63
|
return ROUTER_ROUTE_ORGANIZATION
|
|
60
64
|
}
|
|
65
|
+
|
|
66
|
+
getDefaultSort(): SortByField {
|
|
67
|
+
return SortByEnum.RESOURCE_DATES
|
|
68
|
+
}
|
|
61
69
|
}
|
|
@@ -9,10 +9,7 @@ import {
|
|
|
9
9
|
SetFilters,
|
|
10
10
|
SetSortBy,
|
|
11
11
|
} from '../../../../../../../libs/feature/search/src'
|
|
12
|
-
import {
|
|
13
|
-
FieldFilters,
|
|
14
|
-
SortByEnum,
|
|
15
|
-
} from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
12
|
+
import { FieldFilters } from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
16
13
|
import { Actions, createEffect, ofType } from '@ngrx/effects'
|
|
17
14
|
import { navigation } from '@ngrx/router-store/data-persistence'
|
|
18
15
|
import { of, pairwise, startWith } from 'rxjs'
|
|
@@ -22,6 +19,7 @@ import { RouterFacade } from './router.facade'
|
|
|
22
19
|
import { ROUTE_PARAMS } from '../constants'
|
|
23
20
|
import { sortByFromString } from '../../../../../../../libs/util/shared/src'
|
|
24
21
|
import { ROUTER_CONFIG, RouterConfigModel } from '../router.config'
|
|
22
|
+
import { RouterService } from '../router.service'
|
|
25
23
|
|
|
26
24
|
@Injectable()
|
|
27
25
|
export class RouterEffects {
|
|
@@ -31,7 +29,8 @@ export class RouterEffects {
|
|
|
31
29
|
private _location: Location,
|
|
32
30
|
private facade: RouterFacade,
|
|
33
31
|
@Inject(ROUTER_CONFIG) private routerConfig: RouterConfigModel,
|
|
34
|
-
private fieldsService: FieldsService
|
|
32
|
+
private fieldsService: FieldsService,
|
|
33
|
+
private routerService: RouterService
|
|
35
34
|
) {}
|
|
36
35
|
|
|
37
36
|
navigate$ = createEffect(
|
|
@@ -61,7 +60,7 @@ export class RouterEffects {
|
|
|
61
60
|
let sortBy =
|
|
62
61
|
ROUTE_PARAMS.SORT in newParams
|
|
63
62
|
? sortByFromString(newParams[ROUTE_PARAMS.SORT])
|
|
64
|
-
:
|
|
63
|
+
: this.routerService.getDefaultSort()
|
|
65
64
|
let pageNumber =
|
|
66
65
|
ROUTE_PARAMS.PAGE in newParams
|
|
67
66
|
? parseInt(newParams[ROUTE_PARAMS.PAGE])
|
|
@@ -70,7 +69,7 @@ export class RouterEffects {
|
|
|
70
69
|
const oldSort =
|
|
71
70
|
ROUTE_PARAMS.SORT in oldParams
|
|
72
71
|
? sortByFromString(oldParams[ROUTE_PARAMS.SORT])
|
|
73
|
-
:
|
|
72
|
+
: this.routerService.getDefaultSort()
|
|
74
73
|
if (JSON.stringify(sortBy) === JSON.stringify(oldSort)) {
|
|
75
74
|
sortBy = null
|
|
76
75
|
}
|
|
@@ -13,7 +13,7 @@ import { TranslatePipe } from '@ngx-translate/core'
|
|
|
13
13
|
|
|
14
14
|
interface SortChoice {
|
|
15
15
|
label: string
|
|
16
|
-
value:
|
|
16
|
+
value: SortByField
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@Component({
|
|
@@ -27,24 +27,20 @@ export class SortByComponent implements OnInit {
|
|
|
27
27
|
choices: SortChoice[] = [
|
|
28
28
|
{
|
|
29
29
|
label: marker('results.sortBy.relevancy'),
|
|
30
|
-
value: SortByEnum.RELEVANCY
|
|
30
|
+
value: SortByEnum.RELEVANCY,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
label: marker('results.sortBy.dateStamp'),
|
|
34
|
-
value: SortByEnum.
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: marker('results.sortBy.changeDate'),
|
|
38
|
-
value: SortByEnum.CHANGE_DATE.join(','),
|
|
34
|
+
value: SortByEnum.RESOURCE_DATES,
|
|
39
35
|
},
|
|
40
36
|
{
|
|
41
37
|
label: marker('results.sortBy.popularity'),
|
|
42
|
-
value: SortByEnum.POPULARITY
|
|
38
|
+
value: SortByEnum.POPULARITY,
|
|
43
39
|
},
|
|
44
40
|
]
|
|
45
41
|
currentSortBy$ = this.facade.sortBy$.pipe(
|
|
46
42
|
filter((sortBy) => !!sortBy),
|
|
47
|
-
map((sortBy) => sortBy
|
|
43
|
+
map((sortBy) => sortBy)
|
|
48
44
|
)
|
|
49
45
|
|
|
50
46
|
constructor(
|
|
@@ -56,12 +52,12 @@ export class SortByComponent implements OnInit {
|
|
|
56
52
|
if (this.isQualitySortable) {
|
|
57
53
|
this.choices.push({
|
|
58
54
|
label: marker('results.sortBy.qualityScore'),
|
|
59
|
-
value: SortByEnum.QUALITY_SCORE
|
|
55
|
+
value: SortByEnum.QUALITY_SCORE,
|
|
60
56
|
})
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
changeSortBy(
|
|
65
|
-
this.searchService.setSortBy(
|
|
60
|
+
changeSortBy(criteria: SortByField): void {
|
|
61
|
+
this.searchService.setSortBy(criteria)
|
|
66
62
|
}
|
|
67
63
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="p-[1.7em]
|
|
2
|
+
class="p-[1.7em] text-[1.5em] text-center rounded-lg"
|
|
3
|
+
[ngClass]="{
|
|
4
|
+
'bg-red-50 text-red-800': type !== types.DATASET_HAS_NO_LINK,
|
|
5
|
+
'bg-gray-100 text-black': type === types.DATASET_HAS_NO_LINK,
|
|
6
|
+
}"
|
|
3
7
|
>
|
|
4
8
|
<div
|
|
5
9
|
*ngIf="type === types.COULD_NOT_REACH_API"
|
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
<
|
|
2
|
-
[
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
1
|
+
<ng-container *ngIf="isDatabase; else clickableLink">
|
|
2
|
+
<div [ngClass]="cardClass" [title]="title">
|
|
3
|
+
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
4
|
+
<div
|
|
5
|
+
class="flex min-w-[32px]"
|
|
6
|
+
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="gn-ui-card-icon"
|
|
10
|
+
[title]="'record.metadata.link.postgis.tooltip' | translate"
|
|
11
|
+
>
|
|
12
|
+
<ng-icon
|
|
13
|
+
class="inline-block card-icon align-middle"
|
|
14
|
+
name="iconoirDatabase"
|
|
15
|
+
></ng-icon>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</ng-container>
|
|
20
|
+
|
|
21
|
+
<ng-template #clickableLink>
|
|
22
|
+
<a [href]="link.url" target="_blank" [ngClass]="cardClass" [title]="title">
|
|
23
|
+
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
24
|
+
<div
|
|
25
|
+
class="flex min-w-[32px]"
|
|
26
|
+
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
27
|
+
>
|
|
28
|
+
<div class="gn-ui-card-icon">
|
|
29
|
+
<ng-icon
|
|
30
|
+
class="inline-block card-icon align-middle"
|
|
31
|
+
name="matOpenInNew"
|
|
32
|
+
></ng-icon>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</a>
|
|
36
|
+
</ng-template>
|
|
37
|
+
<ng-template #cardContent>
|
|
8
38
|
<div class="flex flex-col justify-between flex-1 min-w-0">
|
|
9
39
|
<div class="gn-ui-card-title">
|
|
10
40
|
{{ link.description || link.name }}
|
|
11
41
|
</div>
|
|
12
42
|
<div class="gn-ui-card-detail">
|
|
43
|
+
<ng-container *ngIf="isDatabase">
|
|
44
|
+
{{ 'record.metadata.link.postgis.table' | translate }}
|
|
45
|
+
</ng-container>
|
|
13
46
|
{{ link.name }}
|
|
14
47
|
</div>
|
|
15
48
|
<p *ngIf="!link.name && !link.description" class="gn-ui-card-title">
|
|
@@ -20,21 +53,9 @@
|
|
|
20
53
|
class="inline-flex items-center justify-center px-2 py-1 text-13 font-medium leading-none text-white rounded transition-opacity opacity-70 group-hover:opacity-100"
|
|
21
54
|
[style.background-color]="getLinkColor(link)"
|
|
22
55
|
data-cy="download-format"
|
|
23
|
-
>{{
|
|
24
|
-
getLinkFormat(link) || ('downloads.format.unknown' | translate)
|
|
25
|
-
}}</span
|
|
26
56
|
>
|
|
57
|
+
{{ getLinkFormat(link) || ('downloads.format.unknown' | translate) }}
|
|
58
|
+
</span>
|
|
27
59
|
</div>
|
|
28
60
|
</div>
|
|
29
|
-
|
|
30
|
-
class="flex min-w-[32px]"
|
|
31
|
-
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
32
|
-
>
|
|
33
|
-
<div class="gn-ui-card-icon">
|
|
34
|
-
<ng-icon
|
|
35
|
-
class="inline-block card-icon align-middle"
|
|
36
|
-
name="matOpenInNew"
|
|
37
|
-
></ng-icon>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</a>
|
|
61
|
+
</ng-template>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
provideNgIconsConfig,
|
|
8
8
|
} from '@ng-icons/core'
|
|
9
9
|
import { matOpenInNew } from '@ng-icons/material-icons/baseline'
|
|
10
|
+
import { iconoirDatabase } from '@ng-icons/iconoir'
|
|
10
11
|
import { getBadgeColor, getFileFormat } from '../../../../../../libs/util/shared/src'
|
|
11
12
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
12
13
|
|
|
@@ -21,6 +22,7 @@ type CardSize = 'L' | 'M' | 'S' | 'XS'
|
|
|
21
22
|
providers: [
|
|
22
23
|
provideIcons({
|
|
23
24
|
matOpenInNew,
|
|
25
|
+
iconoirDatabase,
|
|
24
26
|
}),
|
|
25
27
|
provideNgIconsConfig({ size: '1.5em' }),
|
|
26
28
|
],
|
|
@@ -37,7 +39,7 @@ export class ExternalLinkCardComponent {
|
|
|
37
39
|
|
|
38
40
|
@Input() set size(value: CardSize) {
|
|
39
41
|
this._size = value
|
|
40
|
-
this.cardClass = this.sizeClassMap[value]
|
|
42
|
+
this.cardClass = `group flex flex-row justify-between card-shadow rounded overflow-hidden ${this.sizeClassMap[value]}`
|
|
41
43
|
}
|
|
42
44
|
get size(): CardSize {
|
|
43
45
|
return this._size
|
|
@@ -51,11 +53,18 @@ export class ExternalLinkCardComponent {
|
|
|
51
53
|
return this.link.name || this.link.description || ''
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
get isDatabase(): boolean {
|
|
57
|
+
return (
|
|
58
|
+
this.link.type === 'service' &&
|
|
59
|
+
this.link.accessServiceProtocol === 'postgis'
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getLinkFormat(link: DatasetOnlineResource): string {
|
|
55
64
|
return getFileFormat(link)
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
getLinkColor(link:
|
|
67
|
+
getLinkColor(link: DatasetOnlineResource): string {
|
|
59
68
|
return getBadgeColor(getFileFormat(link))
|
|
60
69
|
}
|
|
61
70
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
ghostClass="h-[31px] w-3/4"
|
|
25
25
|
[showContent]="fieldReady('keywords')"
|
|
26
26
|
>
|
|
27
|
-
<
|
|
27
|
+
<gn-ui-max-lines [maxLines]="7" *ngIf="metadata.keywords?.length">
|
|
28
28
|
<div class="metadata-info-keywords sm:pb-4 flex flex-wrap gap-2">
|
|
29
29
|
<gn-ui-badge
|
|
30
30
|
class="inline-block lowercase"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
>{{ keyword.label }}</gn-ui-badge
|
|
35
35
|
>
|
|
36
36
|
</div>
|
|
37
|
-
</
|
|
37
|
+
</gn-ui-max-lines>
|
|
38
38
|
</gn-ui-content-ghost>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
@@ -90,8 +90,10 @@ export class DropdownSelectorComponent implements OnInit {
|
|
|
90
90
|
|
|
91
91
|
get selectedChoice(): DropdownChoice {
|
|
92
92
|
return (
|
|
93
|
-
this.choices.find(
|
|
94
|
-
|
|
93
|
+
this.choices.find(
|
|
94
|
+
(choice) =>
|
|
95
|
+
JSON.stringify(choice.value) === JSON.stringify(this.selected)
|
|
96
|
+
) ?? this.choices[0]
|
|
95
97
|
)
|
|
96
98
|
}
|
|
97
99
|
|
|
@@ -150,6 +150,12 @@ export const FORMATS = {
|
|
|
150
150
|
color: '#5A9E6F',
|
|
151
151
|
mimeTypes: ['image/webp'],
|
|
152
152
|
},
|
|
153
|
+
postgis: {
|
|
154
|
+
extensions: ['postgis'],
|
|
155
|
+
priority: 18,
|
|
156
|
+
color: '#336791',
|
|
157
|
+
mimeTypes: [],
|
|
158
|
+
},
|
|
153
159
|
} as const
|
|
154
160
|
|
|
155
161
|
export type FileFormat = keyof typeof FORMATS
|
|
@@ -195,6 +201,11 @@ export function getFileFormatFromServiceOutput(
|
|
|
195
201
|
export function getFileFormat(
|
|
196
202
|
link: DatasetOnlineResource | ServiceOnlineResource
|
|
197
203
|
): FileFormat {
|
|
204
|
+
if ('accessServiceProtocol' in link) {
|
|
205
|
+
if (link.accessServiceProtocol in FORMATS) {
|
|
206
|
+
return link.accessServiceProtocol as FileFormat
|
|
207
|
+
}
|
|
208
|
+
}
|
|
198
209
|
if ('mimeType' in link) {
|
|
199
210
|
const mimeTypeFormat = mimeTypeToFormat(link.mimeType)
|
|
200
211
|
if (mimeTypeFormat !== null) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injectable, InjectionToken, Injector } from '@angular/core'
|
|
2
2
|
import { Location } from '@angular/common'
|
|
3
3
|
|
|
4
4
|
export const PROXY_PATH = new InjectionToken<string>('proxyPath')
|
|
@@ -7,8 +7,12 @@ export const PROXY_PATH = new InjectionToken<string>('proxyPath')
|
|
|
7
7
|
providedIn: 'root',
|
|
8
8
|
})
|
|
9
9
|
export class ProxyService {
|
|
10
|
+
private get proxyPath(): string | null {
|
|
11
|
+
return this.injector.get(PROXY_PATH, null)
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
constructor(
|
|
11
|
-
|
|
15
|
+
private injector: Injector,
|
|
12
16
|
private location: Location
|
|
13
17
|
) {}
|
|
14
18
|
|
|
@@ -6,12 +6,15 @@ export function sortByToStrings(sortBy: SortByField): string[] {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export function sortByToString(sortBy: SortByField): string {
|
|
9
|
-
return sortByToStrings(sortBy)
|
|
9
|
+
return sortByToStrings(sortBy).join(',')
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function sortByFromString(sortByString: string): SortByField {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const fields = sortByString
|
|
14
|
+
.split(',')
|
|
15
|
+
.map((field) => [
|
|
16
|
+
field.startsWith('-') ? 'desc' : 'asc',
|
|
17
|
+
field.startsWith('-') ? field.substring(1) : field,
|
|
18
|
+
]) as SortByField
|
|
19
|
+
return fields.length > 1 ? fields : (fields[0] as SortByField)
|
|
17
20
|
}
|
package/translations/de.json
CHANGED
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
"record.metadata.api.accessServiceProtocol.maplibre-style": "",
|
|
419
419
|
"record.metadata.api.accessServiceProtocol.ogcFeatures": "",
|
|
420
420
|
"record.metadata.api.accessServiceProtocol.other": "",
|
|
421
|
+
"record.metadata.api.accessServiceProtocol.postgis": "",
|
|
421
422
|
"record.metadata.api.accessServiceProtocol.tms": "",
|
|
422
423
|
"record.metadata.api.accessServiceProtocol.wfs": "",
|
|
423
424
|
"record.metadata.api.accessServiceProtocol.wms": "",
|
|
@@ -465,7 +466,8 @@
|
|
|
465
466
|
"record.metadata.isGeographical": "Geographischer Datensatz",
|
|
466
467
|
"record.metadata.keywords": "Stichworte",
|
|
467
468
|
"record.metadata.languages": "Sprachen",
|
|
468
|
-
"record.metadata.
|
|
469
|
+
"record.metadata.link.postgis.table": "",
|
|
470
|
+
"record.metadata.link.postgis.tooltip": "",
|
|
469
471
|
"record.metadata.linked.datasets": "Verknüpfte Datensätze",
|
|
470
472
|
"record.metadata.linked.records": "Verknüpfte Inhalte",
|
|
471
473
|
"record.metadata.linked.reuses": "Verknüpfte Wiederverwendungen",
|
|
@@ -506,6 +508,9 @@
|
|
|
506
508
|
"record.metadata.quality.updateFrequency.failed": "Aktualisierungsfrequenz nicht angegeben",
|
|
507
509
|
"record.metadata.quality.updateFrequency.success": "Aktualisierungsfrequenz angegeben",
|
|
508
510
|
"record.metadata.related": "Entdecken Sie den Katalog",
|
|
511
|
+
"record.metadata.resourceCreated": "Erstellt am {date}",
|
|
512
|
+
"record.metadata.resourcePublished": "Veröffentlicht am {date}",
|
|
513
|
+
"record.metadata.resourceUpdated": "Zuletzt aktualisiert am {date}",
|
|
509
514
|
"record.metadata.ressources.and.links": "Ressourcen und Links",
|
|
510
515
|
"record.metadata.sheet": "Weitere Informationen verfügbar unter:",
|
|
511
516
|
"record.metadata.status": "Status",
|
|
@@ -542,7 +547,6 @@
|
|
|
542
547
|
"results.records.hits.found": "{hits, plural, =0{Keine Ressource entsprechen der angegebenen Suche.} one{1 Ressource gefunden.} other{{hits} Ressourcen gefunden.}}",
|
|
543
548
|
"results.records.hits.selected": "{ amount } ausgewählt",
|
|
544
549
|
"results.showMore": "Mehr Ergebnisse anzeigen...",
|
|
545
|
-
"results.sortBy.changeDate": "",
|
|
546
550
|
"results.sortBy.dateStamp": "Neueste",
|
|
547
551
|
"results.sortBy.popularity": "Beliebtheit",
|
|
548
552
|
"results.sortBy.qualityScore": "Fertigstellungsanzeige",
|
package/translations/en.json
CHANGED
|
@@ -241,7 +241,6 @@
|
|
|
241
241
|
"editor.record.form.topics.inspire.intelligence": "Intelligence / Military",
|
|
242
242
|
"editor.record.form.topics.inspire.location": "Location",
|
|
243
243
|
"editor.record.form.topics.inspire.oceans": "Oceans",
|
|
244
|
-
"editor.record.form.topics.inspire.placeholder": "Select an INSPIRE theme",
|
|
245
244
|
"editor.record.form.topics.inspire.planning": "Planning / Cadastre",
|
|
246
245
|
"editor.record.form.topics.inspire.society": "Society",
|
|
247
246
|
"editor.record.form.topics.inspire.structure": "Structure",
|
|
@@ -419,6 +418,7 @@
|
|
|
419
418
|
"record.metadata.api.accessServiceProtocol.maplibre-style": "maplibre-style",
|
|
420
419
|
"record.metadata.api.accessServiceProtocol.ogcFeatures": "ogcFeatures",
|
|
421
420
|
"record.metadata.api.accessServiceProtocol.other": "other",
|
|
421
|
+
"record.metadata.api.accessServiceProtocol.postgis": "PostGIS",
|
|
422
422
|
"record.metadata.api.accessServiceProtocol.tms": "tms",
|
|
423
423
|
"record.metadata.api.accessServiceProtocol.wfs": "wfs",
|
|
424
424
|
"record.metadata.api.accessServiceProtocol.wms": "wms",
|
|
@@ -466,7 +466,8 @@
|
|
|
466
466
|
"record.metadata.isGeographical": "Geographical dataset",
|
|
467
467
|
"record.metadata.keywords": "Keywords",
|
|
468
468
|
"record.metadata.languages": "Languages",
|
|
469
|
-
"record.metadata.
|
|
469
|
+
"record.metadata.link.postgis.table": "table :",
|
|
470
|
+
"record.metadata.link.postgis.tooltip": "PostGIS resources do not have access links",
|
|
470
471
|
"record.metadata.linked.datasets": "Associated datasets",
|
|
471
472
|
"record.metadata.linked.records": "Associated content",
|
|
472
473
|
"record.metadata.linked.reuses": "Associated reuses",
|
|
@@ -507,6 +508,9 @@
|
|
|
507
508
|
"record.metadata.quality.updateFrequency.failed": "Update frequency is not specified",
|
|
508
509
|
"record.metadata.quality.updateFrequency.success": "Update frequency is specified",
|
|
509
510
|
"record.metadata.related": "Explore the catalog",
|
|
511
|
+
"record.metadata.resourceCreated": "Created on {date}",
|
|
512
|
+
"record.metadata.resourcePublished": "Published on {date}",
|
|
513
|
+
"record.metadata.resourceUpdated": "Last updated on {date}",
|
|
510
514
|
"record.metadata.ressources.and.links": "Resources and links",
|
|
511
515
|
"record.metadata.sheet": "Original metadata",
|
|
512
516
|
"record.metadata.status": "Status",
|
|
@@ -543,7 +547,6 @@
|
|
|
543
547
|
"results.records.hits.found": "{hits, plural, =0{No record match the specified search.} one{1 record found.} other{{hits} records found.}}",
|
|
544
548
|
"results.records.hits.selected": "{ amount } selected",
|
|
545
549
|
"results.showMore": "Show more results...",
|
|
546
|
-
"results.sortBy.changeDate": "Last modification",
|
|
547
550
|
"results.sortBy.dateStamp": "Newest",
|
|
548
551
|
"results.sortBy.popularity": "Popularity",
|
|
549
552
|
"results.sortBy.qualityScore": "Completion score",
|
|
@@ -554,7 +557,7 @@
|
|
|
554
557
|
"search.error.organizationHasNoDataset": "This organization has no records yet.",
|
|
555
558
|
"search.error.organizationNotFound": "This organization could not be found.",
|
|
556
559
|
"search.error.receivedError": "An error was received",
|
|
557
|
-
"search.error.recordHasnolink": "This record currently has no link
|
|
560
|
+
"search.error.recordHasnolink": "This record currently has no link.",
|
|
558
561
|
"search.error.recordNotFound": "The record with identifier \"{ id }\" could not be found.",
|
|
559
562
|
"search.field.any.placeholder": "Search in the catalog ...",
|
|
560
563
|
"search.field.sortBy": "Sort by:",
|
package/translations/es.json
CHANGED
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
"record.metadata.api.accessServiceProtocol.maplibre-style": "",
|
|
419
419
|
"record.metadata.api.accessServiceProtocol.ogcFeatures": "",
|
|
420
420
|
"record.metadata.api.accessServiceProtocol.other": "",
|
|
421
|
+
"record.metadata.api.accessServiceProtocol.postgis": "",
|
|
421
422
|
"record.metadata.api.accessServiceProtocol.tms": "",
|
|
422
423
|
"record.metadata.api.accessServiceProtocol.wfs": "",
|
|
423
424
|
"record.metadata.api.accessServiceProtocol.wms": "",
|
|
@@ -465,7 +466,8 @@
|
|
|
465
466
|
"record.metadata.isGeographical": "",
|
|
466
467
|
"record.metadata.keywords": "",
|
|
467
468
|
"record.metadata.languages": "",
|
|
468
|
-
"record.metadata.
|
|
469
|
+
"record.metadata.link.postgis.table": "",
|
|
470
|
+
"record.metadata.link.postgis.tooltip": "",
|
|
469
471
|
"record.metadata.linked.datasets": "",
|
|
470
472
|
"record.metadata.linked.records": "",
|
|
471
473
|
"record.metadata.linked.reuses": "",
|
|
@@ -506,6 +508,9 @@
|
|
|
506
508
|
"record.metadata.quality.updateFrequency.failed": "",
|
|
507
509
|
"record.metadata.quality.updateFrequency.success": "",
|
|
508
510
|
"record.metadata.related": "",
|
|
511
|
+
"record.metadata.resourceCreated": "",
|
|
512
|
+
"record.metadata.resourcePublished": "",
|
|
513
|
+
"record.metadata.resourceUpdated": "",
|
|
509
514
|
"record.metadata.ressources.and.links": "Recursos y enlaces",
|
|
510
515
|
"record.metadata.sheet": "",
|
|
511
516
|
"record.metadata.status": "",
|
|
@@ -542,7 +547,6 @@
|
|
|
542
547
|
"results.records.hits.found": "",
|
|
543
548
|
"results.records.hits.selected": "",
|
|
544
549
|
"results.showMore": "",
|
|
545
|
-
"results.sortBy.changeDate": "",
|
|
546
550
|
"results.sortBy.dateStamp": "",
|
|
547
551
|
"results.sortBy.popularity": "",
|
|
548
552
|
"results.sortBy.qualityScore": "",
|
package/translations/fr.json
CHANGED
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
"record.metadata.api.accessServiceProtocol.maplibre-style": "",
|
|
419
419
|
"record.metadata.api.accessServiceProtocol.ogcFeatures": "",
|
|
420
420
|
"record.metadata.api.accessServiceProtocol.other": "autre",
|
|
421
|
+
"record.metadata.api.accessServiceProtocol.postgis": "PostGIS",
|
|
421
422
|
"record.metadata.api.accessServiceProtocol.tms": "",
|
|
422
423
|
"record.metadata.api.accessServiceProtocol.wfs": "",
|
|
423
424
|
"record.metadata.api.accessServiceProtocol.wms": "",
|
|
@@ -465,7 +466,8 @@
|
|
|
465
466
|
"record.metadata.isGeographical": "Donnée géographique",
|
|
466
467
|
"record.metadata.keywords": "Mots-clés",
|
|
467
468
|
"record.metadata.languages": "Langues",
|
|
468
|
-
"record.metadata.
|
|
469
|
+
"record.metadata.link.postgis.table": "table :",
|
|
470
|
+
"record.metadata.link.postgis.tooltip": "Les ressources de type PostGIS n'ont pas de lien d'accès",
|
|
469
471
|
"record.metadata.linked.datasets": "Jeux de données associés",
|
|
470
472
|
"record.metadata.linked.records": "Contenus associés",
|
|
471
473
|
"record.metadata.linked.reuses": "Réutilisations associées",
|
|
@@ -506,6 +508,9 @@
|
|
|
506
508
|
"record.metadata.quality.updateFrequency.failed": "La fréquence de mise à jour n'est pas renseignée",
|
|
507
509
|
"record.metadata.quality.updateFrequency.success": "La fréquence de mise à jour est renseignée",
|
|
508
510
|
"record.metadata.related": "Explorez le catalogue",
|
|
511
|
+
"record.metadata.resourceCreated": "Créé le {date}",
|
|
512
|
+
"record.metadata.resourcePublished": "Publié le {date}",
|
|
513
|
+
"record.metadata.resourceUpdated": "Mis à jour le {date}",
|
|
509
514
|
"record.metadata.ressources.and.links": "Ressources et liens",
|
|
510
515
|
"record.metadata.sheet": "Fiche de métadonnées d'origine",
|
|
511
516
|
"record.metadata.status": "Statut",
|
|
@@ -542,7 +547,6 @@
|
|
|
542
547
|
"results.records.hits.found": "{hits, plural, =0{Aucune correspondance.} one{1 ressource trouvée.} other{{hits} ressources.}}",
|
|
543
548
|
"results.records.hits.selected": "{amount, plural, one{1 selectionné} other{{ amount } sélectionnés}}",
|
|
544
549
|
"results.showMore": "Plus de résultats...",
|
|
545
|
-
"results.sortBy.changeDate": "Dernière modification",
|
|
546
550
|
"results.sortBy.dateStamp": "Plus récent",
|
|
547
551
|
"results.sortBy.popularity": "Popularité",
|
|
548
552
|
"results.sortBy.qualityScore": "Indicateur de complétion",
|
|
@@ -553,7 +557,7 @@
|
|
|
553
557
|
"search.error.organizationHasNoDataset": "Cette organisation n'a pas encore de ressources.",
|
|
554
558
|
"search.error.organizationNotFound": "L'organisation n'a pas pu être trouvée.",
|
|
555
559
|
"search.error.receivedError": "Erreur retournée",
|
|
556
|
-
"search.error.recordHasnolink": "Cette ressource n'a
|
|
560
|
+
"search.error.recordHasnolink": "Cette ressource n'a actuellement aucun lien.",
|
|
557
561
|
"search.error.recordNotFound": "La ressource dont l'identifiant est \"{ id }\" n'a pas pu être trouvée.",
|
|
558
562
|
"search.field.any.placeholder": "Rechercher dans le catalogue...",
|
|
559
563
|
"search.field.sortBy": "Trier par :",
|
package/translations/it.json
CHANGED
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
"record.metadata.api.accessServiceProtocol.maplibre-style": "",
|
|
419
419
|
"record.metadata.api.accessServiceProtocol.ogcFeatures": "",
|
|
420
420
|
"record.metadata.api.accessServiceProtocol.other": "",
|
|
421
|
+
"record.metadata.api.accessServiceProtocol.postgis": "",
|
|
421
422
|
"record.metadata.api.accessServiceProtocol.tms": "",
|
|
422
423
|
"record.metadata.api.accessServiceProtocol.wfs": "",
|
|
423
424
|
"record.metadata.api.accessServiceProtocol.wms": "",
|
|
@@ -465,7 +466,8 @@
|
|
|
465
466
|
"record.metadata.isGeographical": "Dati geografici",
|
|
466
467
|
"record.metadata.keywords": "Parole chiave",
|
|
467
468
|
"record.metadata.languages": "Lingue",
|
|
468
|
-
"record.metadata.
|
|
469
|
+
"record.metadata.link.postgis.table": "",
|
|
470
|
+
"record.metadata.link.postgis.tooltip": "",
|
|
469
471
|
"record.metadata.linked.datasets": "",
|
|
470
472
|
"record.metadata.linked.records": "",
|
|
471
473
|
"record.metadata.linked.reuses": "",
|
|
@@ -506,6 +508,9 @@
|
|
|
506
508
|
"record.metadata.quality.updateFrequency.failed": "La frequenza di aggiornamento non è specificata",
|
|
507
509
|
"record.metadata.quality.updateFrequency.success": "La frequenza di aggiornamento è specificata",
|
|
508
510
|
"record.metadata.related": "Vedi anche",
|
|
511
|
+
"record.metadata.resourceCreated": "Creato il {date}",
|
|
512
|
+
"record.metadata.resourcePublished": "Pubblicato il {date}",
|
|
513
|
+
"record.metadata.resourceUpdated": "Ultimo aggiornamento il {date}",
|
|
509
514
|
"record.metadata.ressources.and.links": "Risorse e collegamenti",
|
|
510
515
|
"record.metadata.sheet": "Origine del metadata",
|
|
511
516
|
"record.metadata.status": "Stato",
|
|
@@ -542,7 +547,6 @@
|
|
|
542
547
|
"results.records.hits.found": "{hits, plural, =0{Nessuna corrispondenza.} one{1 record trovato.} other{{hits} risultati.}}",
|
|
543
548
|
"results.records.hits.selected": "{amount, plural, one{1 selezionato} other{{ amount } selezionati}}",
|
|
544
549
|
"results.showMore": "Altri risultati...",
|
|
545
|
-
"results.sortBy.changeDate": "Ultima modifica",
|
|
546
550
|
"results.sortBy.dateStamp": "Più recente",
|
|
547
551
|
"results.sortBy.popularity": "Popolarità",
|
|
548
552
|
"results.sortBy.qualityScore": "Indicatore di completamento",
|
|
@@ -553,7 +557,7 @@
|
|
|
553
557
|
"search.error.organizationHasNoDataset": "Questa organizzazione non ha ancora records.",
|
|
554
558
|
"search.error.organizationNotFound": "Impossibile trovare l'organizzazione.",
|
|
555
559
|
"search.error.receivedError": "Errore restituito",
|
|
556
|
-
"search.error.recordHasnolink": "Questo record non ha
|
|
560
|
+
"search.error.recordHasnolink": "Questo record non ha attualmente alcun collegamento.",
|
|
557
561
|
"search.error.recordNotFound": "Impossibile trovare questi record.",
|
|
558
562
|
"search.field.any.placeholder": "Cerca del catalogo...",
|
|
559
563
|
"search.field.sortBy": "Ordina per:",
|