geonetwork-ui 2.10.0-dev.e97ea6950 → 2.10.0-dev.f1c00d5fe

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