geonetwork-ui 2.3.0-dev.139106e0 → 2.3.0-dev.16f429aa

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 (248) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +2 -2
  2. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
  3. package/esm2022/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.mjs +1 -1
  4. package/esm2022/libs/api/repository/src/lib/gn4/auth/gravatar.service.mjs +12 -1
  5. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +36 -3
  6. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +21 -7
  7. package/esm2022/libs/common/domain/src/lib/model/record/index.mjs +2 -1
  8. package/esm2022/libs/common/domain/src/lib/model/record/user-feedbacks.model.mjs +2 -0
  9. package/esm2022/libs/common/domain/src/lib/model/user/index.mjs +2 -0
  10. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  11. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
  12. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +35 -2
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +64 -0
  14. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +15 -0
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +104 -0
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +25 -6
  17. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
  18. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +23 -1
  19. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +73 -20
  20. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
  21. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
  22. package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +1 -1
  23. package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +37 -8
  24. package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +6 -2
  25. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
  26. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +4 -4
  27. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +4 -3
  28. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +22 -4
  29. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +37 -10
  30. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +22 -7
  31. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +50 -17
  32. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +18 -3
  33. package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +2 -2
  34. package/esm2022/libs/feature/search/src/index.mjs +2 -1
  35. package/esm2022/libs/feature/search/src/lib/results-layout/results-layout.component.mjs +1 -1
  36. package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +1 -1
  37. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +1 -1
  38. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +1 -1
  39. package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +1 -1
  40. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -2
  41. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +2 -2
  42. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +16 -3
  43. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +2 -2
  44. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +99 -36
  45. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -7
  46. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +59 -0
  47. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +60 -0
  48. package/esm2022/libs/ui/inputs/src/index.mjs +16 -15
  49. package/esm2022/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.mjs +4 -3
  50. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +22 -0
  51. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +7 -5
  52. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +19 -8
  53. package/esm2022/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +29 -0
  54. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +27 -4
  55. package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +21 -3
  56. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +14 -11
  57. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  58. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +76 -0
  59. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +42 -18
  60. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +3 -8
  61. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -2
  62. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +22 -1
  63. package/esm2022/translations/de.json +23 -0
  64. package/esm2022/translations/en.json +23 -0
  65. package/esm2022/translations/es.json +23 -0
  66. package/esm2022/translations/fr.json +23 -0
  67. package/esm2022/translations/it.json +23 -0
  68. package/esm2022/translations/nl.json +23 -0
  69. package/esm2022/translations/pt.json +23 -0
  70. package/fesm2022/geonetwork-ui.mjs +1845 -811
  71. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  72. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  73. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts +1 -0
  74. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts.map +1 -1
  75. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts +1 -0
  76. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts.map +1 -1
  77. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +6 -2
  78. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
  79. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -6
  80. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  81. package/libs/common/domain/src/lib/model/record/index.d.ts +1 -0
  82. package/libs/common/domain/src/lib/model/record/index.d.ts.map +1 -1
  83. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts +15 -0
  84. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts.map +1 -0
  85. package/libs/common/domain/src/lib/model/user/index.d.ts +2 -0
  86. package/libs/common/domain/src/lib/model/user/index.d.ts.map +1 -0
  87. package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
  88. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  89. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +3 -1
  90. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  91. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
  92. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
  93. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +8 -0
  94. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +1 -0
  95. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts +21 -0
  96. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -0
  97. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -1
  98. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  99. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  100. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +10 -5
  101. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
  102. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +7 -0
  103. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
  104. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
  105. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
  106. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  107. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  108. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +40 -6
  109. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  110. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +24 -4
  111. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  112. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +14 -4
  113. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  114. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +8 -5
  115. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  116. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +12 -9
  117. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  118. package/libs/feature/search/src/index.d.ts +1 -0
  119. package/libs/feature/search/src/index.d.ts.map +1 -1
  120. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts +3 -3
  121. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  122. package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts.map +1 -1
  123. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  124. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +3 -1
  125. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  126. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +24 -4
  127. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  128. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +16 -15
  129. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  130. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +11 -0
  131. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +1 -0
  132. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +21 -0
  133. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -0
  134. package/libs/ui/inputs/src/index.d.ts +15 -14
  135. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  136. package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts +1 -1
  137. package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts.map +1 -1
  138. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts +9 -0
  139. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -0
  140. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +1 -1
  141. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  142. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts +2 -1
  143. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
  144. package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts +12 -0
  145. package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts.map +1 -0
  146. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +7 -1
  147. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  148. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +5 -1
  149. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
  150. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -35
  151. package/libs/ui/layout/src/index.d.ts +1 -0
  152. package/libs/ui/layout/src/index.d.ts.map +1 -1
  153. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +25 -0
  154. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -0
  155. package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts +13 -6
  156. package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts.map +1 -1
  157. package/libs/ui/layout/src/lib/ui-layout.module.d.ts +4 -5
  158. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  159. package/libs/util/shared/src/lib/links/link-utils.d.ts +18 -0
  160. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  161. package/package.json +2 -2
  162. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +1 -1
  163. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +1 -4
  164. package/src/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.ts +1 -0
  165. package/src/libs/api/repository/src/lib/gn4/auth/gravatar.service.ts +12 -1
  166. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +51 -1
  167. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +40 -7
  168. package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
  169. package/src/libs/common/domain/src/lib/model/record/user-feedbacks.model.ts +15 -0
  170. package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -0
  171. package/src/libs/common/fixtures/src/index.ts +8 -6
  172. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +8 -0
  173. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
  174. package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
  175. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +51 -1
  176. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +0 -0
  177. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
  178. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
  179. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css +0 -0
  180. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.html +4 -0
  181. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.ts +15 -0
  182. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +0 -0
  183. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +14 -0
  184. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +143 -0
  185. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +38 -33
  186. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +21 -0
  187. package/src/libs/feature/editor/src/lib/fields.config.ts +22 -0
  188. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +7 -0
  189. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +32 -18
  190. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +72 -17
  191. package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +7 -0
  192. package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +34 -8
  193. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +5 -1
  194. package/src/libs/feature/record/src/lib/feature-record.module.ts +5 -2
  195. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
  196. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +51 -6
  197. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +82 -7
  198. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +48 -8
  199. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +79 -24
  200. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +40 -10
  201. package/src/libs/feature/router/src/lib/default/state/router.effects.ts +2 -2
  202. package/src/libs/feature/search/src/index.ts +1 -0
  203. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -2
  204. package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +2 -1
  205. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +1 -1
  206. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +38 -20
  207. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +12 -0
  208. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +26 -10
  209. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +126 -30
  210. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -2
  211. package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +54 -0
  212. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.css +0 -0
  213. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +75 -0
  214. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +62 -0
  215. package/src/libs/ui/inputs/src/index.ts +15 -14
  216. package/src/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.ts +3 -0
  217. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +3 -0
  218. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +11 -0
  219. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +16 -0
  220. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +8 -1
  221. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -0
  222. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +14 -0
  223. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.css +6 -0
  224. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.html +26 -0
  225. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.ts +32 -0
  226. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +2 -1
  227. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +29 -0
  228. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +2 -1
  229. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +17 -1
  230. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  231. package/src/libs/ui/layout/src/index.ts +1 -0
  232. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +23 -0
  233. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +20 -0
  234. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +84 -0
  235. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +8 -4
  236. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +4 -4
  237. package/src/libs/ui/layout/src/lib/carousel/carousel.component.ts +45 -15
  238. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -2
  239. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +1 -1
  240. package/src/libs/util/shared/src/lib/links/link-utils.ts +21 -0
  241. package/translations/de.json +23 -0
  242. package/translations/en.json +23 -0
  243. package/translations/es.json +23 -0
  244. package/translations/fr.json +23 -0
  245. package/translations/it.json +23 -0
  246. package/translations/nl.json +23 -0
  247. package/translations/pt.json +23 -0
  248. package/translations/sk.json +23 -0
