geonetwork-ui 2.4.0-dev.7a893adc → 2.4.0-dev.80a79eca

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 (299) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +10 -3
  2. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +5 -5
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +7 -4
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +10 -7
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +7 -14
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +6 -6
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +28 -18
  8. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +41 -7
  9. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  10. package/esm2022/libs/common/domain/src/lib/model/user/user.model.mjs +1 -1
  11. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  12. package/esm2022/libs/data-access/gn4/src/fixtures/site.fixtures.mjs +5 -5
  13. package/esm2022/libs/data-access/gn4/src/fixtures/ui.fixtures.mjs +3 -3
  14. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
  15. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +1 -1
  16. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
  17. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +3 -3
  18. package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +71 -0
  19. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +8 -29
  20. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +148 -0
  21. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +86 -11
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +29 -3
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +32 -59
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +10 -3
  25. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
  26. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +29 -3
  27. package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
  28. package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +2 -2
  29. package/esm2022/libs/feature/map/src/lib/style/map-style.fixtures.mjs +3 -3
  30. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
  31. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +1 -1
  32. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +1 -1
  33. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
  34. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +5 -4
  35. package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +3 -3
  36. package/esm2022/libs/ui/elements/src/index.mjs +2 -2
  37. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +2 -2
  38. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +1 -1
  39. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +2 -2
  40. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
  41. package/esm2022/libs/ui/inputs/src/index.mjs +4 -1
  42. package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +87 -0
  43. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -4
  44. package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +4 -4
  45. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +4 -3
  46. package/esm2022/libs/ui/layout/src/index.mjs +3 -1
  47. package/esm2022/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.mjs +29 -0
  48. package/esm2022/libs/ui/layout/src/lib/sortable-list/sortable-list.component.mjs +43 -0
  49. package/esm2022/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.mjs +7 -7
  50. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +8 -8
  51. package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +10 -10
  52. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +1 -1
  53. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +1 -1
  54. package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -1
  55. package/esm2022/translations/de.json +15 -2
  56. package/esm2022/translations/en.json +15 -2
  57. package/esm2022/translations/es.json +13 -0
  58. package/esm2022/translations/fr.json +16 -3
  59. package/esm2022/translations/it.json +15 -2
  60. package/esm2022/translations/nl.json +13 -0
  61. package/esm2022/translations/pt.json +13 -0
  62. package/fesm2022/geonetwork-ui.mjs +2888 -2477
  63. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  64. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +3 -3
  65. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  66. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +2 -2
  67. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
  68. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +1 -1
  69. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  70. package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
  71. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +4 -5
  72. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  73. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +7 -6
  74. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  75. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +21 -2
  76. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  77. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -6
  78. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  79. package/libs/common/domain/src/lib/model/user/user.model.d.ts +1 -1
  80. package/libs/common/domain/src/lib/model/user/user.model.d.ts.map +1 -1
  81. package/libs/common/domain/src/lib/platform.service.interface.d.ts +15 -0
  82. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  83. package/libs/data-access/gn4/src/fixtures/site.fixtures.d.ts +2 -2
  84. package/libs/data-access/gn4/src/fixtures/site.fixtures.d.ts.map +1 -1
  85. package/libs/data-access/gn4/src/fixtures/ui.fixtures.d.ts +1 -1
  86. package/libs/data-access/gn4/src/fixtures/ui.fixtures.d.ts.map +1 -1
  87. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -2
  88. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  89. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +6 -6
  90. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  91. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -3
  92. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  93. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts +15 -0
  94. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -0
  95. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +2 -5
  96. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
  97. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts +35 -0
  98. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts.map +1 -0
  99. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +20 -2
  100. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
  101. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +7 -2
  102. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  103. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +9 -15
  104. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
  105. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -3
  106. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  107. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts +3 -2
  108. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
  109. package/libs/feature/editor/src/lib/fields.config.d.ts +9 -1
  110. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  111. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +5 -0
  112. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -1
  113. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts +5 -5
  114. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
  115. package/libs/feature/map/src/lib/style/map-style.fixtures.d.ts +2 -2
  116. package/libs/feature/map/src/lib/style/map-style.fixtures.d.ts.map +1 -1
  117. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +3 -3
  118. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  119. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -2
  120. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  121. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +2 -2
  122. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  123. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
  124. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  125. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +1 -0
  126. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  127. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +2 -2
  128. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +1 -1
  129. package/libs/ui/elements/src/index.d.ts +1 -1
  130. package/libs/ui/elements/src/index.d.ts.map +1 -1
  131. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +2 -2
  132. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  133. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -7
  134. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  135. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +2 -2
  136. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  137. package/libs/ui/inputs/src/index.d.ts +3 -0
  138. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  139. package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts +24 -0
  140. package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts.map +1 -0
  141. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +1 -1
  142. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
  143. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts +0 -1
  144. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -1
  145. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  146. package/libs/ui/layout/src/index.d.ts +2 -0
  147. package/libs/ui/layout/src/index.d.ts.map +1 -1
  148. package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts +20 -0
  149. package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts.map +1 -0
  150. package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts +14 -0
  151. package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -0
  152. package/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.d.ts +3 -3
  153. package/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.d.ts.map +1 -1
  154. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +2 -2
  155. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  156. package/libs/util/app-config/src/lib/fixtures.d.ts +8 -8
  157. package/libs/util/app-config/src/lib/fixtures.d.ts.map +1 -1
  158. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
  159. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  160. package/libs/util/shared/src/lib/links/link-utils.d.ts +6 -6
  161. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  162. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -1
  163. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -1
  164. package/package.json +1 -1
  165. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -1
  166. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -1
  167. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
  168. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -1
  169. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +18 -16
  170. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -4
  171. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +12 -4
  172. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +14 -8
  173. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +4 -12
  174. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +13 -15
  175. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +48 -36
  176. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -3
  177. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +7 -7
  178. package/src/libs/common/domain/src/lib/model/user/user.model.ts +1 -1
  179. package/src/libs/common/domain/src/lib/platform.service.interface.ts +26 -0
  180. package/src/libs/common/fixtures/src/index.ts +1 -1
  181. package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +37 -37
  182. package/src/libs/common/fixtures/src/lib/elasticsearch/{aggregations-request.ts → aggregations-request.fixtures.ts} +1 -3
  183. package/src/libs/common/fixtures/src/lib/elasticsearch/{aggregations-response.ts → aggregations-response.fixtures.ts} +6 -8
  184. package/src/libs/common/fixtures/src/lib/elasticsearch/{full-response.ts → full-response.fixtures.ts} +1 -3
  185. package/src/libs/common/fixtures/src/lib/elasticsearch/index.ts +5 -5
  186. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +1 -3
  187. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata.fixtures.ts +1739 -1742
  188. package/src/libs/common/fixtures/src/lib/elasticsearch/{search-requests.ts → search-requests.fixtures.ts} +1 -3
  189. package/src/libs/common/fixtures/src/lib/elasticsearch/{search-responses.ts → search-responses.fixtures.ts} +4 -6
  190. package/src/libs/common/fixtures/src/lib/geojson.fixtures.ts +57178 -57195
  191. package/src/libs/common/fixtures/src/lib/gn4/groups.fixtures.ts +2 -4
  192. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +233 -164
  193. package/src/libs/common/fixtures/src/lib/ol-feature.fixtures.ts +10 -0
  194. package/src/libs/common/fixtures/src/lib/organisations.fixture.ts +37 -3
  195. package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +9 -7
  196. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +9 -9
  197. package/src/libs/common/fixtures/src/lib/repository.fixtures.ts +4 -4
  198. package/src/libs/common/fixtures/src/lib/search/aggregations.ts +2 -3
  199. package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +14 -15
  200. package/src/libs/common/fixtures/src/lib/user.fixtures.ts +32 -15
  201. package/src/libs/data-access/gn4/src/fixtures/site.fixtures.ts +4 -4
  202. package/src/libs/data-access/gn4/src/fixtures/ui.fixtures.ts +2 -2
  203. package/src/libs/feature/catalog/src/lib/sources/sources.fixture.ts +1 -1
  204. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +3 -3
  205. package/src/libs/feature/dataviz/src/lib/figure/figure.fixtures.ts +2 -2
  206. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +6 -6
  207. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -4
  208. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +9 -9
  209. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.html +35 -0
  210. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +79 -0
  211. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +14 -4
  212. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +5 -44
  213. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +33 -0
  214. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +182 -0
  215. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +11 -5
  216. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +93 -4
  217. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +6 -1
  218. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +46 -1
  219. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +21 -2
  220. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +35 -69
  221. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +8 -0
  222. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +8 -1
  223. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +1 -0
  224. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +2 -1
  225. package/src/libs/feature/editor/src/lib/fields.config.ts +32 -2
  226. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +9 -0
  227. package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +7 -7
  228. package/src/libs/feature/map/src/lib/map-context/map-context.fixtures.ts +26 -22
  229. package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +29 -27
  230. package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -3
  231. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +2 -2
  232. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -2
  233. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +5 -1
  234. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
  235. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +10 -1
  236. package/src/libs/feature/search/src/lib/state/fixtures/search-state.fixtures.ts +2 -2
  237. package/src/libs/ui/dataviz/src/lib/chart/chart.fixtures.ts +2 -2
  238. package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +2 -2
  239. package/src/libs/ui/elements/src/index.ts +1 -1
  240. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +4 -4
  241. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -7
  242. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -3
  243. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +5 -0
  244. package/src/libs/ui/inputs/src/index.ts +3 -0
  245. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +1 -1
  246. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +2 -1
  247. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +1 -1
  248. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -1
  249. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +0 -1
  250. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +1 -2
  251. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +1 -1
  252. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -1
  253. package/src/libs/ui/layout/src/index.ts +2 -0
  254. package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.html +15 -0
  255. package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.ts +44 -0
  256. package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +37 -0
  257. package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.ts +13 -16
  258. package/src/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.ts +7 -6
  259. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +9 -2
  260. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +5 -6
  261. package/src/libs/util/app-config/src/lib/fixtures.ts +9 -9
  262. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +4 -3
  263. package/src/libs/util/shared/src/lib/links/link-utils.ts +6 -6
  264. package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +4 -1
  265. package/tailwind.base.css +5 -0
  266. package/translations/de.json +15 -2
  267. package/translations/en.json +15 -2
  268. package/translations/es.json +13 -0
  269. package/translations/fr.json +16 -3
  270. package/translations/it.json +15 -2
  271. package/translations/nl.json +13 -0
  272. package/translations/pt.json +13 -0
  273. package/translations/sk.json +13 -0
  274. package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +0 -96
  275. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.mjs +0 -17
  276. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.mjs +0 -17
  277. package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +0 -39
  278. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +0 -27
  279. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +0 -1
  280. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts +0 -8
  281. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts.map +0 -1
  282. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts +0 -8
  283. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts.map +0 -1
  284. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +0 -17
  285. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +0 -1
  286. package/src/libs/common/fixtures/src/lib/ol-feature.fixture.ts +0 -7
  287. package/src/libs/common/fixtures/src/lib/utils/freeze.ts +0 -10
  288. package/src/libs/common/fixtures/src/lib/utils/index.ts +0 -1
  289. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -9
  290. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +0 -113
  291. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.html +0 -7
  292. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.ts +0 -16
  293. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.html +0 -13
  294. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.ts +0 -16
  295. package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +0 -29
  296. /package/src/libs/feature/editor/src/lib/components/{overview-upload/overview-upload.component.css → online-resource-card/online-resource-card.component.css} +0 -0
  297. /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.css → form-field-online-link-resources/form-field-online-link-resources.component.css} +0 -0
  298. /package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.css → ui/layout/src/lib/modal-dialog/modal-dialog.component.css} +0 -0
  299. /package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.css +0 -0
