geonetwork-ui 2.10.0-dev.fc6515c0b → 2.11.0-dev.5c2e5295e

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