@@ -4,8 +4,7 @@
4
4
  (valueChange)="urlChange.next($event)"
5
5
  [hint]="'map.ogc.urlInput.hint' | translate"
6
6
  class="w-96"
7
- >
8
- </gn-ui-text-input>
7
+ ></gn-ui-text-input>
9
8
  </div>
10
9
 
11
10
  <div *ngIf="errorMessage" class="text-red-500 mt-2">
@@ -16,21 +15,36 @@
16
15
  <p class="loading-message" translate>map.loading.service</p>
17
16
  </div>
18
17
 
19
- <div *ngIf="!loading && layers.length > 0">
20
- <h2 class="font-bold" translate>map.layers.available</h2>
21
- <ng-container *ngFor="let layer of layers">
22
- <div class="flex items-center justify-between my-2 layer-item-tree">
23
- <p class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap">
24
- {{ layer }}
25
- </p>
26
- <gn-ui-button
27
- class="layer-add-btn"
28
- type="primary"
29
- (buttonClick)="addLayer(layer)"
30
- extraClass="text-sm !px-2 !py-1"
31
- translate
32
- ><span translate> map.layer.add </span></gn-ui-button
18
+ <ng-container *ngFor="let layer of layers">
19
+ <div
20
+ *ngIf="shouldDisplayLayer(layer)"
21
+ class="flex items-center justify-between my-2 layer-item-tree"
22
+ >
23
+ <div class="flex flex-col items-start w-full">
24
+ <p
25
+ class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap"
26
+ [title]="layer.name"
33
27
  >
