geonetwork-ui 2.10.0-dev.91673b3ba → 2.10.0-dev.981f59a75

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.
Files changed (161) hide show
  1. package/fesm2022/geonetwork-ui.mjs +1536 -6196
  2. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  3. package/index.d.ts +257 -182
  4. package/index.d.ts.map +1 -1
  5. package/package.json +25 -35
  6. package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +9 -0
  7. package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +2 -0
  8. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -0
  9. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +7 -0
  10. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+roilaye.ts +1 -0
  11. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -0
  12. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -0
  13. package/src/libs/api/metadata-converter/src/lib/fixtures/georhena.records.ts +1 -0
  14. package/src/libs/api/metadata-converter/src/lib/fixtures/metadata-for-i18n.records.ts +2 -0
  15. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -0
  16. package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +1 -0
  17. package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +2 -0
  18. package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +1 -0
  19. package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.reuse.ts +8 -0
  20. package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +48 -7
  21. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
  22. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +6 -5
  23. package/src/libs/api/metadata-converter/src/lib/gn4/metadata-url.service.ts +2 -2
  24. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +1 -0
  25. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +7 -0
  26. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +8 -0
  27. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +12 -0
  28. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +14 -0
  29. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +33 -0
  30. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +36 -0
  31. package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +8 -4
  32. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
  33. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +59 -37
  34. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +1 -1
  35. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +1 -1
  36. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +37 -2
  37. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +13 -5
  38. package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +2 -1
  39. package/src/libs/common/domain/src/lib/model/user/group.model.ts +8 -0
  40. package/src/libs/common/domain/src/lib/model/user/index.ts +1 -0
  41. package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -0
  42. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +56 -0
  43. package/src/libs/feature/catalog/src/lib/sources/sources.service.ts +5 -2
  44. package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +10 -1
  45. package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +26 -19
  46. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +15 -2
  47. package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.ts +0 -2
  48. package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.css +0 -0
  49. package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.html +68 -0
  50. package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.ts +39 -0
  51. package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.html +5 -14
  52. package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +3 -28
  53. package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.html +18 -3
  54. package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.ts +33 -40
  55. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +5 -5
  56. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -1
  57. package/src/libs/feature/editor/src/lib/components/record-form/form-field/field-focus.directive.ts +41 -0
  58. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints-shortcuts/form-field-constraints-shortcuts.component.ts +33 -34
  59. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.html +9 -2
  60. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +12 -0
  61. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +1 -1
  62. 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
  63. 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
  64. 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
  65. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +12 -5
  66. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +4 -4
  67. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +7 -0
  68. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-topics/form-field-topics.component.ts +2 -2
  69. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +6 -2
  70. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +3 -1
  71. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +3 -0
  72. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +21 -16
  73. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +14 -0
  74. package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -0
  75. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +35 -0
  76. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +18 -5
  77. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +118 -5
  78. package/src/libs/feature/editor/src/lib/expressions.ts +380 -8
  79. package/src/libs/feature/editor/src/lib/fields.config.ts +310 -336
  80. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +6 -3
  81. package/src/libs/feature/editor/src/lib/services/editor.service.ts +9 -13
  82. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +33 -0
  83. package/src/libs/feature/notify-reuse/src/index.ts +1 -0
  84. package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.css +0 -0
  85. package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.html +111 -0
  86. package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +229 -0
  87. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +9 -1
  88. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +10 -5
  89. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +2 -2
  90. package/src/libs/ui/dataviz/src/index.ts +0 -1
  91. package/src/libs/ui/elements/src/index.ts +2 -0
  92. package/src/libs/ui/elements/src/lib/contact-details/contact-details.component.html +88 -0
  93. package/src/libs/ui/elements/src/lib/contact-details/contact-details.component.ts +45 -0
  94. package/src/libs/ui/elements/src/lib/contact-pill/contact-pill.component.html +29 -4
  95. package/src/libs/ui/elements/src/lib/contact-pill/contact-pill.component.ts +51 -7
  96. package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.html +2 -1
  97. package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.ts +2 -2
  98. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css +13 -0
  99. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +13 -3
  100. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +43 -6
  101. package/src/libs/ui/elements/src/lib/keyword-badge/keyword-badge.component.html +14 -0
  102. package/src/libs/ui/elements/src/lib/keyword-badge/keyword-badge.component.ts +85 -0
  103. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
  104. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.ts +2 -5
  105. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +5 -0
  106. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +7 -10
  107. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +2 -2
  108. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +4 -5
  109. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +4 -0
  110. package/src/libs/ui/inputs/src/lib/badge/badge.component.html +33 -26
  111. package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +9 -0
  112. package/src/libs/ui/inputs/src/lib/button/button.component.ts +4 -0
  113. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +2 -2
  114. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  115. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +3 -3
  116. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.css +0 -3
  117. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +11 -7
  118. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +56 -30
  119. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +2 -2
  120. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +2 -1
  121. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +5 -5
  122. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +9 -1
  123. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -1
  124. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +3 -8
  125. package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +7 -7
  126. package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.ts +14 -1
  127. package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +2 -1
  128. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +15 -64
  129. package/src/libs/ui/map/src/lib/map-utils.ts +48 -0
  130. package/src/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.ts +1 -1
  131. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +12 -8
  132. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +3 -1
  133. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +1 -0
  134. package/src/libs/ui/widgets/src/lib/popover/popover.component.ts +7 -1
  135. package/src/libs/ui/widgets/src/lib/spinning-loader/spinning-loader.component.html +1 -1
  136. package/src/libs/util/app-config/src/lib/app-config.ts +70 -9
  137. package/src/libs/util/app-config/src/lib/model.ts +7 -0
  138. package/src/libs/util/app-config/src/lib/parse-utils.ts +50 -1
  139. package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +1 -2
  140. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +6 -3
  141. package/src/libs/util/i18n/src/index.ts +0 -1
  142. package/src/libs/util/i18n/src/lib/i18n.constants.ts +17 -11
  143. package/src/libs/util/i18n/src/lib/i18n.interceptor.ts +2 -2
  144. package/src/libs/util/i18n/src/lib/i18n.providers.ts +14 -17
  145. package/src/libs/util/i18n/src/lib/test.translate.loader.ts +48 -0
  146. package/src/libs/util/shared/src/lib/links/link-utils.ts +23 -1
  147. package/src/libs/util/shared/src/lib/record/quality-score.util.ts +33 -18
  148. package/src/libs/util/shared/src/lib/services/date.service.ts +3 -3
  149. package/src/libs/util/shared/src/lib/utils/geojson.ts +58 -1
  150. package/src/libs/util/shared/src/lib/utils/user-display.ts +9 -0
  151. package/style.css +0 -1
  152. package/tailwind.base.css +20 -2
  153. package/translations/de.json +93 -48
  154. package/translations/en.json +98 -53
  155. package/translations/es.json +67 -22
  156. package/translations/fr.json +95 -50
  157. package/translations/it.json +94 -49
  158. package/translations/nl.json +66 -21
  159. package/translations/pt.json +67 -22
  160. package/translations/sk.json +67 -22
  161. package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.css +0 -3
