geonetwork-ui 2.10.0-dev.5f1c6f718 → 2.10.0-dev.6a17c789a
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 +413 -63
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +75 -17
- package/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +9 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +7 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+roilaye.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/georhena.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/metadata-for-i18n.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.reuse.ts +8 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +7 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +8 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +8 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +11 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +33 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +33 -0
- package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +54 -32
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +46 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +11 -0
- package/src/libs/common/domain/src/lib/model/user/group.model.ts +8 -0
- package/src/libs/common/domain/src/lib/model/user/index.ts +1 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +5 -0
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.html +67 -0
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.ts +39 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/field-focus.directive.ts +38 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints-shortcuts/form-field-constraints-shortcuts.component.ts +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.html +9 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +12 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-single-link-resource/form-field-online-single-link-resource.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-single-link-resource/form-field-online-single-link-resource.component.html +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-single-link-resource/form-field-online-single-link-resource.component.ts +89 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +37 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -3
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +27 -25
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +4 -0
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +1 -1
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/contact-details/contact-details.component.html +96 -0
- package/src/libs/ui/elements/src/lib/contact-details/contact-details.component.ts +45 -0
- package/src/libs/ui/elements/src/lib/contact-pill/contact-pill.component.html +29 -4
- package/src/libs/ui/elements/src/lib/contact-pill/contact-pill.component.ts +51 -7
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.ts +2 -5
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +4 -0
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +2 -2
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +2 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +49 -0
- package/src/libs/util/app-config/src/lib/model.ts +7 -0
- package/src/libs/util/app-config/src/lib/parse-utils.ts +50 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +1 -1
- package/src/libs/util/shared/src/lib/utils/user-display.ts +9 -0
- package/tailwind.base.css +6 -0
- package/translations/de.json +9 -1
- package/translations/en.json +9 -1
- package/translations/es.json +9 -1
- package/translations/fr.json +9 -1
- package/translations/it.json +9 -1
- package/translations/nl.json +9 -1
- package/translations/pt.json +9 -1
- package/translations/sk.json +9 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
+
import { Individual } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
3
|
+
import {
|
|
4
|
+
getAddressLines,
|
|
5
|
+
getIndividualDisplayName,
|
|
6
|
+
} from '../../../../../../libs/util/shared/src'
|
|
7
|
+
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
8
|
+
import { matMailOutline, matOpenInNew } from '@ng-icons/material-icons/baseline'
|
|
9
|
+
import {
|
|
10
|
+
matCallOutline,
|
|
11
|
+
matLocationOnOutline,
|
|
12
|
+
} from '@ng-icons/material-icons/outline'
|
|
13
|
+
import { ThumbnailComponent } from '../thumbnail/thumbnail.component'
|
|
14
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'gn-ui-contact-details',
|
|
18
|
+
templateUrl: './contact-details.component.html',
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [NgIcon, ThumbnailComponent, TranslateModule],
|
|
22
|
+
viewProviders: [
|
|
23
|
+
provideIcons({
|
|
24
|
+
matCallOutline,
|
|
25
|
+
matLocationOnOutline,
|
|
26
|
+
matMailOutline,
|
|
27
|
+
matOpenInNew,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
})
|
|
31
|
+
export class ContactDetailsComponent {
|
|
32
|
+
@Input() contact: Individual
|
|
33
|
+
|
|
34
|
+
get organization() {
|
|
35
|
+
return this.contact?.organization
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get displayName(): string {
|
|
39
|
+
return getIndividualDisplayName(this.contact)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
get addressLines(): string[] {
|
|
43
|
+
return getAddressLines(this.contact?.address)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
<gn-ui-button
|
|
2
|
-
type="primary-light"
|
|
2
|
+
[type]="overlayOpen ? 'gray-light' : 'primary-light'"
|
|
3
3
|
extraClass="group w-full min-h-12 gap-3 justify-between py-2 pl-5 pr-4 rounded"
|
|
4
4
|
data-test="contact-pill"
|
|
5
|
+
(buttonClick)="toggleOverlay()"
|
|
6
|
+
cdkOverlayOrigin
|
|
7
|
+
#overlayOrigin="cdkOverlayOrigin"
|
|
5
8
|
>
|
|
6
9
|
<span
|
|
7
|
-
class="font-title font-medium text-base leading-tight truncate
|
|
10
|
+
class="font-title font-medium text-base leading-tight truncate"
|
|
11
|
+
[class]="!overlayOpen ? 'text-primary-black group-hover:text-white' : ''"
|
|
8
12
|
[title]="displayName"
|
|
9
13
|
>{{ displayName }}</span
|
|
10
14
|
>
|
|
11
15
|
<div
|
|
12
|
-
class="gn-ui-card-icon items-center justify-center w-10 h-8
|
|
16
|
+
class="gn-ui-card-icon items-center justify-center w-10 h-8"
|
|
17
|
+
[class]="
|
|
18
|
+
!overlayOpen ? 'group-hover:border-white group-hover:text-white' : ''
|
|
19
|
+
"
|
|
13
20
|
>
|
|
14
|
-
|
|
21
|
+
@if (overlayOpen) {
|
|
22
|
+
<ng-icon class="!w-6 !h-6 !text-[24px]" name="matClose"></ng-icon>
|
|
23
|
+
} @else {
|
|
24
|
+
<ng-icon class="!w-6 !h-6 !text-[24px]" name="matInfoOutline"></ng-icon>
|
|
25
|
+
}
|
|
15
26
|
</div>
|
|
16
27
|
</gn-ui-button>
|
|
28
|
+
|
|
29
|
+
<ng-template
|
|
30
|
+
cdkConnectedOverlay
|
|
31
|
+
[cdkConnectedOverlayOrigin]="overlayOrigin"
|
|
32
|
+
[cdkConnectedOverlayOpen]="overlayOpen"
|
|
33
|
+
[cdkConnectedOverlayPositions]="overlayPositions"
|
|
34
|
+
[cdkConnectedOverlayOffsetX]="overlayOffsetX"
|
|
35
|
+
(overlayOutsideClick)="closeOverlay()"
|
|
36
|
+
(detach)="closeOverlay()"
|
|
37
|
+
>
|
|
38
|
+
<div [style.width.px]="overlayWidth">
|
|
39
|
+
<gn-ui-contact-details [contact]="contact"></gn-ui-contact-details>
|
|
40
|
+
</div>
|
|
41
|
+
</ng-template>
|
|
@@ -1,26 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConnectedPosition, OverlayModule } from '@angular/cdk/overlay'
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
ElementRef,
|
|
6
|
+
inject,
|
|
7
|
+
Input,
|
|
8
|
+
} from '@angular/core'
|
|
2
9
|
import { Individual } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
3
10
|
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
11
|
+
import { matClose } from '@ng-icons/material-icons/baseline'
|
|
4
12
|
import { matInfoOutline } from '@ng-icons/material-icons/outline'
|
|
5
13
|
import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
6
14
|
import { getIndividualDisplayName } from '../../../../../../libs/util/shared/src'
|
|
15
|
+
import { ContactDetailsComponent } from '../contact-details/contact-details.component'
|
|
7
16
|
|
|
8
17
|
@Component({
|
|
9
18
|
selector: 'gn-ui-contact-pill',
|
|
10
19
|
templateUrl: './contact-pill.component.html',
|
|
11
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
21
|
standalone: true,
|
|
13
|
-
imports: [NgIcon, ButtonComponent],
|
|
14
|
-
viewProviders: [
|
|
15
|
-
provideIcons({
|
|
16
|
-
matInfoOutline,
|
|
17
|
-
}),
|
|
18
|
-
],
|
|
22
|
+
imports: [NgIcon, ButtonComponent, OverlayModule, ContactDetailsComponent],
|
|
23
|
+
viewProviders: [provideIcons({ matClose, matInfoOutline })],
|
|
19
24
|
})
|
|
20
25
|
export class ContactPillComponent {
|
|
21
26
|
@Input() contact: Individual
|
|
22
27
|
|
|
28
|
+
private host = inject(ElementRef<HTMLElement>)
|
|
29
|
+
|
|
30
|
+
overlayOpen = false
|
|
31
|
+
overlayWidth = 0
|
|
32
|
+
overlayOffsetX = 0
|
|
33
|
+
overlayPositions: ConnectedPosition[] = [
|
|
34
|
+
{
|
|
35
|
+
originX: 'start',
|
|
36
|
+
originY: 'bottom',
|
|
37
|
+
overlayX: 'start',
|
|
38
|
+
overlayY: 'top',
|
|
39
|
+
offsetY: 4,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
originX: 'start',
|
|
43
|
+
originY: 'top',
|
|
44
|
+
overlayX: 'start',
|
|
45
|
+
overlayY: 'bottom',
|
|
46
|
+
offsetY: -4,
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
|
|
23
50
|
get displayName(): string {
|
|
24
51
|
return getIndividualDisplayName(this.contact)
|
|
25
52
|
}
|
|
53
|
+
|
|
54
|
+
toggleOverlay() {
|
|
55
|
+
if (!this.overlayOpen) {
|
|
56
|
+
// Calculate the width and horizontal offset of the overlay to align it with the parent element
|
|
57
|
+
const parent =
|
|
58
|
+
this.host.nativeElement.parentElement.getBoundingClientRect()
|
|
59
|
+
const pill = this.host.nativeElement.getBoundingClientRect()
|
|
60
|
+
this.overlayWidth = parent.width
|
|
61
|
+
this.overlayOffsetX = parent.left - pill.left
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
this.overlayOpen = !this.overlayOpen
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
closeOverlay() {
|
|
68
|
+
this.overlayOpen = false
|
|
69
|
+
}
|
|
26
70
|
}
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
matCallOutline,
|
|
22
22
|
matLocationOnOutline,
|
|
23
23
|
} from '@ng-icons/material-icons/outline'
|
|
24
|
-
|
|
24
|
+
import { getAddressLines } from '../../../../../../libs/util/shared/src'
|
|
25
25
|
import { TranslateDirective } from '@ngx-translate/core'
|
|
26
26
|
|
|
27
27
|
@Component({
|
|
@@ -59,10 +59,7 @@ export class MetadataContactComponent {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
get address() {
|
|
62
|
-
|
|
63
|
-
.split(',')
|
|
64
|
-
.map((part) => part.trim())
|
|
65
|
-
return addressParts
|
|
62
|
+
return getAddressLines(this.contacts[0]?.address)
|
|
66
63
|
}
|
|
67
64
|
|
|
68
65
|
onOrganizationClick() {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
data-test="usage-panel"
|
|
54
54
|
>
|
|
55
55
|
<div class="flex flex-col gap-[10px] mr-4 py-[12px] rounded text-gray-900">
|
|
56
|
-
@for (license of licenses; track
|
|
56
|
+
@for (license of licenses; track $index) {
|
|
57
57
|
@if (license.url) {
|
|
58
58
|
<div class="text-primary">
|
|
59
59
|
<a
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
>
|
|
114
114
|
<div class="flex flex-col gap-1 pt-3 pb-4">
|
|
115
115
|
@for (group of contactGroups; track group.role) {
|
|
116
|
-
<div class="flex flex-col gap-1 rounded
|
|
116
|
+
<div class="flex flex-col gap-1 rounded py-4 px-2">
|
|
117
117
|
<p class="text-xs font-normal text-black">
|
|
118
118
|
{{ group.roleLabel | translate }}
|
|
119
119
|
</p>
|
|
120
|
-
<div class="grid gap-
|
|
120
|
+
<div class="grid gap-1 grid-cols-1 md:grid-cols-2">
|
|
121
121
|
@for (contact of group.contacts; track contact.email) {
|
|
122
122
|
<gn-ui-contact-pill [contact]="contact"></gn-ui-contact-pill>
|
|
123
123
|
}
|
|
@@ -25,6 +25,7 @@ export class ButtonComponent {
|
|
|
25
25
|
| 'outline'
|
|
26
26
|
| 'light'
|
|
27
27
|
| 'gray'
|
|
28
|
+
| 'gray-light'
|
|
28
29
|
| 'black'
|
|
29
30
|
| 'primary-light'
|
|
30
31
|
) {
|
|
@@ -45,6 +46,9 @@ export class ButtonComponent {
|
|
|
45
46
|
case 'gray':
|
|
46
47
|
this.btnClass = 'gn-ui-btn-gray'
|
|
47
48
|
break
|
|
49
|
+
case 'gray-light':
|
|
50
|
+
this.btnClass = 'gn-ui-btn-gray-light'
|
|
51
|
+
break
|
|
48
52
|
case 'black':
|
|
49
53
|
this.btnClass = 'gn-ui-btn-black'
|
|
50
54
|
break
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type="url"
|
|
7
7
|
[value]="inputValue"
|
|
8
8
|
(input)="handleInput($event)"
|
|
9
|
-
(keydown.enter)="handleUpload(input)"
|
|
9
|
+
(keydown.enter)="handleUpload(input, $event)"
|
|
10
10
|
[placeholder]="placeholder"
|
|
11
11
|
[attr.aria-label]="placeholder"
|
|
12
12
|
[disabled]="disabled"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
extraClass="absolute inset-y-[var(--side-padding)] right-[var(--side-padding)]"
|
|
26
26
|
type="primary"
|
|
27
27
|
[disabled]="disabled || input.value === '' || !isValidUrl(input.value)"
|
|
28
|
-
(buttonClick)="handleUpload(input)"
|
|
28
|
+
(buttonClick)="handleUpload(input, $event)"
|
|
29
29
|
>
|
|
30
30
|
<ng-content>
|
|
31
31
|
<ng-icon name="iconoirArrowUp"></ng-icon>
|
|
@@ -81,7 +81,8 @@ export class UrlInputComponent implements OnChanges {
|
|
|
81
81
|
this.valueChange.next(value)
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
handleUpload(element: HTMLInputElement) {
|
|
84
|
+
handleUpload(element: HTMLInputElement, event: Event) {
|
|
85
|
+
event.stopPropagation()
|
|
85
86
|
const value = element.value
|
|
86
87
|
if (!value || !this.isValidUrl(value)) return
|
|
87
88
|
this.uploadClick.next(value)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as TOML from '@ltd/j-toml'
|
|
2
2
|
import {
|
|
3
3
|
checkMetadataLanguage,
|
|
4
|
+
checkNewRecordDefaultLanguage,
|
|
5
|
+
checkNewRecordStandard,
|
|
4
6
|
parseConfigSection,
|
|
5
7
|
parseMultiConfigSection,
|
|
6
8
|
parseTranslationsConfigSection,
|
|
@@ -8,6 +10,7 @@ import {
|
|
|
8
10
|
import {
|
|
9
11
|
CustomTranslations,
|
|
10
12
|
CustomTranslationsAllLanguages,
|
|
13
|
+
EditorConfig,
|
|
11
14
|
GlobalConfig,
|
|
12
15
|
LayerConfig,
|
|
13
16
|
MapConfig,
|
|
@@ -51,6 +54,12 @@ export function getOptionalSearchConfig(): SearchConfig | null {
|
|
|
51
54
|
return searchConfig
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
let editorConfig: EditorConfig = null
|
|
58
|
+
|
|
59
|
+
export function getOptionalEditorConfig(): EditorConfig | null {
|
|
60
|
+
return editorConfig
|
|
61
|
+
}
|
|
62
|
+
|
|
54
63
|
let metadataQualityConfig: MetadataQualityConfig = null
|
|
55
64
|
export function getMetadataQualityConfig(): MetadataQualityConfig {
|
|
56
65
|
return (
|
|
@@ -285,6 +294,45 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
285
294
|
SORTABLE: parsedMetadataQualitySection.sortable,
|
|
286
295
|
} as MetadataQualityConfig)
|
|
287
296
|
|
|
297
|
+
let parsedEditingSection = parseConfigSection(
|
|
298
|
+
parsed,
|
|
299
|
+
'editing',
|
|
300
|
+
[],
|
|
301
|
+
['new_record_default_language', 'new_record_standard'],
|
|
302
|
+
warnings,
|
|
303
|
+
errors
|
|
304
|
+
)
|
|
305
|
+
if (
|
|
306
|
+
parsedEditingSection !== null &&
|
|
307
|
+
parsedEditingSection.new_record_default_language !== undefined
|
|
308
|
+
) {
|
|
309
|
+
parsedEditingSection = checkNewRecordDefaultLanguage(
|
|
310
|
+
parsedEditingSection,
|
|
311
|
+
warnings
|
|
312
|
+
)
|
|
313
|
+
}
|
|
314
|
+
if (
|
|
315
|
+
parsedEditingSection !== null &&
|
|
316
|
+
parsedEditingSection.new_record_standard !== undefined
|
|
317
|
+
) {
|
|
318
|
+
parsedEditingSection = checkNewRecordStandard(
|
|
319
|
+
parsedEditingSection,
|
|
320
|
+
warnings
|
|
321
|
+
)
|
|
322
|
+
}
|
|
323
|
+
editorConfig =
|
|
324
|
+
parsedEditingSection === null
|
|
325
|
+
? null
|
|
326
|
+
: ({
|
|
327
|
+
NEW_RECORD_DEFAULT_LANGUAGE:
|
|
328
|
+
parsedEditingSection.new_record_default_language as
|
|
329
|
+
| string
|
|
330
|
+
| undefined,
|
|
331
|
+
NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard as
|
|
332
|
+
| EditorConfig['NEW_RECORD_STANDARD']
|
|
333
|
+
| undefined,
|
|
334
|
+
} as EditorConfig)
|
|
335
|
+
|
|
288
336
|
customTranslations = parseTranslationsConfigSection(
|
|
289
337
|
parsed,
|
|
290
338
|
'translations'
|
|
@@ -309,6 +357,7 @@ export function isConfigLoaded() {
|
|
|
309
357
|
export function _reset() {
|
|
310
358
|
globalConfig = null
|
|
311
359
|
themeConfig = null
|
|
360
|
+
editorConfig = null
|
|
312
361
|
customTranslations = null
|
|
313
362
|
}
|
|
314
363
|
|
|
@@ -69,6 +69,13 @@ export interface MetadataQualityConfig {
|
|
|
69
69
|
ENABLED: boolean
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
export type NewRecordStandard = 'iso19139' | 'iso19115-3'
|
|
73
|
+
|
|
74
|
+
export interface EditorConfig {
|
|
75
|
+
NEW_RECORD_DEFAULT_LANGUAGE?: string
|
|
76
|
+
NEW_RECORD_STANDARD?: NewRecordStandard
|
|
77
|
+
}
|
|
78
|
+
|
|
72
79
|
export type CustomTranslations = { [translationKey: string]: string }
|
|
73
80
|
export type CustomTranslationsAllLanguages = {
|
|
74
81
|
[lang: string]: CustomTranslations
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toLang2 } from '../../../../../libs/util/i18n/src'
|
|
1
|
+
import { LANG_2_TO_3_MAPPER, toLang2 } from '../../../../../libs/util/i18n/src'
|
|
2
2
|
|
|
3
3
|
const flatten = (
|
|
4
4
|
base: string,
|
|
@@ -137,3 +137,52 @@ export function checkMetadataLanguage(
|
|
|
137
137
|
}
|
|
138
138
|
return parsedConfigSection
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
export function checkNewRecordDefaultLanguage(
|
|
142
|
+
parsedConfigSection: any,
|
|
143
|
+
outWarnings: string[]
|
|
144
|
+
) {
|
|
145
|
+
const lang2 = toLang2(
|
|
146
|
+
parsedConfigSection.new_record_default_language.toLowerCase()
|
|
147
|
+
)
|
|
148
|
+
if (!(lang2 in LANG_2_TO_3_MAPPER)) {
|
|
149
|
+
outWarnings.push(
|
|
150
|
+
`In the [editing] section: new_record_default_language = "${parsedConfigSection.new_record_default_language}" is not a recognized ISO 639 language code`
|
|
151
|
+
)
|
|
152
|
+
return {
|
|
153
|
+
...parsedConfigSection,
|
|
154
|
+
new_record_default_language: undefined,
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
...parsedConfigSection,
|
|
159
|
+
new_record_default_language: lang2,
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function checkNewRecordStandard(
|
|
164
|
+
parsedConfigSection: any,
|
|
165
|
+
outWarnings: string[]
|
|
166
|
+
) {
|
|
167
|
+
const standard = parsedConfigSection.new_record_standard
|
|
168
|
+
const normalizedStandard =
|
|
169
|
+
typeof standard === 'string' ? standard.trim().toLowerCase() : null
|
|
170
|
+
|
|
171
|
+
if (
|
|
172
|
+
normalizedStandard === 'iso19139' ||
|
|
173
|
+
normalizedStandard === 'iso19115-3'
|
|
174
|
+
) {
|
|
175
|
+
return {
|
|
176
|
+
...parsedConfigSection,
|
|
177
|
+
new_record_standard: normalizedStandard,
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
outWarnings.push(
|
|
182
|
+
`In the [editing] section: new_record_standard = "${standard}" is not a supported metadata standard`
|
|
183
|
+
)
|
|
184
|
+
return {
|
|
185
|
+
...parsedConfigSection,
|
|
186
|
+
new_record_standard: undefined,
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -266,7 +266,7 @@ export function checkFileFormat(
|
|
|
266
266
|
new RegExp(`[./]${format}`, 'i').test(link.name.toLowerCase())) ||
|
|
267
267
|
('url' in link &&
|
|
268
268
|
new RegExp(`[./]${format}`, 'i').test(link.url.toString())) ||
|
|
269
|
-
('name' in link &&
|
|
269
|
+
('name' in link && new RegExp(`\\b${format}\\b`, 'i').test(link.name))
|
|
270
270
|
)
|
|
271
271
|
}
|
|
272
272
|
|
|
@@ -12,6 +12,15 @@ export function getIndividualDisplayName(individual: Individual): string {
|
|
|
12
12
|
return individual.organization?.name ?? individual.email ?? ''
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export function getAddressLines(address: string | undefined): string[] {
|
|
16
|
+
return address
|
|
17
|
+
? address
|
|
18
|
+
.split(',')
|
|
19
|
+
.map((part) => part.trim())
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
: []
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
export function toIndividual(user: UserModel): Individual {
|
|
16
25
|
return {
|
|
17
26
|
firstName: user.name,
|
package/tailwind.base.css
CHANGED
|
@@ -119,6 +119,12 @@
|
|
|
119
119
|
border-gray-100 focus:ring-4 focus:ring-gray-50;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
.gn-ui-btn-gray-light {
|
|
123
|
+
@apply gn-ui-btn text-black
|
|
124
|
+
bg-gray-50 hover:bg-gray-100 focus:bg-gray-100 active:bg-gray-200
|
|
125
|
+
border-gray-50 focus:ring-4 focus:ring-gray-100;
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
.gn-ui-btn-black {
|
|
123
129
|
@apply gn-ui-btn text-white
|
|
124
130
|
bg-black hover:bg-gray-950 focus:bg-gray-950 active:bg-gray-900
|
package/translations/de.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "Seit der Erstellung dieses Entwurfs wurde dieser Datensatz am { date } von { user } geändert. Durch das Veröffentlichen Ihrer Version können dessen Änderungen gelöscht werden. Um dies zu vermeiden, können Sie Ihre Änderungen rückgängig machen oder Ihre Version in voller Kenntnis der Sachlage veröffentlichen.",
|
|
151
151
|
"editor.record.form.field.abstract": "Kurzbeschreibung",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "",
|
|
153
161
|
"editor.record.form.field.contacts": "Ansprechpartner - Email",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "Bitte geben Sie mindestens einen Ansprechpartner an.",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "Kontakt auswählen",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "Rechtliche Einschränkung",
|
|
160
168
|
"editor.record.form.field.license": "Lizenz",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "Beigefügte Ressourcen",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "Link",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "Abbrechen",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "Bestätigen",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "Vorschau des Datensatzes bearbeiten",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "Standardvorschau festlegen",
|
|
495
504
|
"record.metadata.preview.config.saved": "Gespeichert!",
|
|
496
505
|
"record.metadata.preview.config.saving": "Speichern...",
|
|
497
|
-
"record.metadata.producer": "Datenproduzent",
|
|
498
506
|
"record.metadata.publication": "Veröffentlichungsdatum",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{Veröffentlichungsdatum} one{Veröffentlichungsdatum} other{Veröffentlichungen}}",
|
|
500
508
|
"record.metadata.quality": "Metadatenqualität",
|
package/translations/en.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "Since you created this draft, the dataset has been updated on { date } by { user }. Publishing your draft might erase their edits. To avoid this, you need to either cancel your changes or knowingly publish your own version.",
|
|
151
151
|
"editor.record.form.field.abstract": "Abstract",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "Contact email",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "example@domainname.com",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "Contact first name",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "First name",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "Contact last name",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "Last name",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "Contact organization",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "Company",
|
|
153
161
|
"editor.record.form.field.contacts": "Point of contact - Email",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "Please provide at least one point of contact.",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "Choose a contact",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "Legal constraint",
|
|
160
168
|
"editor.record.form.field.license": "License",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "Attached resources",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "Link",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "Cancel",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "Confirm",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "Modify the dataset preview",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "Set as default preview",
|
|
495
504
|
"record.metadata.preview.config.saved": "Saved !",
|
|
496
505
|
"record.metadata.preview.config.saving": "Saving...",
|
|
497
|
-
"record.metadata.producer": "Data producer",
|
|
498
506
|
"record.metadata.publication": "Date of publication",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{publication} one{publication} other{publications}}",
|
|
500
508
|
"record.metadata.quality": "Metadata Quality",
|
package/translations/es.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "",
|
|
151
151
|
"editor.record.form.field.abstract": "",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "",
|
|
153
161
|
"editor.record.form.field.contacts": "Punto de contacto - Correo ",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "",
|
|
160
168
|
"editor.record.form.field.license": "",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "",
|
|
495
504
|
"record.metadata.preview.config.saved": "",
|
|
496
505
|
"record.metadata.preview.config.saving": "",
|
|
497
|
-
"record.metadata.producer": "",
|
|
498
506
|
"record.metadata.publication": "",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{} one{} other{}}",
|
|
500
508
|
"record.metadata.quality": "",
|
package/translations/fr.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "Depuis la création de ce brouillon, ce jeu de données a été modifié le { date } par { user }. Publier votre version peut supprimer ses modifications. Pour éviter cela, vous pouvez annuler vos changements, ou publier votre version en connaissance de cause.",
|
|
151
151
|
"editor.record.form.field.abstract": "Description",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "Email du point de contact",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "exemple@nomdedomaine.com",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "Prénom du point de contact",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "Prénom",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "Nom du point de contact",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "Nom",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "Organisation du point de contact",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "Company",
|
|
153
161
|
"editor.record.form.field.contacts": "Point de contact - Email",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "Veuillez renseigner au moins un point de contact.",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "Choisissez un contact",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "Contrainte légale",
|
|
160
168
|
"editor.record.form.field.license": "Licence",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "Ressources attachées",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "Lien",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "Annuler",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "Valider",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "Modifier l'aperçu du jeu de données",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "Définir l'aperçu par défaut",
|
|
495
504
|
"record.metadata.preview.config.saved": "Sauvegardé !",
|
|
496
505
|
"record.metadata.preview.config.saving": "Sauvegarde...",
|
|
497
|
-
"record.metadata.producer": "Producteur de la donnée",
|
|
498
506
|
"record.metadata.publication": "Date de publication",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{ressource} one{ressource} other{ressources}}",
|
|
500
508
|
"record.metadata.quality": "Description de la ressource",
|
package/translations/it.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "Da quando è stata creata questa bozza, questo dataset è stato modificato il { date } da { user }. La pubblicazione della sua versione potrebbe rimuovere le loro modifiche. Per evitarlo, puoi annullare le sue modifiche o pubblicare la sua versione consapevolmente.",
|
|
151
151
|
"editor.record.form.field.abstract": "Riassunto",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "",
|
|
153
161
|
"editor.record.form.field.contacts": "",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "Inserisci almeno un punto di contatto.",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "Scegli un contatto",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "Vincolo legale",
|
|
160
168
|
"editor.record.form.field.license": "Licenza",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "Risorse allegate",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "Link",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "Annulla",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "Convalida",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "Modifica anteprima dataset",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "",
|
|
495
504
|
"record.metadata.preview.config.saved": "",
|
|
496
505
|
"record.metadata.preview.config.saving": "",
|
|
497
|
-
"record.metadata.producer": "Produttore dei dati",
|
|
498
506
|
"record.metadata.publication": "Data di pubblicazione",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{pubblicazione} one{pubblicazione} other{pubblicazioni}}",
|
|
500
508
|
"record.metadata.quality": "Qualità dei metadati",
|
package/translations/nl.json
CHANGED
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
"editor.record.form.draft.updateAlert": "",
|
|
151
151
|
"editor.record.form.field.abstract": "",
|
|
152
152
|
"editor.record.form.field.constraintsShortcuts": "",
|
|
153
|
+
"editor.record.form.field.contactDetails.email": "",
|
|
154
|
+
"editor.record.form.field.contactDetails.email.placeholder": "",
|
|
155
|
+
"editor.record.form.field.contactDetails.firstName": "",
|
|
156
|
+
"editor.record.form.field.contactDetails.firstName.placeholder": "",
|
|
157
|
+
"editor.record.form.field.contactDetails.lastName": "",
|
|
158
|
+
"editor.record.form.field.contactDetails.lastName.placeholder": "",
|
|
159
|
+
"editor.record.form.field.contactDetails.organization": "",
|
|
160
|
+
"editor.record.form.field.contactDetails.organization.placeholder": "",
|
|
153
161
|
"editor.record.form.field.contacts": "",
|
|
154
162
|
"editor.record.form.field.contacts.noContact": "",
|
|
155
163
|
"editor.record.form.field.contacts.placeholder": "",
|
|
@@ -159,6 +167,7 @@
|
|
|
159
167
|
"editor.record.form.field.legalConstraints": "",
|
|
160
168
|
"editor.record.form.field.license": "",
|
|
161
169
|
"editor.record.form.field.onlineLinkResources": "",
|
|
170
|
+
"editor.record.form.field.onlineLinkageResource.defaultName": "",
|
|
162
171
|
"editor.record.form.field.onlineResource.cancel": "",
|
|
163
172
|
"editor.record.form.field.onlineResource.confirm": "",
|
|
164
173
|
"editor.record.form.field.onlineResource.dialogTitle": "",
|
|
@@ -494,7 +503,6 @@
|
|
|
494
503
|
"record.metadata.preview.config.idle": "",
|
|
495
504
|
"record.metadata.preview.config.saved": "",
|
|
496
505
|
"record.metadata.preview.config.saving": "",
|
|
497
|
-
"record.metadata.producer": "",
|
|
498
506
|
"record.metadata.publication": "",
|
|
499
507
|
"record.metadata.publications": "{count, plural, =0{} one{} other{}}",
|
|
500
508
|
"record.metadata.quality": "",
|