28
+ {{ layer.name }}
29
+ </p>
30
+ <div class="flex justify-between items-center w-full">
31
+ <gn-ui-dropdown-selector
32
+ [title]="'Add Layer As' | translate"
33
+ [choices]="getLayerChoices(layer)"
34
+ (selectValue)="onLayerTypeSelect(layer.name, $event)"
35
+ [selected]="selectedLayerTypes[layer.name]"
36
+ extraBtnClass="w-6 h-5 !text-sm !px-2 !py-1"
37
+ ></gn-ui-dropdown-selector>
38
+ <gn-ui-button
39
+ class="layer-add-btn"
40
+ type="primary"
41
+ (buttonClick)="addLayer(layer.name, selectedLayerTypes[layer.name])"
42
+ extraClass="text-sm !px-2 !py-1"
43
+ translate
44
+ >
45
+ <span translate>map.layer.add</span>
46
+ </gn-ui-button>
47
+ </div>
34
48
  </div>
35
- </ng-container>
36
- </div>
49
+ </div>
50
+ </ng-container>
@@ -14,7 +14,7 @@ import {
14
14
  MapContextLayerTypeEnum,
15
15
  } from '../map-context/map-context.model'
16
16
  import { TranslateModule } from '@ngx-translate/core'
17
- import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
17
+ import { DropdownChoice, UiInputsModule } from '../../../../../../libs/ui/inputs/src'
18
18
  import { CommonModule } from '@angular/common'
19
19
  import { MapLayer } from '../+state/map.models'
20
20
 
