geonetwork-ui 2.7.0-dev.8b8fd1011 → 2.7.0-dev.943f3a71b
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/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/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 +442 -327
- 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/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/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 +25 -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 +1 -1
- 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/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/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
|
@@ -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')
|
|
@@ -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": "",
|
package/translations/en.json
CHANGED
|
@@ -184,26 +184,6 @@
|
|
|
184
184
|
"editor.record.form.field.topics": "Categories",
|
|
185
185
|
"editor.record.form.field.uniqueIdentifier": "Unique identifier",
|
|
186
186
|
"editor.record.form.field.updateFrequency": "Update frequency",
|
|
187
|
-
"editor.record.form.inspire.biota": "Biota",
|
|
188
|
-
"editor.record.form.inspire.boundaries": "Boundaries",
|
|
189
|
-
"editor.record.form.inspire.climatology": "Climatology / Meteorology / Atmosphere",
|
|
190
|
-
"editor.record.form.inspire.economy": "Economy",
|
|
191
|
-
"editor.record.form.inspire.elevation": "Elevation",
|
|
192
|
-
"editor.record.form.inspire.environnement": "Environnement",
|
|
193
|
-
"editor.record.form.inspire.farming": "Farming",
|
|
194
|
-
"editor.record.form.inspire.geoscientific": "Geoscientific Information",
|
|
195
|
-
"editor.record.form.inspire.health": "Health",
|
|
196
|
-
"editor.record.form.inspire.imagery": "Imagery / Base Maps / Earth Cover",
|
|
197
|
-
"editor.record.form.inspire.intelligence": "Intelligence / Military",
|
|
198
|
-
"editor.record.form.inspire.location": "Location",
|
|
199
|
-
"editor.record.form.inspire.oceans": "Oceans",
|
|
200
|
-
"editor.record.form.inspire.placeholder": "Select an INSPIRE theme",
|
|
201
|
-
"editor.record.form.inspire.planning": "Planning / Cadastre",
|
|
202
|
-
"editor.record.form.inspire.society": "Society",
|
|
203
|
-
"editor.record.form.inspire.structure": "Structure",
|
|
204
|
-
"editor.record.form.inspire.transportation": "Transportation",
|
|
205
|
-
"editor.record.form.inspire.utilities": "Utilities / Communication",
|
|
206
|
-
"editor.record.form.inspire.waters": "Inland Waters",
|
|
207
187
|
"editor.record.form.keywords.place.placeholder": "Search for place keywords",
|
|
208
188
|
"editor.record.form.keywords.place.withoutExtent": "This keyword is not associated with any geographical extent",
|
|
209
189
|
"editor.record.form.keywords.placeholder": "Select a keyword",
|
|
@@ -239,15 +219,36 @@
|
|
|
239
219
|
"editor.record.form.section.dataManagers.description": "The data managers are responsible for the data",
|
|
240
220
|
"editor.record.form.section.dataManagers.label": "Data managers",
|
|
241
221
|
"editor.record.form.section.geographicalCoverage.label": "Geographical coverage",
|
|
242
|
-
"editor.record.form.section.inspire.description": "Appropriate INSPIRE themes help users find the dataset",
|
|
243
|
-
"editor.record.form.section.inspire.label": "INSPIRE themes",
|
|
244
222
|
"editor.record.form.section.metadataPointOfContact.description": "This information concerns the metadata",
|
|
245
223
|
"editor.record.form.section.metadataPointOfContact.label": "Metadata point of contact",
|
|
224
|
+
"editor.record.form.section.topics.description": "Topics help to better group datasets",
|
|
225
|
+
"editor.record.form.section.topics.label": "Topics",
|
|
246
226
|
"editor.record.form.section.useAndAccessConditions.label": "Use and access conditions",
|
|
247
227
|
"editor.record.form.temporalExtents.addDate": "Time instant",
|
|
248
228
|
"editor.record.form.temporalExtents.addRange": "Time period",
|
|
249
229
|
"editor.record.form.temporalExtents.date": "Date",
|
|
250
230
|
"editor.record.form.temporalExtents.range": "Date range",
|
|
231
|
+
"editor.record.form.topics.inspire.biota": "Biota",
|
|
232
|
+
"editor.record.form.topics.inspire.boundaries": "Boundaries",
|
|
233
|
+
"editor.record.form.topics.inspire.climatology": "Climatology / Meteorology / Atmosphere",
|
|
234
|
+
"editor.record.form.topics.inspire.economy": "Economy",
|
|
235
|
+
"editor.record.form.topics.inspire.elevation": "Elevation",
|
|
236
|
+
"editor.record.form.topics.inspire.environnement": "Environnement",
|
|
237
|
+
"editor.record.form.topics.inspire.farming": "Farming",
|
|
238
|
+
"editor.record.form.topics.inspire.geoscientific": "Geoscientific Information",
|
|
239
|
+
"editor.record.form.topics.inspire.health": "Health",
|
|
240
|
+
"editor.record.form.topics.inspire.imagery": "Imagery / Base Maps / Earth Cover",
|
|
241
|
+
"editor.record.form.topics.inspire.intelligence": "Intelligence / Military",
|
|
242
|
+
"editor.record.form.topics.inspire.location": "Location",
|
|
243
|
+
"editor.record.form.topics.inspire.oceans": "Oceans",
|
|
244
|
+
"editor.record.form.topics.inspire.placeholder": "Select an INSPIRE theme",
|
|
245
|
+
"editor.record.form.topics.inspire.planning": "Planning / Cadastre",
|
|
246
|
+
"editor.record.form.topics.inspire.society": "Society",
|
|
247
|
+
"editor.record.form.topics.inspire.structure": "Structure",
|
|
248
|
+
"editor.record.form.topics.inspire.transportation": "Transportation",
|
|
249
|
+
"editor.record.form.topics.inspire.utilities": "Utilities / Communication",
|
|
250
|
+
"editor.record.form.topics.inspire.waters": "Inland Waters",
|
|
251
|
+
"editor.record.form.topics.placeholder": "Select one or several topics",
|
|
251
252
|
"editor.record.form.updateFrequency.planned": "This dataset is updated regularly",
|
|
252
253
|
"editor.record.importFromExternalFile.failure.body": "Failure",
|
|
253
254
|
"editor.record.importFromExternalFile.failure.title": "The dataset import failed: ",
|
|
@@ -309,7 +310,8 @@
|
|
|
309
310
|
"facets.block.title.tag.default": "Tag",
|
|
310
311
|
"facets.block.title.th_regions_tree.default": "Regions",
|
|
311
312
|
"favorite.not.authenticated.tooltip": "<div><a href=' {link} '>Login</a> to access this feature</div>",
|
|
312
|
-
"favorite.starToggle.
|
|
313
|
+
"favorite.starToggle.add": "Add to favorites",
|
|
314
|
+
"favorite.starToggle.remove": "Remove from favorites",
|
|
313
315
|
"feature.catalog.attribute.code": "Code",
|
|
314
316
|
"feature.catalog.attribute.definition": "Description",
|
|
315
317
|
"feature.catalog.attribute.name": "Name",
|
|
@@ -522,6 +524,7 @@
|
|
|
522
524
|
"record.metadata.usage": "License and Conditions",
|
|
523
525
|
"record.metadata.userFeedbacks": "Questions / Answers",
|
|
524
526
|
"record.metadata.userFeedbacks.anonymousUser": "In order to leave a comment, please log in.",
|
|
527
|
+
"record.metadata.userFeedbacks.authDisabled": "User comments are disabled.",
|
|
525
528
|
"record.metadata.userFeedbacks.newAnswer.buttonTitle": "Publish",
|
|
526
529
|
"record.metadata.userFeedbacks.newAnswer.placeholder": "Answer...",
|
|
527
530
|
"record.metadata.userFeedbacks.newComment.placeholder": "Write your comment here...",
|