geonetwork-ui 2.10.0-dev.270411d14 → 2.10.0-dev.2be368c45
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 +1277 -6185
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +181 -165
- package/index.d.ts.map +1 -1
- package/package.json +23 -33
- 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 +22 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +1 -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 +22 -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 +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +48 -7
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +6 -5
- package/src/libs/api/metadata-converter/src/lib/gn4/metadata-url.service.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +45 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +13 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +40 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +47 -1
- package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -4
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +12 -8
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +1 -1
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +1 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -22
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +12 -0
- package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +2 -1
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +2 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +57 -0
- package/src/libs/feature/catalog/src/lib/sources/sources.service.ts +5 -2
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +4 -1
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +26 -19
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +5 -1
- package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.ts +0 -2
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.html +7 -6
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.ts +10 -8
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.html +5 -14
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +3 -28
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +5 -5
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/field-focus.directive.ts +4 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints-shortcuts/form-field-constraints-shortcuts.component.ts +7 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +12 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +4 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +7 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +6 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +3 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +0 -34
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +27 -16
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +11 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +35 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +18 -5
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +76 -19
- package/src/libs/feature/editor/src/lib/expressions.ts +380 -8
- package/src/libs/feature/editor/src/lib/fields.config.ts +295 -291
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +6 -3
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +8 -12
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +33 -0
- package/src/libs/feature/notify-reuse/src/index.ts +1 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.css +0 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.html +23 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.ts +114 -0
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.html +111 -1
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +211 -8
- package/src/libs/feature/notify-reuse/src/lib/utils/url.ts +16 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +9 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +10 -5
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +2 -2
- package/src/libs/ui/dataviz/src/index.ts +0 -1
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/contact-details/contact-details.component.html +48 -56
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.html +2 -1
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css +13 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +13 -3
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +43 -6
- package/src/libs/ui/elements/src/lib/keyword-badge/keyword-badge.component.html +14 -0
- package/src/libs/ui/elements/src/lib/keyword-badge/keyword-badge.component.ts +85 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +5 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -7
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +4 -5
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +4 -0
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +33 -26
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +9 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +2 -2
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +3 -3
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.css +0 -3
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +11 -7
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +56 -30
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +5 -5
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +9 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +3 -8
- package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +7 -7
- package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.ts +14 -1
- package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +4 -54
- package/src/libs/ui/map/src/lib/map-utils.ts +48 -0
- package/src/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.ts +1 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +12 -8
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +3 -1
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +1 -0
- package/src/libs/ui/widgets/src/lib/popover/popover.component.ts +7 -1
- package/src/libs/ui/widgets/src/lib/spinning-loader/spinning-loader.component.html +1 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +21 -9
- package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +1 -2
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +6 -3
- package/src/libs/util/i18n/src/index.ts +0 -1
- package/src/libs/util/i18n/src/lib/i18n.constants.ts +17 -11
- package/src/libs/util/i18n/src/lib/i18n.interceptor.ts +2 -2
- package/src/libs/util/i18n/src/lib/i18n.providers.ts +14 -17
- package/src/libs/util/i18n/src/lib/test.translate.loader.ts +48 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +22 -0
- package/src/libs/util/shared/src/lib/services/date.service.ts +3 -3
- package/src/libs/util/shared/src/lib/utils/geojson.ts +58 -1
- package/style.css +0 -1
- package/tailwind.base.css +9 -0
- package/translations/de.json +84 -31
- package/translations/en.json +94 -41
- package/translations/es.json +58 -5
- package/translations/fr.json +91 -38
- package/translations/it.json +85 -32
- package/translations/nl.json +57 -4
- package/translations/pt.json +58 -5
- package/translations/sk.json +58 -5
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.css +0 -3
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
2
|
-
import {
|
|
3
|
-
EditorConfig,
|
|
4
|
-
EditorField,
|
|
5
|
-
EditorSection,
|
|
6
|
-
} from './models/editor-config.model'
|
|
2
|
+
import { EditorConfig } from './models/editor-config.model'
|
|
7
3
|
import { Keyword } from '../../../../../libs/common/domain/src/lib/model/record'
|
|
8
4
|
|
|
9
5
|
export interface ISOTopic {
|
|
@@ -12,309 +8,326 @@ export interface ISOTopic {
|
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
|
-
* This file contains the configuration of the fields
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* Finally, add the section to the corresponding page in the pages part of this file.
|
|
11
|
+
* This file contains the configuration of the fields
|
|
12
|
+
* that will be displayed in the editor
|
|
13
|
+
* and the reuse light editor.
|
|
19
14
|
*/
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
*************** FIELDS *****************
|
|
23
|
-
************************************************************
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export const RECORD_UNIQUE_IDENTIFIER_FIELD: EditorField = {
|
|
27
|
-
model: 'uniqueIdentifier',
|
|
28
|
-
formFieldConfig: {
|
|
29
|
-
labelKey: marker('editor.record.form.field.uniqueIdentifier'),
|
|
30
|
-
},
|
|
31
|
-
hidden: true,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const CONSTRAINTS_SHORTCUTS: EditorField = {
|
|
35
|
-
componentName: 'form-field-constraints-shortcuts',
|
|
36
|
-
formFieldConfig: {
|
|
37
|
-
labelKey: marker('editor.record.form.field.constraintsShortcuts'),
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const LEGAL_CONSTRAINTS_FIELD: EditorField = {
|
|
42
|
-
model: 'legalConstraints',
|
|
43
|
-
formFieldConfig: {
|
|
44
|
-
labelKey: marker('editor.record.form.field.legalConstraints'),
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
export const SECURITY_CONSTRAINTS_FIELD: EditorField = {
|
|
48
|
-
model: 'securityConstraints',
|
|
49
|
-
formFieldConfig: {
|
|
50
|
-
labelKey: marker('editor.record.form.field.securityConstraints'),
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
export const OTHER_CONSTRAINTS_FIELD: EditorField = {
|
|
54
|
-
model: 'otherConstraints',
|
|
55
|
-
formFieldConfig: {
|
|
56
|
-
labelKey: marker('editor.record.form.field.otherConstraints'),
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const RECORD_LICENSE_FIELD: EditorField = {
|
|
61
|
-
model: 'licenses',
|
|
62
|
-
formFieldConfig: {
|
|
63
|
-
labelKey: marker('editor.record.form.field.license'),
|
|
64
|
-
},
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const RECORD_KEYWORDS_FIELD: EditorField = {
|
|
68
|
-
model: 'keywords',
|
|
69
|
-
formFieldConfig: {},
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export const RECORD_TOPICS_FIELD: EditorField = {
|
|
73
|
-
model: 'topics',
|
|
74
|
-
formFieldConfig: {},
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export const RECORD_RESOURCE_CREATED_FIELD: EditorField = {
|
|
78
|
-
model: 'resourceCreated',
|
|
79
|
-
formFieldConfig: {
|
|
80
|
-
labelKey: marker('editor.record.form.field.resourceCreated'),
|
|
81
|
-
},
|
|
82
|
-
gridColumnSpan: 1,
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export const RESOURCE_IDENTIFIER_FIELD: EditorField = {
|
|
86
|
-
model: 'resourceIdentifiers',
|
|
87
|
-
formFieldConfig: {
|
|
88
|
-
labelKey: marker('editor.record.form.field.resourceIdentifier'),
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export const RECORD_RESOURCE_UPDATED_FIELD: EditorField = {
|
|
93
|
-
model: 'resourceUpdated',
|
|
94
|
-
formFieldConfig: {
|
|
95
|
-
labelKey: marker('editor.record.form.field.resourceUpdated'),
|
|
96
|
-
},
|
|
97
|
-
gridColumnSpan: 1,
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export const RECORD_UPDATED_FIELD: EditorField = {
|
|
101
|
-
model: 'recordUpdated',
|
|
102
|
-
formFieldConfig: {
|
|
103
|
-
labelKey: marker('editor.record.form.field.recordUpdated'),
|
|
104
|
-
},
|
|
105
|
-
onSaveProcess: '${dateNow()}',
|
|
106
|
-
gridColumnSpan: 1,
|
|
107
|
-
hidden: true,
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export const RECORD_UPDATE_FREQUENCY_FIELD: EditorField = {
|
|
111
|
-
model: 'updateFrequency',
|
|
112
|
-
formFieldConfig: {},
|
|
113
|
-
}
|
|
114
|
-
// keeping track of the label to not lose existing translation
|
|
16
|
+
// keeping track of labels to not lose existing translations
|
|
115
17
|
marker('editor.record.form.field.updateFrequency')
|
|
116
|
-
|
|
117
|
-
export const RECORD_TEMPORAL_EXTENTS_FIELD: EditorField = {
|
|
118
|
-
model: 'temporalExtents',
|
|
119
|
-
formFieldConfig: {
|
|
120
|
-
labelKey: marker('editor.record.form.field.temporalExtents'),
|
|
121
|
-
},
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export const RECORD_TITLE_FIELD: EditorField = {
|
|
125
|
-
model: 'title',
|
|
126
|
-
formFieldConfig: {
|
|
127
|
-
labelKey: marker('editor.record.form.field.title'),
|
|
128
|
-
},
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export const RECORD_ABSTRACT_FIELD: EditorField = {
|
|
132
|
-
model: 'abstract',
|
|
133
|
-
formFieldConfig: {
|
|
134
|
-
labelKey: marker('editor.record.form.field.abstract'),
|
|
135
|
-
},
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export const CONTACTS_FOR_RESOURCE_FIELD: EditorField = {
|
|
139
|
-
model: 'contactsForResource',
|
|
140
|
-
formFieldConfig: {
|
|
141
|
-
labelKey: '',
|
|
142
|
-
},
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export const CONTACTS: EditorField = {
|
|
146
|
-
model: 'contacts',
|
|
147
|
-
formFieldConfig: {
|
|
148
|
-
labelKey: '',
|
|
149
|
-
},
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export const RECORD_GRAPHICAL_OVERVIEW_FIELD: EditorField = {
|
|
153
|
-
model: 'overviews',
|
|
154
|
-
formFieldConfig: {
|
|
155
|
-
labelKey: marker('editor.record.form.field.overviews'),
|
|
156
|
-
},
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export const RECORD_SPATIAL_TOGGLE_FIELD: EditorField = {
|
|
160
|
-
componentName: 'form-field-spatial-toggle',
|
|
161
|
-
formFieldConfig: {},
|
|
162
|
-
hidden: true,
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export const RECORD_SPATIAL_EXTENTS_FIELD: EditorField = {
|
|
166
|
-
model: 'spatialExtents',
|
|
167
|
-
formFieldConfig: {},
|
|
168
|
-
}
|
|
169
|
-
// keeping track of the label to not lose existing translation
|
|
170
18
|
marker('editor.record.form.field.spatialExtents')
|
|
171
|
-
|
|
172
|
-
export const RECORD_ONLINE_RESOURCES: EditorField = {
|
|
173
|
-
model: 'onlineResources',
|
|
174
|
-
modelSpecifier: 'onlineResourceType:!link',
|
|
175
|
-
formFieldConfig: {},
|
|
176
|
-
}
|
|
177
|
-
// keeping track of the label to not lose existing translation
|
|
178
19
|
marker('editor.record.form.field.onlineResources')
|
|
179
|
-
|
|
180
|
-
export const RECORD_ONLINE_LINK_RESOURCES: EditorField = {
|
|
181
|
-
model: 'onlineResources',
|
|
182
|
-
modelSpecifier: 'onlineResourceType:link',
|
|
183
|
-
formFieldConfig: {},
|
|
184
|
-
}
|
|
185
|
-
// keeping track of the label to not lose existing translation
|
|
186
20
|
marker('editor.record.form.field.onlineLinkResources')
|
|
187
21
|
|
|
188
|
-
/************************************************************
|
|
189
|
-
*************** SECTIONS *****************
|
|
190
|
-
************************************************************
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
export const TITLE_SECTION: EditorSection = {
|
|
194
|
-
hidden: false,
|
|
195
|
-
fields: [
|
|
196
|
-
RECORD_TITLE_FIELD,
|
|
197
|
-
RECORD_ABSTRACT_FIELD,
|
|
198
|
-
RECORD_GRAPHICAL_OVERVIEW_FIELD,
|
|
199
|
-
],
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export const ABOUT_SECTION: EditorSection = {
|
|
203
|
-
labelKey: marker('editor.record.form.section.about.label'),
|
|
204
|
-
descriptionKey: marker('editor.record.form.section.about.description'),
|
|
205
|
-
hidden: false,
|
|
206
|
-
fields: [
|
|
207
|
-
RECORD_UNIQUE_IDENTIFIER_FIELD,
|
|
208
|
-
RESOURCE_IDENTIFIER_FIELD,
|
|
209
|
-
RECORD_RESOURCE_CREATED_FIELD,
|
|
210
|
-
RECORD_RESOURCE_UPDATED_FIELD,
|
|
211
|
-
RECORD_UPDATED_FIELD,
|
|
212
|
-
RECORD_UPDATE_FREQUENCY_FIELD,
|
|
213
|
-
RECORD_TEMPORAL_EXTENTS_FIELD,
|
|
214
|
-
],
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export const GEOGRAPHICAL_COVERAGE_SECTION: EditorSection = {
|
|
218
|
-
labelKey: marker('editor.record.form.section.geographicalCoverage.label'),
|
|
219
|
-
hidden: false,
|
|
220
|
-
fields: [RECORD_SPATIAL_TOGGLE_FIELD, RECORD_SPATIAL_EXTENTS_FIELD],
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export const ASSOCIATED_RESOURCES_SECTION: EditorSection = {
|
|
224
|
-
labelKey: marker('editor.record.form.section.associatedResources.label'),
|
|
225
|
-
descriptionKey: marker(
|
|
226
|
-
'editor.record.form.section.associatedResources.description'
|
|
227
|
-
),
|
|
228
|
-
hidden: false,
|
|
229
|
-
fields: [RECORD_ONLINE_RESOURCES],
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export const ANNEXES_SECTION: EditorSection = {
|
|
233
|
-
labelKey: marker('editor.record.form.section.annexes.label'),
|
|
234
|
-
descriptionKey: marker('editor.record.form.section.annexes.description'),
|
|
235
|
-
hidden: false,
|
|
236
|
-
fields: [RECORD_ONLINE_LINK_RESOURCES],
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export const CLASSIFICATION_SECTION: EditorSection = {
|
|
240
|
-
labelKey: marker('editor.record.form.section.classification.label'),
|
|
241
|
-
descriptionKey: marker(
|
|
242
|
-
'editor.record.form.section.classification.description'
|
|
243
|
-
),
|
|
244
|
-
hidden: false,
|
|
245
|
-
fields: [RECORD_KEYWORDS_FIELD],
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export const TOPICS_SECTION: EditorSection = {
|
|
249
|
-
labelKey: marker('editor.record.form.section.topics.label'),
|
|
250
|
-
descriptionKey: marker('editor.record.form.section.topics.description'),
|
|
251
|
-
hidden: false,
|
|
252
|
-
fields: [RECORD_TOPICS_FIELD],
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export const USE_AND_ACCESS_CONDITIONS_SECTION: EditorSection = {
|
|
256
|
-
labelKey: marker('editor.record.form.section.useAndAccessConditions.label'),
|
|
257
|
-
hidden: false,
|
|
258
|
-
fields: [
|
|
259
|
-
RECORD_LICENSE_FIELD,
|
|
260
|
-
CONSTRAINTS_SHORTCUTS,
|
|
261
|
-
LEGAL_CONSTRAINTS_FIELD,
|
|
262
|
-
SECURITY_CONSTRAINTS_FIELD,
|
|
263
|
-
OTHER_CONSTRAINTS_FIELD,
|
|
264
|
-
],
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export const DATA_MANAGERS_SECTION: EditorSection = {
|
|
268
|
-
labelKey: marker('editor.record.form.section.dataManagers.label'),
|
|
269
|
-
descriptionKey: marker('editor.record.form.section.dataManagers.description'),
|
|
270
|
-
hidden: false,
|
|
271
|
-
fields: [CONTACTS_FOR_RESOURCE_FIELD],
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export const METADATA_POINT_OF_CONTACT_SECTION: EditorSection = {
|
|
275
|
-
labelKey: marker('editor.record.form.section.metadataPointOfContact.label'),
|
|
276
|
-
descriptionKey: marker(
|
|
277
|
-
'editor.record.form.section.metadataPointOfContact.description'
|
|
278
|
-
),
|
|
279
|
-
hidden: false,
|
|
280
|
-
fields: [CONTACTS],
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/************************************************************
|
|
284
|
-
*************** PAGES *****************
|
|
285
|
-
************************************************************
|
|
286
|
-
*/
|
|
287
22
|
export const DEFAULT_CONFIGURATION: EditorConfig = {
|
|
288
23
|
pages: [
|
|
24
|
+
/**
|
|
25
|
+
* Page 1: DESCRIPTION
|
|
26
|
+
*/
|
|
27
|
+
|
|
289
28
|
{
|
|
290
29
|
labelKey: marker('editor.record.form.page.description'),
|
|
291
30
|
sections: [
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
31
|
+
// Section: Title, abstract and overview
|
|
32
|
+
{
|
|
33
|
+
fields: [
|
|
34
|
+
{
|
|
35
|
+
model: 'title',
|
|
36
|
+
formFieldConfig: {
|
|
37
|
+
labelKey: marker('editor.record.form.field.title'),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
model: 'abstract',
|
|
42
|
+
formFieldConfig: {
|
|
43
|
+
labelKey: marker('editor.record.form.field.abstract'),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
model: 'overviews',
|
|
48
|
+
formFieldConfig: {
|
|
49
|
+
labelKey: marker('editor.record.form.field.overviews'),
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// Section: Classification
|
|
56
|
+
{
|
|
57
|
+
labelKey: marker('editor.record.form.section.classification.label'),
|
|
58
|
+
descriptionKey: marker(
|
|
59
|
+
'editor.record.form.section.classification.description'
|
|
60
|
+
),
|
|
61
|
+
fields: [
|
|
62
|
+
{
|
|
63
|
+
model: 'keywords',
|
|
64
|
+
formFieldConfig: {},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
// Section: Topics
|
|
70
|
+
{
|
|
71
|
+
labelKey: marker('editor.record.form.section.topics.label'),
|
|
72
|
+
descriptionKey: marker(
|
|
73
|
+
'editor.record.form.section.topics.description'
|
|
74
|
+
),
|
|
75
|
+
fields: [
|
|
76
|
+
{
|
|
77
|
+
model: 'topics',
|
|
78
|
+
formFieldConfig: {},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// Section: About (identifiers, dates, update frequency, temporal extents)
|
|
84
|
+
{
|
|
85
|
+
labelKey: marker('editor.record.form.section.about.label'),
|
|
86
|
+
descriptionKey: marker(
|
|
87
|
+
'editor.record.form.section.about.description'
|
|
88
|
+
),
|
|
89
|
+
fields: [
|
|
90
|
+
{
|
|
91
|
+
model: 'uniqueIdentifier',
|
|
92
|
+
formFieldConfig: {
|
|
93
|
+
labelKey: marker('editor.record.form.field.uniqueIdentifier'),
|
|
94
|
+
},
|
|
95
|
+
hidden: true,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
model: 'resourceIdentifiers',
|
|
99
|
+
formFieldConfig: {
|
|
100
|
+
labelKey: marker('editor.record.form.field.resourceIdentifier'),
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
model: 'resourceCreated',
|
|
105
|
+
formFieldConfig: {
|
|
106
|
+
labelKey: marker('editor.record.form.field.resourceCreated'),
|
|
107
|
+
},
|
|
108
|
+
gridColumnSpan: 1,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
model: 'resourceUpdated',
|
|
112
|
+
formFieldConfig: {
|
|
113
|
+
labelKey: marker('editor.record.form.field.resourceUpdated'),
|
|
114
|
+
},
|
|
115
|
+
gridColumnSpan: 1,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
model: 'recordUpdated',
|
|
119
|
+
formFieldConfig: {
|
|
120
|
+
labelKey: marker('editor.record.form.field.recordUpdated'),
|
|
121
|
+
},
|
|
122
|
+
onSaveProcess: '${dateNow()}',
|
|
123
|
+
gridColumnSpan: 1,
|
|
124
|
+
hidden: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
model: 'updateFrequency',
|
|
128
|
+
formFieldConfig: {},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
model: 'temporalExtents',
|
|
132
|
+
formFieldConfig: {
|
|
133
|
+
labelKey: marker('editor.record.form.field.temporalExtents'),
|
|
134
|
+
},
|
|
135
|
+
hidden: '${record.kind == "service"}',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// Section: Geographical coverage
|
|
141
|
+
{
|
|
142
|
+
labelKey: marker(
|
|
143
|
+
'editor.record.form.section.geographicalCoverage.label'
|
|
144
|
+
),
|
|
145
|
+
fields: [
|
|
146
|
+
{
|
|
147
|
+
componentName: 'form-field-spatial-toggle',
|
|
148
|
+
formFieldConfig: {},
|
|
149
|
+
hidden: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
model: 'spatialExtents',
|
|
153
|
+
formFieldConfig: {},
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
297
157
|
],
|
|
298
158
|
},
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Page 2: RESOURCES
|
|
162
|
+
*/
|
|
163
|
+
|
|
299
164
|
{
|
|
300
165
|
labelKey: marker('editor.record.form.page.resources'),
|
|
301
|
-
sections: [
|
|
166
|
+
sections: [
|
|
167
|
+
// Section: Associated resources (distributions, services, …)
|
|
168
|
+
{
|
|
169
|
+
hidden: '${record.kind != "dataset"}',
|
|
170
|
+
labelKey: marker(
|
|
171
|
+
'editor.record.form.section.associatedResources.label'
|
|
172
|
+
),
|
|
173
|
+
descriptionKey: marker(
|
|
174
|
+
'editor.record.form.section.associatedResources.description'
|
|
175
|
+
),
|
|
176
|
+
fields: [
|
|
177
|
+
{
|
|
178
|
+
model: 'onlineResources',
|
|
179
|
+
modelSpecifier: 'onlineResourceType:!link',
|
|
180
|
+
formFieldConfig: {},
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
// Section: Annexes (links)
|
|
186
|
+
{
|
|
187
|
+
labelKey: marker('editor.record.form.section.annexes.label'),
|
|
188
|
+
descriptionKey: marker(
|
|
189
|
+
'editor.record.form.section.annexes.description'
|
|
190
|
+
),
|
|
191
|
+
fields: [
|
|
192
|
+
{
|
|
193
|
+
model: 'onlineResources',
|
|
194
|
+
modelSpecifier: 'onlineResourceType:link',
|
|
195
|
+
formFieldConfig: {},
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
],
|
|
302
200
|
},
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Page 3: ACCESS & CONTACT
|
|
204
|
+
*/
|
|
205
|
+
|
|
303
206
|
{
|
|
304
207
|
labelKey: marker('editor.record.form.page.accessAndContact'),
|
|
305
208
|
sections: [
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
209
|
+
// Section: Use and access conditions (license, constraints)
|
|
210
|
+
{
|
|
211
|
+
labelKey: marker(
|
|
212
|
+
'editor.record.form.section.useAndAccessConditions.label'
|
|
213
|
+
),
|
|
214
|
+
fields: [
|
|
215
|
+
{
|
|
216
|
+
model: 'licenses',
|
|
217
|
+
formFieldConfig: {
|
|
218
|
+
labelKey: marker('editor.record.form.field.license'),
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
componentName: 'form-field-constraints-shortcuts',
|
|
223
|
+
formFieldConfig: {
|
|
224
|
+
labelKey: marker(
|
|
225
|
+
'editor.record.form.field.constraintsShortcuts'
|
|
226
|
+
),
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
model: 'legalConstraints',
|
|
231
|
+
formFieldConfig: {
|
|
232
|
+
labelKey: marker('editor.record.form.field.legalConstraints'),
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
model: 'securityConstraints',
|
|
237
|
+
formFieldConfig: {
|
|
238
|
+
labelKey: marker(
|
|
239
|
+
'editor.record.form.field.securityConstraints'
|
|
240
|
+
),
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
model: 'otherConstraints',
|
|
245
|
+
formFieldConfig: {
|
|
246
|
+
labelKey: marker('editor.record.form.field.otherConstraints'),
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
// Section: Data managers (contacts for resource)
|
|
253
|
+
{
|
|
254
|
+
labelKey: marker('editor.record.form.section.dataManagers.label'),
|
|
255
|
+
descriptionKey: marker(
|
|
256
|
+
'editor.record.form.section.dataManagers.description'
|
|
257
|
+
),
|
|
258
|
+
fields: [
|
|
259
|
+
{
|
|
260
|
+
model: 'contactsForResource',
|
|
261
|
+
formFieldConfig: { labelKey: '' },
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
// Section: Metadata point of contact
|
|
267
|
+
{
|
|
268
|
+
labelKey: marker(
|
|
269
|
+
'editor.record.form.section.metadataPointOfContact.label'
|
|
270
|
+
),
|
|
271
|
+
descriptionKey: marker(
|
|
272
|
+
'editor.record.form.section.metadataPointOfContact.description'
|
|
273
|
+
),
|
|
274
|
+
fields: [
|
|
275
|
+
{
|
|
276
|
+
model: 'contacts',
|
|
277
|
+
formFieldConfig: { labelKey: '' },
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
},
|
|
309
281
|
],
|
|
310
282
|
},
|
|
311
283
|
],
|
|
312
284
|
}
|
|
313
285
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
286
|
+
// reduced configuration used by the light edition page for reuse records;
|
|
287
|
+
// the point of contact is edited outside the record form on that page
|
|
288
|
+
export const REUSE_LIGHT_CONFIGURATION: EditorConfig = {
|
|
289
|
+
pages: [
|
|
290
|
+
{
|
|
291
|
+
sections: [
|
|
292
|
+
{
|
|
293
|
+
hidden: false,
|
|
294
|
+
fields: [
|
|
295
|
+
{
|
|
296
|
+
model: 'title',
|
|
297
|
+
formFieldConfig: {
|
|
298
|
+
labelKey: marker('editor.record.form.field.title'),
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
model: 'abstract',
|
|
303
|
+
formFieldConfig: {
|
|
304
|
+
labelKey: marker('editor.record.form.field.abstract'),
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
model: 'onlineResources',
|
|
309
|
+
modelSpecifier: 'onlineResourceType:singleLink',
|
|
310
|
+
formFieldConfig: {
|
|
311
|
+
labelKey: marker('editor.record.form.field.reuseUrl'),
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
model: 'overviews',
|
|
316
|
+
formFieldConfig: {
|
|
317
|
+
labelKey: marker('editor.record.form.field.overviews'),
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* OTHER SETTINGS
|
|
317
329
|
*/
|
|
330
|
+
|
|
318
331
|
export const AVAILABLE_LICENSES: string[] = [
|
|
319
332
|
'cc-by',
|
|
320
333
|
'cc-by-sa',
|
|
@@ -340,10 +353,6 @@ marker('editor.record.form.license.pddl')
|
|
|
340
353
|
marker('editor.record.form.license.unknown')
|
|
341
354
|
|
|
342
355
|
export const MAX_UPLOAD_SIZE_MB = 10
|
|
343
|
-
/************************************************************
|
|
344
|
-
*************** SPATIAL SCOPE ************
|
|
345
|
-
************************************************************
|
|
346
|
-
*/
|
|
347
356
|
|
|
348
357
|
export const SPATIAL_SCOPES: Keyword[] = [
|
|
349
358
|
{
|
|
@@ -360,11 +369,6 @@ export const SPATIAL_SCOPES: Keyword[] = [
|
|
|
360
369
|
},
|
|
361
370
|
]
|
|
362
371
|
|
|
363
|
-
/************************************************************
|
|
364
|
-
*************** ISO TOPICS **************
|
|
365
|
-
************************************************************
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
372
|
// label keys mirror the ISO MD_TopicCategoryCode value for consistency
|
|
369
373
|
// TODO: correctly handle code lists; for instance, this code list is specific to ISO 19139
|
|
370
374
|
export const ISO_TOPICS: ISOTopic[] = [
|
|
@@ -19,12 +19,16 @@ export interface FormFieldConfig {
|
|
|
19
19
|
// This is used for instance to target only certain online resources in a field
|
|
20
20
|
type OnlineLinkResourceSpecifier = `onlineResourceType:link`
|
|
21
21
|
type DatasetDistributionsSpecifier = `onlineResourceType:!link`
|
|
22
|
+
// Renders a single URL input bound to the first online resource of the record
|
|
23
|
+
// (FormFieldOnlineSingleLinkResourceComponent)
|
|
24
|
+
type OnlineSingleLinkResourceSpecifier = `onlineResourceType:singleLink`
|
|
22
25
|
// When set on the `contacts` field, contacts are rendered as editable detail
|
|
23
26
|
// fields (ContactDetailsFormComponent) instead of cards (ContactCardComponent)
|
|
24
27
|
type EditableContactDetailsSpecifier = `contact:editableDetails`
|
|
25
28
|
export type FieldModelSpecifier =
|
|
26
29
|
| OnlineLinkResourceSpecifier
|
|
27
30
|
| DatasetDistributionsSpecifier
|
|
31
|
+
| OnlineSingleLinkResourceSpecifier
|
|
28
32
|
| EditableContactDetailsSpecifier
|
|
29
33
|
|
|
30
34
|
export type FormFieldComponentName =
|
|
@@ -48,8 +52,7 @@ export interface EditorField extends EditorFieldIdentification {
|
|
|
48
52
|
gridColumnSpan?: number
|
|
49
53
|
|
|
50
54
|
// a hidden field won't show but can still be used to modify the record
|
|
51
|
-
|
|
52
|
-
hidden?: boolean
|
|
55
|
+
hidden?: boolean | EditorFieldExpression
|
|
53
56
|
|
|
54
57
|
// the result of this expression will replace the field value on save
|
|
55
58
|
onSaveProcess?: EditorFieldExpression
|
|
@@ -58,7 +61,7 @@ export interface EditorField extends EditorFieldIdentification {
|
|
|
58
61
|
export interface EditorSection {
|
|
59
62
|
labelKey?: string
|
|
60
63
|
descriptionKey?: string
|
|
61
|
-
hidden
|
|
64
|
+
hidden?: boolean | EditorFieldExpression
|
|
62
65
|
fields: EditorField[]
|
|
63
66
|
}
|
|
64
67
|
|