@@ -30,18 +30,16 @@ export class AddLayerFromOgcApiComponent implements OnInit {
30
30
  @Output() layerAdded = new EventEmitter<MapLayer>()
31
31
 
32
32
  urlChange = new Subject<string>()
33
- layerUrl = ''
34
33
  loading = false
35
- layers: string[] = []
36
- ogcEndpoint: OgcApiEndpoint = null
34
+ layers: any[] = []
37
35
  errorMessage: string | null = null
36
+ selectedLayerTypes: { [key: string]: DropdownChoice['value'] } = {}
38
37
 
39
38
  constructor(private changeDetectorRef: ChangeDetectorRef) {}
40
39
 
41
40
  ngOnInit() {
42
41
  this.urlChange.pipe(debounceTime(700)).subscribe(() => {
43
42
  this.loadLayers()
44
- this.changeDetectorRef.detectChanges() // manually trigger change detection
45
43
  })
46
44
  }
47
45
 
@@ -49,14 +47,13 @@ export class AddLayerFromOgcApiComponent implements OnInit {
49
47
  this.errorMessage = null
50
48
  try {
51
49
  this.loading = true
52
- if (this.ogcUrl.trim() === '') {
50
+ if (!this.ogcUrl.trim()) {
53
51
  this.layers = []
54
52
  return
55
53
  }
56
- this.ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
57
-
58
- // Currently only supports feature collections
59
- this.layers = await this.ogcEndpoint.featureCollections
54
+ const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
55
+ this.layers = await ogcEndpoint.allCollections
56
+ this.setDefaultLayerTypes()
60
57
  } catch (error) {
61
58
  const err = error as Error
62
59
  this.layers = []
@@ -67,14 +64,72 @@ export class AddLayerFromOgcApiComponent implements OnInit {
67
64
  }
68
65
  }
69
66
 
70
- async addLayer(layer: string) {
71
- this.layerUrl = await this.ogcEndpoint.getCollectionItemsUrl(layer)
67
+ setDefaultLayerTypes() {
68
+ this.layers.forEach((layer) => {
69
+ const choices = this.getLayerChoices(layer)
70
+ if (choices.length > 0) {
71
+ this.selectedLayerTypes[layer.name] = choices[0].value
72
+ }
73
+ })
74
+ }
72
75
 
73
- const layerToAdd: MapContextLayerModel = {
74
- name: layer,
75
- url: this.layerUrl,
76
- type: MapContextLayerTypeEnum.OGCAPI,
76
+ getLayerChoices(layer: any) {
77
+ const choices = []
78
+ if (layer.hasRecords) {
79
+ choices.push({ label: 'Records', value: 'record' })
80
+ }
81
+ if (layer.hasFeatures) {
82
+ choices.push({ label: 'Features', value: 'features' })
83
+ }
84
+ if (layer.hasVectorTiles) {
85
+ choices.push({ label: 'Vector Tiles', value: 'vectorTiles' })
86
+ }
87
+ if (layer.hasMapTiles) {
88
+ choices.push({ label: 'Map Tiles', value: 'mapTiles' })
89
+ }
90
+ return choices
91
+ }
92
+
93
+ shouldDisplayLayer(layer: any) {
94
+ return (
95
+ layer.hasRecords ||
96
+ layer.hasFeatures ||
97
+ layer.hasVectorTiles ||
98
+ layer.hasMapTiles
99
+ )
100
+ }
101
+
102
+ onLayerTypeSelect(layerName: string, selectedType: any) {
103
+ this.selectedLayerTypes[layerName] = selectedType
104
+ ? selectedType
105
+ : this.getLayerChoices(layerName)[0]?.value
106
+ }
107
+
108
+ async addLayer(layer: string, layerType: any) {
109
+ try {
110
+ const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
111
+ let layerUrl: string
112
+
113
+ if (layerType === 'vectorTiles') {
114
+ layerUrl = await ogcEndpoint.getVectorTilesetUrl(layer)
115
+ } else if (layerType === 'mapTiles') {
116
+ layerUrl = await ogcEndpoint.getMapTilesetUrl(layer)
117
+ } else {
118
+ layerUrl = await ogcEndpoint.getCollectionItemsUrl(layer, {
119
+ outputFormat: 'json',
120
+ })
121
+ }
122
+
123
+ const layerToAdd: MapContextLayerModel = {
124
+ name: layer,
125
+ url: layerUrl,
126
+ type: MapContextLayerTypeEnum.OGCAPI,
127
+ layerType: layerType,
128
+ }
129
+ this.layerAdded.emit({ ...layerToAdd, title: layer })
130
+ } catch (error) {
131
+ const err = error as Error
132
+ console.error('Error adding layer:', err.message)
77
133
  }
78
- this.layerAdded.emit({ ...layerToAdd, title: layer })
79
134
  }
80
135
  }
@@ -20,29 +20,35 @@ export interface MapContextLayerWmsModel {
20
20
  type: 'wms'
21
21
  url: string
22
22
  name: string
23
+ attributions?: string
23
24
  }
24
25
 
25
26
  export interface MapContextLayerWmtsModel {
26
27
  type: 'wmts'
27
28
  url: string
28
29
  name: string
30
+ attributions?: string
29
31
  }
30
32
 
31
33
  interface MapContextLayerWfsModel {
32
34
  type: 'wfs'
33
35
  url: string
34
36
  name: string
37
+ attributions?: string
35
38
  }
36
39
 
37
40
  export interface MapContextLayerOgcapiModel {
38
41
  type: 'ogcapi'
39
42
  url: string
40
43
  name: string
44
+ layerType: 'feature' | 'vectorTiles' | 'mapTiles' | 'record'
45
+ attributions?: string
41
46
  }
42
47
 
43
48
  interface LayerXyzModel {
44
49
  type: 'xyz'
45
50
  name?: string
51
+ attributions?: string
46
52
  }
47
53
  interface LayerXyzModelWithUrl extends LayerXyzModel {
48
54
  url: string
@@ -58,6 +64,7 @@ export type MapContextLayerXyzModel =
58
64
 
59
65
  interface LayerGeojson {
60
66
  type: 'geojson'
67
+ attributions?: string
61
68
  }
62
69
  interface LayerGeojsonWithUrl extends LayerGeojson {
63
70
  url: string
@@ -25,6 +25,10 @@ import WMTS from 'ol/source/WMTS'
25
25
  import { Geometry } from 'ol/geom'
26
26
  import Feature from 'ol/Feature'
27
27
  import { WfsEndpoint, WmtsEndpoint } from '@camptocamp/ogc-client'
28
+ import OGCVectorTile from 'ol/source/OGCVectorTile.js'
29
+ import { MVT } from 'ol/format'
30
+ import VectorTileLayer from 'ol/layer/VectorTile'
31
+ import OGCMapTile from 'ol/source/OGCMapTile.js'
28
32
 
29
33
  export const DEFAULT_BASELAYER_CONTEXT: MapContextLayerXyzModel = {
30
34
  type: MapContextLayerTypeEnum.XYZ,
@@ -33,6 +37,7 @@ export const DEFAULT_BASELAYER_CONTEXT: MapContextLayerXyzModel = {
33
37
  `https://b.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png`,
34
38
  `https://c.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png`,
35
39
  ],
40
+ attributions: `<span>© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/">Carto</a></span>`,
36
41
  }
37
42
 
38
43
  export const DEFAULT_VIEW: MapContextViewModel = {
@@ -78,19 +83,37 @@ export class MapContextService {
78
83
  const style = this.styleService.styles.default
79
84
  switch (type) {
80
85
  case MapContextLayerTypeEnum.OGCAPI:
81
- return new VectorLayer({
82
- source: new VectorSource({
83
- format: new GeoJSON(),
84
- url: layerModel.url,
85
- }),
86
- style,
87
- })
88
-
86
+ if (layerModel.layerType === 'vectorTiles') {
87
+ return new VectorTileLayer({
88
+ source: new OGCVectorTile({
89
+ url: layerModel.url,
90
+ format: new MVT(),
91
+ attributions: layerModel.attributions,
92
+ }),
93
+ })
94
+ } else if (layerModel.layerType === 'mapTiles') {
95
+ return new TileLayer({
96
+ source: new OGCMapTile({
97
+ url: layerModel.url,
98
+ attributions: layerModel.attributions,
99
+ }),
100
+ })
101
+ } else {
102
+ return new VectorLayer({
103
+ source: new VectorSource({
104
+ format: new GeoJSON(),
105
+ url: layerModel.url,
106
+ attributions: layerModel.attributions,
107
+ }),
108
+ style,
109
+ })
110
+ }
89
111
  case MapContextLayerTypeEnum.XYZ:
90
112
  return new TileLayer({
91
113
  source: new XYZ({
92
114
  url: 'url' in layerModel ? layerModel.url : undefined,
93
115
  urls: 'urls' in layerModel ? layerModel.urls : undefined,
116
+ attributions: layerModel.attributions,
94
117
  }),
95
118
  })
96
119
  case MapContextLayerTypeEnum.WMS:
@@ -99,6 +122,7 @@ export class MapContextService {
99
122
  url: layerModel.url,
100
123
  params: { LAYERS: layerModel.name },
101
124
  gutter: 20,
125
+ attributions: layerModel.attributions,
102
126
  }),
103
127
  })
104
128
  case MapContextLayerTypeEnum.WMTS: {
@@ -123,6 +147,7 @@ export class MapContextService {
123
147
  tileGrid,
124
148
  projection: matrixSet.crs,
125
149
  dimensions,
150
+ attributions: layerModel.attributions,
126
151
  })
127
152
  )
128
153
  })
@@ -148,6 +173,7 @@ export class MapContextService {
148
173
  })
149
174
  },
150
175
  strategy: bboxStrategy,
176
+ attributions: layerModel.attributions,
151
177
  })
