geonetwork-ui 2.4.0-dev.344a92f2 → 2.4.0-dev.3b6b95eb

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 (429) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +4 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/license.mjs +64 -0
  3. package/esm2022/libs/api/metadata-converter/src/lib/common/url.mjs +14 -0
  4. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.mjs +254 -0
  5. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/index.mjs +2 -0
  6. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.mjs +17 -0
  7. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.mjs +196 -0
  8. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.mjs +46 -0
  9. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.mjs +74 -0
  10. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.mjs +2 -0
  11. package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.mjs +27 -0
  12. package/esm2022/libs/api/metadata-converter/src/lib/find-converter.mjs +11 -1
  13. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +3 -3
  14. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +8 -23
  15. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +3 -3
  16. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +27 -37
  17. package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +35 -3
  18. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
  19. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +34 -26
  20. package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +1 -1
  21. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  22. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  23. package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +7 -4
  24. package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +6 -6
  25. package/esm2022/libs/feature/dataviz/src/lib/feature-dataviz.module.mjs +10 -7
  26. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +40 -50
  27. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  28. package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +5 -5
  29. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +3 -3
  30. package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +95 -0
  31. package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +72 -0
  32. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.mjs +109 -0
  33. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +9 -8
  34. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +38 -60
  35. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +10 -7
  36. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.mjs +191 -0
  37. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +5 -4
  38. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +2 -2
  39. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +10 -6
  40. package/esm2022/libs/feature/editor/src/lib/components/wizard/wizard.component.mjs +3 -3
  41. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +17 -3
  42. package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +5 -5
  43. package/esm2022/libs/feature/map/src/index.mjs +2 -9
  44. package/esm2022/libs/feature/map/src/lib/+state/map.actions.mjs +4 -7
  45. package/esm2022/libs/feature/map/src/lib/+state/map.facade.mjs +9 -15
  46. package/esm2022/libs/feature/map/src/lib/+state/map.reducer.mjs +13 -44
  47. package/esm2022/libs/feature/map/src/lib/+state/map.selectors.mjs +3 -2
  48. package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +15 -15
  49. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +16 -10
  50. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +10 -8
  51. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +11 -7
  52. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +10 -6
  53. package/esm2022/libs/feature/map/src/lib/constant/index.mjs +1 -2
  54. package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +4 -44
  55. package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +43 -29
  56. package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +17 -8
  57. package/esm2022/libs/feature/map/src/lib/map-state-container/map-state-container.component.mjs +27 -0
  58. package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +4 -168
  59. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +21 -17
  60. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +14 -8
  61. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +40 -52
  62. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +1 -1
  63. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +11 -6
  64. package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +7 -7
  65. package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +1 -6
  66. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  67. package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +3 -3
  68. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +3 -3
  69. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +3 -3
  70. package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +3 -3
  71. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +2 -2
  72. package/esm2022/libs/ui/inputs/src/lib/search-input/search-input.component.mjs +6 -4
  73. package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +5 -3
  74. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +2 -7
  75. package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +20 -4
  76. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
  77. package/esm2022/libs/ui/layout/src/lib/sortable-list/sortable-list.component.mjs +3 -3
  78. package/esm2022/libs/ui/map/src/index.mjs +4 -3
  79. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +8 -6
  80. package/esm2022/libs/ui/map/src/lib/components/map-container/map-container.component.mjs +137 -0
  81. package/esm2022/libs/ui/map/src/lib/components/map-container/map-settings.token.mjs +13 -0
  82. package/esm2022/libs/ui/map/src/lib/map-utils.mjs +37 -0
  83. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +3 -3
  84. package/esm2022/libs/util/app-config/src/index.mjs +2 -1
  85. package/esm2022/libs/util/app-config/src/lib/map-layers.mjs +27 -0
  86. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
  87. package/esm2022/libs/util/shared/src/lib/utils/no-duplicate-file-name.mjs +19 -0
  88. package/esm2022/translations/de.json +19 -0
  89. package/esm2022/translations/en.json +51 -32
  90. package/esm2022/translations/es.json +19 -0
  91. package/esm2022/translations/fr.json +82 -63
  92. package/esm2022/translations/it.json +19 -0
  93. package/esm2022/translations/nl.json +19 -0
  94. package/esm2022/translations/pt.json +19 -0
  95. package/fesm2022/geonetwork-ui.mjs +6871 -6029
  96. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  97. package/libs/api/metadata-converter/src/index.d.ts +3 -0
  98. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  99. package/libs/api/metadata-converter/src/lib/common/license.d.ts +3 -0
  100. package/libs/api/metadata-converter/src/lib/common/license.d.ts.map +1 -0
  101. package/libs/api/metadata-converter/src/lib/common/url.d.ts +7 -0
  102. package/libs/api/metadata-converter/src/lib/common/url.d.ts.map +1 -0
  103. package/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.d.ts +13 -0
  104. package/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.d.ts.map +1 -0
  105. package/libs/api/metadata-converter/src/lib/dcat-ap/index.d.ts +2 -0
  106. package/libs/api/metadata-converter/src/lib/dcat-ap/index.d.ts.map +1 -0
  107. package/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.d.ts +16 -0
  108. package/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.d.ts.map +1 -0
  109. package/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.d.ts +20 -0
  110. package/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.d.ts.map +1 -0
  111. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.d.ts +9 -0
  112. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.d.ts.map +1 -0
  113. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.d.ts +8 -0
  114. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.d.ts.map +1 -0
  115. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.d.ts +2 -0
  116. package/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.d.ts.map +1 -0
  117. package/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.d.ts +6 -0
  118. package/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.d.ts.map +1 -0
  119. package/libs/api/metadata-converter/src/lib/find-converter.d.ts.map +1 -1
  120. package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts.map +1 -1
  121. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +0 -1
  122. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  123. package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
  124. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +4 -6
  125. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  126. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +58 -0
  127. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
  128. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +12 -7
  129. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  130. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -15
  131. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  132. package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -1
  133. package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
  134. package/libs/common/domain/src/lib/platform.service.interface.d.ts +2 -3
  135. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  136. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +7 -0
  137. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  138. package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts +2 -1
  139. package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +1 -1
  140. package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts +10 -9
  141. package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts.map +1 -1
  142. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +13 -20
  143. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
  144. package/libs/feature/editor/src/index.d.ts +1 -0
  145. package/libs/feature/editor/src/index.d.ts.map +1 -1
  146. package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
  147. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +34 -0
  148. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts.map +1 -0
  149. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +16 -0
  150. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -0
  151. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.d.ts +38 -0
  152. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.d.ts.map +1 -0
  153. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +1 -1
  154. 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
  155. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +6 -13
  156. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +1 -1
  157. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts +1 -1
  158. 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 -1
  159. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.d.ts +44 -0
  160. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.d.ts.map +1 -0
  161. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +1 -1
  162. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
  163. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  164. package/libs/feature/editor/src/lib/fields.config.d.ts +2 -0
  165. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  166. package/libs/feature/editor/src/lib/services/editor.service.d.ts +2 -2
  167. package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
  168. package/libs/feature/map/src/index.d.ts +1 -8
  169. package/libs/feature/map/src/index.d.ts.map +1 -1
  170. package/libs/feature/map/src/lib/+state/map.actions.d.ts +13 -39
  171. package/libs/feature/map/src/lib/+state/map.actions.d.ts.map +1 -1
  172. package/libs/feature/map/src/lib/+state/map.facade.d.ts +9 -10
  173. package/libs/feature/map/src/lib/+state/map.facade.d.ts.map +1 -1
  174. package/libs/feature/map/src/lib/+state/map.reducer.d.ts +4 -2
  175. package/libs/feature/map/src/lib/+state/map.reducer.d.ts.map +1 -1
  176. package/libs/feature/map/src/lib/+state/map.selectors.d.ts +6 -1
  177. package/libs/feature/map/src/lib/+state/map.selectors.d.ts.map +1 -1
  178. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts +3 -5
  179. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
  180. package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -1
  181. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +2 -2
  182. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
  183. package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +1 -1
  184. package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -1
  185. package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +1 -1
  186. package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -1
  187. package/libs/feature/map/src/lib/constant/index.d.ts +0 -1
  188. package/libs/feature/map/src/lib/constant/index.d.ts.map +1 -1
  189. package/libs/feature/map/src/lib/feature-map.module.d.ts +12 -18
  190. package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
  191. package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +7 -7
  192. package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -1
  193. package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts +4 -3
  194. package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts.map +1 -1
  195. package/libs/feature/map/src/lib/map-state-container/map-state-container.component.d.ts +14 -0
  196. package/libs/feature/map/src/lib/map-state-container/map-state-container.component.d.ts.map +1 -0
  197. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +0 -30
  198. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
  199. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +8 -5
  200. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  201. package/libs/feature/record/src/lib/feature-record.module.d.ts +13 -11
  202. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  203. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +13 -19
  204. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  205. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +4 -3
  206. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  207. package/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.d.ts +1 -1
  208. package/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.d.ts.map +1 -1
  209. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts +9 -10
  210. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts.map +1 -1
  211. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  212. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
  213. package/libs/ui/inputs/src/index.d.ts +1 -0
  214. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  215. package/libs/ui/inputs/src/lib/search-input/search-input.component.d.ts +1 -1
  216. package/libs/ui/inputs/src/lib/search-input/search-input.component.d.ts.map +1 -1
  217. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts +1 -0
  218. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -1
  219. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -26
  220. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  221. package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts +6 -3
  222. package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts.map +1 -1
  223. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
  224. package/libs/ui/map/src/index.d.ts +3 -2
  225. package/libs/ui/map/src/index.d.ts.map +1 -1
  226. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +3 -4
  227. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  228. package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts +37 -0
  229. package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts.map +1 -0
  230. package/libs/ui/map/src/lib/components/map-container/map-settings.token.d.ts +18 -0
  231. package/libs/ui/map/src/lib/components/map-container/map-settings.token.d.ts.map +1 -0
  232. package/libs/ui/map/src/lib/map-utils.d.ts +7 -0
  233. package/libs/ui/map/src/lib/map-utils.d.ts.map +1 -0
  234. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +1 -1
  235. package/libs/util/app-config/src/index.d.ts +1 -0
  236. package/libs/util/app-config/src/index.d.ts.map +1 -1
  237. package/libs/util/app-config/src/lib/map-layers.d.ts +4 -0
  238. package/libs/util/app-config/src/lib/map-layers.d.ts.map +1 -0
  239. package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
  240. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  241. package/libs/util/shared/src/lib/utils/no-duplicate-file-name.d.ts +2 -0
  242. package/libs/util/shared/src/lib/utils/no-duplicate-file-name.d.ts.map +1 -0
  243. package/package.json +5 -3
  244. package/src/libs/api/metadata-converter/src/index.ts +3 -0
  245. package/src/libs/api/metadata-converter/src/lib/common/license.ts +66 -0
  246. package/src/libs/api/metadata-converter/src/lib/common/url.ts +15 -0
  247. package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +378 -0
  248. package/src/libs/api/metadata-converter/src/lib/dcat-ap/index.ts +1 -0
  249. package/src/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.ts +17 -0
  250. package/src/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.ts +370 -0
  251. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.ts +95 -0
  252. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/individual-name.ts +20 -0
  253. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/keyword.mapper.ts +16 -0
  254. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/role.mapper.ts +48 -0
  255. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.ts +97 -0
  256. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/status.mapper.ts +19 -0
  257. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/update-frequency.mapper.ts +67 -0
  258. package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.ts +1 -0
  259. package/src/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.ts +68 -0
  260. package/src/libs/api/metadata-converter/src/lib/find-converter.ts +13 -0
  261. package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +272 -0
  262. package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +110 -0
  263. package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +85 -0
  264. package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +73 -0
  265. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +1 -2
  266. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +7 -35
  267. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +1 -2
  268. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +85 -120
  269. package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +37 -2
  270. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
  271. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +57 -30
  272. package/src/libs/common/domain/src/lib/model/record/contact.model.ts +1 -1
  273. package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -2
  274. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
  275. package/src/libs/common/fixtures/src/index.ts +3 -0
  276. package/src/libs/common/fixtures/src/lib/individual.fixtures.ts +61 -0
  277. package/src/libs/common/fixtures/src/lib/map/index.ts +1 -0
  278. package/src/libs/common/fixtures/src/lib/map/map-context.fixtures.ts +53 -0
  279. package/src/libs/common/fixtures/src/lib/user.fixtures.ts +13 -0
  280. package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +5 -1
  281. package/src/libs/feature/dataviz/src/lib/feature-dataviz.module.ts +6 -2
  282. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +5 -2
  283. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +38 -78
  284. package/src/libs/feature/editor/src/index.ts +1 -0
  285. package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +11 -4
  286. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +1 -1
  287. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +47 -0
  288. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +132 -0
  289. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.html +31 -0
  290. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +82 -0
  291. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.html +40 -0
  292. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +170 -0
  293. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +1 -1
  294. 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 -8
  295. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +1 -4
  296. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts +41 -83
  297. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +20 -11
  298. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +9 -5
  299. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.css +0 -0
  300. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.html +71 -0
  301. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-resources/form-field-online-resources.component.ts +241 -0
  302. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +4 -3
  303. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +1 -1
  304. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +15 -0
  305. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +7 -3
  306. package/src/libs/feature/editor/src/lib/components/wizard/wizard.component.html +2 -6
  307. package/src/libs/feature/editor/src/lib/fields.config.ts +18 -2
  308. package/src/libs/feature/editor/src/lib/services/editor.service.ts +7 -3
  309. package/src/libs/feature/map/src/index.ts +1 -8
  310. package/src/libs/feature/map/src/lib/+state/map.actions.ts +10 -25
  311. package/src/libs/feature/map/src/lib/+state/map.facade.ts +11 -15
  312. package/src/libs/feature/map/src/lib/+state/map.reducer.ts +16 -53
  313. package/src/libs/feature/map/src/lib/+state/map.selectors.ts +7 -2
  314. package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +12 -15
  315. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +17 -11
  316. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +11 -12
  317. package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +12 -10
  318. package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +11 -9
  319. package/src/libs/feature/map/src/lib/constant/index.ts +0 -1
  320. package/src/libs/feature/map/src/lib/feature-map.module.ts +0 -26
  321. package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +38 -20
  322. package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +2 -2
  323. package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.ts +15 -5
  324. package/src/libs/feature/map/src/lib/map-state-container/map-state-container.component.css +0 -0
  325. package/src/libs/feature/map/src/lib/map-state-container/map-state-container.component.html +4 -0
  326. package/src/libs/feature/map/src/lib/map-state-container/map-state-container.component.ts +29 -0
  327. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +1 -229
  328. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +27 -18
  329. package/src/libs/feature/record/src/lib/feature-record.module.ts +11 -3
  330. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -4
  331. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +44 -71
  332. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +1 -1
  333. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +4 -1
  334. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +4 -2
  335. package/src/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.ts +8 -1
  336. package/src/libs/ui/catalog/src/lib/ui-catalog.module.ts +0 -3
  337. package/src/libs/ui/inputs/src/index.ts +1 -0
  338. package/src/libs/ui/inputs/src/lib/badge/badge.component.html +1 -2
  339. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +2 -1
  340. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +2 -1
  341. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +8 -8
  342. package/src/libs/ui/inputs/src/lib/search-input/search-input.component.ts +5 -1
  343. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +1 -1
  344. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +3 -1
  345. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
  346. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +5 -1
  347. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +25 -2
  348. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.css +1 -1
  349. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +2 -2
  350. package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +1 -1
  351. package/src/libs/ui/map/src/index.ts +3 -2
  352. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +1 -1
  353. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +8 -5
  354. package/src/libs/ui/map/src/lib/components/map-container/map-container.component.css +0 -0
  355. package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +203 -0
  356. package/src/libs/ui/map/src/lib/components/map-container/map-settings.token.ts +23 -0
  357. package/src/libs/ui/map/src/lib/map-utils.ts +54 -0
  358. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +18 -14
  359. package/src/libs/util/app-config/src/index.ts +1 -0
  360. package/src/libs/util/app-config/src/lib/map-layers.ts +31 -0
  361. package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
  362. package/src/libs/util/shared/src/lib/utils/no-duplicate-file-name.ts +23 -0
  363. package/tailwind.base.css +3 -2
  364. package/translations/de.json +19 -0
  365. package/translations/en.json +51 -32
  366. package/translations/es.json +19 -0
  367. package/translations/fr.json +82 -63
  368. package/translations/it.json +19 -0
  369. package/translations/nl.json +19 -0
  370. package/translations/pt.json +19 -0
  371. package/translations/sk.json +19 -0
  372. package/esm2022/libs/feature/map/src/lib/+state/map.effects.mjs +0 -15
  373. package/esm2022/libs/feature/map/src/lib/+state/map.models.mjs +0 -2
  374. package/esm2022/libs/feature/map/src/lib/constant/map-options.mjs +0 -8
  375. package/esm2022/libs/feature/map/src/lib/constant/style.constant.mjs +0 -17
  376. package/esm2022/libs/feature/map/src/lib/feature-info/feature-info.service.mjs +0 -38
  377. package/esm2022/libs/feature/map/src/lib/manager/map-instance.directive.mjs +0 -19
  378. package/esm2022/libs/feature/map/src/lib/manager/map-manager.service.mjs +0 -19
  379. package/esm2022/libs/feature/map/src/lib/map-container/map-container.component.mjs +0 -27
  380. package/esm2022/libs/feature/map/src/lib/map-context/component/map-context.component.mjs +0 -46
  381. package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +0 -10
  382. package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +0 -289
  383. package/esm2022/libs/ui/map/src/lib/components/map/map.component.mjs +0 -40
  384. package/esm2022/libs/ui/map/src/lib/ui-map.module.mjs +0 -33
  385. package/libs/feature/map/src/lib/+state/map.effects.d.ts +0 -9
  386. package/libs/feature/map/src/lib/+state/map.effects.d.ts.map +0 -1
  387. package/libs/feature/map/src/lib/+state/map.models.d.ts +0 -9
  388. package/libs/feature/map/src/lib/+state/map.models.d.ts.map +0 -1
  389. package/libs/feature/map/src/lib/constant/map-options.d.ts +0 -9
  390. package/libs/feature/map/src/lib/constant/map-options.d.ts.map +0 -1
  391. package/libs/feature/map/src/lib/constant/style.constant.d.ts +0 -4
  392. package/libs/feature/map/src/lib/constant/style.constant.d.ts.map +0 -1
  393. package/libs/feature/map/src/lib/feature-info/feature-info.service.d.ts +0 -16
  394. package/libs/feature/map/src/lib/feature-info/feature-info.service.d.ts.map +0 -1
  395. package/libs/feature/map/src/lib/manager/map-instance.directive.d.ts +0 -9
  396. package/libs/feature/map/src/lib/manager/map-instance.directive.d.ts.map +0 -1
  397. package/libs/feature/map/src/lib/manager/map-manager.service.d.ts +0 -11
  398. package/libs/feature/map/src/lib/manager/map-manager.service.d.ts.map +0 -1
  399. package/libs/feature/map/src/lib/map-container/map-container.component.d.ts +0 -12
  400. package/libs/feature/map/src/lib/map-container/map-container.component.d.ts.map +0 -1
  401. package/libs/feature/map/src/lib/map-context/component/map-context.component.d.ts +0 -26
  402. package/libs/feature/map/src/lib/map-context/component/map-context.component.d.ts.map +0 -1
  403. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +0 -77
  404. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +0 -1
  405. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +0 -26
  406. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +0 -1
  407. package/libs/ui/map/src/lib/components/map/map.component.d.ts +0 -19
  408. package/libs/ui/map/src/lib/components/map/map.component.d.ts.map +0 -1
  409. package/libs/ui/map/src/lib/ui-map.module.d.ts +0 -13
  410. package/libs/ui/map/src/lib/ui-map.module.d.ts.map +0 -1
  411. package/src/libs/feature/map/src/lib/+state/map.effects.ts +0 -7
  412. package/src/libs/feature/map/src/lib/+state/map.models.ts +0 -9
  413. package/src/libs/feature/map/src/lib/constant/map-options.ts +0 -17
  414. package/src/libs/feature/map/src/lib/feature-info/feature-info.service.ts +0 -42
  415. package/src/libs/feature/map/src/lib/manager/map-instance.directive.ts +0 -10
  416. package/src/libs/feature/map/src/lib/manager/map-manager.service.ts +0 -13
  417. package/src/libs/feature/map/src/lib/map-container/map-container.component.html +0 -1
  418. package/src/libs/feature/map/src/lib/map-container/map-container.component.ts +0 -26
  419. package/src/libs/feature/map/src/lib/map-context/component/map-context.component.html +0 -1
  420. package/src/libs/feature/map/src/lib/map-context/component/map-context.component.ts +0 -57
  421. package/src/libs/feature/map/src/lib/map-context/map-context.fixtures.ts +0 -55
  422. package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +0 -95
  423. package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +0 -318
  424. package/src/libs/ui/map/src/lib/components/map/map.component.ts +0 -57
  425. package/src/libs/ui/map/src/lib/ui-map.module.ts +0 -19
  426. /package/src/libs/feature/{map/src/lib/map-container/map-container.component.css → editor/src/lib/components/import-record/import-record.component.css} +0 -0
  427. /package/src/libs/feature/{map/src/lib/map-context/component/map-context.component.css → editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.css} +0 -0
  428. /package/src/libs/{ui/map/src/lib/components/map/map.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.css} +0 -0
  429. /package/src/libs/ui/map/src/lib/components/{map/map.component.html → map-container/map-container.component.html} +0 -0
