geonetwork-ui 2.7.0-dev.fd871c105 → 2.7.0
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/repository/src/lib/gn4/gn4.provider.mjs +7 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +20 -6
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-topics/form-field-topics.component.mjs +55 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +6 -6
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +51 -45
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +24 -17
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +5 -5
- package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +8 -4
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +33 -8
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/scroll.mjs +40 -0
- package/esm2022/translations/de.json +25 -23
- package/esm2022/translations/en.json +26 -23
- package/esm2022/translations/es.json +25 -23
- package/esm2022/translations/fr.json +25 -23
- package/esm2022/translations/it.json +25 -23
- package/esm2022/translations/nl.json +25 -23
- package/esm2022/translations/pt.json +25 -23
- package/esm2022/translations/sk.json +25 -23
- package/fesm2022/geonetwork-ui.mjs +449 -332
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts +5 -1
- package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +6 -2
- 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 +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/service/data.service.d.ts +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-topics/form-field-topics.component.d.ts +20 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-topics/form-field-topics.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +4 -4
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts +1 -0
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +26 -7
- package/libs/util/shared/src/lib/links/link-utils.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/scroll.d.ts +12 -0
- package/libs/util/shared/src/lib/utils/scroll.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +13 -2
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +17 -6
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +1 -1
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -0
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +4 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-inspire-field/form-field-inspire-theme.component.html → form-field-topics/form-field-topics.component.html} +6 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-topics/form-field-topics.component.ts +57 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +3 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +3 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +51 -45
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -2
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +23 -16
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +5 -1
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +4 -3
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +2 -2
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -4
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +5 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +32 -7
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/scroll.ts +48 -0
- package/translations/de.json +25 -23
- package/translations/en.json +26 -23
- package/translations/es.json +25 -23
- package/translations/fr.json +25 -23
- package/translations/it.json +25 -23
- package/translations/nl.json +25 -23
- package/translations/pt.json +25 -23
- package/translations/sk.json +25 -23
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.mjs +0 -55
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.d.ts +0 -20
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.d.ts.map +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.ts +0 -57
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-inspire-field/form-field-inspire-theme.component.css → form-field-topics/form-field-topics.component.css} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import {
|
|
4
|
+
AutocompleteComponent,
|
|
5
|
+
BadgeComponent,
|
|
6
|
+
DropdownMultiselectComponent,
|
|
7
|
+
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
8
|
+
import { NgIconComponent } from '@ng-icons/core'
|
|
9
|
+
import { INSPIRE_TOPICS } from '../../../../fields.config'
|
|
10
|
+
import { TranslatePipe, TranslateService } from '@ngx-translate/core'
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'gn-ui-form-field-topics',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
AutocompleteComponent,
|
|
18
|
+
NgIconComponent,
|
|
19
|
+
BadgeComponent,
|
|
20
|
+
TranslatePipe,
|
|
21
|
+
DropdownMultiselectComponent,
|
|
22
|
+
],
|
|
23
|
+
templateUrl: './form-field-topics.component.html',
|
|
24
|
+
styleUrl: './form-field-topics.component.css',
|
|
25
|
+
})
|
|
26
|
+
export class FormFieldTopicsComponent {
|
|
27
|
+
topics = []
|
|
28
|
+
@Input() set value(topics: string[]) {
|
|
29
|
+
this.topics = topics
|
|
30
|
+
}
|
|
31
|
+
@Output() valueChange: EventEmitter<string[]> = new EventEmitter()
|
|
32
|
+
availableTopics = INSPIRE_TOPICS.map((topic) => {
|
|
33
|
+
return {
|
|
34
|
+
label: this.translateService.instant(topic.label),
|
|
35
|
+
value: topic.value,
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
constructor(private translateService: TranslateService) {}
|
|
40
|
+
|
|
41
|
+
handleItemSelection(selectedItems: string[]) {
|
|
42
|
+
this.topics = selectedItems
|
|
43
|
+
this.valueChange.emit(this.topics)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
removeTopic(topic: string) {
|
|
47
|
+
this.topics = this.topics.filter((t) => t !== topic)
|
|
48
|
+
this.valueChange.emit(this.topics)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getTranslatedTopic(topic: string) {
|
|
52
|
+
const topicKey = this.availableTopics.find(
|
|
53
|
+
(avail) => avail.value === topic
|
|
54
|
+
)?.label
|
|
55
|
+
return topicKey ? this.translateService.instant(topicKey) : ''
|
|
56
|
+
}
|
|
57
|
+
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
></gn-ui-form-field-keywords>
|
|
111
111
|
</ng-container>
|
|
112
112
|
<ng-container *ngSwitchCase="'topics'">
|
|
113
|
-
<gn-ui-form-field-
|
|
114
|
-
[value]="
|
|
113
|
+
<gn-ui-form-field-topics
|
|
114
|
+
[value]="valueAsTopics"
|
|
115
115
|
(valueChange)="valueChange.emit($event)"
|
|
116
|
-
></gn-ui-form-field-
|
|
116
|
+
></gn-ui-form-field-topics>
|
|
117
117
|
</ng-container>
|
|
118
118
|
<ng-container *ngSwitchCase="'licenses'">
|
|
119
119
|
<gn-ui-form-field-license
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -45,7 +45,7 @@ import { FormFieldConstraintsShortcutsComponent } from './form-field-constraints
|
|
|
45
45
|
import { FormFieldConstraintsComponent } from './form-field-constraints/form-field-constraints.component'
|
|
46
46
|
import { TextFieldModule } from '@angular/cdk/text-field'
|
|
47
47
|
import { FormFieldSpatialToggleComponent } from './form-field-spatial-toggle/form-field-spatial-toggle.component'
|
|
48
|
-
import {
|
|
48
|
+
import { FormFieldTopicsComponent } from './form-field-topics/form-field-topics.component'
|
|
49
49
|
|
|
50
50
|
@Component({
|
|
51
51
|
selector: 'gn-ui-form-field',
|
|
@@ -74,7 +74,7 @@ import { FormFieldInspireThemeComponent } from './form-field-inspire-field/form-
|
|
|
74
74
|
FormFieldConstraintsComponent,
|
|
75
75
|
FormFieldConstraintsShortcutsComponent,
|
|
76
76
|
FormFieldSpatialToggleComponent,
|
|
77
|
-
|
|
77
|
+
FormFieldTopicsComponent,
|
|
78
78
|
TextFieldModule,
|
|
79
79
|
],
|
|
80
80
|
})
|
|
@@ -130,7 +130,7 @@ export class FormFieldComponent {
|
|
|
130
130
|
get valueAsKeywords() {
|
|
131
131
|
return this.value as Array<Keyword>
|
|
132
132
|
}
|
|
133
|
-
get
|
|
133
|
+
get valueAsTopics() {
|
|
134
134
|
return this.value as Array<string>
|
|
135
135
|
}
|
|
136
136
|
get valueAsConstraints() {
|
|
@@ -10,4 +10,4 @@ export * from './form-field-array/form-field-array.component'
|
|
|
10
10
|
export * from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
11
11
|
export * from './form-field.component'
|
|
12
12
|
export * from './form-field-constraints-shortcuts/constraints.utils'
|
|
13
|
-
export * from './form-field-
|
|
13
|
+
export * from './form-field-topics/form-field-topics.component'
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
EditorSection,
|
|
6
6
|
} from './models/editor-config.model'
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
INSPIRE_topic,
|
|
9
9
|
Keyword,
|
|
10
10
|
} from '../../../../../libs/common/domain/src/lib/model/record'
|
|
11
11
|
|
|
@@ -243,9 +243,9 @@ export const CLASSIFICATION_SECTION: EditorSection = {
|
|
|
243
243
|
fields: [RECORD_KEYWORDS_FIELD],
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
export const
|
|
247
|
-
labelKey: marker('editor.record.form.section.
|
|
248
|
-
descriptionKey: marker('editor.record.form.section.
|
|
246
|
+
export const TOPICS_SECTION: EditorSection = {
|
|
247
|
+
labelKey: marker('editor.record.form.section.topics.label'),
|
|
248
|
+
descriptionKey: marker('editor.record.form.section.topics.description'),
|
|
249
249
|
hidden: false,
|
|
250
250
|
fields: [RECORD_TOPICS_FIELD],
|
|
251
251
|
}
|
|
@@ -289,7 +289,7 @@ export const DEFAULT_CONFIGURATION: EditorConfig = {
|
|
|
289
289
|
sections: [
|
|
290
290
|
TITLE_SECTION,
|
|
291
291
|
CLASSIFICATION_SECTION,
|
|
292
|
-
|
|
292
|
+
TOPICS_SECTION,
|
|
293
293
|
ABOUT_SECTION,
|
|
294
294
|
GEOGRAPHICAL_COVERAGE_SECTION,
|
|
295
295
|
],
|
|
@@ -359,69 +359,75 @@ export const SPATIAL_SCOPES: Keyword[] = [
|
|
|
359
359
|
]
|
|
360
360
|
|
|
361
361
|
/************************************************************
|
|
362
|
-
*************** INSPIRE
|
|
362
|
+
*************** INSPIRE TOPICS **************
|
|
363
363
|
************************************************************
|
|
364
364
|
*/
|
|
365
365
|
|
|
366
|
-
export const
|
|
367
|
-
{ value: 'biota', label: 'editor.record.form.inspire.biota' },
|
|
368
|
-
{
|
|
366
|
+
export const INSPIRE_TOPICS: INSPIRE_topic[] = [
|
|
367
|
+
{ value: 'biota', label: 'editor.record.form.topics.inspire.biota' },
|
|
368
|
+
{
|
|
369
|
+
value: 'boundaries',
|
|
370
|
+
label: 'editor.record.form.topics.inspire.boundaries',
|
|
371
|
+
},
|
|
369
372
|
{
|
|
370
373
|
value: 'climatologyMeteorologyAtmosphere',
|
|
371
|
-
label: 'editor.record.form.inspire.climatology',
|
|
374
|
+
label: 'editor.record.form.topics.inspire.climatology',
|
|
375
|
+
},
|
|
376
|
+
{ value: 'economy', label: 'editor.record.form.topics.inspire.economy' },
|
|
377
|
+
{ value: 'elevation', label: 'editor.record.form.topics.inspire.elevation' },
|
|
378
|
+
{
|
|
379
|
+
value: 'environment',
|
|
380
|
+
label: 'editor.record.form.topics.inspire.environnement',
|
|
372
381
|
},
|
|
373
|
-
{ value: '
|
|
374
|
-
{ value: 'elevation', label: 'editor.record.form.inspire.elevation' },
|
|
375
|
-
{ value: 'environment', label: 'editor.record.form.inspire.environnement' },
|
|
376
|
-
{ value: 'farming', label: 'editor.record.form.inspire.farming' },
|
|
382
|
+
{ value: 'farming', label: 'editor.record.form.topics.inspire.farming' },
|
|
377
383
|
{
|
|
378
384
|
value: 'geoscientific information',
|
|
379
|
-
label: 'editor.record.form.inspire.geoscientific',
|
|
385
|
+
label: 'editor.record.form.topics.inspire.geoscientific',
|
|
380
386
|
},
|
|
381
|
-
{ value: 'health', label: 'editor.record.form.inspire.health' },
|
|
387
|
+
{ value: 'health', label: 'editor.record.form.topics.inspire.health' },
|
|
382
388
|
{
|
|
383
389
|
value: 'imageryBaseMapsEarthCover',
|
|
384
|
-
label: 'editor.record.form.inspire.imagery',
|
|
390
|
+
label: 'editor.record.form.topics.inspire.imagery',
|
|
385
391
|
},
|
|
386
|
-
{ value: 'inlandWaters', label: 'editor.record.form.inspire.waters' },
|
|
392
|
+
{ value: 'inlandWaters', label: 'editor.record.form.topics.inspire.waters' },
|
|
387
393
|
{
|
|
388
394
|
value: 'intelligenceMilitary',
|
|
389
|
-
label: 'editor.record.form.inspire.intelligence',
|
|
395
|
+
label: 'editor.record.form.topics.inspire.intelligence',
|
|
390
396
|
},
|
|
391
|
-
{ value: 'Location', label: 'editor.record.form.inspire.location' },
|
|
392
|
-
{ value: 'Oceans', label: 'editor.record.form.inspire.oceans' },
|
|
397
|
+
{ value: 'Location', label: 'editor.record.form.topics.inspire.location' },
|
|
398
|
+
{ value: 'Oceans', label: 'editor.record.form.topics.inspire.oceans' },
|
|
393
399
|
{
|
|
394
400
|
value: 'planningCadastre',
|
|
395
|
-
label: 'editor.record.form.inspire.planning',
|
|
401
|
+
label: 'editor.record.form.topics.inspire.planning',
|
|
396
402
|
},
|
|
397
|
-
{ value: 'Society', label: 'editor.record.form.inspire.society' },
|
|
398
|
-
{ value: 'Structure', label: 'editor.record.form.inspire.structure' },
|
|
403
|
+
{ value: 'Society', label: 'editor.record.form.topics.inspire.society' },
|
|
404
|
+
{ value: 'Structure', label: 'editor.record.form.topics.inspire.structure' },
|
|
399
405
|
{
|
|
400
406
|
value: 'Transportation',
|
|
401
|
-
label: 'editor.record.form.inspire.transportation',
|
|
407
|
+
label: 'editor.record.form.topics.inspire.transportation',
|
|
402
408
|
},
|
|
403
409
|
{
|
|
404
410
|
value: 'utilitiesCommunication',
|
|
405
|
-
label: 'editor.record.form.inspire.utilities',
|
|
411
|
+
label: 'editor.record.form.topics.inspire.utilities',
|
|
406
412
|
},
|
|
407
413
|
]
|
|
408
414
|
|
|
409
|
-
marker('editor.record.form.inspire.biota')
|
|
410
|
-
marker('editor.record.form.inspire.boundaries')
|
|
411
|
-
marker('editor.record.form.inspire.climatology')
|
|
412
|
-
marker('editor.record.form.inspire.economy')
|
|
413
|
-
marker('editor.record.form.inspire.elevation')
|
|
414
|
-
marker('editor.record.form.inspire.environnement')
|
|
415
|
-
marker('editor.record.form.inspire.farming')
|
|
416
|
-
marker('editor.record.form.inspire.geoscientific')
|
|
417
|
-
marker('editor.record.form.inspire.health')
|
|
418
|
-
marker('editor.record.form.inspire.imagery')
|
|
419
|
-
marker('editor.record.form.inspire.intelligence')
|
|
420
|
-
marker('editor.record.form.inspire.location')
|
|
421
|
-
marker('editor.record.form.inspire.oceans')
|
|
422
|
-
marker('editor.record.form.inspire.planning')
|
|
423
|
-
marker('editor.record.form.inspire.society')
|
|
424
|
-
marker('editor.record.form.inspire.structure')
|
|
425
|
-
marker('editor.record.form.inspire.transportation')
|
|
426
|
-
marker('editor.record.form.inspire.utilities')
|
|
427
|
-
marker('editor.record.form.inspire.waters')
|
|
415
|
+
marker('editor.record.form.topics.inspire.biota')
|
|
416
|
+
marker('editor.record.form.topics.inspire.boundaries')
|
|
417
|
+
marker('editor.record.form.topics.inspire.climatology')
|
|
418
|
+
marker('editor.record.form.topics.inspire.economy')
|
|
419
|
+
marker('editor.record.form.topics.inspire.elevation')
|
|
420
|
+
marker('editor.record.form.topics.inspire.environnement')
|
|
421
|
+
marker('editor.record.form.topics.inspire.farming')
|
|
422
|
+
marker('editor.record.form.topics.inspire.geoscientific')
|
|
423
|
+
marker('editor.record.form.topics.inspire.health')
|
|
424
|
+
marker('editor.record.form.topics.inspire.imagery')
|
|
425
|
+
marker('editor.record.form.topics.inspire.intelligence')
|
|
426
|
+
marker('editor.record.form.topics.inspire.location')
|
|
427
|
+
marker('editor.record.form.topics.inspire.oceans')
|
|
428
|
+
marker('editor.record.form.topics.inspire.planning')
|
|
429
|
+
marker('editor.record.form.topics.inspire.society')
|
|
430
|
+
marker('editor.record.form.topics.inspire.structure')
|
|
431
|
+
marker('editor.record.form.topics.inspire.transportation')
|
|
432
|
+
marker('editor.record.form.topics.inspire.utilities')
|
|
433
|
+
marker('editor.record.form.topics.inspire.waters')
|
|
@@ -139,8 +139,10 @@ export class MdViewFacade {
|
|
|
139
139
|
return from(
|
|
140
140
|
this.dataService.getItemsFromOgcApi(link.url.href)
|
|
141
141
|
).pipe(
|
|
142
|
-
map((collectionRecords: OgcApiRecord) => {
|
|
143
|
-
return collectionRecords &&
|
|
142
|
+
map((collectionRecords: OgcApiRecord[]) => {
|
|
143
|
+
return collectionRecords &&
|
|
144
|
+
collectionRecords[0] &&
|
|
145
|
+
collectionRecords[0].geometry
|
|
144
146
|
? link
|
|
145
147
|
: null
|
|
146
148
|
}),
|
|
@@ -48,6 +48,7 @@ export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
|
|
|
48
48
|
isFavorite$ = this.favoritesService.myFavoritesUuid$.pipe(
|
|
49
49
|
map((favorites) => favorites.indexOf(this.record.uniqueIdentifier) > -1)
|
|
50
50
|
)
|
|
51
|
+
supportsAuthentication = this.platformService.supportsAuthentication()
|
|
51
52
|
isAnonymous$ = this.platformService.isAnonymous()
|
|
52
53
|
record_: Partial<CatalogRecord>
|
|
53
54
|
favoriteCount: number | null
|
|
@@ -79,20 +80,22 @@ export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
|
|
|
79
80
|
) {}
|
|
80
81
|
|
|
81
82
|
ngAfterViewInit(): void {
|
|
82
|
-
this.
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
if (this.supportsAuthentication) {
|
|
84
|
+
this.subscription = this.isAnonymous$
|
|
85
|
+
.pipe(withLatestFrom(this.loginMessage$))
|
|
86
|
+
.subscribe(([anonymous, loginMessage]) => {
|
|
87
|
+
if (anonymous) {
|
|
88
|
+
tippy(this.starToggleRef.nativeElement, {
|
|
89
|
+
appendTo: () => document.body,
|
|
90
|
+
content: loginMessage,
|
|
91
|
+
allowHTML: true,
|
|
92
|
+
interactive: true,
|
|
93
|
+
zIndex: 60,
|
|
94
|
+
maxWidth: 250,
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
}
|
|
96
99
|
this.countSubscription = this.favoritesService.myFavoritesUuid$
|
|
97
100
|
.pipe(pairwise())
|
|
98
101
|
.subscribe(([oldFavs, newFavs]) => {
|
|
@@ -115,8 +118,12 @@ export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
|
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
ngOnDestroy(): void {
|
|
118
|
-
this.subscription
|
|
119
|
-
|
|
121
|
+
if (this.subscription) {
|
|
122
|
+
this.subscription.unsubscribe()
|
|
123
|
+
}
|
|
124
|
+
if (this.countSubscription) {
|
|
125
|
+
this.countSubscription.unsubscribe()
|
|
126
|
+
}
|
|
120
127
|
}
|
|
121
128
|
|
|
122
129
|
toggleFavorite(isFavorite) {
|
|
@@ -231,7 +231,11 @@
|
|
|
231
231
|
</div>
|
|
232
232
|
</gn-ui-expandable-panel>
|
|
233
233
|
<gn-ui-expandable-panel
|
|
234
|
-
*ngIf="
|
|
234
|
+
*ngIf="
|
|
235
|
+
metadata.kind !== 'dataset' &&
|
|
236
|
+
metadata.spatialExtents &&
|
|
237
|
+
metadata.spatialExtents.length
|
|
238
|
+
"
|
|
235
239
|
[title]="'service.metadata.spatialExtent' | translate"
|
|
236
240
|
data-test="spatial-extent-panel"
|
|
237
241
|
>
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
<ng-icon [name]="toggled ? 'matStar' : 'matStarBorder'"></ng-icon>
|
|
13
|
-
<span *ngIf="displayLabel" class="mx-2 text-[16px] content-center"
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
<span *ngIf="displayLabel" class="mx-2 text-[16px] content-center">{{
|
|
14
|
+
(toggled ? 'favorite.starToggle.remove' : 'favorite.starToggle.add')
|
|
15
|
+
| translate
|
|
16
|
+
}}</span>
|
|
16
17
|
</gn-ui-button>
|
|
17
18
|
<svg
|
|
18
19
|
#starOverlay
|
|
@@ -12,7 +12,7 @@ import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
|
|
|
12
12
|
import { CommonModule } from '@angular/common'
|
|
13
13
|
import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
|
|
14
14
|
import { ButtonComponent } from '../button/button.component'
|
|
15
|
-
import {
|
|
15
|
+
import { TranslatePipe } from '@ngx-translate/core'
|
|
16
16
|
|
|
17
17
|
@Component({
|
|
18
18
|
selector: 'gn-ui-star-toggle',
|
|
@@ -20,7 +20,7 @@ import { TranslateDirective } from '@ngx-translate/core'
|
|
|
20
20
|
styleUrls: ['./star-toggle.component.css'],
|
|
21
21
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
22
|
standalone: true,
|
|
23
|
-
imports: [CommonModule, NgIcon, ButtonComponent,
|
|
23
|
+
imports: [CommonModule, NgIcon, ButtonComponent, TranslatePipe],
|
|
24
24
|
viewProviders: [
|
|
25
25
|
provideIcons({ matStar, matStarBorder }),
|
|
26
26
|
provideNgIconsConfig({
|
package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html
CHANGED
|
@@ -15,10 +15,7 @@
|
|
|
15
15
|
}"
|
|
16
16
|
>
|
|
17
17
|
<ng-template #customTemplate>
|
|
18
|
-
{{ 'search.filters.recordKind.' + choice.value | translate
|
|
19
|
-
}}<span class="ml-1" *ngIf="isSelectedChoice(choice.value)"
|
|
20
|
-
>({{ choice.count }})</span
|
|
21
|
-
>
|
|
18
|
+
{{ 'search.filters.recordKind.' + choice.value | translate }}
|
|
22
19
|
</ng-template>
|
|
23
20
|
</gn-ui-kind-badge>
|
|
24
21
|
</ng-template>
|
package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts
CHANGED
|
@@ -48,7 +48,11 @@ export class ResultsHitsSearchKindComponent implements OnChanges {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
onSelectedValues(values: string[]) {
|
|
51
|
-
const selectedValues = values.includes('all')
|
|
51
|
+
const selectedValues = values.includes('all')
|
|
52
|
+
? []
|
|
53
|
+
: values.length > 1
|
|
54
|
+
? [values[values.length - 1]]
|
|
55
|
+
: values
|
|
52
56
|
|
|
53
57
|
this.selectionChanged.emit(selectedValues)
|
|
54
58
|
}
|
|
@@ -75,10 +75,17 @@ export const FORMATS = {
|
|
|
75
75
|
mimeTypes: ['application/geopackage+sqlite3'],
|
|
76
76
|
},
|
|
77
77
|
zip: {
|
|
78
|
-
extensions: ['zip', 'tar.gz'],
|
|
78
|
+
extensions: ['zip', 'tar.gz', 'gz', '7z', '7zip'],
|
|
79
79
|
priority: 8,
|
|
80
80
|
color: '#B0CB52',
|
|
81
|
-
mimeTypes: [
|
|
81
|
+
mimeTypes: [
|
|
82
|
+
'application/zip',
|
|
83
|
+
'application/x-zip',
|
|
84
|
+
'application/x-compressed',
|
|
85
|
+
'application/x-7z-compressed',
|
|
86
|
+
'application/gzip',
|
|
87
|
+
'application/x-gzip',
|
|
88
|
+
],
|
|
82
89
|
},
|
|
83
90
|
pdf: {
|
|
84
91
|
extensions: ['pdf'],
|
|
@@ -92,39 +99,57 @@ export const FORMATS = {
|
|
|
92
99
|
color: '#C4A98F',
|
|
93
100
|
mimeTypes: ['image/jpg'],
|
|
94
101
|
},
|
|
102
|
+
png: {
|
|
103
|
+
extensions: ['png'],
|
|
104
|
+
priority: 10,
|
|
105
|
+
color: '#8B5A3C',
|
|
106
|
+
mimeTypes: ['image/png'],
|
|
107
|
+
},
|
|
108
|
+
tiff: {
|
|
109
|
+
extensions: ['tiff', 'tif', 'geotiff', 'geotif'],
|
|
110
|
+
priority: 11,
|
|
111
|
+
color: '#6B4423',
|
|
112
|
+
mimeTypes: ['image/tiff'],
|
|
113
|
+
},
|
|
95
114
|
svg: {
|
|
96
115
|
extensions: ['svg'],
|
|
97
|
-
priority:
|
|
116
|
+
priority: 12,
|
|
98
117
|
color: '#EB6D82',
|
|
99
118
|
mimeTypes: ['image/svg+xml'],
|
|
100
119
|
},
|
|
101
120
|
dxf: {
|
|
102
121
|
extensions: ['dxf'],
|
|
103
|
-
priority:
|
|
122
|
+
priority: 13,
|
|
104
123
|
color: '#DCCD00',
|
|
105
124
|
mimeTypes: ['application/x-dxf', 'image/x-dxf'],
|
|
106
125
|
},
|
|
107
126
|
html: {
|
|
108
127
|
extensions: ['html', 'htm'],
|
|
109
|
-
priority:
|
|
128
|
+
priority: 14,
|
|
110
129
|
color: '#C0C9B6',
|
|
111
130
|
mimeTypes: ['text/html'],
|
|
112
131
|
},
|
|
113
132
|
fgb: {
|
|
114
133
|
extensions: ['fgb', 'flatgeobuf'],
|
|
115
|
-
priority:
|
|
134
|
+
priority: 15,
|
|
116
135
|
color: '#A8111C',
|
|
117
136
|
mimeTypes: ['application/flatgeobuf'],
|
|
118
137
|
},
|
|
119
138
|
jsonfg: {
|
|
120
139
|
extensions: ['jsonfg', 'jsonfgc'],
|
|
121
|
-
priority:
|
|
140
|
+
priority: 16,
|
|
122
141
|
color: '#009EE0',
|
|
123
142
|
mimeTypes: [
|
|
124
143
|
'application/vnd.ogc.fg+json',
|
|
125
144
|
'application/vnd.ogc.fg+json;compatibility=geojson',
|
|
126
145
|
],
|
|
127
146
|
},
|
|
147
|
+
webp: {
|
|
148
|
+
extensions: ['webp'],
|
|
149
|
+
priority: 17,
|
|
150
|
+
color: '#5A9E6F',
|
|
151
|
+
mimeTypes: ['image/webp'],
|
|
152
|
+
},
|
|
128
153
|
} as const
|
|
129
154
|
|
|
130
155
|
export type FileFormat = keyof typeof FORMATS
|
|
@@ -8,6 +8,7 @@ export * from './mobile-screen'
|
|
|
8
8
|
export * from './no-duplicate-file-name'
|
|
9
9
|
export * from './parse'
|
|
10
10
|
export * from './remove-whitespace'
|
|
11
|
+
export * from './scroll'
|
|
11
12
|
export * from './sort-by'
|
|
12
13
|
export * from './strip-html'
|
|
13
14
|
export * from './temporal-extent-union'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ViewportScroller } from '@angular/common'
|
|
2
|
+
import { Event, NavigationEnd, Router, Scroll } from '@angular/router'
|
|
3
|
+
import { filter, pairwise, tap } from 'rxjs'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* When route is changed, Angular interprets a simple query params change as "forward navigation" too.
|
|
7
|
+
* Using the pairwise function allows us to have both the previous and current router events, which we can
|
|
8
|
+
* use to effectively compare the two navigation events and see if they actually change route, or only
|
|
9
|
+
* the route parameters (i.e. search params stored in query params).
|
|
10
|
+
*
|
|
11
|
+
* Related to: https://github.com/angular/angular/issues/26744
|
|
12
|
+
*/
|
|
13
|
+
export function handleScrollOnNavigation(
|
|
14
|
+
router: Router,
|
|
15
|
+
viewportScroller: ViewportScroller
|
|
16
|
+
): void {
|
|
17
|
+
router.events
|
|
18
|
+
.pipe(
|
|
19
|
+
filter((e: Event): e is Scroll => e instanceof Scroll),
|
|
20
|
+
pairwise()
|
|
21
|
+
)
|
|
22
|
+
.subscribe(([previous, current]: [Scroll, Scroll]) => {
|
|
23
|
+
if (current.position) {
|
|
24
|
+
// Backward navigation
|
|
25
|
+
viewportScroller.scrollToPosition(current.position)
|
|
26
|
+
} else if (current.anchor) {
|
|
27
|
+
// Anchor navigation
|
|
28
|
+
viewportScroller.scrollToAnchor(current.anchor)
|
|
29
|
+
} else {
|
|
30
|
+
// Check if routes match, or if it is only a query param change
|
|
31
|
+
if (
|
|
32
|
+
previous.routerEvent instanceof NavigationEnd &&
|
|
33
|
+
current.routerEvent instanceof NavigationEnd &&
|
|
34
|
+
getBaseRoute(previous.routerEvent.urlAfterRedirects) !==
|
|
35
|
+
getBaseRoute(current.routerEvent.urlAfterRedirects)
|
|
36
|
+
) {
|
|
37
|
+
// Routes don't match, this is actual forward navigation
|
|
38
|
+
// Default behavior: scroll to top
|
|
39
|
+
viewportScroller.scrollToPosition([0, 0])
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getBaseRoute(url: string): string {
|
|
46
|
+
// return url without query params
|
|
47
|
+
return url.split('?')[0]
|
|
48
|
+
}
|
package/translations/de.json
CHANGED
|
@@ -184,26 +184,6 @@
|
|
|
184
184
|
"editor.record.form.field.topics": "Kategorien",
|
|
185
185
|
"editor.record.form.field.uniqueIdentifier": "Eindeutige Kennung (ID)",
|
|
186
186
|
"editor.record.form.field.updateFrequency": "Aktualisierungshäufigkeit",
|
|
187
|
-
"editor.record.form.inspire.biota": "",
|
|
188
|
-
"editor.record.form.inspire.boundaries": "",
|
|
189
|
-
"editor.record.form.inspire.climatology": "",
|
|
190
|
-
"editor.record.form.inspire.economy": "",
|
|
191
|
-
"editor.record.form.inspire.elevation": "",
|
|
192
|
-
"editor.record.form.inspire.environnement": "",
|
|
193
|
-
"editor.record.form.inspire.farming": "",
|
|
194
|
-
"editor.record.form.inspire.geoscientific": "",
|
|
195
|
-
"editor.record.form.inspire.health": "",
|
|
196
|
-
"editor.record.form.inspire.imagery": "",
|
|
197
|
-
"editor.record.form.inspire.intelligence": "",
|
|
198
|
-
"editor.record.form.inspire.location": "",
|
|
199
|
-
"editor.record.form.inspire.oceans": "",
|
|
200
|
-
"editor.record.form.inspire.placeholder": "",
|
|
201
|
-
"editor.record.form.inspire.planning": "",
|
|
202
|
-
"editor.record.form.inspire.society": "",
|
|
203
|
-
"editor.record.form.inspire.structure": "",
|
|
204
|
-
"editor.record.form.inspire.transportation": "",
|
|
205
|
-
"editor.record.form.inspire.utilities": "",
|
|
206
|
-
"editor.record.form.inspire.waters": "",
|
|
207
187
|
"editor.record.form.keywords.place.placeholder": "",
|
|
208
188
|
"editor.record.form.keywords.place.withoutExtent": "",
|
|
209
189
|
"editor.record.form.keywords.placeholder": "",
|
|
@@ -239,15 +219,35 @@
|
|
|
239
219
|
"editor.record.form.section.dataManagers.description": "",
|
|
240
220
|
"editor.record.form.section.dataManagers.label": "",
|
|
241
221
|
"editor.record.form.section.geographicalCoverage.label": "",
|
|
242
|
-
"editor.record.form.section.inspire.description": "",
|
|
243
|
-
"editor.record.form.section.inspire.label": "",
|
|
244
222
|
"editor.record.form.section.metadataPointOfContact.description": "",
|
|
245
223
|
"editor.record.form.section.metadataPointOfContact.label": "",
|
|
224
|
+
"editor.record.form.section.topics.description": "",
|
|
225
|
+
"editor.record.form.section.topics.label": "",
|
|
246
226
|
"editor.record.form.section.useAndAccessConditions.label": "",
|
|
247
227
|
"editor.record.form.temporalExtents.addDate": "Zeitpunkt",
|
|
248
228
|
"editor.record.form.temporalExtents.addRange": "Zeitraum",
|
|
249
229
|
"editor.record.form.temporalExtents.date": "Datum",
|
|
250
230
|
"editor.record.form.temporalExtents.range": "Datumsbereich",
|
|
231
|
+
"editor.record.form.topics.inspire.biota": "",
|
|
232
|
+
"editor.record.form.topics.inspire.boundaries": "",
|
|
233
|
+
"editor.record.form.topics.inspire.climatology": "",
|
|
234
|
+
"editor.record.form.topics.inspire.economy": "",
|
|
235
|
+
"editor.record.form.topics.inspire.elevation": "",
|
|
236
|
+
"editor.record.form.topics.inspire.environnement": "",
|
|
237
|
+
"editor.record.form.topics.inspire.farming": "",
|
|
238
|
+
"editor.record.form.topics.inspire.geoscientific": "",
|
|
239
|
+
"editor.record.form.topics.inspire.health": "",
|
|
240
|
+
"editor.record.form.topics.inspire.imagery": "",
|
|
241
|
+
"editor.record.form.topics.inspire.intelligence": "",
|
|
242
|
+
"editor.record.form.topics.inspire.location": "",
|
|
243
|
+
"editor.record.form.topics.inspire.oceans": "",
|
|
244
|
+
"editor.record.form.topics.inspire.planning": "",
|
|
245
|
+
"editor.record.form.topics.inspire.society": "",
|
|
246
|
+
"editor.record.form.topics.inspire.structure": "",
|
|
247
|
+
"editor.record.form.topics.inspire.transportation": "",
|
|
248
|
+
"editor.record.form.topics.inspire.utilities": "",
|
|
249
|
+
"editor.record.form.topics.inspire.waters": "",
|
|
250
|
+
"editor.record.form.topics.placeholder": "",
|
|
251
251
|
"editor.record.form.updateFrequency.planned": "Dieses Dataset wird regelmäßig aktualisiert.",
|
|
252
252
|
"editor.record.importFromExternalFile.failure.body": "",
|
|
253
253
|
"editor.record.importFromExternalFile.failure.title": "",
|
|
@@ -309,7 +309,8 @@
|
|
|
309
309
|
"facets.block.title.tag.default": "Stichwort",
|
|
310
310
|
"facets.block.title.th_regions_tree.default": "Regionen",
|
|
311
311
|
"favorite.not.authenticated.tooltip": "<div><a href=' {link} '>Anmelden</a>, um auf diese Funktion zuzugreifen</div>",
|
|
312
|
-
"favorite.starToggle.
|
|
312
|
+
"favorite.starToggle.add": "Zu Favoriten hinzufügen",
|
|
313
|
+
"favorite.starToggle.remove": "Aus Favoriten entfernen",
|
|
313
314
|
"feature.catalog.attribute.code": "Code",
|
|
314
315
|
"feature.catalog.attribute.definition": "Beschreibung",
|
|
315
316
|
"feature.catalog.attribute.name": "Name",
|
|
@@ -522,6 +523,7 @@
|
|
|
522
523
|
"record.metadata.usage": "Nutzung und Einschränkungen",
|
|
523
524
|
"record.metadata.userFeedbacks": "",
|
|
524
525
|
"record.metadata.userFeedbacks.anonymousUser": "",
|
|
526
|
+
"record.metadata.userFeedbacks.authDisabled": "",
|
|
525
527
|
"record.metadata.userFeedbacks.newAnswer.buttonTitle": "",
|
|
526
528
|
"record.metadata.userFeedbacks.newAnswer.placeholder": "",
|
|
527
529
|
"record.metadata.userFeedbacks.newComment.placeholder": "",
|