152
178
  )
153
179
  })
@@ -26,6 +26,7 @@ import {
26
26
  MapContextLayerWmsModel,
27
27
  } from '../map-context/map-context.model'
28
28
  import Collection from 'ol/Collection'
29
+ import { defaults as defaultControls } from 'ol/control.js'
29
30
  import MapBrowserEvent from 'ol/MapBrowserEvent'
30
31
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
31
32
  import { ProxyService } from '../../../../../../libs/util/shared/src'
@@ -47,7 +48,10 @@ export class MapUtilsService {
47
48
 
48
49
  createEmptyMap(): Map {
49
50
  return new Map({
50
- controls: [],
51
+ controls: defaultControls({
52
+ attribution: true,
53
+ attributionOptions: { collapsible: false },
54
+ }),
51
55
  pixelRatio: 1,
52
56
  })
53
57
  }
@@ -11,7 +11,10 @@ import { MdViewFacade } from './state'
11
11
  import { MdViewEffects } from './state/mdview.effects'
12
12
  import { MapViewComponent } from './map-view/map-view.component'
13
13
  import { DataViewComponent } from './data-view/data-view.component'
14
- import { MD_VIEW_FEATURE_STATE_KEY, reducer } from './state/mdview.reducer'
14
+ import {
15
+ METADATA_VIEW_FEATURE_STATE_KEY,
16
+ reducer,
17
+ } from './state/mdview.reducer'
15
18
  import { MatTabsModule } from '@angular/material/tabs'
16
19
  import { MatIconModule } from '@angular/material/icon'
17
20
  import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
@@ -35,7 +38,7 @@ import { DataViewShareComponent } from './data-view-share/data-view-share.compon
35
38
  ],
