geonetwork-ui 2.7.0-dev.47822f9d1 → 2.7.0-dev.4cf8fec3b
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/iso19139/utils/status.mapper.mjs +4 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +5 -1
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +12 -2
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +5 -1
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.mjs +80 -0
- package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +1 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +4 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +5 -4
- package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +5 -4
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +21 -43
- package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +5 -4
- package/esm2022/libs/util/shared/src/index.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -2
- package/esm2022/libs/util/shared/src/lib/record/index.mjs +3 -0
- package/esm2022/libs/util/shared/src/lib/record/quality-score.util.mjs +45 -0
- package/esm2022/libs/util/shared/src/lib/record/record.util.mjs +56 -0
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/mobile-screen.mjs +9 -0
- package/esm2022/translations/de.json +7 -0
- package/esm2022/translations/en.json +7 -0
- package/esm2022/translations/es.json +7 -0
- package/esm2022/translations/fr.json +8 -1
- package/esm2022/translations/it.json +7 -0
- package/esm2022/translations/nl.json +7 -0
- package/esm2022/translations/pt.json +7 -0
- package/esm2022/translations/sk.json +7 -0
- package/fesm2022/geonetwork-ui.mjs +244 -62
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts +19 -0
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +7 -6
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +1 -0
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -1
- package/libs/util/shared/src/index.d.ts +1 -1
- package/libs/util/shared/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/record/index.d.ts +3 -0
- package/libs/util/shared/src/lib/record/index.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts +13 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts +3 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +12 -1
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +4 -0
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +0 -3
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.html +37 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.ts +90 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +2 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +0 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +3 -1
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +12 -11
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +4 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +7 -1
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +1 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +5 -1
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -0
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +21 -54
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +7 -1
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +3 -1
- package/src/libs/util/shared/src/index.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +2 -1
- package/src/libs/util/shared/src/lib/record/index.ts +2 -0
- package/src/libs/util/shared/src/lib/record/quality-score.util.ts +69 -0
- package/src/libs/util/shared/src/lib/{record.util.ts → record/record.util.ts} +1 -1
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/mobile-screen.ts +14 -0
- package/translations/de.json +7 -0
- package/translations/en.json +7 -0
- package/translations/es.json +7 -0
- package/translations/fr.json +8 -1
- package/translations/it.json +7 -0
- package/translations/nl.json +7 -0
- package/translations/pt.json +7 -0
- package/translations/sk.json +7 -0
- package/esm2022/libs/util/shared/src/lib/record.util.mjs +0 -56
- package/libs/util/shared/src/lib/record.util.d.ts +0 -3
- package/libs/util/shared/src/lib/record.util.d.ts.map +0 -1
|
@@ -389,7 +389,9 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
389
389
|
) {
|
|
390
390
|
// FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
|
|
391
391
|
return of({
|
|
392
|
-
url: link.url
|
|
392
|
+
url: link.url
|
|
393
|
+
.toString()
|
|
394
|
+
.replace(/\/?$/, `/${link.name}/{z}/{x}/{y}.pbf`),
|
|
393
395
|
type: 'xyz',
|
|
394
396
|
tileFormat: 'application/vnd.mapbox-vector-tile',
|
|
395
397
|
name: link.name,
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
<span class="px-3">({{ linksCount }})</span>
|
|
14
14
|
</div>
|
|
15
15
|
<gn-ui-previous-next-buttons
|
|
16
|
-
|
|
17
|
-
*ngIf="_list?.pagesCount > 1"
|
|
16
|
+
*ngIf="(isMobile$ | async) === false && _list?.pagesCount > 1"
|
|
18
17
|
[listComponent]="_list"
|
|
19
18
|
></gn-ui-previous-next-buttons>
|
|
20
19
|
</div>
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
|
|
41
40
|
<ng-container>
|
|
42
41
|
<gn-ui-block-list
|
|
43
|
-
|
|
42
|
+
*ngIf="(isMobile$ | async) === false"
|
|
44
43
|
#blockList
|
|
45
44
|
(listChanges)="updateList($event)"
|
|
46
45
|
containerClass="gap-4 pt-5 pb-7"
|
|
@@ -57,12 +56,14 @@
|
|
|
57
56
|
</gn-ui-block-list>
|
|
58
57
|
</ng-container>
|
|
59
58
|
|
|
60
|
-
<div class="mb-5
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
<div class="mb-5" *ngFor="let link of filteredLinks">
|
|
60
|
+
<ng-container *ngIf="(isMobile$ | async) === true">
|
|
61
|
+
<gn-ui-download-item
|
|
62
|
+
size="M"
|
|
63
|
+
[link]="link"
|
|
64
|
+
[color]="getLinkColor(link)"
|
|
65
|
+
[format]="getLinkFormat(link)"
|
|
66
|
+
[isFromApi]="isFromApi(link)"
|
|
67
|
+
></gn-ui-download-item>
|
|
68
|
+
</ng-container>
|
|
68
69
|
</div>
|
|
@@ -6,7 +6,11 @@ import {
|
|
|
6
6
|
} from '@angular/core'
|
|
7
7
|
import { TranslateDirective, TranslateService } from '@ngx-translate/core'
|
|
8
8
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
getBadgeColor,
|
|
11
|
+
getFileFormat,
|
|
12
|
+
getIsMobile,
|
|
13
|
+
} from '../../../../../../libs/util/shared/src'
|
|
10
14
|
import { DatasetDownloadDistribution } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
11
15
|
import { CommonModule } from '@angular/common'
|
|
12
16
|
import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
@@ -50,6 +54,8 @@ export class DownloadsListComponent {
|
|
|
50
54
|
return this.filteredLinks?.length || 0
|
|
51
55
|
}
|
|
52
56
|
|
|
57
|
+
isMobile$ = getIsMobile()
|
|
58
|
+
|
|
53
59
|
activeFilterFormats: FilterFormat[] = ['all']
|
|
54
60
|
|
|
55
61
|
updateList($event: BlockListComponent) {
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
class="shrink-0 text-[0.75em]"
|
|
8
8
|
name="matLocationSearchingOutline"
|
|
9
9
|
></ng-icon>
|
|
10
|
-
<span
|
|
10
|
+
<span
|
|
11
|
+
class="ml-1 inline-block shrink-0"
|
|
12
|
+
*ngIf="(isMobile$ | async) === false && showLabel"
|
|
13
|
+
translate
|
|
11
14
|
>record.metadata.isGeographical</span
|
|
12
15
|
>
|
|
13
16
|
</div>
|
|
@@ -4,7 +4,11 @@ import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/mode
|
|
|
4
4
|
import { CommonModule } from '@angular/common'
|
|
5
5
|
import { TranslateDirective, TranslatePipe } from '@ngx-translate/core'
|
|
6
6
|
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getIsMobile,
|
|
9
|
+
LinkClassifierService,
|
|
10
|
+
LinkUsage,
|
|
11
|
+
} from '../../../../../../libs/util/shared/src'
|
|
8
12
|
|
|
9
13
|
@Component({
|
|
10
14
|
selector: 'gn-ui-geo-data-badge',
|
|
@@ -24,6 +28,8 @@ export class GeoDataBadgeComponent {
|
|
|
24
28
|
@Input() styling = 'default'
|
|
25
29
|
@Input() record: CatalogRecord
|
|
26
30
|
|
|
31
|
+
isMobile$ = getIsMobile()
|
|
32
|
+
|
|
27
33
|
isGeodata() {
|
|
28
34
|
const links =
|
|
29
35
|
'onlineResources' in this.record ? this.record.onlineResources : []
|
|
@@ -21,7 +21,11 @@ import { KindBadgeComponent } from '../kind-badge/kind-badge.component'
|
|
|
21
21
|
import { MarkdownParserComponent } from '../markdown-parser/markdown-parser.component'
|
|
22
22
|
import { MetadataQualityComponent } from '../metadata-quality/metadata-quality.component'
|
|
23
23
|
import { ThumbnailComponent } from '../thumbnail/thumbnail.component'
|
|
24
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
removeWhitespace,
|
|
26
|
+
stripHtml,
|
|
27
|
+
type ValidatorMapperKeys,
|
|
28
|
+
} from '../../../../../../libs/util/shared/src'
|
|
25
29
|
|
|
26
30
|
type CardSize = 'L' | 'M' | 'S' | 'XS'
|
|
27
31
|
|
|
@@ -14,15 +14,16 @@ import {
|
|
|
14
14
|
PopoverComponent,
|
|
15
15
|
ProgressBarComponent,
|
|
16
16
|
} from '../../../../../../libs/ui/widgets/src'
|
|
17
|
+
import {
|
|
18
|
+
getQualityValidators,
|
|
19
|
+
getAllKeysValidator,
|
|
20
|
+
type ValidatorMapperKeys,
|
|
21
|
+
} from '../../../../../../libs/util/shared/src'
|
|
17
22
|
import { CommonModule } from '@angular/common'
|
|
18
23
|
import { TranslateDirective } from '@ngx-translate/core'
|
|
19
24
|
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
|
|
20
25
|
import { matInfoOutline } from '@ng-icons/material-icons/outline'
|
|
21
26
|
|
|
22
|
-
type QualityChecks = {
|
|
23
|
-
[key: string]: (metadata: Partial<CatalogRecord>) => boolean
|
|
24
|
-
}
|
|
25
|
-
|
|
26
27
|
@Component({
|
|
27
28
|
selector: 'gn-ui-metadata-quality',
|
|
28
29
|
templateUrl: './metadata-quality.component.html',
|
|
@@ -48,77 +49,43 @@ type QualityChecks = {
|
|
|
48
49
|
],
|
|
49
50
|
})
|
|
50
51
|
export class MetadataQualityComponent implements OnChanges {
|
|
51
|
-
@Input() metadata:
|
|
52
|
+
@Input() metadata: CatalogRecord
|
|
52
53
|
@Input() smaller = false
|
|
53
54
|
@Input() metadataQualityDisplay: boolean
|
|
55
|
+
@Input() popoverDisplay = true
|
|
56
|
+
@Input() propsToValidate?: ValidatorMapperKeys[]
|
|
57
|
+
@Input() forceComputeScore = false // Instead of returning es' quality score
|
|
54
58
|
|
|
55
59
|
items: MetadataQualityItem[] = []
|
|
56
60
|
|
|
57
61
|
get qualityScore() {
|
|
58
|
-
const qualityScore = this.
|
|
62
|
+
const qualityScore = !this.forceComputeScore
|
|
63
|
+
? this.metadata?.extras?.qualityScore
|
|
64
|
+
: this.computedQualityScore
|
|
65
|
+
|
|
59
66
|
return typeof qualityScore === 'number'
|
|
60
67
|
? qualityScore
|
|
61
|
-
: this.
|
|
68
|
+
: this.computedQualityScore
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
get
|
|
71
|
+
get computedQualityScore(): number {
|
|
65
72
|
return Math.round(
|
|
66
73
|
(this.items.filter(({ value }) => value).length * 100) / this.items.length
|
|
67
74
|
)
|
|
68
75
|
}
|
|
69
76
|
|
|
70
|
-
private add(name: string, value: boolean) {
|
|
71
|
-
if (this.metadataQualityDisplay?.[name] !== false) {
|
|
72
|
-
this.items.push({ name, value })
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
77
|
hasGetCapabilities(url: string): boolean {
|
|
76
78
|
return url.toLowerCase().includes('capabilities')
|
|
77
79
|
}
|
|
78
80
|
|
|
79
|
-
private readonly COMMON_CHECKS: QualityChecks = {
|
|
80
|
-
title: (metadata) => !!metadata?.title,
|
|
81
|
-
description: (metadata) => !!metadata?.abstract,
|
|
82
|
-
keywords: (metadata) => (metadata?.keywords?.length ?? 0) > 0,
|
|
83
|
-
legalConstraints: (metadata) =>
|
|
84
|
-
(metadata?.legalConstraints?.length ?? 0) > 0,
|
|
85
|
-
contact: (metadata) => !!metadata?.contacts?.[0]?.email,
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
private readonly SPECIFIC_CHECKS: Record<string, QualityChecks> = {
|
|
89
|
-
dataset: {
|
|
90
|
-
updateFrequency: (metadata) => !!metadata?.updateFrequency,
|
|
91
|
-
topic: (metadata) => (metadata?.topics?.length ?? 0) > 0,
|
|
92
|
-
organisation: (metadata) => !!metadata?.contacts?.[0]?.organization?.name,
|
|
93
|
-
},
|
|
94
|
-
service: {
|
|
95
|
-
capabilities: (metadata) =>
|
|
96
|
-
(metadata?.onlineResources ?? []).some((resource) =>
|
|
97
|
-
this.hasGetCapabilities(resource?.url?.href ?? '')
|
|
98
|
-
),
|
|
99
|
-
},
|
|
100
|
-
reuse: {
|
|
101
|
-
topic: (metadata) => (metadata?.topics?.length ?? 0) > 0,
|
|
102
|
-
organisation: (metadata) => !!metadata?.contacts?.[0]?.organization?.name,
|
|
103
|
-
source: (metadata) => !!metadata?.extras?.sourcesIdentifiers,
|
|
104
|
-
},
|
|
105
|
-
}
|
|
106
|
-
|
|
107
81
|
initialize() {
|
|
108
|
-
this.
|
|
109
|
-
|
|
110
|
-
Object.entries(this.COMMON_CHECKS).forEach(([name, check]) => {
|
|
111
|
-
this.add(name, check(this.metadata))
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
const datasetType = this.metadata?.kind
|
|
115
|
-
if (datasetType && this.SPECIFIC_CHECKS[datasetType]) {
|
|
116
|
-
Object.entries(this.SPECIFIC_CHECKS[datasetType]).forEach(
|
|
117
|
-
([name, check]) => {
|
|
118
|
-
this.add(name, check(this.metadata))
|
|
119
|
-
}
|
|
120
|
-
)
|
|
82
|
+
if (!this.propsToValidate) {
|
|
83
|
+
this.propsToValidate = getAllKeysValidator()
|
|
121
84
|
}
|
|
85
|
+
|
|
86
|
+
this.items = getQualityValidators(this.metadata, this.propsToValidate).map(
|
|
87
|
+
({ name, validator }) => ({ name, value: validator() })
|
|
88
|
+
)
|
|
122
89
|
}
|
|
123
90
|
|
|
124
91
|
ngOnChanges(changes: SimpleChanges): void {
|
package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div
|
|
2
2
|
class="flex items-center justify-between p-3 mt-8 bg-white rounded-lg border-b solid border-gray-300"
|
|
3
|
+
*ngIf="
|
|
4
|
+
(isMobile$ | async) === false || featureCatalog?.featureTypes?.length > 1
|
|
5
|
+
"
|
|
3
6
|
>
|
|
4
7
|
<div
|
|
5
8
|
class="relative shrink-0"
|
|
@@ -17,7 +20,10 @@
|
|
|
17
20
|
name="iconoirSearch"
|
|
18
21
|
></ng-icon>
|
|
19
22
|
</div>
|
|
20
|
-
<div
|
|
23
|
+
<div
|
|
24
|
+
*ngIf="(isMobile$ | async) === false"
|
|
25
|
+
class="text-sm px-1 ml-auto inline"
|
|
26
|
+
>
|
|
21
27
|
<ng-container *ngIf="featureCatalog?.featureTypes?.length > 1">
|
|
22
28
|
<span
|
|
23
29
|
class="text-sm font-medium text-gray-900"
|
package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { DatasetFeatureCatalog } from '../../../../../../libs/common/domain/src/
|
|
|
6
6
|
import { FormsModule } from '@angular/forms'
|
|
7
7
|
import { of } from 'rxjs'
|
|
8
8
|
import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'
|
|
9
|
-
import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
|
|
9
|
+
import { createFuzzyFilter, getIsMobile } from '../../../../../../libs/util/shared/src'
|
|
10
10
|
import { iconoirSearch } from '@ng-icons/iconoir'
|
|
11
11
|
|
|
12
12
|
@Component({
|
|
@@ -39,6 +39,8 @@ export class SearchFeatureCatalogComponent {
|
|
|
39
39
|
return this._featureCatalog
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
isMobile$ = getIsMobile()
|
|
43
|
+
|
|
42
44
|
@Output() filteredFeatureCatalogChange =
|
|
43
45
|
new EventEmitter<DatasetFeatureCatalog>()
|
|
44
46
|
filteredFeatureCatalog: DatasetFeatureCatalog
|
|
@@ -23,8 +23,8 @@ export const FORMATS = {
|
|
|
23
23
|
excel: {
|
|
24
24
|
extensions: [
|
|
25
25
|
'excel',
|
|
26
|
-
'xls',
|
|
27
26
|
'xlsx',
|
|
27
|
+
'xls',
|
|
28
28
|
'ms-excel',
|
|
29
29
|
'openxmlformats-officedocument',
|
|
30
30
|
],
|
|
@@ -190,6 +190,7 @@ export function isFormatInQueryParam(
|
|
|
190
190
|
alias: string
|
|
191
191
|
): boolean {
|
|
192
192
|
const queryParams = link.url.searchParams
|
|
193
|
+
if (!queryParams) return false
|
|
193
194
|
for (const [key, value] of queryParams.entries()) {
|
|
194
195
|
if (key === 'format' || key === 'f') {
|
|
195
196
|
return value === alias
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CatalogRecord,
|
|
3
|
+
RecordKind,
|
|
4
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
5
|
+
|
|
6
|
+
type TValidatorMapper = {
|
|
7
|
+
[key: string]: (metadata: Partial<CatalogRecord>) => boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ValidatorMapper: TValidatorMapper = {
|
|
11
|
+
title: (record) => !!record?.title,
|
|
12
|
+
abstract: (record) => !!record?.abstract,
|
|
13
|
+
keywords: (record) => (record?.keywords?.length ?? 0) > 0,
|
|
14
|
+
legalConstraints: (record) => (record?.legalConstraints?.length ?? 0) > 0,
|
|
15
|
+
contacts: (record) => !!record?.contacts?.[0]?.email,
|
|
16
|
+
updateFrequency: (record) => !!record?.updateFrequency,
|
|
17
|
+
topics: (record) => (record?.topics?.length ?? 0) > 0,
|
|
18
|
+
organisation: (record) => !!record?.contacts?.[0]?.organization?.name,
|
|
19
|
+
capabilities: (record) =>
|
|
20
|
+
record?.onlineResources?.some((resource) =>
|
|
21
|
+
resource?.url?.href.toLowerCase().includes('capabilities')
|
|
22
|
+
),
|
|
23
|
+
source: (record) => !!record?.extras?.sourcesIdentifiers,
|
|
24
|
+
} as const
|
|
25
|
+
|
|
26
|
+
export type ValidatorMapperKeys = keyof typeof ValidatorMapper & string
|
|
27
|
+
|
|
28
|
+
export function getAllKeysValidator() {
|
|
29
|
+
return Object.keys(ValidatorMapper)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function getMappersFromKind(kind: RecordKind) {
|
|
33
|
+
let kindKeys = <ValidatorMapperKeys[]>[]
|
|
34
|
+
const commonsKeys = <ValidatorMapperKeys[]>[
|
|
35
|
+
'title',
|
|
36
|
+
'abstract',
|
|
37
|
+
'keywords',
|
|
38
|
+
'legalConstraints',
|
|
39
|
+
'contacts',
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
switch (kind) {
|
|
43
|
+
case 'service':
|
|
44
|
+
kindKeys = ['capabilities']
|
|
45
|
+
break
|
|
46
|
+
case 'reuse':
|
|
47
|
+
kindKeys = ['topics', 'organisation', 'source']
|
|
48
|
+
break
|
|
49
|
+
case 'dataset':
|
|
50
|
+
default:
|
|
51
|
+
kindKeys = ['updateFrequency', 'topics', 'organisation']
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return [...commonsKeys, ...kindKeys]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function getQualityValidators(
|
|
58
|
+
record: Partial<CatalogRecord>,
|
|
59
|
+
propsToValidate: ValidatorMapperKeys[]
|
|
60
|
+
) {
|
|
61
|
+
const filteredProps = propsToValidate.filter((prop) =>
|
|
62
|
+
getMappersFromKind(record.kind).includes(prop)
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return filteredProps.map((name) => ({
|
|
66
|
+
name,
|
|
67
|
+
validator: () => ValidatorMapper[name](record),
|
|
68
|
+
}))
|
|
69
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { fromEvent, startWith, map, shareReplay } from 'rxjs'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This returns true when the screen size is under 768px, which is the mobile threshold.
|
|
5
|
+
*/
|
|
6
|
+
const MOBILE_MAX_WIDTH = 768
|
|
7
|
+
|
|
8
|
+
export function getIsMobile() {
|
|
9
|
+
return fromEvent(window, 'resize').pipe(
|
|
10
|
+
startWith(window.innerWidth),
|
|
11
|
+
map(() => window.innerWidth < MOBILE_MAX_WIDTH),
|
|
12
|
+
shareReplay({ bufferSize: 1, refCount: true })
|
|
13
|
+
)
|
|
14
|
+
}
|
package/translations/de.json
CHANGED
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
"domain.record.status.completed": "Abgeschlossen",
|
|
87
87
|
"domain.record.status.deprecated": "Veraltet",
|
|
88
88
|
"domain.record.status.ongoing": "Kontinuierliche Aktualisierung",
|
|
89
|
+
"domain.record.status.planned": "",
|
|
89
90
|
"domain.record.status.removed": "Entfernt",
|
|
91
|
+
"domain.record.status.required": "",
|
|
90
92
|
"domain.record.status.under_development": "In Erstellung",
|
|
91
93
|
"domain.record.updateFrequency.annually": "Daten werden jedes Jahr aktualisiert",
|
|
92
94
|
"domain.record.updateFrequency.asNeeded": "Daten werden nach Bedarf aktualisiert",
|
|
@@ -142,6 +144,7 @@
|
|
|
142
144
|
"editor.record.form.draft.updateAlert": "",
|
|
143
145
|
"editor.record.form.field.abstract": "Kurzbeschreibung",
|
|
144
146
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
147
|
+
"editor.record.form.field.contacts": "Ansprechpartner - Email",
|
|
145
148
|
"editor.record.form.field.contacts.noContact": "",
|
|
146
149
|
"editor.record.form.field.contacts.placeholder": "",
|
|
147
150
|
"editor.record.form.field.contactsForResource.noContact": "",
|
|
@@ -166,6 +169,7 @@
|
|
|
166
169
|
"editor.record.form.field.onlineResource.toggle.dataset": "",
|
|
167
170
|
"editor.record.form.field.onlineResource.toggle.service": "",
|
|
168
171
|
"editor.record.form.field.onlineResources": "",
|
|
172
|
+
"editor.record.form.field.organisation": "Ansprechpartner - Organisation",
|
|
169
173
|
"editor.record.form.field.otherConstraints": "Allgemeine Einschränkung",
|
|
170
174
|
"editor.record.form.field.overviews": "",
|
|
171
175
|
"editor.record.form.field.recordUpdated": "Datensatz zuletzt aktualisiert",
|
|
@@ -177,6 +181,7 @@
|
|
|
177
181
|
"editor.record.form.field.temporalExtents": "Zeitlicher Umfang",
|
|
178
182
|
"editor.record.form.field.title": "Metadaten-Titel",
|
|
179
183
|
"editor.record.form.field.title.placeholder": "Geben Sie einen Titel ein",
|
|
184
|
+
"editor.record.form.field.topics": "Kategorien",
|
|
180
185
|
"editor.record.form.field.uniqueIdentifier": "Eindeutige Kennung (ID)",
|
|
181
186
|
"editor.record.form.field.updateFrequency": "Aktualisierungshäufigkeit",
|
|
182
187
|
"editor.record.form.keywords.place.placeholder": "",
|
|
@@ -191,6 +196,8 @@
|
|
|
191
196
|
"editor.record.form.license.odc-by": "",
|
|
192
197
|
"editor.record.form.license.pddl": "",
|
|
193
198
|
"editor.record.form.license.unknown": "",
|
|
199
|
+
"editor.record.form.metadataQuality.open": "Öffnen Sie das Panel zur Metadatenqualität",
|
|
200
|
+
"editor.record.form.metadataQuality.title": "Vollständigkeit",
|
|
194
201
|
"editor.record.form.multilingual.activate": "",
|
|
195
202
|
"editor.record.form.multilingual.default": "",
|
|
196
203
|
"editor.record.form.multilingual.enable": "",
|
package/translations/en.json
CHANGED
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
"domain.record.status.completed": "Completed",
|
|
87
87
|
"domain.record.status.deprecated": "Deprecated",
|
|
88
88
|
"domain.record.status.ongoing": "Ongoing",
|
|
89
|
+
"domain.record.status.planned": "Planned",
|
|
89
90
|
"domain.record.status.removed": "Removed",
|
|
91
|
+
"domain.record.status.required": "Required",
|
|
90
92
|
"domain.record.status.under_development": "Under development",
|
|
91
93
|
"domain.record.updateFrequency.annually": "Data is updated every year",
|
|
92
94
|
"domain.record.updateFrequency.asNeeded": "Data is updated as deemed necessary",
|
|
@@ -142,6 +144,7 @@
|
|
|
142
144
|
"editor.record.form.draft.updateAlert": "Since you created this draft, the dataset has been updated on { date } by { user }. Publishing your draft might erase their edits. To avoid this, you need to either cancel your changes or knowingly publish your own version.",
|
|
143
145
|
"editor.record.form.field.abstract": "Abstract",
|
|
144
146
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
147
|
+
"editor.record.form.field.contacts": "Point of contact - Email",
|
|
145
148
|
"editor.record.form.field.contacts.noContact": "Please provide at least one point of contact.",
|
|
146
149
|
"editor.record.form.field.contacts.placeholder": "Choose a contact",
|
|
147
150
|
"editor.record.form.field.contactsForResource.noContact": "Please provide at least one point of contact responsible for the data.",
|
|
@@ -166,6 +169,7 @@
|
|
|
166
169
|
"editor.record.form.field.onlineResource.toggle.dataset": "Link to a file",
|
|
167
170
|
"editor.record.form.field.onlineResource.toggle.service": "Link to a service",
|
|
168
171
|
"editor.record.form.field.onlineResources": "Distribution",
|
|
172
|
+
"editor.record.form.field.organisation": "Point of contact - Organization",
|
|
169
173
|
"editor.record.form.field.otherConstraints": "Other constraint",
|
|
170
174
|
"editor.record.form.field.overviews": "Overview",
|
|
171
175
|
"editor.record.form.field.recordUpdated": "Record updated",
|
|
@@ -177,6 +181,7 @@
|
|
|
177
181
|
"editor.record.form.field.temporalExtents": "Temporal extents",
|
|
178
182
|
"editor.record.form.field.title": "Metadata title",
|
|
179
183
|
"editor.record.form.field.title.placeholder": "Enter a title",
|
|
184
|
+
"editor.record.form.field.topics": "Categories",
|
|
180
185
|
"editor.record.form.field.uniqueIdentifier": "Unique identifier",
|
|
181
186
|
"editor.record.form.field.updateFrequency": "Update frequency",
|
|
182
187
|
"editor.record.form.keywords.place.placeholder": "Search for place keywords",
|
|
@@ -191,6 +196,8 @@
|
|
|
191
196
|
"editor.record.form.license.odc-by": "Open Data Commons ODC-By",
|
|
192
197
|
"editor.record.form.license.pddl": "Open Data Commons PDDL",
|
|
193
198
|
"editor.record.form.license.unknown": "Unknown or absent",
|
|
199
|
+
"editor.record.form.metadataQuality.open": "Open the metadata quality panel",
|
|
200
|
+
"editor.record.form.metadataQuality.title": "Completeness",
|
|
194
201
|
"editor.record.form.multilingual.activate": "Activate the languages",
|
|
195
202
|
"editor.record.form.multilingual.default": "Default",
|
|
196
203
|
"editor.record.form.multilingual.enable": "Multilingual Mode",
|
package/translations/es.json
CHANGED
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
"domain.record.status.completed": "",
|
|
87
87
|
"domain.record.status.deprecated": "",
|
|
88
88
|
"domain.record.status.ongoing": "",
|
|
89
|
+
"domain.record.status.planned": "",
|
|
89
90
|
"domain.record.status.removed": "",
|
|
91
|
+
"domain.record.status.required": "",
|
|
90
92
|
"domain.record.status.under_development": "",
|
|
91
93
|
"domain.record.updateFrequency.annually": "Los datos se actualizan cada año",
|
|
92
94
|
"domain.record.updateFrequency.asNeeded": "Los datos se actualizan según sea necesario",
|
|
@@ -142,6 +144,7 @@
|
|
|
142
144
|
"editor.record.form.draft.updateAlert": "",
|
|
143
145
|
"editor.record.form.field.abstract": "",
|
|
144
146
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
147
|
+
"editor.record.form.field.contacts": "Punto de contacto - Correo ",
|
|
145
148
|
"editor.record.form.field.contacts.noContact": "",
|
|
146
149
|
"editor.record.form.field.contacts.placeholder": "",
|
|
147
150
|
"editor.record.form.field.contactsForResource.noContact": "",
|
|
@@ -166,6 +169,7 @@
|
|
|
166
169
|
"editor.record.form.field.onlineResource.toggle.dataset": "",
|
|
167
170
|
"editor.record.form.field.onlineResource.toggle.service": "",
|
|
168
171
|
"editor.record.form.field.onlineResources": "",
|
|
172
|
+
"editor.record.form.field.organisation": "Punto de contacto - Organización",
|
|
169
173
|
"editor.record.form.field.otherConstraints": "",
|
|
170
174
|
"editor.record.form.field.overviews": "",
|
|
171
175
|
"editor.record.form.field.recordUpdated": "",
|
|
@@ -177,6 +181,7 @@
|
|
|
177
181
|
"editor.record.form.field.temporalExtents": "",
|
|
178
182
|
"editor.record.form.field.title": "",
|
|
179
183
|
"editor.record.form.field.title.placeholder": "Introduzca un título",
|
|
184
|
+
"editor.record.form.field.topics": "Categorías",
|
|
180
185
|
"editor.record.form.field.uniqueIdentifier": "",
|
|
181
186
|
"editor.record.form.field.updateFrequency": "",
|
|
182
187
|
"editor.record.form.keywords.place.placeholder": "",
|
|
@@ -191,6 +196,8 @@
|
|
|
191
196
|
"editor.record.form.license.odc-by": "",
|
|
192
197
|
"editor.record.form.license.pddl": "",
|
|
193
198
|
"editor.record.form.license.unknown": "",
|
|
199
|
+
"editor.record.form.metadataQuality.open": "Abrir el panel de calidad de los metadatos",
|
|
200
|
+
"editor.record.form.metadataQuality.title": "Completitud",
|
|
194
201
|
"editor.record.form.multilingual.activate": "",
|
|
195
202
|
"editor.record.form.multilingual.default": "",
|
|
196
203
|
"editor.record.form.multilingual.enable": "",
|
package/translations/fr.json
CHANGED
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
"domain.record.status.completed": "Finalisé",
|
|
87
87
|
"domain.record.status.deprecated": "Obsolète",
|
|
88
88
|
"domain.record.status.ongoing": "Mise à jour continue",
|
|
89
|
+
"domain.record.status.planned": "Planifié",
|
|
89
90
|
"domain.record.status.removed": "Supprimé",
|
|
91
|
+
"domain.record.status.required": "Obligatoire",
|
|
90
92
|
"domain.record.status.under_development": "En cours de création",
|
|
91
93
|
"domain.record.updateFrequency.annually": "Les données sont mises à jour chaque année",
|
|
92
94
|
"domain.record.updateFrequency.asNeeded": "Les données sont mises à jour selon les besoins",
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
"domain.record.updateFrequency.irregular": "Les données sont mises à jour à intervalles irréguliers",
|
|
100
102
|
"domain.record.updateFrequency.month": "{count, plural, =0{0 fois} one{Une fois} other{{count} fois}} par mois",
|
|
101
103
|
"domain.record.updateFrequency.monthly": "Les données sont mises à jour chaque mois",
|
|
102
|
-
"domain.record.updateFrequency.notPlanned": "
|
|
104
|
+
"domain.record.updateFrequency.notPlanned": "La mise à jour des données n’est pas planifiée",
|
|
103
105
|
"domain.record.updateFrequency.periodic": "Les données sont mises à jour à intervalles réguliers",
|
|
104
106
|
"domain.record.updateFrequency.quarterly": "Les données sont mises à jour tous les trois mois",
|
|
105
107
|
"domain.record.updateFrequency.semimonthly": "Les données sont mises à jour deux fois par mois",
|
|
@@ -142,6 +144,7 @@
|
|
|
142
144
|
"editor.record.form.draft.updateAlert": "Depuis la création de ce brouillon, ce jeu de données a été modifié le { date } par { user }. Publier votre version peut supprimer ses modifications. Pour éviter cela, vous pouvez annuler vos changements, ou publier votre version en connaissance de cause.",
|
|
143
145
|
"editor.record.form.field.abstract": "Description",
|
|
144
146
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
147
|
+
"editor.record.form.field.contacts": "Point de contact - Email",
|
|
145
148
|
"editor.record.form.field.contacts.noContact": "Veuillez renseigner au moins un point de contact.",
|
|
146
149
|
"editor.record.form.field.contacts.placeholder": "Choisissez un contact",
|
|
147
150
|
"editor.record.form.field.contactsForResource.noContact": "Veuillez renseigner au moins un point de contact responsable de la donnée.",
|
|
@@ -166,6 +169,7 @@
|
|
|
166
169
|
"editor.record.form.field.onlineResource.toggle.dataset": "Lier un fichier",
|
|
167
170
|
"editor.record.form.field.onlineResource.toggle.service": "Lier un service",
|
|
168
171
|
"editor.record.form.field.onlineResources": "Distribution",
|
|
172
|
+
"editor.record.form.field.organisation": "Point de contact - Organisation",
|
|
169
173
|
"editor.record.form.field.otherConstraints": "Contrainte générale",
|
|
170
174
|
"editor.record.form.field.overviews": "Aperçu",
|
|
171
175
|
"editor.record.form.field.recordUpdated": "Date de mise à jour",
|
|
@@ -177,6 +181,7 @@
|
|
|
177
181
|
"editor.record.form.field.temporalExtents": "Étendue temporelle",
|
|
178
182
|
"editor.record.form.field.title": "Titre",
|
|
179
183
|
"editor.record.form.field.title.placeholder": "Saisir un titre",
|
|
184
|
+
"editor.record.form.field.topics": "Thèmes",
|
|
180
185
|
"editor.record.form.field.uniqueIdentifier": "Identifiant unique",
|
|
181
186
|
"editor.record.form.field.updateFrequency": "Fréquence de mise à jour",
|
|
182
187
|
"editor.record.form.keywords.place.placeholder": "Rechercher une localisation par mot-clé",
|
|
@@ -191,6 +196,8 @@
|
|
|
191
196
|
"editor.record.form.license.odc-by": "Open Data Commons ODC-By",
|
|
192
197
|
"editor.record.form.license.pddl": "Open Data Commons PDDL",
|
|
193
198
|
"editor.record.form.license.unknown": "Inconnue ou absente",
|
|
199
|
+
"editor.record.form.metadataQuality.open": "Ouvrir le menu de qualité des métadonnées",
|
|
200
|
+
"editor.record.form.metadataQuality.title": "Complétion",
|
|
194
201
|
"editor.record.form.multilingual.activate": "Activez les langues",
|
|
195
202
|
"editor.record.form.multilingual.default": "Par défaut",
|
|
196
203
|
"editor.record.form.multilingual.enable": "Mode Multilingue",
|