@@ -6,6 +6,7 @@ import {
6
6
  import { ElasticsearchService } from './elasticsearch'
7
7
  import {
8
8
  combineLatest,
9
+ exhaustMap,
9
10
  from,
10
11
  Observable,
11
12
  of,
@@ -25,22 +26,30 @@ import {
25
26
  } from '../../../../../../libs/common/domain/src/lib/model/search'
26
27
  import { catchError, map, tap } from 'rxjs/operators'
27
28
  import {
29
+ assertValidXml,
28
30
  findConverterForDocument,
29
31
  Gn4Converter,
30
32
  Gn4SearchResults,
31
33
  Iso19139Converter,
32
34
  } from '../../../../../../libs/api/metadata-converter/src'
33
35
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
34
- import { HttpErrorResponse } from '@angular/common/http'
36
+ import {
37
+ HttpClient,
38
+ HttpErrorResponse,
39
+ HttpHeaders,
40
+ } from '@angular/common/http'
35
41
 
36
42
  const TEMPORARY_ID_PREFIX = 'TEMP-ID-'
37
43
 
44
+ export type RecordAsXml = string
45
+
38
46
  @Injectable()
39
47
  export class Gn4Repository implements RecordsRepositoryInterface {
40
48
  _draftsChanged = new Subject<void>()
41
49
  draftsChanged$ = this._draftsChanged.asObservable()
42
50
 
43
51
  constructor(
52
+ private httpClient: HttpClient,
44
53
  private gn4SearchApi: SearchApiService,
45
54
  private gn4SearchHelper: ElasticsearchService,
46
55
  private gn4Mapper: Gn4Converter,
@@ -140,6 +149,7 @@ export class Gn4Repository implements RecordsRepositoryInterface {
140
149
  )
141
150
  )
142
151
  }
152
+
143
153
  aggregate(params: AggregationsParams): Observable<Aggregations> {
144
154
  // if aggregations are empty, return an empty object right away
145
155
  if (Object.keys(params).length === 0) return of({})
@@ -184,44 +194,12 @@ export class Gn4Repository implements RecordsRepositoryInterface {
184
194
  )
185
195
  }
186
196
 
187
- /**
188
- * Returns null if the record is not found
189
- */
190
- private loadRecordAsXml(uniqueIdentifier: string): Observable<string | null> {
191
- return this.gn4RecordsApi
192
- .getRecordAs(
193
- uniqueIdentifier,
194
- undefined,
195
- false,
196
- undefined,
197
- undefined,
198
- undefined,
199
- 'application/xml',
200
- 'response',
201
- undefined,
202
- { httpHeaderAccept: 'text/xml,application/xml' as 'application/xml' } // this is to make sure that the response is parsed as text
203
- )
204
- .pipe(
205
- map((response) => response.body),
206
- catchError((error: HttpErrorResponse) =>
207
- error.status === 404 ? of(null) : throwError(() => error)
208
- )
209
- )
210
- }
211
-
212
- private getLocalStorageKeyForRecord(uniqueIdentifier: string) {
213
- return `geonetwork-ui-draft-${uniqueIdentifier}`
214
- }
215
-
216
197
  openRecordForEdition(
217
198
  uniqueIdentifier: string
218
199
  ): Observable<[CatalogRecord, string, boolean] | null> {
219
- const draft$ = of(
220
- window.localStorage.getItem(
221
- this.getLocalStorageKeyForRecord(uniqueIdentifier)
222
- )
223
- )
224
- const recordAsXml$ = this.loadRecordAsXml(uniqueIdentifier)
200
+ const draft$ = of(this.getRecordFromLocalStorage(uniqueIdentifier))
201
+ const recordAsXml$ = this.getRecordAsXml(uniqueIdentifier)
202
+
225
203
  return combineLatest([draft$, recordAsXml$]).pipe(
226
204
  switchMap(([draft, recordAsXml]) => {
227
205
  const xml = draft ?? recordAsXml
@@ -239,34 +217,27 @@ export class Gn4Repository implements RecordsRepositoryInterface {
239
217
  openRecordForDuplication(
240
218
  uniqueIdentifier: string
241
219
  ): Observable<[CatalogRecord, string, false] | null> {
242
- return this.loadRecordAsXml(uniqueIdentifier).pipe(
243
- switchMap(async (recordAsXml) => {
244
- const converter = findConverterForDocument(recordAsXml)
245
- const record = await converter.readRecord(recordAsXml)
220
+ return this.getRecordAsXml(uniqueIdentifier).pipe(
221
+ switchMap(async (fetchedRecordAsXml) => {
222
+ const converter = findConverterForDocument(fetchedRecordAsXml)
223
+ const record = await converter.readRecord(fetchedRecordAsXml)
224
+
246
225
  record.uniqueIdentifier = `${TEMPORARY_ID_PREFIX}${Date.now()}`
247
226
  record.title = `${record.title} (Copy)`
248
- const xml = await converter.writeRecord(record, recordAsXml)
249
- window.localStorage.setItem(
250
- this.getLocalStorageKeyForRecord(record.uniqueIdentifier),
251
- xml
227
+
228
+ const recordAsXml = await converter.writeRecord(
229
+ record,
230
+ fetchedRecordAsXml
252
231
  )
232
+
233
+ this.saveRecordToLocalStorage(recordAsXml, record.uniqueIdentifier)
253
234
  this._draftsChanged.next()
254
- return [record, xml, false] as [CatalogRecord, string, false]
235
+
236
+ return [record, recordAsXml, false] as [CatalogRecord, string, false]
255
237
  })
256
238
  )
257
239
  }
258
240
 
259
- private serializeRecordToXml(
260
- record: CatalogRecord,
261
- referenceRecordSource?: string
262
- ): Observable<string> {
263
- // if there's a reference record, use that standard; otherwise, use iso19139
264
- const converter = referenceRecordSource
265
- ? findConverterForDocument(referenceRecordSource)
266
- : new Iso19139Converter()
267
- return from(converter.writeRecord(record, referenceRecordSource))
268
- }
269
-
270
241
  saveRecord(
271
242
  record: CatalogRecord,
272
243
  referenceRecordSource?: string
@@ -301,6 +272,32 @@ export class Gn4Repository implements RecordsRepositoryInterface {
301
272
  )
302
273
  }
303
274
 
275
+ duplicateExternalRecord(recordDownloadUrl: string): Observable<string> {
276
+ return this.getExternalRecordAsXml(recordDownloadUrl).pipe(
277
+ exhaustMap(async (fetchedRecordAsXml: string) => {
278
+ const converter = findConverterForDocument(fetchedRecordAsXml)
279
+ const record = await converter.readRecord(fetchedRecordAsXml)
280
+ const tempId = this.generateTemporaryId()
281
+
282
+ record.title = `${record.title} (Copy)`
283
+ record.uniqueIdentifier = tempId
284
+
285
+ const recordAsXml = await converter.writeRecord(
286
+ record,
287
+ fetchedRecordAsXml
288
+ )
289
+
290
+ this.saveRecordToLocalStorage(recordAsXml, record.uniqueIdentifier)
291
+ this._draftsChanged.next()
292
+
293
+ return tempId
294
+ }),
295
+ catchError((error: HttpErrorResponse) => {
296
+ return throwError(() => error)
297
+ })
298
+ )
299
+ }
300
+
304
301
  deleteRecord(uniqueIdentifier: string): Observable<void> {
305
302
  return this.gn4RecordsApi.deleteRecord(uniqueIdentifier)
306
303
  }
@@ -315,28 +312,19 @@ export class Gn4Repository implements RecordsRepositoryInterface {
315
312
  ): Observable<string> {
316
313
  return this.serializeRecordToXml(record, referenceRecordSource).pipe(
317
314
  tap((recordXml) => {
318
- window.localStorage.setItem(
319
- this.getLocalStorageKeyForRecord(record.uniqueIdentifier),
320
- recordXml
321
- )
315
+ this.saveRecordToLocalStorage(recordXml, record.uniqueIdentifier)
322
316
  this._draftsChanged.next()
323
317
  })
324
318
  )
325
319
  }
326
320
 
327
321
  clearRecordDraft(uniqueIdentifier: string): void {
328
- window.localStorage.removeItem(
329
- this.getLocalStorageKeyForRecord(uniqueIdentifier)
330
- )
322
+ this.removeRecordFromLocalStorage(uniqueIdentifier)
331
323
  this._draftsChanged.next()
332
324
  }
333
325
 
334
326
  recordHasDraft(uniqueIdentifier: string): boolean {
335
- return (
336
- window.localStorage.getItem(
337
- this.getLocalStorageKeyForRecord(uniqueIdentifier)
338
- ) !== null
339
- )
327
+ return this.getRecordFromLocalStorage(uniqueIdentifier) !== null
340
328
  }
341
329
 
342
330
  isRecordNotYetSaved(uniqueIdentifier: string): boolean {
@@ -356,4 +344,80 @@ export class Gn4Repository implements RecordsRepositoryInterface {
356
344
  )
357
345
  )
358
346
  }
347
+
348
+ private getRecordAsXml(uniqueIdentifier: string): Observable<string | null> {
349
+ return this.gn4RecordsApi
350
+ .getRecordAs(
351
+ uniqueIdentifier,
352
+ undefined,
353
+ false,
354
+ undefined,
355
+ undefined,
356
+ undefined,
357
+ 'application/xml',
358
+ 'response',
359
+ undefined,
360
+ { httpHeaderAccept: 'text/xml,application/xml' as 'application/xml' } // this is to make sure that the response is parsed as text
361
+ )
362
+ .pipe(
363
+ map((response) => response.body),
364
+ catchError((error: HttpErrorResponse) =>
365
+ error.status === 404 ? of(null) : throwError(() => error)
366
+ )
367
+ )
368
+ }
369
+
370
+ private serializeRecordToXml(
371
+ record: CatalogRecord,
372
+ referenceRecordSource?: string
373
+ ): Observable<string> {
374
+ // if there's a reference record, use that standard; otherwise, use iso19139
375
+ const converter = referenceRecordSource
376
+ ? findConverterForDocument(referenceRecordSource)
377
+ : new Iso19139Converter()
378
+ return from(converter.writeRecord(record, referenceRecordSource))
379
+ }
380
+
381
+ private getExternalRecordAsXml(
382
+ recordDownloadUrl: string
383
+ ): Observable<string> {
384
+ let headers = new HttpHeaders()
385
+ const responseType_ = 'text'
386
+ headers = headers.set('Accept', 'text/xml,application/xml')
387
+
388
+ return this.httpClient
389
+ .get<string>(recordDownloadUrl, {
390
+ responseType: <any>responseType_,
391
+ headers: headers,
392
+ observe: 'body',
393
+ })
394
+ .pipe(
395
+ map((recordAsXmlFile) => {
396
+ assertValidXml(recordAsXmlFile)
397
+
398
+ return recordAsXmlFile
399
+ })
400
+ )
401
+ }
402
+
403
+ private getLocalStorageKeyForRecord(recordId: string): string {
404
+ return `geonetwork-ui-draft-${recordId}` // Never change this prefix as it is a breaking change
405
+ }
406
+
407
+ private saveRecordToLocalStorage(recordAsXml: RecordAsXml, recordId: string) {
408
+ window.localStorage.setItem(
409
+ this.getLocalStorageKeyForRecord(recordId),
410
+ recordAsXml
411
+ )
412
+ }
413
+
414
+ private getRecordFromLocalStorage(recordId: string): RecordAsXml {
415
+ return window.localStorage.getItem(
416
+ this.getLocalStorageKeyForRecord(recordId)
417
+ )
418
+ }
419
+
420
+ private removeRecordFromLocalStorage(recordId: string): void {
421
+ window.localStorage.removeItem(this.getLocalStorageKeyForRecord(recordId))
422
+ }
359
423
  }
@@ -1,5 +1,5 @@
1
1
  import { Injectable } from '@angular/core'
2
- import { combineLatest, Observable, of, switchMap } from 'rxjs'
2
+ import { combineLatest, Observable, of, switchMap, throwError } from 'rxjs'
3
3
  import { catchError, filter, map, shareReplay, tap } from 'rxjs/operators'
4
4
  import {
5
5
  MeApiService,
@@ -10,7 +10,10 @@ import {
10
10
  UserfeedbackApiService,
11
11
  UsersApiService,
12
12
  } from '../../../../../../../libs/data-access/gn4/src'
13
- import { PlatformServiceInterface } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
13
+ import {
14
+ PlatformServiceInterface,
15
+ UploadEvent,
16
+ } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
14
17
  import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
15
18
  import {
16
19
  Keyword,
@@ -26,6 +29,7 @@ import {
26
29
  ThesaurusApiResponse,
27
30
  } from '../../../../../../../libs/api/metadata-converter/src'
28
31
  import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
32
+ import { noDuplicateFileName } from '../../../../../../../libs/util/shared/src'
29
33
 
30
34
  const minApiVersion = '4.2.2'
31
35
 
@@ -288,34 +292,57 @@ export class Gn4PlatformService implements PlatformServiceInterface {
288
292
  )
289
293
  }
290
294
 
291
- attachFileToRecord(recordUuid: string, file: File) {
295
+ attachFileToRecord(recordUuid: string, file: File): Observable<UploadEvent> {
292
296
  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
- )
297
+
298
+ // Check if the resource already exists on the server and rename it if that's the case
299
+ return this.getRecordAttachments(recordUuid).pipe(
300
+ map((recordAttachement) => recordAttachement.map((r) => r.fileName)),
301
+ switchMap((fileNames) => {
302
+ const fileName = noDuplicateFileName(file.name, fileNames)
303
+
304
+ const fileCopy = new File([file], fileName, { type: file.type })
305
+
306
+ return this.recordsApiService
307
+ .putResource(
308
+ recordUuid,
309
+ fileCopy,
310
+ 'public',
311
+ undefined,
312
+ 'events',
313
+ true
314
+ )
315
+ .pipe(
316
+ map((event) => {
317
+ if (event.type === HttpEventType.UploadProgress) {
318
+ sizeBytes = event.total
319
+ return {
320
+ type: 'progress',
321
+ progress: event.total
322
+ ? Math.round((100 * event.loaded) / event.total)
323
+ : 0,
324
+ } as UploadEvent
325
+ }
326
+ if (event.type === HttpEventType.Response) {
327
+ return {
328
+ type: 'success',
329
+ attachment: {
330
+ url: new URL(event.body.url),
331
+ fileName: event.body.filename,
332
+ },
333
+ sizeBytes,
334
+ } as UploadEvent
335
+ }
336
+ return undefined
337
+ }),
338
+ filter((event) => !!event)
339
+ )
340
+ }),
341
+ catchError((error) => {
342
+ return throwError(
343
+ () => new Error(error.error?.message ?? error.message)
344
+ )
345
+ })
346
+ )
320
347
  }
321
348
  }
@@ -60,7 +60,7 @@ export interface Individual {
60
60
  email: string
61
61
  role: Role
62
62
  position?: string
63
- organization: Organization
63
+ organization?: Organization
64
64
  address?: string
65
65
  phone?: string
66
66
  }
@@ -4,11 +4,11 @@ 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 {
7
+ export interface RecordAttachment {
8
8
  url: URL
9
9
  fileName: string
10
10
  }
11
- type UploadEvent =
11
+ export type UploadEvent =
12
12
  | {
13
13
  type: 'progress'
14
14
  progress: number // in percent
@@ -52,6 +52,16 @@ export abstract class RecordsRepositoryInterface {
52
52
  referenceRecordSource?: string
53
53
  ): Observable<string>
54
54
 
55
+ /**
56
+ * Try to duplicate the external record from given url. If it suceed, then it will save the record as draft and return its temporary id.
57
+ *
58
+ * @param recordDownloadUrl
59
+ * @returns Observable<string>
60
+ */
61
+ abstract duplicateExternalRecord(
62
+ recordDownloadUrl: string
63
+ ): Observable<string>
64
+
55
65
  /**
56
66
  * @param uniqueIdentifier
57
67
  * @returns Observable<void> Returns when record is deleted
@@ -10,6 +10,9 @@ export * from './lib/record-link.fixtures'
10
10
  export * from './lib/records.fixtures'
11
11
  export * from './lib/repository.fixtures'
12
12
  export * from './lib/user.fixtures'
13
+ export * from './lib/individual.fixtures'
13
14
  export * from './lib/user-feedbacks.fixtures'
14
15
 
15
16
  export * from './lib/editor'
17
+
18
+ export * from './lib/map'
@@ -0,0 +1,61 @@
1
+ import { Individual } from '../../../../../libs/common/domain/src/lib/model/record'
2
+ import { barbieIncOrganizationFixture } from './organisations.fixture'
3
+
4
+ export const createIndividualFixture = (
5
+ overrides: Partial<Individual> = {}
6
+ ): Individual => ({
7
+ firstName: 'Arnaud',
8
+ lastName: 'Demaison',
9
+ email: 'a.demaison@geo2france.fr',
10
+ organization: barbieIncOrganizationFixture(),
11
+ role: 'point_of_contact',
12
+ ...overrides,
13
+ })
14
+
15
+ export const barbieIndividualFixture = (): Individual =>
16
+ createIndividualFixture({
17
+ firstName: 'Barbara',
18
+ lastName: 'Roberts',
19
+ email: 'barbie@email.org',
20
+ organization: barbieIncOrganizationFixture(),
21
+ role: 'point_of_contact',
22
+ })
23
+
24
+ export const someIndividualsFixture = (): Individual[] => [
25
+ barbieIndividualFixture(),
26
+ {
27
+ firstName: 'John',
28
+ lastName: 'Doe',
29
+ email: 'john.doe@email.com',
30
+ organization: barbieIncOrganizationFixture(),
31
+ role: 'owner',
32
+ },
33
+ {
34
+ firstName: 'Alice',
35
+ lastName: 'Smith',
36
+ email: 'alice.smith@workplace.com',
37
+ organization: barbieIncOrganizationFixture(),
38
+ role: 'author',
39
+ },
40
+ {
41
+ firstName: 'Michael',
42
+ lastName: 'Johnson',
43
+ email: 'michael.j@company.org',
44
+ organization: barbieIncOrganizationFixture(),
45
+ role: 'contributor',
46
+ },
47
+ {
48
+ firstName: 'Emma',
49
+ lastName: 'Williams',
50
+ email: 'emma.w@business.io',
51
+ organization: barbieIncOrganizationFixture(),
52
+ role: 'rights_holder',
53
+ },
54
+ {
55
+ firstName: 'David',
56
+ lastName: 'Brown',
57
+ email: 'david.brown@enterprise.net',
58
+ organization: barbieIncOrganizationFixture(),
59
+ role: 'stakeholder',
60
+ },
61
+ ]
@@ -0,0 +1 @@
1
+ export * from './map-context.fixtures'
@@ -0,0 +1,53 @@
1
+ import { polygonFeatureCollectionFixture } from '../geojson.fixtures'
2
+ import { Extent } from 'ol/extent'
3
+ import type {
4
+ MapContext,
5
+ MapContextLayer,
6
+ MapContextView,
7
+ } from '@geospatial-sdk/core'
8
+
9
+ export const mapCtxLayerXyzFixture = (): MapContextLayer => ({
10
+ type: 'xyz',
11
+ url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
12
+ attributions: '<a href="https://www.openstreetmap.org/copyright">',
13
+ })
14
+
15
+ export const mapCtxLayerWmsFixture = (): MapContextLayer => ({
16
+ type: 'wms',
17
+ url: 'https://www.geograndest.fr/geoserver/region-grand-est/ows?REQUEST=GetCapabilities&SERVICE=WMS',
18
+ name: 'commune_actuelle_3857',
19
+ })
20
+
21
+ export const mapCtxLayerWfsFixture = (): MapContextLayer => ({
22
+ type: 'wfs',
23
+ url: 'https://www.geograndest.fr/geoserver/region-grand-est/ows?REQUEST=GetCapabilities&SERVICE=WFS&VERSION=1.1.0',
24
+ featureType: 'ms:commune_actuelle_3857',
25
+ })
26
+
27
+ export const mapCtxLayerGeojsonFixture = (): MapContextLayer => ({
28
+ type: 'geojson',
29
+ data: polygonFeatureCollectionFixture(),
30
+ })
31
+
32
+ export const mapCtxLayerGeojsonRemoteFixture = (): MapContextLayer => ({
33
+ type: 'geojson',
34
+ url: 'https://my.host.com/data/regions.json',
35
+ })
36
+
37
+ export const mapCtxViewFixture = (): MapContextView => ({
38
+ center: [7.75, 48.6],
39
+ zoom: 9,
40
+ })
41
+
42
+ export const mapCtxFixture = (): MapContext => ({
43
+ layers: [
44
+ mapCtxLayerXyzFixture(),
45
+ mapCtxLayerWmsFixture(),
46
+ mapCtxLayerGeojsonFixture(),
47
+ ],
48
+ view: mapCtxViewFixture(),
49
+ })
50
+
51
+ export const mapCtxExtentFixture = (): Extent => [
52
+ 171083.69713494915, 6246047.945419401, 476970.39956295764, 6631079.362882684,
53
+ ]
@@ -28,6 +28,19 @@ export const barbieUserFixture = (): UserModel =>
28
28
  'https://www.gravatar.com/avatar/dbdffd183622800bcf8587328daf43a6?d=mp',
29
29
  })
30
30
 
31
+ export const johnDoeUserFixture = (): UserModel =>
32
+ createUserFixture({
33
+ id: '12345',
34
+ profile: 'User',
35
+ username: 'johndoe',
36
+ name: 'John',
37
+ surname: 'Doe',
38
+ email: 'johndoe@email.com',
39
+ organisation: 'Doe Enterprises',
40
+ profileIcon:
41
+ 'https://www.gravatar.com/avatar/5f6d74eabcb57186a12f7c8ba40b4c9f?d=mp',
42
+ })
43
+
31
44
  export const ghostUserFixture = (): UserModel =>
32
45
  createUserFixture({
33
46
  id: '161',
@@ -1,6 +1,9 @@
1
1
  import { InjectionToken, NgModule } from '@angular/core'
2
2
  import { SiteTitleComponent } from './site-title/site-title.component'
3
- import { UiCatalogModule } from '../../../../../libs/ui/catalog/src'
3
+ import {
4
+ OrganisationsFilterComponent,
5
+ UiCatalogModule,
6
+ } from '../../../../../libs/ui/catalog/src'
4
7
  import {
5
8
  GroupsApiService,
6
9
  SearchApiService,
@@ -64,6 +67,7 @@ const organizationsServiceFactory = (
64
67
  UtilI18nModule,
65
68
  TranslateModule.forChild(),
66
69
  UiElementsModule,
70
+ OrganisationsFilterComponent,
67
71
  ],
68
72
  exports: [SiteTitleComponent, SourceLabelComponent, OrganisationsComponent],
69
73
  providers: [
@@ -1,7 +1,10 @@
1
1
  import { NgModule } from '@angular/core'
2
2
  import { CommonModule } from '@angular/common'
3
3
  import { FeatureMapModule } from '../../../../../libs/feature/map/src'
4
- import { UiMapModule } from '../../../../../libs/ui/map/src'
4
+ import {
5
+ FeatureDetailComponent,
6
+ MapContainerComponent,
7
+ } from '../../../../../libs/ui/map/src'
5
8
  import { GeoTableViewComponent } from './geo-table-view/geo-table-view.component'
6
9
  import { FigureContainerComponent } from './figure/figure-container/figure-container.component'
7
10
  import {
@@ -19,7 +22,6 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
19
22
  imports: [
20
23
  CommonModule,
21
24
  FeatureMapModule,
22
- UiMapModule,
23
25
  UiDatavizModule,
24
26
  TableComponent,
25
27
  UiWidgetsModule,
@@ -27,6 +29,8 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
27
29
  ChartComponent,
28
30
  UiInputsModule,
29
31
  PopupAlertComponent,
32
+ FeatureDetailComponent,
33
+ MapContainerComponent,
30
34
  ],
31
35
  declarations: [
32
36
  GeoTableViewComponent,
@@ -1,14 +1,17 @@
1
1
  <div class="flex flex-row h-full overflow-auto">
2
2
  <gn-ui-table
3
+ #table
3
4
  class="w-1/2 overflow-auto"
4
5
  [data]="tableData"
5
6
  [activeId]="selectionId"
6
7
  (selected)="onTableSelect($event)"
7
8
  ></gn-ui-table>
8
- <gn-ui-map-context
9
+ <gn-ui-map-container
10
+ #mapContainer
9
11
  class="w-1/2 h-full"
10
12
  [context]="mapContext"
11
- ></gn-ui-map-context>
13
+ (featuresClick)="onMapFeatureSelect($event)"
14
+ ></gn-ui-map-container>
12
15
  <gn-ui-feature-detail
13
16
  style="width: 300px"
14
17
  class="p-3 shrink-0 overflow-auto"