geonetwork-ui 2.7.0-dev.d500b08cc → 2.7.0-dev.d51ff2ddf
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/elasticsearch/constant.mjs +4 -6
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +47 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +32 -4
- package/esm2022/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +5 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +10 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -2
- 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/map/src/lib/utils/map-utils.service.mjs +3 -5
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +31 -12
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +76 -27
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/state/reducer.mjs +5 -2
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +4 -3
- 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/ui/map/src/lib/components/map-legend/map-legend.component.mjs +2 -2
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +5 -1
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/shared/src/index.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +12 -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/geojson.mjs +58 -1
- 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 +9 -1
- package/esm2022/translations/en.json +9 -1
- package/esm2022/translations/es.json +9 -1
- package/esm2022/translations/fr.json +10 -2
- package/esm2022/translations/it.json +9 -1
- package/esm2022/translations/nl.json +9 -1
- package/esm2022/translations/pt.json +9 -1
- package/esm2022/translations/sk.json +9 -1
- package/fesm2022/geonetwork-ui.mjs +2725 -2331
- 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/elasticsearch/constant.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +3 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +3 -2
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.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/map/src/lib/utils/map-utils.service.d.ts +2 -2
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +8 -4
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +12 -5
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/reducer.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.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/app-config/src/lib/app-config.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/model.d.ts +2 -0
- package/libs/util/app-config/src/lib/model.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 +2 -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/geojson.d.ts +7 -2
- package/libs/util/shared/src/lib/utils/geojson.d.ts.map +1 -1
- 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/elasticsearch/constant.ts +3 -5
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +50 -3
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +38 -4
- package/src/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +4 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -0
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +0 -3
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +10 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +3 -1
- 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/map/src/lib/utils/map-utils.service.ts +8 -8
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +34 -15
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +5 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +70 -23
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -1
- package/src/libs/feature/search/src/lib/state/reducer.ts +4 -1
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +6 -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/ui/map/src/lib/components/map-legend/map-legend.component.ts +1 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +4 -0
- package/src/libs/util/app-config/src/lib/model.ts +2 -0
- package/src/libs/util/shared/src/index.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +11 -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/geojson.ts +72 -2
- 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 +9 -1
- package/translations/en.json +9 -1
- package/translations/es.json +9 -1
- package/translations/fr.json +10 -2
- package/translations/it.json +9 -1
- package/translations/nl.json +9 -1
- package/translations/pt.json +9 -1
- package/translations/sk.json +9 -1
- 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
|
@@ -5,15 +5,16 @@ import {
|
|
|
5
5
|
Input,
|
|
6
6
|
Output,
|
|
7
7
|
} from '@angular/core'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
getLinkId,
|
|
10
|
+
getLinkLabel,
|
|
11
|
+
getLinkPriority,
|
|
12
|
+
} from '../../../../../../libs/util/shared/src'
|
|
9
13
|
import { BehaviorSubject, combineLatest } from 'rxjs'
|
|
10
14
|
import { map, tap } from 'rxjs/operators'
|
|
11
15
|
import { MdViewFacade } from '../state'
|
|
12
16
|
import { DatavizChartConfigModel } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
|
|
13
|
-
import {
|
|
14
|
-
DatasetOnlineResource,
|
|
15
|
-
DatasetServiceDistribution,
|
|
16
|
-
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
17
|
+
import { DatasetOnlineResource } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
17
18
|
import { DropdownSelectorComponent } from '../../../../../../libs/ui/inputs/src'
|
|
18
19
|
import {
|
|
19
20
|
ChartViewComponent,
|
|
@@ -45,13 +46,28 @@ export class DataViewComponent {
|
|
|
45
46
|
@Input() set exceedsLimit(value: boolean) {
|
|
46
47
|
this.excludeWfs$.next(value)
|
|
47
48
|
}
|
|
49
|
+
linkMap: Map<string, DatasetOnlineResource> = new Map()
|
|
48
50
|
_selectedView = ''
|
|
51
|
+
_chartConfig = null
|
|
52
|
+
_selectedChoice = null
|
|
49
53
|
@Input() set selectedView(value: string) {
|
|
50
54
|
this._selectedView = value
|
|
51
|
-
if (
|
|
55
|
+
if (this.mode === value) {
|
|
52
56
|
this.linkSelected.emit(this.selectedLink$.value)
|
|
53
57
|
}
|
|
54
58
|
}
|
|
59
|
+
@Input() set datavizConfig(value: any) {
|
|
60
|
+
this._selectedView = value.view
|
|
61
|
+
if (this.mode === value.view) {
|
|
62
|
+
if (!value.source) {
|
|
63
|
+
this.linkSelected.emit(this.selectedLink$.value)
|
|
64
|
+
} else {
|
|
65
|
+
this._chartConfig = value.chartConfig
|
|
66
|
+
this._selectedChoice = getLinkId(value.source)
|
|
67
|
+
this.selectedLink$.next(value.source)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
55
71
|
@Output() chartConfig$ = new BehaviorSubject<DatavizChartConfigModel>(null)
|
|
56
72
|
@Output() linkSelected = new EventEmitter<DatasetOnlineResource>()
|
|
57
73
|
cacheActive$ = this.mdViewFacade.isHighUpdateFrequency$.pipe(
|
|
@@ -69,15 +85,19 @@ export class DataViewComponent {
|
|
|
69
85
|
})
|
|
70
86
|
)
|
|
71
87
|
dropdownChoices$ = this.compatibleDataLinks$.pipe(
|
|
72
|
-
tap((links) => {
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
tap((links: DatasetOnlineResource[]) => {
|
|
89
|
+
this.linkMap.clear()
|
|
90
|
+
links.forEach((link: DatasetOnlineResource) =>
|
|
91
|
+
this.linkMap.set(getLinkId(link), link)
|
|
92
|
+
)
|
|
93
|
+
if (!links.some((l) => l.url === this.selectedLink$.value?.url)) {
|
|
94
|
+
this.selectLink(getLinkId(links[0]))
|
|
75
95
|
}
|
|
76
96
|
}),
|
|
77
97
|
map((links) =>
|
|
78
|
-
links.map((link) => ({
|
|
98
|
+
links.map((link: DatasetOnlineResource) => ({
|
|
79
99
|
label: getLinkLabel(link),
|
|
80
|
-
value:
|
|
100
|
+
value: getLinkId(link),
|
|
81
101
|
}))
|
|
82
102
|
)
|
|
83
103
|
)
|
|
@@ -93,12 +113,11 @@ export class DataViewComponent {
|
|
|
93
113
|
this.mdViewFacade.setChartConfig(event)
|
|
94
114
|
}
|
|
95
115
|
|
|
96
|
-
selectLink(
|
|
97
|
-
const link
|
|
98
|
-
if (this._selectedView && this._selectedView
|
|
116
|
+
selectLink(linkId: string) {
|
|
117
|
+
const link = this.linkMap.get(linkId)
|
|
118
|
+
if (this._selectedView && this._selectedView === this.mode) {
|
|
99
119
|
this.linkSelected.emit(link)
|
|
100
120
|
}
|
|
101
|
-
link.url = new URL(link.url)
|
|
102
121
|
this.selectedLink$.next(link)
|
|
103
122
|
}
|
|
104
123
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
extraBtnClass="font-sans font-bold"
|
|
9
9
|
[title]="'map.select.layer' | translate"
|
|
10
10
|
[choices]="dropdownChoices$ | async"
|
|
11
|
+
[selected]="_selectedChoice"
|
|
11
12
|
(selectValue)="selectLinkToDisplay($event)"
|
|
12
13
|
></gn-ui-dropdown-selector>
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
extraBtnClass="font-sans font-bold"
|
|
18
19
|
[title]="'map.select.style' | translate"
|
|
19
20
|
[choices]="styleDropdownChoices$ | async"
|
|
21
|
+
[selected]="_styleFromConfig"
|
|
20
22
|
(selectValue)="selectStyleToDisplay($event)"
|
|
21
23
|
></gn-ui-dropdown-selector>
|
|
22
24
|
</ng-container>
|
|
@@ -85,7 +87,7 @@
|
|
|
85
87
|
[hidden]="!showLegend || !legendExists"
|
|
86
88
|
>
|
|
87
89
|
<div class="flex justify-between items-center mb-2">
|
|
88
|
-
<div class="text-primary font-bold">
|
|
90
|
+
<div class="text-primary font-bold" translate>map.legend.title</div>
|
|
89
91
|
<gn-ui-button
|
|
90
92
|
type="light"
|
|
91
93
|
(buttonClick)="toggleLegend()"
|
|
@@ -110,8 +112,9 @@
|
|
|
110
112
|
type="outline"
|
|
111
113
|
(buttonClick)="toggleLegend()"
|
|
112
114
|
extraClass="absolute top-[1em] right-[1em] rounded p-1 text-xs bg-white"
|
|
115
|
+
translate
|
|
113
116
|
>
|
|
114
|
-
|
|
117
|
+
map.legend.title
|
|
115
118
|
</gn-ui-button>
|
|
116
119
|
|
|
117
120
|
<gn-ui-loading-mask
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ViewChild,
|
|
10
10
|
} from '@angular/core'
|
|
11
11
|
import { MapUtilsService } from '../../../../../../libs/feature/map/src'
|
|
12
|
-
import { getLinkLabel } from '../../../../../../libs/util/shared/src'
|
|
12
|
+
import { getLinkId, getLinkLabel } from '../../../../../../libs/util/shared/src'
|
|
13
13
|
import {
|
|
14
14
|
BehaviorSubject,
|
|
15
15
|
combineLatest,
|
|
@@ -100,15 +100,28 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
100
100
|
@Input() set exceedsLimit(value: boolean) {
|
|
101
101
|
this.excludeWfs$.next(value)
|
|
102
102
|
}
|
|
103
|
+
linkFromConfig$ = new BehaviorSubject(null)
|
|
104
|
+
_selectedChoice = null
|
|
105
|
+
_styleFromConfig = null
|
|
106
|
+
|
|
107
|
+
linkMap: Map<string, DatasetOnlineResource> = new Map()
|
|
103
108
|
@Input() set selectedView(value: string) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
this.selectedView$.next(value)
|
|
110
|
+
}
|
|
111
|
+
@Input() set datavizConfig(value: any) {
|
|
112
|
+
if (value.view === 'map') {
|
|
113
|
+
this.selectedView$.next(value.view)
|
|
114
|
+
if (value.styleTMSIndex) {
|
|
115
|
+
this._styleFromConfig = value.styleTMSIndex
|
|
116
|
+
}
|
|
117
|
+
if (value.source) {
|
|
118
|
+
this.linkFromConfig$.next(value.source)
|
|
119
|
+
}
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
122
|
@Input() displaySource = true
|
|
111
123
|
@Output() linkSelected = new EventEmitter<DatasetOnlineResource>()
|
|
124
|
+
@Output() styleSelected = new EventEmitter<number>()
|
|
112
125
|
@ViewChild('mapContainer') mapContainer: MapContainerComponent
|
|
113
126
|
|
|
114
127
|
excludeWfs$ = new BehaviorSubject(false)
|
|
@@ -119,12 +132,13 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
119
132
|
loading = false
|
|
120
133
|
error = null
|
|
121
134
|
|
|
122
|
-
selectLinkToDisplay(
|
|
123
|
-
this.
|
|
135
|
+
selectLinkToDisplay(id: string) {
|
|
136
|
+
this.selectedLinkId$.next(id)
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
selectStyleToDisplay(i: number) {
|
|
127
|
-
this.
|
|
140
|
+
this.selectedStyleId$.next(i)
|
|
141
|
+
this.styleSelected.emit(i)
|
|
128
142
|
}
|
|
129
143
|
|
|
130
144
|
toggleLegend() {
|
|
@@ -146,29 +160,54 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
146
160
|
)
|
|
147
161
|
|
|
148
162
|
dropdownChoices$ = this.compatibleMapLinks$.pipe(
|
|
149
|
-
map((links) =>
|
|
150
|
-
|
|
151
|
-
|
|
163
|
+
map((links) => {
|
|
164
|
+
this.linkMap.clear()
|
|
165
|
+
links.forEach((link: DatasetOnlineResource) =>
|
|
166
|
+
this.linkMap.set(getLinkId(link), link)
|
|
167
|
+
)
|
|
168
|
+
return links.length
|
|
169
|
+
? links.map((link) => ({
|
|
152
170
|
label: getLinkLabel(link),
|
|
153
|
-
value:
|
|
171
|
+
value: getLinkId(link),
|
|
154
172
|
}))
|
|
155
|
-
: [{ label: 'map.dropdown.placeholder', value:
|
|
156
|
-
)
|
|
173
|
+
: [{ label: 'map.dropdown.placeholder', value: '' }]
|
|
174
|
+
})
|
|
157
175
|
)
|
|
158
176
|
|
|
159
|
-
|
|
160
|
-
|
|
177
|
+
selectedView$ = new BehaviorSubject(null)
|
|
178
|
+
selectedLinkId$ = new BehaviorSubject(null)
|
|
179
|
+
selectedStyleId$ = new BehaviorSubject(null)
|
|
161
180
|
|
|
162
181
|
selectedSourceLink$ = combineLatest([
|
|
163
182
|
this.compatibleMapLinks$,
|
|
164
|
-
this.
|
|
183
|
+
this.linkFromConfig$,
|
|
184
|
+
this.selectedLinkId$.pipe(distinctUntilChanged()),
|
|
185
|
+
this.selectedView$,
|
|
165
186
|
]).pipe(
|
|
166
187
|
tap(() => {
|
|
167
188
|
this.error = null
|
|
168
189
|
}),
|
|
169
|
-
map(([
|
|
170
|
-
|
|
171
|
-
|
|
190
|
+
map(([compatibleLinks, configLink, id, view]) => {
|
|
191
|
+
if (view === 'map') {
|
|
192
|
+
if (
|
|
193
|
+
configLink &&
|
|
194
|
+
!id &&
|
|
195
|
+
compatibleLinks.some(
|
|
196
|
+
(link) => getLinkId(link) === getLinkId(configLink)
|
|
197
|
+
)
|
|
198
|
+
) {
|
|
199
|
+
this._selectedChoice = getLinkId(configLink)
|
|
200
|
+
this.linkSelected.emit(configLink)
|
|
201
|
+
return configLink
|
|
202
|
+
} else if (id) {
|
|
203
|
+
this._selectedChoice = id
|
|
204
|
+
this.linkSelected.emit(this.linkMap.get(id))
|
|
205
|
+
return this.linkMap.get(id)
|
|
206
|
+
} else {
|
|
207
|
+
this.linkSelected.emit(compatibleLinks[0])
|
|
208
|
+
return compatibleLinks[0]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
172
211
|
})
|
|
173
212
|
)
|
|
174
213
|
|
|
@@ -205,7 +244,13 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
205
244
|
}
|
|
206
245
|
return of([])
|
|
207
246
|
}),
|
|
208
|
-
tap(() =>
|
|
247
|
+
tap((styles) => {
|
|
248
|
+
if (this._styleFromConfig && this._styleFromConfig <= styles.length) {
|
|
249
|
+
this.selectedStyleId$.next(this._styleFromConfig)
|
|
250
|
+
} else {
|
|
251
|
+
this.selectedStyleId$.next(0)
|
|
252
|
+
}
|
|
253
|
+
}),
|
|
209
254
|
shareReplay(1)
|
|
210
255
|
)
|
|
211
256
|
|
|
@@ -228,7 +273,7 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
228
273
|
selectedLink$ = combineLatest([
|
|
229
274
|
this.selectedSourceLink$,
|
|
230
275
|
this.styleLinks$,
|
|
231
|
-
this.
|
|
276
|
+
this.selectedStyleId$.pipe(distinctUntilChanged()),
|
|
232
277
|
]).pipe(
|
|
233
278
|
map(([src, styles, styleIdx]) => (styles.length ? styles[styleIdx] : src)),
|
|
234
279
|
shareReplay(1)
|
|
@@ -344,7 +389,9 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
344
389
|
) {
|
|
345
390
|
// FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
|
|
346
391
|
return of({
|
|
347
|
-
url: link.url
|
|
392
|
+
url: link.url
|
|
393
|
+
.toString()
|
|
394
|
+
.replace(/\/?$/, `/${link.name}/{z}/{x}/{y}.pbf`),
|
|
348
395
|
type: 'xyz',
|
|
349
396
|
tileFormat: 'application/vnd.mapbox-vector-tile',
|
|
350
397
|
name: link.name,
|
|
@@ -23,7 +23,11 @@ export class MdViewEffects {
|
|
|
23
23
|
ofType(MdViewActions.loadFullMetadata),
|
|
24
24
|
switchMap(({ uuid }) => this.recordsRepository.getRecord(uuid)),
|
|
25
25
|
map((record) => {
|
|
26
|
-
if (
|
|
26
|
+
if (
|
|
27
|
+
record === null ||
|
|
28
|
+
(this.router.url !== '/' && // FIXME: special case for WC, find a better way
|
|
29
|
+
!this.router.url.includes(record.kind))
|
|
30
|
+
) {
|
|
27
31
|
return MdViewActions.loadFullMetadataFailure({ notFound: true })
|
|
28
32
|
}
|
|
29
33
|
return MdViewActions.loadFullMetadataSuccess({ full: record })
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
SortByField,
|
|
9
9
|
} from '../../../../../../libs/common/domain/src/lib/model/search'
|
|
10
10
|
import { DEFAULT_PAGE_SIZE, FIELDS_SUMMARY } from '../constants'
|
|
11
|
+
import { getOptionalSearchConfig } from '../../../../../../libs/util/app-config/src'
|
|
11
12
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
12
13
|
|
|
13
14
|
export const SEARCH_FEATURE_KEY = 'searchState'
|
|
@@ -55,7 +56,9 @@ export const initSearch = (): SearchStateSearch => {
|
|
|
55
56
|
},
|
|
56
57
|
params: {
|
|
57
58
|
filters: {},
|
|
58
|
-
pageSize:
|
|
59
|
+
pageSize: getOptionalSearchConfig()?.LIMIT
|
|
60
|
+
? getOptionalSearchConfig().LIMIT
|
|
61
|
+
: DEFAULT_PAGE_SIZE,
|
|
59
62
|
currentPage: 0,
|
|
60
63
|
favoritesOnly: false,
|
|
61
64
|
useSpatialFilter: true,
|
|
@@ -14,7 +14,11 @@ import {
|
|
|
14
14
|
} from '@angular/core'
|
|
15
15
|
import { MatSort, MatSortModule } from '@angular/material/sort'
|
|
16
16
|
import { MatTableModule } from '@angular/material/table'
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
TranslateDirective,
|
|
19
|
+
TranslatePipe,
|
|
20
|
+
TranslateService,
|
|
21
|
+
} from '@ngx-translate/core'
|
|
18
22
|
import { DataTableDataSource } from './data-table.data.source'
|
|
19
23
|
import { BaseReader, FetchError } from '../../../../../../libs/util/data-fetcher/src'
|
|
20
24
|
import {
|
|
@@ -53,6 +57,7 @@ export interface TableItemModel {
|
|
|
53
57
|
PopupAlertComponent,
|
|
54
58
|
LetDirective,
|
|
55
59
|
TranslatePipe,
|
|
60
|
+
TranslateDirective,
|
|
56
61
|
],
|
|
57
62
|
providers: [{ provide: MatPaginatorIntl, useClass: CustomMatPaginatorIntl }],
|
|
58
63
|
selector: 'gn-ui-data-table',
|
|
@@ -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
|
|
@@ -27,7 +27,7 @@ export class MapLegendComponent implements OnChanges {
|
|
|
27
27
|
async ngOnChanges(changes: SimpleChanges) {
|
|
28
28
|
if ('context' in changes) {
|
|
29
29
|
const mapContext = changes['context'].currentValue
|
|
30
|
-
if (mapContext
|
|
30
|
+
if (mapContext?.layers && mapContext.layers.length > 0) {
|
|
31
31
|
const mapContextLayer = mapContext.layers[0]
|
|
32
32
|
this.legendHTML = await createLegendFromLayer(mapContextLayer)
|
|
33
33
|
if (this.legendHTML) {
|