geonetwork-ui 2.11.0-dev.aed5b2e5b → 2.11.0-dev.b7f9a229d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/geonetwork-ui.mjs +287 -205
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +100 -54
- package/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +107 -34
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +20 -1
- package/src/libs/feature/map/src/index.ts +0 -1
- package/src/libs/feature/map/src/lib/feature-map.module.ts +1 -8
- package/src/libs/feature/search/src/index.ts +2 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +3 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +13 -1
- package/src/libs/feature/{map/src/lib → search/src/lib/geocoding}/geocoding.service.ts +16 -7
- package/src/libs/feature/search/src/lib/location-search/location-search.component.html +8 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.ts +40 -0
- package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +1 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +8 -2
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +49 -5
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +10 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +8 -0
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +7 -4
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +12 -9
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.model.ts +2 -2
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +5 -11
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +34 -4
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +1 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +2 -0
- package/src/libs/util/app-config/src/lib/app-config.ts +5 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +3 -0
- package/src/libs/util/app-config/src/lib/model.ts +4 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +19 -10
- package/src/libs/util/shared/src/lib/utils/geojson.ts +24 -0
- package/translations/de.json +8 -4
- package/translations/en.json +9 -5
- package/translations/es.json +8 -4
- package/translations/fr.json +9 -5
- package/translations/it.json +8 -4
- package/translations/nl.json +8 -4
- package/translations/pt.json +8 -4
- package/translations/sk.json +8 -4
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.css +0 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +0 -41
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +0 -112
package/translations/sk.json
CHANGED
|
@@ -425,7 +425,6 @@
|
|
|
425
425
|
"map.add.layer.wms": "Z WMS",
|
|
426
426
|
"map.addFromFile.placeholder": "Kliknite na tlačidlo alebo sem vložte súbor",
|
|
427
427
|
"map.dropdown.placeholder": "",
|
|
428
|
-
"map.geocoding.placeholder": "Nájsť miesto",
|
|
429
428
|
"map.help.addFromFile": "Kliknite na tlačidlo alebo sem vložte súbor, ktorý chcete pridať do mapy (v súčasnosti podporuje iba formát GeoJSON).",
|
|
430
429
|
"map.layer.add": "Pridať",
|
|
431
430
|
"map.layers.available": "Dostupné vrsty",
|
|
@@ -690,18 +689,23 @@
|
|
|
690
689
|
"search.filters.recordKind.reuse": "",
|
|
691
690
|
"search.filters.recordKind.service": "",
|
|
692
691
|
"search.filters.representationType": "Typ reprezentácie",
|
|
692
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
693
693
|
"search.filters.resourceType": "Typ zdroja",
|
|
694
|
-
"search.filters.spatialExtent": "",
|
|
695
|
-
"search.filters.spatialExtent.
|
|
696
|
-
"search.filters.spatialExtent.
|
|
694
|
+
"search.filters.spatialExtent.bboxFromFile": "",
|
|
695
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "",
|
|
696
|
+
"search.filters.spatialExtent.bboxInitial": "",
|
|
697
|
+
"search.filters.spatialExtent.bboxInitialDelete": "",
|
|
697
698
|
"search.filters.spatialExtent.error.fileTooLarge": "",
|
|
698
699
|
"search.filters.spatialExtent.error.invalidFormat": "",
|
|
699
700
|
"search.filters.spatialExtent.error.noGeometry": "",
|
|
701
|
+
"search.filters.spatialExtent.error.outOfBounds": "",
|
|
700
702
|
"search.filters.spatialExtent.error.title": "",
|
|
703
|
+
"search.filters.spatialExtent": "",
|
|
701
704
|
"search.filters.spatialExtent.helpText": "",
|
|
702
705
|
"search.filters.spatialExtent.import": "",
|
|
703
706
|
"search.filters.standard": "Štandard",
|
|
704
707
|
"search.filters.summaryLabel.changeDate": "",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
705
709
|
"search.filters.summaryLabel.user": "",
|
|
706
710
|
"search.filters.title": "Filtrovanie výsledkov",
|
|
707
711
|
"search.filters.topic": "Témy",
|
|
File without changes
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<gn-ui-search-input
|
|
2
|
-
[(value)]="searchText"
|
|
3
|
-
(valueChange)="onSearchChange($event)"
|
|
4
|
-
(keyup.enter)="onEnterPress()"
|
|
5
|
-
[placeholder]="'map.geocoding.placeholder' | translate"
|
|
6
|
-
>
|
|
7
|
-
</gn-ui-search-input>
|
|
8
|
-
@if (results && results.length) {
|
|
9
|
-
<ul
|
|
10
|
-
class="bg-gray-50 border border-gray-200 w-full mt-2 shadow-sm rounded-lg"
|
|
11
|
-
>
|
|
12
|
-
@for (result of results; track result) {
|
|
13
|
-
<li
|
|
14
|
-
(click)="zoomToLocation(result)"
|
|
15
|
-
class="flex items-center pl-8 pr-4 py-2 border-b border-gray-200 relative cursor-pointer hover:bg-blue-100 hover:text-gray-800 transition duration-300 ease-in-out"
|
|
16
|
-
>
|
|
17
|
-
<svg
|
|
18
|
-
class="stroke-current text-blue-500 absolute w-5 h-5 left-3 top-3"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
fill="none"
|
|
21
|
-
viewBox="0 0 24 24"
|
|
22
|
-
stroke="currentColor"
|
|
23
|
-
>
|
|
24
|
-
<path
|
|
25
|
-
stroke-linecap="round"
|
|
26
|
-
stroke-linejoin="round"
|
|
27
|
-
stroke-width="2"
|
|
28
|
-
d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
29
|
-
/>
|
|
30
|
-
<path
|
|
31
|
-
stroke-linecap="round"
|
|
32
|
-
stroke-linejoin="round"
|
|
33
|
-
stroke-width="2"
|
|
34
|
-
d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
35
|
-
/>
|
|
36
|
-
</svg>
|
|
37
|
-
<span class="font-sans font-semibold ml-4">{{ result.label }}</span>
|
|
38
|
-
</li>
|
|
39
|
-
}
|
|
40
|
-
</ul>
|
|
41
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { Component, OnDestroy, inject } from '@angular/core'
|
|
2
|
-
import { catchError, firstValueFrom, from, Subject, takeUntil } from 'rxjs'
|
|
3
|
-
import { debounceTime, switchMap } from 'rxjs/operators'
|
|
4
|
-
import { GeocodingService } from '../geocoding.service'
|
|
5
|
-
import { MapFacade } from '../+state/map.facade'
|
|
6
|
-
|
|
7
|
-
import { SearchInputComponent } from '../../../../../../libs/ui/inputs/src'
|
|
8
|
-
import { TranslatePipe } from '@ngx-translate/core'
|
|
9
|
-
import { MapContextView } from '@geospatial-sdk/core'
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'gn-ui-geocoding',
|
|
13
|
-
templateUrl: './geocoding.component.html',
|
|
14
|
-
styleUrls: ['./geocoding.component.css'],
|
|
15
|
-
standalone: true,
|
|
16
|
-
imports: [SearchInputComponent, TranslatePipe],
|
|
17
|
-
})
|
|
18
|
-
export class GeocodingComponent implements OnDestroy {
|
|
19
|
-
private mapFacade = inject(MapFacade)
|
|
20
|
-
private geocodingService = inject(GeocodingService)
|
|
21
|
-
|
|
22
|
-
searchText = ''
|
|
23
|
-
results: any[] = []
|
|
24
|
-
searchTextChanged = new Subject<string>()
|
|
25
|
-
destroy$ = new Subject<void>()
|
|
26
|
-
errorMessage: string | null = null
|
|
27
|
-
|
|
28
|
-
constructor() {
|
|
29
|
-
this.searchTextChanged
|
|
30
|
-
.pipe(
|
|
31
|
-
debounceTime(300),
|
|
32
|
-
switchMap((searchText) => {
|
|
33
|
-
return from(this.geocodingService.query(searchText)).pipe(
|
|
34
|
-
catchError((error) => {
|
|
35
|
-
this.errorMessage =
|
|
36
|
-
'An error occurred while searching. Please try again.'
|
|
37
|
-
console.error(error)
|
|
38
|
-
return []
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
}),
|
|
42
|
-
takeUntil(this.destroy$)
|
|
43
|
-
)
|
|
44
|
-
.subscribe((results) => {
|
|
45
|
-
this.results = results
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
ngOnDestroy() {
|
|
50
|
-
this.destroy$.next()
|
|
51
|
-
this.destroy$.complete()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
onSearchChange(searchText: string) {
|
|
55
|
-
if (!searchText) {
|
|
56
|
-
this.clearSearch()
|
|
57
|
-
return
|
|
58
|
-
} else {
|
|
59
|
-
this.searchTextChanged.next(searchText)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
clearSearch() {
|
|
64
|
-
this.searchText = ''
|
|
65
|
-
this.results = []
|
|
66
|
-
this.errorMessage = null
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async zoomToLocation(result: any) {
|
|
70
|
-
const geometry = result.geom
|
|
71
|
-
|
|
72
|
-
if (geometry.type === 'Point') {
|
|
73
|
-
await this.zoomToPoint(geometry.coordinates)
|
|
74
|
-
} else if (geometry.type === 'Polygon') {
|
|
75
|
-
await this.zoomToPolygon(geometry.coordinates)
|
|
76
|
-
} else {
|
|
77
|
-
console.error(`Unsupported geometry type: ${geometry.type}`)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async zoomToPoint(pointCoords: [number, number]) {
|
|
82
|
-
const context = await firstValueFrom(this.mapFacade.context$)
|
|
83
|
-
const view: MapContextView = {
|
|
84
|
-
center: pointCoords,
|
|
85
|
-
zoom: 10,
|
|
86
|
-
}
|
|
87
|
-
this.mapFacade.applyContext({
|
|
88
|
-
...context,
|
|
89
|
-
view,
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async zoomToPolygon(polygonCoords: [[number, number][]]) {
|
|
94
|
-
const context = await firstValueFrom(this.mapFacade.context$)
|
|
95
|
-
const view: MapContextView = {
|
|
96
|
-
geometry: {
|
|
97
|
-
type: 'Polygon',
|
|
98
|
-
coordinates: polygonCoords,
|
|
99
|
-
},
|
|
100
|
-
}
|
|
101
|
-
this.mapFacade.applyContext({
|
|
102
|
-
...context,
|
|
103
|
-
view,
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
onEnterPress() {
|
|
108
|
-
if (this.results && this.results.length > 0) {
|
|
109
|
-
this.zoomToLocation(this.results[0])
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|