36
39
  imports: [
37
40
  CommonModule,
38
- StoreModule.forFeature(MD_VIEW_FEATURE_STATE_KEY, reducer),
41
+ StoreModule.forFeature(METADATA_VIEW_FEATURE_STATE_KEY, reducer),
39
42
  EffectsModule.forFeature([MdViewEffects]),
40
43
  UiLayoutModule,
41
44
  FeatureMapModule,
@@ -196,7 +196,8 @@ export class MapViewComponent implements OnInit, OnDestroy {
196
196
  } else if (
197
197
  (link.type === 'service' &&
198
198
  (link.accessServiceProtocol === 'wfs' ||
199
- link.accessServiceProtocol === 'esriRest')) ||
199
+ link.accessServiceProtocol === 'esriRest' ||
200
+ link.accessServiceProtocol === 'ogcFeatures')) ||
200
201
  link.type === 'download'
201
202
  ) {
202
203
  return this.dataService.readAsGeoJson(link).pipe(
@@ -1,7 +1,13 @@
1
1
  import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
2
2
  import { createAction, props } from '@ngrx/store'
3
- import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
3
+ import {
4
+ CatalogRecord,
5
+ UserFeedback,
6
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
4
7
 
8
+ /*
9
+ Metadata actions
10
+ */
5
11
  export const loadFullMetadata = createAction(
6
12
  '[Metadata view] Load full metadata',
7
13
  props<{ uuid: string }>()
@@ -12,24 +18,63 @@ export const setIncompleteMetadata = createAction(
12
18
  props<{ incomplete: Partial<CatalogRecord> }>()
13
19
  )
14
20
 
15
- export const loadFullSuccess = createAction(
16
- '[Metadata view] Load full success',
21
+ export const loadFullMetadataSuccess = createAction(
22
+ '[Metadata view] Load full metadata success',
17
23
  props<{ full: CatalogRecord }>()
18
24
  )
19
25
 
20
- export const loadFullFailure = createAction(
21
- '[Metadata view] Load full failure',
26
+ export const loadFullMetadataFailure = createAction(
27
+ '[Metadata view] Load full metadata failure',
22
28
  props<{ otherError?: string; notFound?: boolean }>()
23
29
  )
24
30
 
31
+ export const closeMetadata = createAction('[Metadata view] close')
32
+
33
+ /*
34
+ Related actions
35
+ */
25
36
  export const setRelated = createAction(
26
37
  '[Metadata view] Set related records',
27
38
  props<{ related: CatalogRecord[] }>()
28
39
  )
29
40
 
41
+ /*
42
+ ChartConfig actions
43
+ */
30
44
  export const setChartConfig = createAction(
31
45
  '[Metadata view] Set chart config',
32
46
  props<{ chartConfig: DatavizConfigurationModel }>()
33
47
  )
34
48
 
35
- export const close = createAction('[Metadata view] close')
49
+ /*
50
+ User Feedbacks actions
51
+ */
52
+ export const addUserFeedback = createAction(
53
+ '[Metadata view] Add UserFeedback',
54
+ props<{ userFeedback: UserFeedback }>()
55
+ )
56
+
57
+ export const addUserFeedbackSuccess = createAction(
58
+ '[Metadata view] Add UserFeedback Success',
59
+ props<{ datasetUuid: string }>()
60
+ )
61
+
62
+ export const addUserFeedbackFailure = createAction(
63
+ '[Metadata view] Add UserFeedback Failure',
64
+ props<{ otherError?: string; notFound?: boolean }>()
65
+ )
66
+
67
+ export const loadUserFeedbacks = createAction(
68
+ '[Metadata view] Load UserFeedbacks',
69
+ props<{ datasetUuid: string }>()
70
+ )
71
+
72
+ export const loadUserFeedbacksSuccess = createAction(
73
+ '[Metadata view] Load UserFeedbacks Success',
74
+ props<{ userFeedbacks: UserFeedback[] }>()
75
+ )
76
+
77
+ export const loadUserFeedbacksFailure = createAction(
78
+ '[Metadata view] Load UserFeedbacks Failure',
79
+ props<{ otherError?: string; notFound?: boolean }>()
80
+ )
@@ -1,18 +1,23 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { Actions, createEffect, ofType } from '@ngrx/effects'
3
- import { of } from 'rxjs'
3
+ import { exhaustMap, mergeMap, of } from 'rxjs'
4
4
  import { catchError, map, switchMap } from 'rxjs/operators'
5
5
  import * as MdViewActions from './mdview.actions'
6
6
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
7
+ import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
7
8
 
8
9
  @Injectable()
9
10
  export class MdViewEffects {
10
11
  constructor(
11
12
  private actions$: Actions,
12
- private recordsRepository: RecordsRepositoryInterface
13
+ private recordsRepository: RecordsRepositoryInterface,
14
+ private platformServiceInterface: PlatformServiceInterface
13
15
  ) {}
14
16
 
15
- loadFull$ = createEffect(() =>
17
+ /*
18
+ Metadata effects
19
+ */
20
+ loadFullMetadata$ = createEffect(() =>
16
21
  this.actions$.pipe(
17
22
  ofType(MdViewActions.loadFullMetadata),
18
23
  switchMap(({ uuid }) =>
@@ -20,19 +25,22 @@ export class MdViewEffects {
20
25
  ),
21
26
  map((record) => {
22
27
  if (record === null) {
23
- return MdViewActions.loadFullFailure({ notFound: true })
28
+ return MdViewActions.loadFullMetadataFailure({ notFound: true })
24
29
  }
25
- return MdViewActions.loadFullSuccess({ full: record })
30
+ return MdViewActions.loadFullMetadataSuccess({ full: record })
26
31
  }),
27
32
  catchError((error) =>
28
- of(MdViewActions.loadFullFailure({ otherError: error.message }))
33
+ of(MdViewActions.loadFullMetadataFailure({ otherError: error.message }))
29
34
  )
30
35
  )
31
36
  )
32
37
 
38
+ /*
39
+ Related effects
40
+ */
33
41
  loadRelatedRecords$ = createEffect(() =>
34
42
  this.actions$.pipe(
35
- ofType(MdViewActions.loadFullSuccess),
43
+ ofType(MdViewActions.loadFullMetadataSuccess),
36
44
  switchMap(({ full }) => this.recordsRepository.getSimilarRecords(full)),
37
45
  map((related) => {
38
46
  return MdViewActions.setRelated({ related })
@@ -40,4 +48,71 @@ export class MdViewEffects {
40
48
  catchError((error) => of(MdViewActions.setRelated({ related: null })))
41
49
  )
42
50
  )
51
+
52
+ /*
53
+ UserFeedback effects
54
+ */
55
+ loadUserFeedbacks$ = createEffect(() =>
56
+ this.actions$.pipe(
57
+ ofType(MdViewActions.loadUserFeedbacks),
58
+ exhaustMap(({ datasetUuid }) =>
59
+ this.platformServiceInterface.getUserFeedbacks(datasetUuid).pipe(
60
+ map((userFeedbacks) =>
61
+ MdViewActions.loadUserFeedbacksSuccess({ userFeedbacks })
62
+ ),
63
+ catchError((error) =>
64
+ of(
65
+ MdViewActions.loadUserFeedbacksFailure({
66
+ otherError: error.message,
67
+ })
68
+ )
69
+ )
70
+ )
71
+ )
72
+ )
73
+ )
74
+
75
+ reloadUserFeedbacks$ = createEffect(() =>
76
+ this.actions$.pipe(
77
+ ofType(MdViewActions.addUserFeedbackSuccess),
78
+ exhaustMap(({ datasetUuid }) =>
79
+ this.platformServiceInterface.getUserFeedbacks(datasetUuid).pipe(
80
+ map((userFeedbacks) =>
81
+ MdViewActions.loadUserFeedbacksSuccess({ userFeedbacks })
82
+ ),
83
+ catchError((error) =>
84
+ of(
85
+ MdViewActions.loadUserFeedbacksFailure({
86
+ otherError: error.message,
87
+ })
88
+ )
89
+ )
90
+ )
91
+ )
92
+ )
93
+ )
94
+
95
+ addUserFeedback$ = createEffect(() =>
96
+ this.actions$.pipe(
97
+ ofType(MdViewActions.addUserFeedback),
98
+ mergeMap((action) =>
99
+ this.platformServiceInterface
100
+ .postUserFeedbacks(action.userFeedback)
101
+ .pipe(
102
+ map(() =>
103
+ MdViewActions.addUserFeedbackSuccess({
104
+ datasetUuid: action.userFeedback.metadataUUID,
105
+ })
106
+ ),
107
+ catchError((error) => {
108
+ return of(
109
+ MdViewActions.addUserFeedbackFailure({
110
+ otherError: error.message,
111
+ })
112
+ )
113
+ })
114
+ )
115
+ )
116
+ )
117
+ )
43
118
  }