geonetwork-ui 2.10.0-dev.b6696be21 → 2.10.0-dev.bf2e85a24
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 +947 -6061
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +129 -148
- package/index.d.ts.map +1 -1
- package/material-styles.css +483 -0
- package/package.json +23 -33
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +48 -7
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +5 -4
- 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/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 +5 -5
- 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 +2 -2
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +2 -0
- package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +2 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +51 -0
- package/src/libs/feature/catalog/src/lib/sources/sources.service.ts +5 -2
- 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/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 +6 -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 +20 -16
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +9 -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 +251 -290
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +2 -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/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/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/markdown-parser/markdown-parser.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +17 -7
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +29 -1
- 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/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/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/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 +2 -0
- package/translations/de.json +53 -29
- package/translations/en.json +58 -34
- package/translations/es.json +27 -3
- package/translations/fr.json +55 -31
- package/translations/it.json +53 -29
- package/translations/nl.json +26 -2
- package/translations/pt.json +27 -3
- package/translations/sk.json +27 -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 {
|
|
@@ -13,308 +9,282 @@ export interface ISOTopic {
|
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* This file contains the configuration of the fields that will be displayed in the editor.
|
|
16
|
-
* To add a new field, you need to create a new EditorField object in the fields part of this file.
|
|
17
|
-
* Then add it to the corresponding section in the sections part of this file.
|
|
18
|
-
* Finally, add the section to the corresponding page in the pages part of this file.
|
|
19
12
|
*/
|
|
20
13
|
|
|
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
|
|
14
|
+
// keeping track of labels to not lose existing translations
|
|
115
15
|
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
16
|
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
17
|
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
18
|
marker('editor.record.form.field.onlineLinkResources')
|
|
187
19
|
|
|
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
20
|
export const DEFAULT_CONFIGURATION: EditorConfig = {
|
|
288
21
|
pages: [
|
|
22
|
+
/**
|
|
23
|
+
* Page 1: DESCRIPTION
|
|
24
|
+
*/
|
|
25
|
+
|
|
289
26
|
{
|
|
290
27
|
labelKey: marker('editor.record.form.page.description'),
|
|
291
28
|
sections: [
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
29
|
+
// Section: Title, abstract and overview
|
|
30
|
+
{
|
|
31
|
+
fields: [
|
|
32
|
+
{
|
|
33
|
+
model: 'title',
|
|
34
|
+
formFieldConfig: {
|
|
35
|
+
labelKey: marker('editor.record.form.field.title'),
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
model: 'abstract',
|
|
40
|
+
formFieldConfig: {
|
|
41
|
+
labelKey: marker('editor.record.form.field.abstract'),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
model: 'overviews',
|
|
46
|
+
formFieldConfig: {
|
|
47
|
+
labelKey: marker('editor.record.form.field.overviews'),
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// Section: Classification
|
|
54
|
+
{
|
|
55
|
+
labelKey: marker('editor.record.form.section.classification.label'),
|
|
56
|
+
descriptionKey: marker(
|
|
57
|
+
'editor.record.form.section.classification.description'
|
|
58
|
+
),
|
|
59
|
+
fields: [
|
|
60
|
+
{
|
|
61
|
+
model: 'keywords',
|
|
62
|
+
formFieldConfig: {},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// Section: Topics
|
|
68
|
+
{
|
|
69
|
+
labelKey: marker('editor.record.form.section.topics.label'),
|
|
70
|
+
descriptionKey: marker(
|
|
71
|
+
'editor.record.form.section.topics.description'
|
|
72
|
+
),
|
|
73
|
+
fields: [
|
|
74
|
+
{
|
|
75
|
+
model: 'topics',
|
|
76
|
+
formFieldConfig: {},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
// Section: About (identifiers, dates, update frequency, temporal extents)
|
|
82
|
+
{
|
|
83
|
+
labelKey: marker('editor.record.form.section.about.label'),
|
|
84
|
+
descriptionKey: marker(
|
|
85
|
+
'editor.record.form.section.about.description'
|
|
86
|
+
),
|
|
87
|
+
fields: [
|
|
88
|
+
{
|
|
89
|
+
model: 'uniqueIdentifier',
|
|
90
|
+
formFieldConfig: {
|
|
91
|
+
labelKey: marker('editor.record.form.field.uniqueIdentifier'),
|
|
92
|
+
},
|
|
93
|
+
hidden: true,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
model: 'resourceIdentifiers',
|
|
97
|
+
formFieldConfig: {
|
|
98
|
+
labelKey: marker('editor.record.form.field.resourceIdentifier'),
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
model: 'resourceCreated',
|
|
103
|
+
formFieldConfig: {
|
|
104
|
+
labelKey: marker('editor.record.form.field.resourceCreated'),
|
|
105
|
+
},
|
|
106
|
+
gridColumnSpan: 1,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
model: 'resourceUpdated',
|
|
110
|
+
formFieldConfig: {
|
|
111
|
+
labelKey: marker('editor.record.form.field.resourceUpdated'),
|
|
112
|
+
},
|
|
113
|
+
gridColumnSpan: 1,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
model: 'recordUpdated',
|
|
117
|
+
formFieldConfig: {
|
|
118
|
+
labelKey: marker('editor.record.form.field.recordUpdated'),
|
|
119
|
+
},
|
|
120
|
+
onSaveProcess: '${dateNow()}',
|
|
121
|
+
gridColumnSpan: 1,
|
|
122
|
+
hidden: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
model: 'updateFrequency',
|
|
126
|
+
formFieldConfig: {},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
model: 'temporalExtents',
|
|
130
|
+
formFieldConfig: {
|
|
131
|
+
labelKey: marker('editor.record.form.field.temporalExtents'),
|
|
132
|
+
},
|
|
133
|
+
hidden: '${record.kind == "service"}',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
// Section: Geographical coverage
|
|
139
|
+
{
|
|
140
|
+
labelKey: marker(
|
|
141
|
+
'editor.record.form.section.geographicalCoverage.label'
|
|
142
|
+
),
|
|
143
|
+
fields: [
|
|
144
|
+
{
|
|
145
|
+
componentName: 'form-field-spatial-toggle',
|
|
146
|
+
formFieldConfig: {},
|
|
147
|
+
hidden: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
model: 'spatialExtents',
|
|
151
|
+
formFieldConfig: {},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
297
155
|
],
|
|
298
156
|
},
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Page 2: RESOURCES
|
|
160
|
+
*/
|
|
161
|
+
|
|
299
162
|
{
|
|
300
163
|
labelKey: marker('editor.record.form.page.resources'),
|
|
301
|
-
sections: [
|
|
164
|
+
sections: [
|
|
165
|
+
// Section: Associated resources (distributions, services, …)
|
|
166
|
+
{
|
|
167
|
+
hidden: '${record.kind != "dataset"}',
|
|
168
|
+
labelKey: marker(
|
|
169
|
+
'editor.record.form.section.associatedResources.label'
|
|
170
|
+
),
|
|
171
|
+
descriptionKey: marker(
|
|
172
|
+
'editor.record.form.section.associatedResources.description'
|
|
173
|
+
),
|
|
174
|
+
fields: [
|
|
175
|
+
{
|
|
176
|
+
model: 'onlineResources',
|
|
177
|
+
modelSpecifier: 'onlineResourceType:!link',
|
|
178
|
+
formFieldConfig: {},
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// Section: Annexes (links)
|
|
184
|
+
{
|
|
185
|
+
labelKey: marker('editor.record.form.section.annexes.label'),
|
|
186
|
+
descriptionKey: marker(
|
|
187
|
+
'editor.record.form.section.annexes.description'
|
|
188
|
+
),
|
|
189
|
+
fields: [
|
|
190
|
+
{
|
|
191
|
+
model: 'onlineResources',
|
|
192
|
+
modelSpecifier: 'onlineResourceType:link',
|
|
193
|
+
formFieldConfig: {},
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
],
|
|
302
198
|
},
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Page 3: ACCESS & CONTACT
|
|
202
|
+
*/
|
|
203
|
+
|
|
303
204
|
{
|
|
304
205
|
labelKey: marker('editor.record.form.page.accessAndContact'),
|
|
305
206
|
sections: [
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
207
|
+
// Section: Use and access conditions (license, constraints)
|
|
208
|
+
{
|
|
209
|
+
labelKey: marker(
|
|
210
|
+
'editor.record.form.section.useAndAccessConditions.label'
|
|
211
|
+
),
|
|
212
|
+
fields: [
|
|
213
|
+
{
|
|
214
|
+
model: 'licenses',
|
|
215
|
+
formFieldConfig: {
|
|
216
|
+
labelKey: marker('editor.record.form.field.license'),
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
componentName: 'form-field-constraints-shortcuts',
|
|
221
|
+
formFieldConfig: {
|
|
222
|
+
labelKey: marker(
|
|
223
|
+
'editor.record.form.field.constraintsShortcuts'
|
|
224
|
+
),
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
model: 'legalConstraints',
|
|
229
|
+
formFieldConfig: {
|
|
230
|
+
labelKey: marker('editor.record.form.field.legalConstraints'),
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
model: 'securityConstraints',
|
|
235
|
+
formFieldConfig: {
|
|
236
|
+
labelKey: marker(
|
|
237
|
+
'editor.record.form.field.securityConstraints'
|
|
238
|
+
),
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
model: 'otherConstraints',
|
|
243
|
+
formFieldConfig: {
|
|
244
|
+
labelKey: marker('editor.record.form.field.otherConstraints'),
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
// Section: Data managers (contacts for resource)
|
|
251
|
+
{
|
|
252
|
+
labelKey: marker('editor.record.form.section.dataManagers.label'),
|
|
253
|
+
descriptionKey: marker(
|
|
254
|
+
'editor.record.form.section.dataManagers.description'
|
|
255
|
+
),
|
|
256
|
+
fields: [
|
|
257
|
+
{
|
|
258
|
+
model: 'contactsForResource',
|
|
259
|
+
formFieldConfig: { labelKey: '' },
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
// Section: Metadata point of contact
|
|
265
|
+
{
|
|
266
|
+
labelKey: marker(
|
|
267
|
+
'editor.record.form.section.metadataPointOfContact.label'
|
|
268
|
+
),
|
|
269
|
+
descriptionKey: marker(
|
|
270
|
+
'editor.record.form.section.metadataPointOfContact.description'
|
|
271
|
+
),
|
|
272
|
+
fields: [
|
|
273
|
+
{
|
|
274
|
+
model: 'contacts',
|
|
275
|
+
formFieldConfig: { labelKey: '' },
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
},
|
|
309
279
|
],
|
|
310
280
|
},
|
|
311
281
|
],
|
|
312
282
|
}
|
|
313
283
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
************************************************************
|
|
284
|
+
/**
|
|
285
|
+
* OTHER SETTINGS
|
|
317
286
|
*/
|
|
287
|
+
|
|
318
288
|
export const AVAILABLE_LICENSES: string[] = [
|
|
319
289
|
'cc-by',
|
|
320
290
|
'cc-by-sa',
|
|
@@ -340,10 +310,6 @@ marker('editor.record.form.license.pddl')
|
|
|
340
310
|
marker('editor.record.form.license.unknown')
|
|
341
311
|
|
|
342
312
|
export const MAX_UPLOAD_SIZE_MB = 10
|
|
343
|
-
/************************************************************
|
|
344
|
-
*************** SPATIAL SCOPE ************
|
|
345
|
-
************************************************************
|
|
346
|
-
*/
|
|
347
313
|
|
|
348
314
|
export const SPATIAL_SCOPES: Keyword[] = [
|
|
349
315
|
{
|
|
@@ -360,11 +326,6 @@ export const SPATIAL_SCOPES: Keyword[] = [
|
|
|
360
326
|
},
|
|
361
327
|
]
|
|
362
328
|
|
|
363
|
-
/************************************************************
|
|
364
|
-
*************** ISO TOPICS **************
|
|
365
|
-
************************************************************
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
329
|
// label keys mirror the ISO MD_TopicCategoryCode value for consistency
|
|
369
330
|
// TODO: correctly handle code lists; for instance, this code list is specific to ISO 19139
|
|
370
331
|
export const ISO_TOPICS: ISOTopic[] = [
|
|
@@ -48,8 +48,7 @@ export interface EditorField extends EditorFieldIdentification {
|
|
|
48
48
|
gridColumnSpan?: number
|
|
49
49
|
|
|
50
50
|
// a hidden field won't show but can still be used to modify the record
|
|
51
|
-
|
|
52
|
-
hidden?: boolean
|
|
51
|
+
hidden?: boolean | EditorFieldExpression
|
|
53
52
|
|
|
54
53
|
// the result of this expression will replace the field value on save
|
|
55
54
|
onSaveProcess?: EditorFieldExpression
|
|
@@ -58,7 +57,7 @@ export interface EditorField extends EditorFieldIdentification {
|
|
|
58
57
|
export interface EditorSection {
|
|
59
58
|
labelKey?: string
|
|
60
59
|
descriptionKey?: string
|
|
61
|
-
hidden
|
|
60
|
+
hidden?: boolean | EditorFieldExpression
|
|
62
61
|
fields: EditorField[]
|
|
63
62
|
}
|
|
64
63
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inject, Injectable } from '@angular/core'
|
|
2
2
|
import { Observable, switchMap } from 'rxjs'
|
|
3
3
|
import { map, tap } from 'rxjs/operators'
|
|
4
4
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
@@ -16,7 +16,8 @@ export class EditorService {
|
|
|
16
16
|
saveRecord(
|
|
17
17
|
record: CatalogRecord,
|
|
18
18
|
recordSource: string,
|
|
19
|
-
fieldsConfig: EditorConfig
|
|
19
|
+
fieldsConfig: EditorConfig,
|
|
20
|
+
publish: boolean
|
|
20
21
|
): Observable<[CatalogRecord, string]> {
|
|
21
22
|
const savedRecord = { ...record }
|
|
22
23
|
|
|
@@ -27,22 +28,17 @@ export class EditorService {
|
|
|
27
28
|
// run onSave processes
|
|
28
29
|
for (const field of fields) {
|
|
29
30
|
if (field.onSaveProcess && field.model) {
|
|
30
|
-
const evaluator = evaluate(field.onSaveProcess)
|
|
31
|
+
const { evaluator } = evaluate(field.onSaveProcess)
|
|
31
32
|
savedRecord[field.model] = evaluator({
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
globals: {
|
|
34
|
+
record,
|
|
35
|
+
},
|
|
34
36
|
})
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
let publishToAll = true
|
|
38
|
-
// if the record is new, generate a new unique identifier and pass publishToAll as false
|
|
39
|
-
if (!record.uniqueIdentifier) {
|
|
40
|
-
savedRecord.uniqueIdentifier = null
|
|
41
|
-
publishToAll = false
|
|
42
|
-
}
|
|
43
39
|
|
|
44
40
|
return this.recordsRepository
|
|
45
|
-
.saveRecord(savedRecord, recordSource,
|
|
41
|
+
.saveRecord(savedRecord, recordSource, publish)
|
|
46
42
|
.pipe(
|
|
47
43
|
switchMap((uniqueIdentifier) =>
|
|
48
44
|
this.recordsRepository.openRecordForEdition(uniqueIdentifier)
|
|
@@ -2,6 +2,23 @@ import { Injectable } from '@angular/core'
|
|
|
2
2
|
import { extend } from 'ol/extent.js'
|
|
3
3
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
4
4
|
import { BoundingBox, getGeometryBoundingBox } from '../../../../../../libs/util/shared/src'
|
|
5
|
+
import { MapContextLayer } from '@geospatial-sdk/core'
|
|
6
|
+
import {
|
|
7
|
+
createSpatialExtentLayer,
|
|
8
|
+
SpatialExtentLayerStyle,
|
|
9
|
+
} from '../../../../../../libs/ui/map/src'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Style of the extent overlay drawn on top of the previewed data: a dashed
|
|
13
|
+
* black outline over a very light fill, so the extent stays readable without
|
|
14
|
+
* hiding the data underneath.
|
|
15
|
+
*/
|
|
16
|
+
const RECORD_EXTENT_OVERLAY_STYLE: SpatialExtentLayerStyle = {
|
|
17
|
+
'stroke-color': 'rgba(0, 0, 0, 0.6)',
|
|
18
|
+
'stroke-width': 2,
|
|
19
|
+
'stroke-line-dash': [8, 6],
|
|
20
|
+
'fill-color': 'rgba(0, 0, 0, 0.03)',
|
|
21
|
+
}
|
|
5
22
|
|
|
6
23
|
@Injectable({
|
|
7
24
|
providedIn: 'root',
|
|
@@ -26,4 +43,20 @@ export class MapUtilsService {
|
|
|
26
43
|
[Infinity, Infinity, -Infinity, -Infinity]
|
|
27
44
|
)
|
|
28
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Builds a non-interactive overlay layer drawing the spatial extent(s)
|
|
49
|
+
* declared in the record's metadata (bounding boxes and/or geometries).
|
|
50
|
+
* Returns null when the record has no usable spatial extent.
|
|
51
|
+
*
|
|
52
|
+
* This is purely for display and is independent from the map's initial view,
|
|
53
|
+
* which is derived separately (see {@link getRecordExtent}).
|
|
54
|
+
*/
|
|
55
|
+
getRecordExtentLayer(record: Partial<CatalogRecord>): MapContextLayer | null {
|
|
56
|
+
return createSpatialExtentLayer(record.spatialExtents ?? [], {
|
|
57
|
+
label: 'Spatial extent',
|
|
58
|
+
clickable: false,
|
|
59
|
+
style: RECORD_EXTENT_OVERLAY_STYLE,
|
|
60
|
+
})
|
|
61
|
+
}
|
|
29
62
|
}
|