@@ -1,318 +1,290 @@
1
1
  import { marker } from '@biesbjerg/ngx-translate-extract-marker'
2
- import {
3
- EditorConfig,
4
- EditorField,
5
- EditorSection,
6
- } from './models/editor-config.model'
7
- import {
8
- INSPIRE_topic,
9
- Keyword,
10
- } from '../../../../../libs/common/domain/src/lib/model/record'
2
+ import { EditorConfig } from './models/editor-config.model'
3
+ import { Keyword } from '../../../../../libs/common/domain/src/lib/model/record'
4
+
5
+ export interface ISOTopic {
6
+ value: string
7
+ label: string
8
+ }
11
9
 
12
10
  /**
13
11
  * This file contains the configuration of the fields that will be displayed in the editor.
14
- * To add a new field, you need to create a new EditorField object in the fields part of this file.
15
- * Then add it to the corresponding section in the sections part of this file.
16
- * Finally, add the section to the corresponding page in the pages part of this file.
17
- */
18
-
19
- /************************************************************
20
- *************** FIELDS *****************
21
- ************************************************************
22
12
  */
23
13
 
24
- export const RECORD_UNIQUE_IDENTIFIER_FIELD: EditorField = {
25
- model: 'uniqueIdentifier',
26
- formFieldConfig: {
27
- labelKey: marker('editor.record.form.field.uniqueIdentifier'),
28
- },
29
- hidden: true,
30
- }
31
-
32
- export const CONSTRAINTS_SHORTCUTS: EditorField = {
33
- componentName: 'form-field-constraints-shortcuts',
34
- formFieldConfig: {
35
- labelKey: marker('editor.record.form.field.constraintsShortcuts'),
36
- },
37
- }
38
-
39
- export const LEGAL_CONSTRAINTS_FIELD: EditorField = {
40
- model: 'legalConstraints',
41
- formFieldConfig: {
42
- labelKey: marker('editor.record.form.field.legalConstraints'),
43
- },
44
- }
45
- export const SECURITY_CONSTRAINTS_FIELD: EditorField = {
46
- model: 'securityConstraints',
47
- formFieldConfig: {
48
- labelKey: marker('editor.record.form.field.securityConstraints'),
49
- },
50
- }
51
- export const OTHER_CONSTRAINTS_FIELD: EditorField = {
52
- model: 'otherConstraints',
53
- formFieldConfig: {
54
- labelKey: marker('editor.record.form.field.otherConstraints'),
55
- },
56
- }
57
-
58
- export const RECORD_LICENSE_FIELD: EditorField = {
59
- model: 'licenses',
60
- formFieldConfig: {
61
- labelKey: marker('editor.record.form.field.license'),
62
- },
63
- }
64
-
65
- export const RECORD_KEYWORDS_FIELD: EditorField = {
66
- model: 'keywords',
67
- formFieldConfig: {},
68
- }
69
-
70
- export const RECORD_TOPICS_FIELD: EditorField = {
71
- model: 'topics',
72
- formFieldConfig: {},
73
- }
74
-
75
- export const RECORD_RESOURCE_CREATED_FIELD: EditorField = {
76
- model: 'resourceCreated',
77
- formFieldConfig: {
78
- labelKey: marker('editor.record.form.field.resourceCreated'),
79
- },
80
- gridColumnSpan: 1,
81
- }
82
-
83
- export const RESOURCE_IDENTIFIER_FIELD: EditorField = {
84
- model: 'resourceIdentifiers',
85
- formFieldConfig: {
86
- labelKey: marker('editor.record.form.field.resourceIdentifier'),
87
- },
88
- }
89
-
90
- export const RECORD_RESOURCE_UPDATED_FIELD: EditorField = {
91
- model: 'resourceUpdated',
92
- formFieldConfig: {
93
- labelKey: marker('editor.record.form.field.resourceUpdated'),
94
- },
95
- gridColumnSpan: 1,
96
- }
97
-
98
- export const RECORD_UPDATED_FIELD: EditorField = {
99
- model: 'recordUpdated',
100
- formFieldConfig: {
101
- labelKey: marker('editor.record.form.field.recordUpdated'),
102
- },
103
- onSaveProcess: '${dateNow()}',
104
- gridColumnSpan: 1,
105
- hidden: true,
106
- }
107
-
108
- export const RECORD_UPDATE_FREQUENCY_FIELD: EditorField = {
109
- model: 'updateFrequency',
110
- formFieldConfig: {},
111
- }
112
- // keeping track of the label to not lose existing translation
14
+ // keeping track of labels to not lose existing translations
113
15
  marker('editor.record.form.field.updateFrequency')