@@ -2,7 +2,6 @@ import {
2
2
  CatalogRecord,
3
3
  DatasetRecord,
4
4
  Individual,
5
- ServiceOnlineResource,
6
5
  } from '../../../../../../libs/common/domain/src/lib/model/record'
7
6
  import {
8
7
  addAttribute,
@@ -34,14 +33,14 @@ import {
34
33
  pipe,
35
34
  } from '../function-utils'
36
35
  import {
37
- appendDistribution,
38
36
  appendKeywords,
37
+ appendOnlineResource,
38
+ appendServiceOnlineResources,
39
39
  createDistributionInfo,
40
40
  findOrCreateDistribution,
41
41
  findOrCreateIdentification,
42
42
  getProgressCode,
43
43
  getRoleCode,
44
- getServiceEndpointProtocol,
45
44
  removeKeywords,
46
45
  writeCharacterString,
47
46
  writeDateTime,
@@ -481,7 +480,7 @@ function removeTransferOptions(rootEl: XmlElement) {
481
480
  )(rootEl)
482
481
  }
483
482
 
484
- function appendDistributionFormat(mimeType: string) {
483
+ function appendOnlineResourceFormat(mimeType: string) {
485
484
  return appendChildren(
486
485
  pipe(
487
486
  createElement('mrd:distributionFormat'),
@@ -494,11 +493,18 @@ function appendDistributionFormat(mimeType: string) {
494
493
  )
495
494
  }
496
495
 
497
- export function writeDistributions(record: DatasetRecord, rootEl: XmlElement) {
496
+ export function writeOnlineResources(
497
+ record: CatalogRecord,
498
+ rootEl: XmlElement
499
+ ) {
498
500
  removeTransferOptions(rootEl)
499
501
 
500
- // for each distribution, either find an existing distribution info or create a new one
501
- record.distributions.forEach((distribution, index) => {
502
+ if (record.kind === 'service') {
503
+ appendServiceOnlineResources(record, rootEl)
504
+ }
505
+
506
+ // for each online resource, either find an existing distribution info or create a new one
507
+ record.onlineResources.forEach((onlineResource, index) => {
502
508
  pipe(
503
509
  fallback(
504
510
  pipe(
@@ -507,7 +513,7 @@ export function writeDistributions(record: DatasetRecord, rootEl: XmlElement) {
507
513
  ),
508
514
  appendChildTree(createDistributionInfo())
509
515
  ),
510
- appendDistribution(distribution, appendDistributionFormat)
516
+ appendOnlineResource(onlineResource, appendOnlineResourceFormat)
511
517
  )(rootEl)
512
518
  })
513
519
  }
@@ -18,7 +18,6 @@ import {
18
18
  readAbstract,
19
19
  readContacts,
20
20
  readContactsForResource,
21
- readDistributions,
22
21
  readIsoTopics,
23
22
  readKeywords,
24
23
  readKind,
@@ -46,7 +45,6 @@ import {
46
45
  writeAbstract,
47
46
  writeContacts,
48
47
  writeContactsForResource,
49
- writeDistributions,
50
48
  writeGraphicOverviews,
51
49
  writeKeywords,
52
50
  writeKind,
@@ -100,7 +98,6 @@ export class Iso19139Converter extends BaseConverter<string> {
100
98
  spatialRepresentation: readSpatialRepresentation,
101
99
  overviews: readOverviews,
102
100
  lineage: readLineage,
103
- distributions: readDistributions,
104
101
  onlineResources: readOnlineResources,
105
102
  temporalExtents: readTemporalExtents,
106
103
  spatialExtents: readSpatialExtents,
@@ -138,7 +135,6 @@ export class Iso19139Converter extends BaseConverter<string> {
138
135
  spatialRepresentation: writeSpatialRepresentation,
139
136
  overviews: writeGraphicOverviews,
140
137
  lineage: writeLineage,
141
- distributions: writeDistributions,
142
138
  onlineResources: writeOnlineResources,
143
139
  temporalExtents: writeTemporalExtents,
144
140
  spatialExtents: writeSpatialExtents,
@@ -177,6 +173,7 @@ export class Iso19139Converter extends BaseConverter<string> {
177
173
  const licenses = this.readers['licenses'](rootEl)
178
174
  const overviews = this.readers['overviews'](rootEl)
179
175
  const landingPage = this.readers['landingPage'](rootEl)
176
+ const onlineResources = this.readers['onlineResources'](rootEl)
180
177
 
181
178
  if (kind === 'dataset') {
182
179
  const status = this.readers['status'](rootEl)
@@ -185,7 +182,6 @@ export class Iso19139Converter extends BaseConverter<string> {
185
182
  const spatialExtents = this.readers['spatialExtents'](rootEl)
186
183
  const temporalExtents = this.readers['temporalExtents'](rootEl)
187
184
  const lineage = this.readers['lineage'](rootEl)
188
- const distributions = this.readers['distributions'](rootEl)
189
185
  const updateFrequency = this.readers['updateFrequency'](rootEl)
190
186
 
191
187
  return {
@@ -215,12 +211,11 @@ export class Iso19139Converter extends BaseConverter<string> {
215
211
  overviews,
216
212
  spatialExtents,
217
213
  temporalExtents,
218
- distributions,
214
+ onlineResources,
219
215
  updateFrequency,
220
216
  ...(landingPage && { landingPage }),
221
217
  } as DatasetRecord
222
218
  } else {
223
- const onlineResources = this.readers['onlineResources'](rootEl)
224
219
  return {
225
220
  uniqueIdentifier,
226
221
  kind,
@@ -307,6 +302,8 @@ export class Iso19139Converter extends BaseConverter<string> {
307
302
  fieldChanged('licenses') && this.writers['licenses'](record, rootEl)
308
303
  fieldChanged('otherConstraints') &&
309
304
  this.writers['otherConstraints'](record, rootEl)
305
+ fieldChanged('onlineResources') &&
306
+ this.writers['onlineResources'](record, rootEl)
310
307
 
311
308
  if (record.kind === 'dataset') {
312
309
  fieldChanged('status') && this.writers['status'](record, rootEl)
@@ -319,12 +316,7 @@ export class Iso19139Converter extends BaseConverter<string> {
319
316
  this.writers['temporalExtents'](record, rootEl)
320
317
  fieldChanged('spatialExtents') &&
321
318
  this.writers['spatialExtents'](record, rootEl)
322
- fieldChanged('distributions') &&
323
- this.writers['distributions'](record, rootEl)
324
319
  fieldChanged('lineage') && this.writers['lineage'](record, rootEl)
325
- } else {
326
- fieldChanged('onlineResources') &&
327
- this.writers['onlineResources'](record, rootEl)
328
320
  }
329
321
 
330
322
  this.beforeDocumentCreation(rootEl)
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  Constraint,
3
- DatasetDistribution,
3
+ DatasetOnlineResource,
4
4
  GraphicOverview,
5
5
  Individual,
6
6
  Keyword,
7
+ OnlineResource,
7
8
  Organization,
8
9
  RecordKind,
9
10
  RecordStatus,
@@ -326,12 +327,12 @@ const getMimeType = pipe(
326
327
  )
327
328
 
328
329
  /**
329
- * Extract distributions from a MD_Distribution element
330
+ * Extract online resources from an MD_Distribution element
330
331
  * @param getMimeTypeFn This function starts from a gmd:transferOptions element
331
332
  */
332
- export function extractDatasetDistributions(
333
+ export function extractDatasetOnlineResources(
333
334
  getMimeTypeFn: ChainableFunction<XmlElement, string>
334
- ): ChainableFunction<XmlElement, DatasetDistribution[]> {
335
+ ): ChainableFunction<XmlElement, DatasetOnlineResource[]> {
335
336
  const getUrl = pipe(findChildElement('gmd:linkage'), extractMandatoryUrl())
336
337
  const getProtocolStr = pipe(
337
338
  findChildElement('gmd:protocol'),
@@ -774,14 +775,6 @@ export function readLineage(rootEl: XmlElement): string {
774
775
  )(rootEl)
775
776
  }
776
777
 
777
- export function readDistributions(rootEl: XmlElement): DatasetDistribution[] {
778
- return pipe(
779
- findNestedElements('gmd:distributionInfo', 'gmd:MD_Distribution'),
780
- mapArray(extractDatasetDistributions(getMimeType)),
781
- flattenArray()
782
- )(rootEl)
783
- }
784
-
785
778
  export function readUpdateFrequency(rootEl: XmlElement): UpdateFrequency {
786
779
  return pipe(
787
780
  findIdentification(),
@@ -845,9 +838,14 @@ export function extractServiceOnlineResources(): ChainableFunction<
845
838
  )
846
839
  }
847
840
 
848
- export function readOnlineResources(
849
- rootEl: XmlElement
850
- ): ServiceOnlineResource[] {
841
+ export function readOnlineResources(rootEl: XmlElement): OnlineResource[] {
842
+ if (readKind(rootEl) === 'dataset') {
843
+ return pipe(
844
+ findNestedElements('gmd:distributionInfo', 'gmd:MD_Distribution'),
845
+ mapArray(extractDatasetOnlineResources(getMimeType)),
846
+ flattenArray()
847
+ )(rootEl)
848
+ }
851
849
  return pipe(
852
850
  findNestedElements('gmd:distributionInfo', 'gmd:MD_Distribution'),
853
851
  mapArray(extractServiceOnlineResources()),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CatalogRecord,
3
3
  Constraint,
4
- DatasetDistribution,
4
+ DatasetOnlineResource,
5
5
  DatasetRecord,
6
6
  DatasetServiceDistribution,
7
7
  Individual,
@@ -29,7 +29,6 @@ import {
29
29
  tap,
30
30
  } from '../function-utils'
31
31
  import {
32
- XmlElement,
33
32
  addAttribute,
34
33
  appendChildren,
35
34
  createChild,
@@ -44,6 +43,7 @@ import {
44
43
  removeChildren,
45
44
  removeChildrenByName,
46
45
  setTextContent,
46
+ XmlElement,
47
47
  } from '../xml-utils'
48
48
  import { readKind } from './read-parts'
49
49
  import { writeGeometry } from './utils/geometry'
@@ -179,7 +179,7 @@ export function getRoleCode(role: Role): string {
179
179
  }
180
180
  }
181
181
 
182
- export function getDistributionProtocol(
182
+ export function getServiceDistributionProtocol(
183
183
  distribution: DatasetServiceDistribution
184
184
  ): string {
185
185
  switch (distribution.accessServiceProtocol.toLowerCase()) {
@@ -610,11 +610,11 @@ export function createLicense(license: Constraint) {
610
610
  )
611
611
  }
612
612
 
613
- export function removeDistributions() {
613
+ export function removeOnlineResources() {
614
614
  return pipe(removeChildrenByName('gmd:distributionInfo'))
615
615
  }
616
616
 
617
- function appendDistributionFormat(mimeType: string) {
617
+ function appendOnlineResourceFormat(mimeType: string) {
618
618
  return appendChildren(
619
619
  pipe(
620
620
  createElement('gmd:distributionFormat'),
@@ -638,8 +638,8 @@ export function createDistributionInfo() {
638
638
  }
639
639
 
640
640
  // apply to MD_Distribution
641
- export function appendDistribution(
642
- distribution: DatasetDistribution,
641
+ export function appendOnlineResource(
642
+ onlineResource: DatasetOnlineResource,
643
643
  appendFormatFn: (
644
644
  mimeType: string
645
645
  ) => ChainableFunction<XmlElement, XmlElement>
@@ -647,16 +647,16 @@ export function appendDistribution(
647
647
  let name: string
648
648
  let functionCode: string
649
649
  let protocol: string
650
- if (distribution.type === 'service') {
651
- name = distribution.identifierInService // this is for GeoNetwork to know the layer name
650
+ if (onlineResource.type === 'service') {
651
+ name = onlineResource.identifierInService // this is for GeoNetwork to know the layer name
652
652
  functionCode = 'download'
653
- protocol = getDistributionProtocol(distribution)
654
- } else if (distribution.type === 'download') {
655
- name = distribution.name
653
+ protocol = getServiceDistributionProtocol(onlineResource)
654
+ } else if (onlineResource.type === 'download') {
655
+ name = onlineResource.name
656
656
  functionCode = 'download'
657
657
  protocol = 'WWW:DOWNLOAD'
658
658
  } else {
659
- name = distribution.name
659
+ name = onlineResource.name
660
660
  functionCode = 'information'
661
661
  protocol = 'WWW:LINK'
662
662
  }
@@ -666,12 +666,12 @@ export function appendDistribution(
666
666
  createChild('gmd:MD_DigitalTransferOptions'),
667
667
  createChild('gmd:onLine'),
668
668
  createChild('gmd:CI_OnlineResource'),
669
- writeLinkage(distribution.url),
670
- 'description' in distribution
669
+ writeLinkage(onlineResource.url),
670
+ 'description' in onlineResource
671
671
  ? appendChildren(
672
672
  pipe(
673
673
  createElement('gmd:description'),
674
- writeCharacterString(distribution.description)
674
+ writeCharacterString(onlineResource.description)
675
675
  )
676
676
  )
677
677
  : noop,
@@ -695,7 +695,9 @@ export function appendDistribution(
695
695
  )
696
696
  )
697
697
  return pipe(
698
- 'mimeType' in distribution ? appendFormatFn(distribution.mimeType) : noop,
698
+ 'mimeType' in onlineResource
699
+ ? appendFormatFn(onlineResource.mimeType)
700
+ : noop,
699
701
  appendTransferOptions
700
702
  )
701
703
  }
@@ -1032,20 +1034,6 @@ export function writeGraphicOverviews(
1032
1034
  )(rootEl)
1033
1035
  }
1034
1036
 
1035
- export function writeDistributions(record: DatasetRecord, rootEl: XmlElement) {
1036
- pipe(
1037
- removeDistributions(),
1038
- appendChildren(
1039
- ...record.distributions.map((d) =>
1040
- pipe(
1041
- createDistributionInfo(),
1042
- appendDistribution(d, appendDistributionFormat)
1043
- )
1044
- )
1045
- )
1046
- )(rootEl)
1047
- }
1048
-
1049
1037
  export function writeLineage(record: DatasetRecord, rootEl: XmlElement) {
1050
1038
  pipe(
1051
1039
  findNestedChildOrCreate(
@@ -1127,16 +1115,40 @@ export function createOnlineResource(onlineResource: ServiceOnlineResource) {
1127
1115
  )
1128
1116
  }
1129
1117
 
1130
- export function writeOnlineResources(
1131
- record: ServiceRecord,
1118
+ export function appendDatasetOnlineResources(
1119
+ record: DatasetRecord,
1132
1120
  rootEl: XmlElement
1133
1121
  ) {
1134
- pipe(
1135
- removeDistributions(),
1136
- appendChildren(...record.onlineResources.map(createOnlineResource))
1122
+ appendChildren(
1123
+ ...record.onlineResources.map((d) =>
1124
+ pipe(
1125
+ createDistributionInfo(),
1126
+ appendOnlineResource(d, appendOnlineResourceFormat)
1127
+ )
1128
+ )
1137
1129
  )(rootEl)
1138
1130
  }
1139
1131
 
1132
+ export function appendServiceOnlineResources(
1133
+ record: ServiceRecord,
1134
+ rootEl: XmlElement
1135
+ ) {
1136
+ appendChildren(...record.onlineResources.map(createOnlineResource))(rootEl)
1137
+ }
1138
+
1139
+ export function writeOnlineResources(
1140
+ record: CatalogRecord,
1141
+ rootEl: XmlElement
1142
+ ) {
1143
+ removeOnlineResources()(rootEl)
1144
+
1145
+ if (record.kind === 'dataset') {
1146
+ appendDatasetOnlineResources(record, rootEl)
1147
+ return
1148
+ }
1149
+ appendServiceOnlineResources(record, rootEl)
1150
+ }
1151
+
1140
1152
  export function writeTemporalExtents(
1141
1153
  record: DatasetRecord,
1142
1154
  rootEl: XmlElement
@@ -1,8 +1,9 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { combineLatest, Observable, of, switchMap } from 'rxjs'
3
- import { catchError, map, shareReplay, tap } from 'rxjs/operators'
3
+ import { catchError, filter, map, shareReplay, tap } from 'rxjs/operators'
4
4
  import {
5
5
  MeApiService,
6
+ RecordsApiService,
6
7
  RegistriesApiService,
7
8
  SiteApiService,
8
9
  ToolsApiService,
@@ -19,7 +20,7 @@ import {
19
20
  import { Gn4PlatformMapper } from './gn4-platform.mapper'
20
21
  import { ltr } from 'semver'
21
22
  import { LangService } from '../../../../../../../libs/util/i18n/src'
22
- import { HttpClient } from '@angular/common/http'
23
+ import { HttpClient, HttpEventType } from '@angular/common/http'
23
24
  import {
24
25
  KeywordApiResponse,
25
26
  ThesaurusApiResponse,
@@ -77,7 +78,8 @@ export class Gn4PlatformService implements PlatformServiceInterface {
77
78
  private registriesApiService: RegistriesApiService,
78
79
  private langService: LangService,
79
80
  private userfeedbackApiService: UserfeedbackApiService,
80
- private httpClient: HttpClient
81
+ private httpClient: HttpClient,
82
+ private recordsApiService: RecordsApiService
81
83
  ) {
82
84
  this.me$ = this.meApi.getMe().pipe(
83
85
  switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)),
@@ -274,4 +276,46 @@ export class Gn4PlatformService implements PlatformServiceInterface {
274
276
  })
275
277
  )
276
278
  }
279
+
280
+ getRecordAttachments(recordUuid: string) {
281
+ return this.recordsApiService.getAllResources(recordUuid).pipe(
282
+ map((resources) =>
283
+ resources.map((r) => ({
284
+ url: new URL(r.url),
285
+ fileName: r.filename,
286
+ }))
287
+ )
288
+ )
289
+ }
290
+
291
+ attachFileToRecord(recordUuid: string, file: File) {
292
+ let sizeBytes = -1
293
+ return this.recordsApiService
294
+ .putResource(recordUuid, file, 'public', undefined, 'events', true)
295
+ .pipe(
296
+ map((event) => {
297
+ if (event.type === HttpEventType.UploadProgress) {
298
+ sizeBytes = event.total
299
+ return {
300
+ type: 'progress',
301
+ progress: event.total
302
+ ? Math.round((100 * event.loaded) / event.total)
303
+ : 0,
304
+ } as const
305
+ }
306
+ if (event.type === HttpEventType.Response) {
307
+ return {
308
+ type: 'success',
309
+ attachment: {
310
+ url: new URL(event.body.url),
311
+ fileName: event.body.filename,
312
+ },
313
+ sizeBytes,
314
+ } as const
315
+ }
316
+ return undefined
317
+ }),
318
+ filter((event) => !!event)
319
+ )
320
+ }
277
321
  }
@@ -115,7 +115,7 @@ export type ServiceProtocol =
115
115
  | 'ogcFeatures'
116
116
  | 'other'
117
117
 
118
- export type DatasetDistributionType = 'service' | 'download' | 'link'
118
+ export type OnlineResourceType = 'service' | 'download' | 'link' | 'endpoint'
119
119
 
120
120
  export interface DatasetServiceDistribution {
121
121
  type: 'service'
@@ -146,12 +146,12 @@ export interface OnlineLinkResource {
146
146
  description?: string
147
147
  }
148
148
 
149
- export type DatasetDistribution = (
149
+ export type DatasetOnlineResource = (
150
150
  | DatasetServiceDistribution
151
151
  | DatasetDownloadDistribution
152
152
  | OnlineLinkResource
153
153
  ) & {
154
- type: DatasetDistributionType
154
+ type: OnlineResourceType
155
155
  }
156
156
 
157
157
  export interface GraphicOverview {
@@ -178,14 +178,12 @@ export interface DatasetRecord extends BaseRecord {
178
178
  kind: 'dataset'
179
179
  status: RecordStatus
180
180
  lineage: string // Explanation of the origin of this record (e.g: how, why)"
181
- distributions: Array<DatasetDistribution>
181
+ onlineResources: Array<DatasetOnlineResource>
182
182
  spatialExtents: Array<DatasetSpatialExtent>
183
183
  temporalExtents: Array<DatasetTemporalExtent>
184
184
  spatialRepresentation?: SpatialRepresentationType
185
185
  }
186
186
 
187
- export type ServiceOnlineResourceType = 'endpoint' | 'link'
188
-
189
187
  export interface ServiceEndpoint {
190
188
  endpointUrl: URL
191
189
  protocol: string
@@ -194,7 +192,7 @@ export interface ServiceEndpoint {
194
192
  }
195
193
 
196
194
  export type ServiceOnlineResource = (ServiceEndpoint | OnlineLinkResource) & {
197
- type: ServiceOnlineResourceType
195
+ type: OnlineResourceType
198
196
  }
199
197
 
200
198
  export interface ServiceRecord extends BaseRecord {
@@ -202,6 +200,8 @@ export interface ServiceRecord extends BaseRecord {
202
200
  onlineResources: Array<ServiceOnlineResource>
203
201
  }
204
202
 
203
+ export type OnlineResource = DatasetOnlineResource | ServiceOnlineResource
204
+
205
205
  export type CatalogRecord = ServiceRecord | DatasetRecord
206
206
 
207
207
  export type CatalogRecordKeys = keyof ServiceRecord | keyof DatasetRecord
@@ -5,6 +5,6 @@ export interface UserModel {
5
5
  name: string
6
6
  surname: string
7
7
  email: string
8
- organisation: string
8
+ organisation?: string
9
9
  profileIcon?: string
10
10
  }
@@ -4,6 +4,21 @@ import type { Organization } from './model/record/organization.model'
4
4
  import { Keyword, UserFeedback } from './model/record'
5
5
  import { KeywordType } from './model/thesaurus'
6
6
 
7
+ interface RecordAttachment {
8
+ url: URL
9
+ fileName: string
10
+ }
11
+ type UploadEvent =
12
+ | {
13
+ type: 'progress'
14
+ progress: number // in percent
15
+ }
16
+ | {
17
+ type: 'success'
18
+ attachment: RecordAttachment
19
+ sizeBytes: number
20
+ }
21
+
7
22
  export abstract class PlatformServiceInterface {
8
23
  abstract getType(): string
9
24
  abstract getApiVersion(): Observable<string>
@@ -15,7 +30,9 @@ export abstract class PlatformServiceInterface {
15
30
  organisation: Organization
16
31
  ): Observable<UserModel[]>
17
32
  abstract getOrganizations(): Observable<Organization[]>
33
+
18
34
  abstract translateKey(key: string): Observable<string>
35
+
19
36
  abstract searchKeywords(
20
37
  query: string,
21
38
  keywordTypes: KeywordType[]
@@ -25,6 +42,15 @@ export abstract class PlatformServiceInterface {
25
42
  query: string,
26
43
  thesaurusId: string
27
44
  ): Observable<Keyword[]>
45
+
28
46
  abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
29
47
  abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
48
+
49
+ abstract getRecordAttachments(
50
+ recordUuid: string
51
+ ): Observable<RecordAttachment[]>
52
+ abstract attachFileToRecord(
53
+ recordUuid: string,
54
+ file: File
55
+ ): Observable<UploadEvent>
30
56
  }
@@ -4,7 +4,7 @@ export * from './lib/search'
4
4
 
5
5
  export * from './lib/geojson.fixtures'
6
6
  export * from './lib/link.fixtures'
7
- export * from './lib/ol-feature.fixture'
7
+ export * from './lib/ol-feature.fixtures'
8
8
  export * from './lib/organisations.fixture'
9
9
  export * from './lib/record-link.fixtures'
10
10
  export * from './lib/records.fixtures'