geonetwork-ui 2.11.0-dev.bc1a6d4e2 → 2.11.0-dev.bd615f629
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 +55 -36
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +20 -25
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +30 -28
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +1 -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 +6 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +16 -0
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +2 -1
- 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/util/shared/src/lib/links/link-utils.ts +19 -10
- package/translations/de.json +2 -0
- package/translations/en.json +2 -0
- package/translations/es.json +2 -0
- package/translations/fr.json +2 -0
- package/translations/it.json +2 -0
- package/translations/nl.json +2 -0
- package/translations/pt.json +2 -0
- package/translations/sk.json +2 -0
|
@@ -128,7 +128,8 @@ export class ServiceCapabilitiesComponent implements OnInit {
|
|
|
128
128
|
this.loading = true
|
|
129
129
|
this.availableLayers = await getLayers(
|
|
130
130
|
this.apiLinks[0].url.href,
|
|
131
|
-
this.apiLinks[0].accessServiceProtocol
|
|
131
|
+
this.apiLinks[0].accessServiceProtocol,
|
|
132
|
+
true
|
|
132
133
|
)
|
|
133
134
|
this.loading = false
|
|
134
135
|
this.cdr.detectChanges()
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
}
|
|
22
22
|
</div>
|
|
23
|
-
<button
|
|
23
|
+
<button
|
|
24
|
+
class="h-6 w-6 flex items-center justify-center"
|
|
25
|
+
data-test="dropdown-clear"
|
|
26
|
+
>
|
|
24
27
|
@if (hasSelectedChoices && !overlayOpen) {
|
|
25
28
|
<ng-icon
|
|
26
|
-
class="shrink-0 opacity-40
|
|
29
|
+
class="shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn"
|
|
27
30
|
(click)="clearSelection($event)"
|
|
28
31
|
name="matClose"
|
|
29
32
|
></ng-icon>
|
|
@@ -61,13 +64,13 @@
|
|
|
61
64
|
#overlayContainer
|
|
62
65
|
>
|
|
63
66
|
<div
|
|
64
|
-
class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-
|
|
67
|
+
class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-1 flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
|
|
65
68
|
>
|
|
66
69
|
@for (selected of selectedChoices; track selected) {
|
|
67
70
|
<button
|
|
68
71
|
type="button"
|
|
69
72
|
[title]="selected.label"
|
|
70
|
-
class="max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity
|
|
73
|
+
class="max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity"
|
|
71
74
|
(click)="select(selected, false)"
|
|
72
75
|
>
|
|
73
76
|
<div class="text-sm truncate leading-[26px] px-2">
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
propagateToDocumentOnly,
|
|
25
25
|
} from '../../../../../../libs/util/shared/src'
|
|
26
26
|
import { ButtonComponent } from '../button/button.component'
|
|
27
|
-
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
27
|
+
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
|
|
28
28
|
import { FormsModule } from '@angular/forms'
|
|
29
29
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
30
30
|
|
|
@@ -46,19 +46,22 @@ import {
|
|
|
46
46
|
matExpandMore,
|
|
47
47
|
matExpandLess,
|
|
48
48
|
}),
|
|
49
|
+
provideNgIconsConfig({
|
|
50
|
+
size: '1.5rem',
|
|
51
|
+
}),
|
|
49
52
|
],
|
|
50
53
|
standalone: true,
|
|
51
54
|
})
|
|
52
|
-
export class DropdownMultiselectComponent {
|
|
55
|
+
export class DropdownMultiselectComponent<T = unknown> {
|
|
53
56
|
private scrollStrategies = inject(ScrollStrategyOptions)
|
|
54
57
|
|
|
55
58
|
@Input() title: string
|
|
56
|
-
@Input() choices: Choice[]
|
|
57
|
-
@Input() selected:
|
|
59
|
+
@Input() choices: Choice<T>[]
|
|
60
|
+
@Input() selected: T[] = []
|
|
58
61
|
@Input() allowSearch = true
|
|
59
62
|
@Input() maxRows: number
|
|
60
63
|
@Input() searchInputValue = ''
|
|
61
|
-
@Output() selectValues = new EventEmitter<
|
|
64
|
+
@Output() selectValues = new EventEmitter<T[]>()
|
|
62
65
|
@ViewChild('overlayOrigin') overlayOrigin: CdkOverlayOrigin
|
|
63
66
|
@ViewChild(CdkConnectedOverlay) overlay: CdkConnectedOverlay
|
|
64
67
|
@ViewChild('overlayContainer', { read: ElementRef })
|
|
@@ -115,7 +118,7 @@ export class DropdownMultiselectComponent {
|
|
|
115
118
|
|
|
116
119
|
private setFocus() {
|
|
117
120
|
setTimeout(() => {
|
|
118
|
-
this.searchFieldInput
|
|
121
|
+
this.searchFieldInput?.nativeElement.focus()
|
|
119
122
|
}, 0)
|
|
120
123
|
}
|
|
121
124
|
|
|
@@ -194,18 +197,18 @@ export class DropdownMultiselectComponent {
|
|
|
194
197
|
this.checkboxes.get(newIndex).nativeElement.focus()
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
isSelected(choice: Choice) {
|
|
200
|
+
isSelected(choice: Choice<T>) {
|
|
198
201
|
return this.selected.indexOf(choice.value) > -1
|
|
199
202
|
}
|
|
200
203
|
|
|
201
|
-
select(choice: Choice
|
|
204
|
+
select(choice: Choice<T>, selected: boolean) {
|
|
202
205
|
this.selected = selected
|
|
203
206
|
? [...this.selected.filter((v) => v !== choice.value), choice.value]
|
|
204
207
|
: this.selected.filter((v) => v !== choice.value)
|
|
205
208
|
this.selectValues.emit(this.selected)
|
|
206
209
|
}
|
|
207
210
|
|
|
208
|
-
toggle(choice: Choice) {
|
|
211
|
+
toggle(choice: Choice<T>) {
|
|
209
212
|
this.select(choice, !this.isSelected(choice))
|
|
210
213
|
}
|
|
211
214
|
|
|
@@ -344,7 +344,11 @@ export function getLinkLabel(
|
|
|
344
344
|
return format ? `${label} (${format})` : label
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
export async function getLayers(
|
|
347
|
+
export async function getLayers(
|
|
348
|
+
url: string,
|
|
349
|
+
serviceProtocol: ServiceProtocol,
|
|
350
|
+
deep = false
|
|
351
|
+
) {
|
|
348
352
|
switch (serviceProtocol) {
|
|
349
353
|
case 'ogcFeatures': {
|
|
350
354
|
const layers = await new OgcApiEndpoint(url).allCollections
|
|
@@ -352,7 +356,10 @@ export async function getLayers(url: string, serviceProtocol: ServiceProtocol) {
|
|
|
352
356
|
}
|
|
353
357
|
case 'wfs': {
|
|
354
358
|
const endpointWfs = await new WfsEndpoint(url).isReady()
|
|
355
|
-
const featureTypes =
|
|
359
|
+
const featureTypes = endpointWfs.getFeatureTypes()
|
|
360
|
+
if (!deep) {
|
|
361
|
+
return featureTypes
|
|
362
|
+
}
|
|
356
363
|
const layers = (
|
|
357
364
|
await Promise.allSettled(
|
|
358
365
|
featureTypes.map((collection) => {
|
|
@@ -366,14 +373,16 @@ export async function getLayers(url: string, serviceProtocol: ServiceProtocol) {
|
|
|
366
373
|
}
|
|
367
374
|
case 'wms': {
|
|
368
375
|
const endpointWms = await new WmsEndpoint(url).isReady()
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
const layersSummary = endpointWms
|
|
377
|
+
.getLayers()
|
|
378
|
+
.flatMap(wmsLayerFlatten)
|
|
379
|
+
.filter((l) => l.name)
|
|
380
|
+
if (!deep) {
|
|
381
|
+
return layersSummary
|
|
382
|
+
}
|
|
383
|
+
const layers = layersSummary.map((collection) =>
|
|
384
|
+
endpointWms.getLayerByName(collection.name)
|
|
385
|
+
)
|
|
377
386
|
return layers
|
|
378
387
|
}
|
|
379
388
|
case 'wmts': {
|
package/translations/de.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "Wiederverwendungen",
|
|
691
691
|
"search.filters.recordKind.service": "Dienste",
|
|
692
692
|
"search.filters.representationType": "Repräsentationstyp",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "Ressourcendatum",
|
|
693
694
|
"search.filters.resourceType": "Ressourcentyp",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "Standard",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "Geändert am: ",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Ressourcendatum: ",
|
|
707
709
|
"search.filters.summaryLabel.user": "Geändert von: ",
|
|
708
710
|
"search.filters.title": "Ergebnisse filtern",
|
|
709
711
|
"search.filters.topic": "Themen",
|
package/translations/en.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "Reuses",
|
|
691
691
|
"search.filters.recordKind.service": "Services",
|
|
692
692
|
"search.filters.representationType": "Representation type",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "Resource date",
|
|
693
694
|
"search.filters.resourceType": "Resource type",
|
|
694
695
|
"search.filters.spatialExtent": "Spatial extent",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "extent from {fileName}",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "Import a GeoJSON",
|
|
705
706
|
"search.filters.standard": "Standard",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "Updated: ",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Resource date: ",
|
|
707
709
|
"search.filters.summaryLabel.user": "Editor: ",
|
|
708
710
|
"search.filters.title": "Filter your results",
|
|
709
711
|
"search.filters.topic": "Topics",
|
package/translations/es.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "",
|
|
691
691
|
"search.filters.recordKind.service": "",
|
|
692
692
|
"search.filters.representationType": "",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
693
694
|
"search.filters.resourceType": "",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
707
709
|
"search.filters.summaryLabel.user": "",
|
|
708
710
|
"search.filters.title": "",
|
|
709
711
|
"search.filters.topic": "",
|
package/translations/fr.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "Réutilisations",
|
|
691
691
|
"search.filters.recordKind.service": "Services",
|
|
692
692
|
"search.filters.representationType": "Type de représentation",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "Date de la ressource",
|
|
693
694
|
"search.filters.resourceType": "Type de ressource",
|
|
694
695
|
"search.filters.spatialExtent": "Étendue spatiale",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "étendue de {fileName}",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "Importer un GeoJSON",
|
|
705
706
|
"search.filters.standard": "Standard",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "Mise à jour : ",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Date de la ressource : ",
|
|
707
709
|
"search.filters.summaryLabel.user": "Éditeur : ",
|
|
708
710
|
"search.filters.title": "Affiner votre recherche",
|
|
709
711
|
"search.filters.topic": "Thèmes",
|
package/translations/it.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "Riutilizzi",
|
|
691
691
|
"search.filters.recordKind.service": "Servizi",
|
|
692
692
|
"search.filters.representationType": "Tipo di rappresentazione",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "Data della risorsa",
|
|
693
694
|
"search.filters.resourceType": "Tipo di risorsa",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "Standard",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "Aggiornato: ",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Data della risorsa: ",
|
|
707
709
|
"search.filters.summaryLabel.user": "Editor: ",
|
|
708
710
|
"search.filters.title": "Affina la sua ricerca",
|
|
709
711
|
"search.filters.topic": "Argomenti",
|
package/translations/nl.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "",
|
|
691
691
|
"search.filters.recordKind.service": "",
|
|
692
692
|
"search.filters.representationType": "",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
693
694
|
"search.filters.resourceType": "",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
707
709
|
"search.filters.summaryLabel.user": "",
|
|
708
710
|
"search.filters.title": "",
|
|
709
711
|
"search.filters.topic": "",
|
package/translations/pt.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "",
|
|
691
691
|
"search.filters.recordKind.service": "",
|
|
692
692
|
"search.filters.representationType": "",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
693
694
|
"search.filters.resourceType": "",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
707
709
|
"search.filters.summaryLabel.user": "",
|
|
708
710
|
"search.filters.title": "",
|
|
709
711
|
"search.filters.topic": "",
|
package/translations/sk.json
CHANGED
|
@@ -690,6 +690,7 @@
|
|
|
690
690
|
"search.filters.recordKind.reuse": "",
|
|
691
691
|
"search.filters.recordKind.service": "",
|
|
692
692
|
"search.filters.representationType": "Typ reprezentácie",
|
|
693
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
693
694
|
"search.filters.resourceType": "Typ zdroja",
|
|
694
695
|
"search.filters.spatialExtent": "",
|
|
695
696
|
"search.filters.spatialExtent.bboxFromFile": "",
|
|
@@ -704,6 +705,7 @@
|
|
|
704
705
|
"search.filters.spatialExtent.import": "",
|
|
705
706
|
"search.filters.standard": "Štandard",
|
|
706
707
|
"search.filters.summaryLabel.changeDate": "",
|
|
708
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
707
709
|
"search.filters.summaryLabel.user": "",
|
|
708
710
|
"search.filters.title": "Filtrovanie výsledkov",
|
|
709
711
|
"search.filters.topic": "Témy",
|