114
-
115
- export const RECORD_TEMPORAL_EXTENTS_FIELD: EditorField = {
116
- model: 'temporalExtents',
117
- formFieldConfig: {
118
- labelKey: marker('editor.record.form.field.temporalExtents'),
119
- },
120
- }
121
-
122
- export const RECORD_TITLE_FIELD: EditorField = {
123
- model: 'title',
124
- formFieldConfig: {
125
- labelKey: marker('editor.record.form.field.title'),
126
- },
127
- }
128
-
129
- export const RECORD_ABSTRACT_FIELD: EditorField = {
130
- model: 'abstract',
131
- formFieldConfig: {
132
- labelKey: marker('editor.record.form.field.abstract'),
133
- },
134
- }
135
-
136
- export const CONTACTS_FOR_RESOURCE_FIELD: EditorField = {
137
- model: 'contactsForResource',
138
- formFieldConfig: {
139
- labelKey: '',
140
- },
141
- }
142
-
143
- export const CONTACTS: EditorField = {
144
- model: 'contacts',
145
- formFieldConfig: {
146
- labelKey: '',
147
- },
148
- }
149
-
150
- export const RECORD_GRAPHICAL_OVERVIEW_FIELD: EditorField = {
151
- model: 'overviews',
152
- formFieldConfig: {
153
- labelKey: marker('editor.record.form.field.overviews'),
154
- },
155
- }
156
-
157
- export const RECORD_SPATIAL_TOGGLE_FIELD: EditorField = {
158
- componentName: 'form-field-spatial-toggle',
159
- formFieldConfig: {},
160
- hidden: true,
161
- }
162
-
163
- export const RECORD_SPATIAL_EXTENTS_FIELD: EditorField = {
164
- model: 'spatialExtents',
165
- formFieldConfig: {},
166
- }
167
- // keeping track of the label to not lose existing translation
168
16
  marker('editor.record.form.field.spatialExtents')
169
-
170
- export const RECORD_ONLINE_RESOURCES: EditorField = {
171
- model: 'onlineResources',
172
- modelSpecifier: 'onlineResourceType:!link',
173
- formFieldConfig: {},
174
- }
175
- // keeping track of the label to not lose existing translation
176
17
  marker('editor.record.form.field.onlineResources')
177
-
178
- export const RECORD_ONLINE_LINK_RESOURCES: EditorField = {
179
- model: 'onlineResources',
180
- modelSpecifier: 'onlineResourceType:link',
181
- formFieldConfig: {},
182
- }
183
- // keeping track of the label to not lose existing translation
184
18
  marker('editor.record.form.field.onlineLinkResources')
185
19
 
186
- /************************************************************
187
- *************** SECTIONS *****************
188
- ************************************************************
189
- */
190
-
191
- export const TITLE_SECTION: EditorSection = {
192
- hidden: false,
193
- fields: [
194
- RECORD_TITLE_FIELD,
195
- RECORD_ABSTRACT_FIELD,
196
- RECORD_GRAPHICAL_OVERVIEW_FIELD,
197
- ],
198
- }
199
-
200
- export const ABOUT_SECTION: EditorSection = {
201
- labelKey: marker('editor.record.form.section.about.label'),
202
- descriptionKey: marker('editor.record.form.section.about.description'),
203
- hidden: false,
204
- fields: [
205
- RECORD_UNIQUE_IDENTIFIER_FIELD,
206
- RESOURCE_IDENTIFIER_FIELD,
207
- RECORD_RESOURCE_CREATED_FIELD,
208
- RECORD_RESOURCE_UPDATED_FIELD,
209
- RECORD_UPDATED_FIELD,
210
- RECORD_UPDATE_FREQUENCY_FIELD,
211
- RECORD_TEMPORAL_EXTENTS_FIELD,
212
- ],
213
- }
214
-
215
- export const GEOGRAPHICAL_COVERAGE_SECTION: EditorSection = {
216
- labelKey: marker('editor.record.form.section.geographicalCoverage.label'),
217
- hidden: false,
218
- fields: [RECORD_SPATIAL_TOGGLE_FIELD, RECORD_SPATIAL_EXTENTS_FIELD],
219
- }
220
-
221
- export const ASSOCIATED_RESOURCES_SECTION: EditorSection = {
222
- labelKey: marker('editor.record.form.section.associatedResources.label'),
223
- descriptionKey: marker(
224
- 'editor.record.form.section.associatedResources.description'
225
- ),
226
- hidden: false,
227
- fields: [RECORD_ONLINE_RESOURCES],
228
- }
229
-
230
- export const ANNEXES_SECTION: EditorSection = {
231
- labelKey: marker('editor.record.form.section.annexes.label'),
232
- descriptionKey: marker('editor.record.form.section.annexes.description'),
233
- hidden: false,
234
- fields: [RECORD_ONLINE_LINK_RESOURCES],
235
- }
236
-
237
- export const CLASSIFICATION_SECTION: EditorSection = {
238
- labelKey: marker('editor.record.form.section.classification.label'),
239
- descriptionKey: marker(
240
- 'editor.record.form.section.classification.description'
241
- ),
242
- hidden: false,
243
- fields: [RECORD_KEYWORDS_FIELD],
244
- }
245
-
246
- export const TOPICS_SECTION: EditorSection = {
247
- labelKey: marker('editor.record.form.section.topics.label'),
248
- descriptionKey: marker('editor.record.form.section.topics.description'),
249
- hidden: false,
250
- fields: [RECORD_TOPICS_FIELD],
251
- }
252
-
253
- export const USE_AND_ACCESS_CONDITIONS_SECTION: EditorSection = {
254
- labelKey: marker('editor.record.form.section.useAndAccessConditions.label'),
255
- hidden: false,
256
- fields: [
257
- RECORD_LICENSE_FIELD,
258
- CONSTRAINTS_SHORTCUTS,
259
- LEGAL_CONSTRAINTS_FIELD,
260
- SECURITY_CONSTRAINTS_FIELD,
261
- OTHER_CONSTRAINTS_FIELD,
262
- ],
263
- }
264
-
265
- export const DATA_MANAGERS_SECTION: EditorSection = {
266
- labelKey: marker('editor.record.form.section.dataManagers.label'),
267
- descriptionKey: marker('editor.record.form.section.dataManagers.description'),
268
- hidden: false,
269
- fields: [CONTACTS_FOR_RESOURCE_FIELD],
270
- }
271
-
272
- export const METADATA_POINT_OF_CONTACT_SECTION: EditorSection = {
273
- labelKey: marker('editor.record.form.section.metadataPointOfContact.label'),
274
- descriptionKey: marker(
275
- 'editor.record.form.section.metadataPointOfContact.description'
276
- ),
277
- hidden: false,
278
- fields: [CONTACTS],
279
- }
280
-
281
- /************************************************************
282
- *************** PAGES *****************
283
- ************************************************************
284
- */
285
20
  export const DEFAULT_CONFIGURATION: EditorConfig = {
286
21
  pages: [
22
+ /**
23
+ * Page 1: DESCRIPTION
24
+ */
25
+
287
26
  {
288
27
  labelKey: marker('editor.record.form.page.description'),
289
28
  sections: [
290
- TITLE_SECTION,
291
- CLASSIFICATION_SECTION,
292
- TOPICS_SECTION,
293
- ABOUT_SECTION,
294
- GEOGRAPHICAL_COVERAGE_SECTION,
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
+ },
295
155
  ],
296
156
  },
157
+
158
+ /**
159
+ * Page 2: RESOURCES
160
+ */
161
+
297
162
  {
298
163
  labelKey: marker('editor.record.form.page.resources'),
299
- sections: [ASSOCIATED_RESOURCES_SECTION, ANNEXES_SECTION],
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
+ ],
300
198
  },
199
+
200
+ /**
201
+ * Page 3: ACCESS & CONTACT
202
+ */
203
+
301
204
  {
302
205
  labelKey: marker('editor.record.form.page.accessAndContact'),
303
206
  sections: [
304
- USE_AND_ACCESS_CONDITIONS_SECTION,
305
- DATA_MANAGERS_SECTION,
306
- METADATA_POINT_OF_CONTACT_SECTION,
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
+ },
307
279
  ],
308
280
  },
309
281
  ],
310
282
  }
311
283
 
312
- /************************************************************
313
- *************** LICENSES **************
314
- ************************************************************
284
+ /**
285
+ * OTHER SETTINGS
315
286
  */
287
+
316
288
  export const AVAILABLE_LICENSES: string[] = [
317
289
  'cc-by',
318
290
  'cc-by-sa',
@@ -338,10 +310,6 @@ marker('editor.record.form.license.pddl')
338
310
  marker('editor.record.form.license.unknown')
339
311
 
340
312
  export const MAX_UPLOAD_SIZE_MB = 10
341
- /************************************************************
342
- *************** SPATIAL SCOPE ************
343
- ************************************************************
344
- */
345
313
 
346
314
  export const SPATIAL_SCOPES: Keyword[] = [
347
315
  {
@@ -358,76 +326,82 @@ export const SPATIAL_SCOPES: Keyword[] = [
358
326
  },
359
327
  ]
360
328
 
361
- /************************************************************
362
- *************** INSPIRE TOPICS **************
363
- ************************************************************
364
- */
365
-
366
- export const INSPIRE_TOPICS: INSPIRE_topic[] = [
367
- { value: 'biota', label: 'editor.record.form.topics.inspire.biota' },
329
+ // label keys mirror the ISO MD_TopicCategoryCode value for consistency
330
+ // TODO: correctly handle code lists; for instance, this code list is specific to ISO 19139
331
+ export const ISO_TOPICS: ISOTopic[] = [
332
+ { value: 'biota', label: marker('editor.record.form.topics.iso.biota') },
368
333
  {
369
334
  value: 'boundaries',
370
- label: 'editor.record.form.topics.inspire.boundaries',
335
+ label: marker('editor.record.form.topics.iso.boundaries'),
371
336
  },
372
337
  {
373
338
  value: 'climatologyMeteorologyAtmosphere',
374
- label: 'editor.record.form.topics.inspire.climatology',
339
+ label: marker(
340
+ 'editor.record.form.topics.iso.climatologyMeteorologyAtmosphere'
341
+ ),
342
+ },
343
+ {
344
+ value: 'economy',
345
+ label: marker('editor.record.form.topics.iso.economy'),
346
+ },
347
+ {
348
+ value: 'elevation',
349
+ label: marker('editor.record.form.topics.iso.elevation'),
375
350
  },
376
- { value: 'economy', label: 'editor.record.form.topics.inspire.economy' },
377
- { value: 'elevation', label: 'editor.record.form.topics.inspire.elevation' },
378
351
  {
379
352
  value: 'environment',
380
- label: 'editor.record.form.topics.inspire.environnement',
353
+ label: marker('editor.record.form.topics.iso.environment'),
381
354
  },
382
- { value: 'farming', label: 'editor.record.form.topics.inspire.farming' },
383
355
  {
384
- value: 'geoscientific information',
385
- label: 'editor.record.form.topics.inspire.geoscientific',
356
+ value: 'farming',
357
+ label: marker('editor.record.form.topics.iso.farming'),
358
+ },
359
+ {
360
+ value: 'geoscientificInformation',
361
+ label: marker('editor.record.form.topics.iso.geoscientificInformation'),
362
+ },
363
+ {
364
+ value: 'health',
365
+ label: marker('editor.record.form.topics.iso.health'),
386
366
  },
387
- { value: 'health', label: 'editor.record.form.topics.inspire.health' },
388
367
  {
389
368
  value: 'imageryBaseMapsEarthCover',
390
- label: 'editor.record.form.topics.inspire.imagery',
369
+ label: marker('editor.record.form.topics.iso.imageryBaseMapsEarthCover'),
370
+ },
371
+ {
372
+ value: 'inlandWaters',
373
+ label: marker('editor.record.form.topics.iso.inlandWaters'),
391
374
  },
392
- { value: 'inlandWaters', label: 'editor.record.form.topics.inspire.waters' },
393
375
  {
394
376
  value: 'intelligenceMilitary',
395
- label: 'editor.record.form.topics.inspire.intelligence',
377
+ label: marker('editor.record.form.topics.iso.intelligenceMilitary'),
378
+ },
379
+ {
380
+ value: 'location',
381
+ label: marker('editor.record.form.topics.iso.location'),
382
+ },
383
+ {
384
+ value: 'oceans',
385
+ label: marker('editor.record.form.topics.iso.oceans'),
396
386
  },
397
- { value: 'Location', label: 'editor.record.form.topics.inspire.location' },
398
- { value: 'Oceans', label: 'editor.record.form.topics.inspire.oceans' },
399
387
  {
400
388
  value: 'planningCadastre',
401
- label: 'editor.record.form.topics.inspire.planning',
389
+ label: marker('editor.record.form.topics.iso.planningCadastre'),
390
+ },
391
+ {
392
+ value: 'society',
393
+ label: marker('editor.record.form.topics.iso.society'),
402
394
  },
403
- { value: 'Society', label: 'editor.record.form.topics.inspire.society' },
404
- { value: 'Structure', label: 'editor.record.form.topics.inspire.structure' },
405
395
  {
406
- value: 'Transportation',
407
- label: 'editor.record.form.topics.inspire.transportation',
396
+ value: 'structure',
397
+ label: marker('editor.record.form.topics.iso.structure'),
398
+ },
399
+ {
400
+ value: 'transportation',
401
+ label: marker('editor.record.form.topics.iso.transportation'),
408
402
  },
409
403
  {
410
404
  value: 'utilitiesCommunication',
411
- label: 'editor.record.form.topics.inspire.utilities',
405
+ label: marker('editor.record.form.topics.iso.utilitiesCommunication'),
412
406
  },
413
407
  ]
414
-
415
- marker('editor.record.form.topics.inspire.biota')
416
- marker('editor.record.form.topics.inspire.boundaries')
417
- marker('editor.record.form.topics.inspire.climatology')
418
- marker('editor.record.form.topics.inspire.economy')
419
- marker('editor.record.form.topics.inspire.elevation')
420
- marker('editor.record.form.topics.inspire.environnement')
421
- marker('editor.record.form.topics.inspire.farming')
422
- marker('editor.record.form.topics.inspire.geoscientific')
423
- marker('editor.record.form.topics.inspire.health')
424
- marker('editor.record.form.topics.inspire.imagery')
425
- marker('editor.record.form.topics.inspire.intelligence')
426
- marker('editor.record.form.topics.inspire.location')
427
- marker('editor.record.form.topics.inspire.oceans')
428
- marker('editor.record.form.topics.inspire.planning')
429
- marker('editor.record.form.topics.inspire.society')
430
- marker('editor.record.form.topics.inspire.structure')
431
- marker('editor.record.form.topics.inspire.transportation')
432
- marker('editor.record.form.topics.inspire.utilities')
433
- marker('editor.record.form.topics.inspire.waters')