geonetwork-ui 2.6.0-dev.01d2b5fc0 → 2.6.0-dev.025a2f85d

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 (278) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/base.converter.mjs +1 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +8 -3
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +3 -3
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +4 -4
  5. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -10
  6. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +18 -11
  7. package/esm2022/libs/api/repository/src/lib/gn4/gn4.provider.mjs +7 -1
  8. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  9. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -3
  10. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  11. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -1
  12. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +7 -3
  13. package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +2 -3
  14. package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +1 -1
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +5 -5
  16. package/esm2022/libs/feature/map/src/lib/map-state-container/map-state-container.component.mjs +2 -2
  17. package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +2 -4
  18. package/esm2022/libs/feature/record/src/index.mjs +1 -2
  19. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +5 -9
  20. package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +7 -11
  21. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +45 -14
  22. package/esm2022/libs/feature/record/src/lib/record-meta/record-meta.component.mjs +1 -1
  23. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +8 -5
  24. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -6
  25. package/esm2022/libs/feature/router/src/lib/default/constants.mjs +3 -1
  26. package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
  27. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +10 -2
  28. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +9 -3
  29. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +8 -7
  30. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -15
  31. package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -2
  32. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +26 -10
  33. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
  34. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  35. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +27 -6
  36. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +22 -6
  37. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +3 -3
  38. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +163 -0
  39. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +29 -7
  40. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  41. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  42. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +8 -5
  43. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  44. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -2
  45. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +161 -0
  46. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
  47. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  48. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +4 -3
  49. package/esm2022/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.mjs +43 -3
  50. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  51. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +15 -3
  52. package/esm2022/libs/ui/map/src/index.mjs +2 -1
  53. package/esm2022/libs/ui/map/src/lib/components/map-container/map-container.component.mjs +14 -3
  54. package/esm2022/libs/ui/map/src/lib/components/map-legend/map-legend.component.mjs +5 -1
  55. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +79 -0
  56. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +5 -4
  57. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  58. package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +6 -2
  59. package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +4 -1
  60. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +30 -2
  61. package/esm2022/libs/util/shared/src/index.mjs +2 -1
  62. package/esm2022/libs/util/shared/src/lib/gn-ui-version.mjs +6 -0
  63. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -1
  64. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +33 -24
  65. package/esm2022/translations/de.json +34 -3
  66. package/esm2022/translations/en.json +35 -4
  67. package/esm2022/translations/es.json +34 -3
  68. package/esm2022/translations/fr.json +36 -5
  69. package/esm2022/translations/it.json +34 -4
  70. package/esm2022/translations/nl.json +34 -3
  71. package/esm2022/translations/pt.json +34 -3
  72. package/fesm2022/geonetwork-ui.mjs +1367 -531
  73. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  74. package/libs/api/metadata-converter/src/lib/base.converter.d.ts.map +1 -1
  75. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  76. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  77. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +1 -0
  78. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  79. package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts.map +1 -1
  80. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +23 -4
  81. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  82. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  83. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  84. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +2 -2
  85. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  86. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -1
  87. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +6 -6
  88. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -1
  89. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  90. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
  91. package/libs/feature/record/src/index.d.ts +0 -1
  92. package/libs/feature/record/src/index.d.ts.map +1 -1
  93. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +9 -1
  94. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  95. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +2 -3
  96. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
  97. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +1 -2
  98. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
  99. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +7 -2
  100. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  101. package/libs/feature/record/src/lib/record-meta/record-meta.component.d.ts +2 -2
  102. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +3 -1
  103. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  104. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
  105. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  106. package/libs/feature/router/src/lib/default/constants.d.ts +2 -0
  107. package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
  108. package/libs/feature/router/src/lib/default/router.config.d.ts +2 -0
  109. package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
  110. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  111. package/libs/feature/router/src/lib/default/state/router.facade.d.ts +5 -0
  112. package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
  113. package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
  114. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  115. package/libs/feature/search/src/lib/record-url.token.d.ts +3 -1
  116. package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -1
  117. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +5 -3
  118. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  119. package/libs/ui/elements/src/index.d.ts +2 -0
  120. package/libs/ui/elements/src/index.d.ts.map +1 -1
  121. package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts +9 -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/download-item/download-item.component.d.ts +8 -1
  124. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  125. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +43 -0
  126. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -0
  127. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +10 -2
  128. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  129. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +2 -2
  130. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  131. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  132. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +30 -0
  133. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -0
  134. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
  135. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  136. package/libs/ui/inputs/src/index.d.ts +0 -1
  137. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  138. package/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.d.ts.map +1 -1
  139. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts +10 -3
  140. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts.map +1 -1
  141. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +2 -0
  142. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
  143. package/libs/ui/map/src/index.d.ts +1 -0
  144. package/libs/ui/map/src/index.d.ts.map +1 -1
  145. package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts +4 -2
  146. package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts.map +1 -1
  147. package/libs/ui/map/src/lib/components/map-legend/map-legend.component.d.ts.map +1 -1
  148. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts +15 -0
  149. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -0
  150. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  151. package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
  152. package/libs/util/data-fetcher/src/lib/model.d.ts +3 -2
  153. package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
  154. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +1 -0
  155. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  156. package/libs/util/shared/src/index.d.ts +1 -0
  157. package/libs/util/shared/src/index.d.ts.map +1 -1
  158. package/libs/util/shared/src/lib/gn-ui-version.d.ts +3 -0
  159. package/libs/util/shared/src/lib/gn-ui-version.d.ts.map +1 -0
  160. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
  161. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  162. package/libs/util/shared/src/lib/links/link-utils.d.ts +30 -23
  163. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  164. package/package.json +1 -1
  165. package/src/libs/api/metadata-converter/src/lib/base.converter.ts +1 -4
  166. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.service+eaux-usees.ts +2 -2
  167. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +2 -2
  168. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +2 -2
  169. package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.service+napitswallonia.ts +2 -2
  170. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +8 -2
  171. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
  172. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +3 -3
  173. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -9
  174. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +20 -12
  175. package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +6 -0
  176. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +22 -3
  177. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +26 -26
  178. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +2 -2
  179. package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +5 -5
  180. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +18 -2
  181. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +1 -0
  182. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -0
  183. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +1 -0
  184. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +10 -8
  185. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -0
  186. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +1 -2
  187. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -2
  188. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +2 -2
  189. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +2 -2
  190. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +1 -3
  191. package/src/libs/feature/record/src/index.ts +0 -1
  192. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +2 -3
  193. package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +4 -5
  194. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +1 -0
  195. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +41 -7
  196. package/src/libs/feature/record/src/lib/record-meta/record-meta.component.ts +2 -2
  197. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -3
  198. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -7
  199. package/src/libs/feature/router/src/lib/default/constants.ts +2 -0
  200. package/src/libs/feature/router/src/lib/default/router.config.ts +2 -0
  201. package/src/libs/feature/router/src/lib/default/router.service.ts +10 -0
  202. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +10 -1
  203. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +1 -7
  204. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +16 -8
  205. package/src/libs/feature/search/src/lib/feature-search.module.ts +0 -8
  206. package/src/libs/feature/search/src/lib/record-url.token.ts +10 -1
  207. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.css +6 -0
  208. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.html +1 -0
  209. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +24 -5
  210. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
  211. package/src/libs/ui/elements/src/index.ts +2 -0
  212. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +64 -38
  213. package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +26 -2
  214. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +17 -17
  215. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +20 -2
  216. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +7 -6
  217. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +156 -0
  218. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +190 -0
  219. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +27 -29
  220. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +33 -3
  221. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +1 -1
  222. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
  223. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +9 -0
  224. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +13 -4
  225. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -4
  226. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +4 -2
  227. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -1
  228. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.css +0 -0
  229. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +96 -0
  230. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +183 -0
  231. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -0
  232. package/src/libs/ui/inputs/src/index.ts +0 -1
  233. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +5 -5
  234. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +2 -1
  235. package/src/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.ts +46 -2
  236. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -4
  237. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -7
  238. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -0
  239. package/src/libs/ui/map/src/index.ts +1 -0
  240. package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +14 -0
  241. package/src/libs/ui/map/src/lib/components/map-legend/map-legend.component.ts +3 -0
  242. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.css +0 -0
  243. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.html +4 -0
  244. package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts → ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts} +7 -8
  245. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +7 -4
  246. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +2 -1
  247. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -2
  248. package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +3 -1
  249. package/src/libs/util/data-fetcher/src/lib/model.ts +11 -1
  250. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +29 -3
  251. package/src/libs/util/shared/src/index.ts +1 -0
  252. package/src/libs/util/shared/src/lib/gn-ui-version.ts +8 -0
  253. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +12 -3
  254. package/src/libs/util/shared/src/lib/links/link-utils.ts +50 -30
  255. package/tailwind.base.css +51 -13
  256. package/translations/de.json +34 -3
  257. package/translations/en.json +35 -4
  258. package/translations/es.json +34 -3
  259. package/translations/fr.json +36 -5
  260. package/translations/it.json +34 -4
  261. package/translations/nl.json +34 -3
  262. package/translations/pt.json +34 -3
  263. package/translations/sk.json +34 -3
  264. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +0 -79
  265. package/esm2022/libs/feature/record/src/lib/gn-ui-version.token.mjs +0 -3
  266. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +0 -16
  267. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +0 -15
  268. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +0 -1
  269. package/libs/feature/record/src/lib/gn-ui-version.token.d.ts +0 -3
  270. package/libs/feature/record/src/lib/gn-ui-version.token.d.ts.map +0 -1
  271. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts +0 -8
  272. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts.map +0 -1
  273. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +0 -1
  274. package/src/libs/feature/record/src/lib/gn-ui-version.token.ts +0 -3
  275. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +0 -3
  276. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +0 -9
  277. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.ts +0 -15
  278. /package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.css → ui/elements/src/lib/internal-link-card/internal-link-card.component.css} +0 -0
@@ -1,26 +1,26 @@
1
1
  export const wmsRecordLinkFixture = () => ({
2
2
  description: 'Lieu de surveillance (point)',
3
3
  name: 'surval_parametre_point',
4
- protocol: 'OGC:WMS',
4
+ accessServiceProtocol: 'OGC:WMS',
5
5
  url: 'https://www.ifremer.fr/services/wms/surveillance_littorale',
6
6
  })
7
7
 
8
8
  export const wpsRecordLinkFixture = () => ({
9
9
  description: "Extraction des données d'observation",
10
10
  name: 'r:survalextraction',
11
- protocol: 'OGC:WPS',
11
+ accessServiceProtocol: 'OGC:WPS',
12
12
  url: 'https://www.ifremer.fr/services/wps/surval',
13
13
  })
14
14
 
15
15
  export const wwwRecordLinkFixture = () => ({
16
16
  description: '',
17
17
  name: 'La base de données Quadrige',
18
- protocol: 'WWW:LINK',
18
+ praccessServiceProtocolotocol: 'WWW:LINK',
19
19
  url: 'http://envlit.ifremer.fr/resultats/quadrige',
20
20
  })
21
21
 
22
22
  export const doiRecordLinkFixture = () => ({
23
- protocol: 'WWW:DOI',
23
+ accessServiceProtocol: 'WWW:DOI',
24
24
  description: 'DOI for the resource',
25
25
  url: 'http://doi.org/123-456-678',
26
26
  })
@@ -28,6 +28,6 @@ export const doiRecordLinkFixture = () => ({
28
28
  export const wfsRecordLinkFixture = () => ({
29
29
  description: 'Lieu de surveillance (point)',
30
30
  name: 'surval_parametre_point',
31
- protocol: 'OGC:WFS',
31
+ accessServiceProtocol: 'OGC:WFS',
32
32
  url: 'https://www.ifremer.fr/services/wfs/surveillance_littorale',
33
33
  })
@@ -187,8 +187,24 @@ As such, **it is not very interesting at all.**`,
187
187
  ],
188
188
  code: '',
189
189
  aliases: '',
190
- typeName: "Catalogue d'attributs",
191
- definition: '',
190
+ typeName: "Catalogue d'attributs N°1",
191
+ definition: 'Définition du catalogue d attributs N°1',
192
+ isAbstract: 'false',
193
+ },
194
+ {
195
+ attributeTable: [
196
+ {
197
+ code: 'UniqueObject',
198
+ name: 'unique object ',
199
+ link: '',
200
+ definition: 'this is the only object of this catalog',
201
+ type: 'String (50)',
202
+ },
203
+ ],
204
+ code: '',
205
+ aliases: '',
206
+ typeName: "Catalogue d'attributs N°2",
207
+ definition: 'Définition du catalogue d attributs N°2',
192
208
  isAbstract: 'false',
193
209
  },
194
210
  ],
@@ -40,6 +40,7 @@
40
40
  class="relative h-full mt-2 bg-white border border-gray-300 rounded-lg overflow-hidden"
41
41
  >
42
42
  <gn-ui-chart
43
+ *ngIf="!error"
43
44
  [data]="chartData$ | async"
44
45
  [type]="chartType$.value"
45
46
  [labelProperty]="labelProperty"
@@ -137,6 +137,10 @@ export class ChartViewComponent {
137
137
  switchMap((link) => {
138
138
  this.error = null
139
139
  this.loading = true
140
+ if (link.accessRestricted) {
141
+ this.handleError('dataset.error.restrictedAccess')
142
+ return EMPTY
143
+ }
140
144
  return this.dataService.getDataset(link, this.cacheActive).pipe(
141
145
  catchError((error) => {
142
146
  this.handleError(error)
@@ -30,6 +30,7 @@ import {
30
30
 
31
31
  marker('wfs.unreachable.cors')
32
32
  marker('wfs.unreachable.http')
33
+ marker('dataset.error.forbidden')
33
34
  marker('wfs.unreachable.unknown')
34
35
  marker('wfs.featuretype.notfound')
35
36
  marker('wfs.geojsongml.notsupported')
@@ -11,13 +11,15 @@
11
11
  class="absolute inset-0"
12
12
  [message]="'table.loading.data' | translate"
13
13
  ></gn-ui-loading-mask>
14
- <gn-ui-popup-alert
15
- *ngIf="error"
16
- type="warning"
17
- icon="matErrorOutlineOutline"
18
- class="absolute m-2 inset-0"
19
- >
20
- <span translate>{{ error }}</span>
21
- </gn-ui-popup-alert>
14
+ <ng-content *ngIf="error">
15
+ <div class="border border-gray-300 rounded-lg bg-white h-full"></div>
16
+ <gn-ui-popup-alert
17
+ type="warning"
18
+ icon="matErrorOutlineOutline"
19
+ class="absolute m-2 inset-0"
20
+ >
21
+ <span translate>{{ error }}</span>
22
+ </gn-ui-popup-alert>
23
+ </ng-content>
22
24
  </div>
23
25
  </div>
@@ -46,6 +46,10 @@ export class TableViewComponent {
46
46
  switchMap((link) => {
47
47
  this.error = null
48
48
  if (!link) return of(undefined)
49
+ if (link.accessRestricted) {
50
+ this.handleError('dataset.error.restrictedAccess')
51
+ return of([])
52
+ }
49
53
  this.loading = true
50
54
  return this.getDatasetReader(link).pipe(
51
55
  catchError((error) => {
@@ -66,9 +66,8 @@ export class OnlineResourceCardComponent {
66
66
  get subtitle(): string {
67
67
  switch (this.onlineResource.type) {
68
68
  case 'service':
69
- return `${this.onlineResource.accessServiceProtocol}`
70
69
  case 'endpoint':
71
- return `${this.onlineResource.protocol}`
70
+ return `${this.onlineResource.accessServiceProtocol}`
72
71
  case 'link':
73
72
  case 'download':
74
73
  return this.getFormat(this.onlineResource)
@@ -81,8 +81,8 @@ export class OnlineServiceResourceInputComponent {
81
81
  errorMessage = false
82
82
  resetUrlOnChange = Math.random()
83
83
 
84
- layersSubject = new BehaviorSubject<{ name: string; title: string }[]>([])
85
- layers$: Observable<{ name: string; title: string }[]> =
84
+ layersSubject = new BehaviorSubject<{ name?: string; title?: string }[]>([])
85
+ layers$: Observable<{ name?: string; title?: string }[]> =
86
86
  this.layersSubject.asObservable()
87
87
 
88
88
  protocolOptions: {
@@ -8,8 +8,8 @@
8
8
  >
9
9
  </gn-ui-generic-keywords>
10
10
  <div class="w-full h-96 mt-2">
11
- <gn-ui-form-field-map-container
11
+ <gn-ui-spatial-extent
12
12
  [spatialExtents]="spatialExtents$ | async"
13
- ></gn-ui-form-field-map-container>
13
+ ></gn-ui-spatial-extent>
14
14
  </div>
15
15
  </div>
@@ -9,9 +9,9 @@ import { PlatformServiceInterface } from '../../../../../../../../../libs/common
9
9
  import { firstValueFrom, map, shareReplay } from 'rxjs'
10
10
  import { EditorFacade } from '../../../../+state/editor.facade'
11
11
  import { switchMap } from 'rxjs/operators'
12
- import { FormFieldMapContainerComponent } from '../form-field-map-container/form-field-map-container.component'
13
12
  import { TranslateModule, TranslateService } from '@ngx-translate/core'
14
13
  import { SPATIAL_SCOPES } from '../../../../fields.config'
14
+ import { SpatialExtentComponent } from '../../../../../../../../../libs/ui/map/src'
15
15
 
16
16
  // This intermediary type will let us keep track of which keyword is bound to
17
17
  // which extent; these properties will not be persisted
@@ -35,8 +35,8 @@ type KeywordWithExtent = Keyword & {
35
35
  imports: [
36
36
  CommonModule,
37
37
  GenericKeywordsComponent,
38
- FormFieldMapContainerComponent,
39
38
  TranslateModule,
39
+ SpatialExtentComponent,
40
40
  ],
41
41
  })
42
42
  export class FormFieldSpatialExtentComponent {
@@ -1,7 +1,6 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { extend, Extent } from 'ol/extent'
3
3
  import GeoJSON from 'ol/format/GeoJSON'
4
- import { transformExtent } from 'ol/proj'
5
4
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
6
5
 
7
6
  const GEOJSON = new GeoJSON()
@@ -15,7 +14,7 @@ export class MapUtilsService {
15
14
  return null
16
15
  }
17
16
  // extend all the spatial extents into an including bbox
18
- const totalExtent = record.spatialExtents.reduce(
17
+ return record.spatialExtents.reduce(
19
18
  (prev, curr) => {
20
19
  if ('bbox' in curr) return extend(prev, curr.bbox)
21
20
  else if ('geometry' in curr) {
@@ -26,6 +25,5 @@ export class MapUtilsService {
26
25
  },
27
26
  [Infinity, Infinity, -Infinity, -Infinity]
28
27
  )
29
- return transformExtent(totalExtent, 'EPSG:4326', 'EPSG:3857')
30
28
  }
31
29
  }
@@ -1,5 +1,4 @@
1
1
  export * from './lib/feature-record.module'
2
- export * from './lib/gn-ui-version.token'
3
2
  export * from './lib/state'
4
3
  export * from './lib/data-view-permalink/data-view-permalink.component'
5
4
  export * from './lib/data-view/data-view.component'
@@ -9,10 +9,10 @@ import {
9
9
  import { Configuration } from '../../../../../../libs/data-access/gn4/src'
10
10
  import { BehaviorSubject, combineLatest, map } from 'rxjs'
11
11
  import { MdViewFacade } from '../state'
12
- import { GN_UI_VERSION } from '../gn-ui-version.token'
13
12
  import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
14
13
  import { CommonModule } from '@angular/common'
15
14
  import { TranslateModule } from '@ngx-translate/core'
15
+ import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
16
16
 
17
17
  export const WEB_COMPONENT_EMBEDDER_URL = new InjectionToken<string>(
18
18
  'webComponentEmbedderUrl'
@@ -40,7 +40,7 @@ export class DataViewPermalinkComponent {
40
40
  ]).pipe(
41
41
  map(([viewType, config, metadata]) => {
42
42
  const url = new URL(`${this.wcEmbedderBaseUrl}`, window.location.origin)
43
- url.searchParams.set('v', `${this.version}`)
43
+ url.searchParams.set('v', `${GEONETWORK_UI_TAG_NAME}`)
44
44
  if (viewType === 'chart') {
45
45
  if (config) {
46
46
  const { aggregation, xProperty, yProperty, chartType } = config
@@ -74,7 +74,6 @@ export class DataViewPermalinkComponent {
74
74
  @Optional()
75
75
  @Inject(WEB_COMPONENT_EMBEDDER_URL)
76
76
  protected wcEmbedderBaseUrl: string,
77
- @Inject(GN_UI_VERSION) private version: string,
78
77
  private facade: MdViewFacade
79
78
  ) {}
80
79
  }
@@ -7,10 +7,10 @@ import {
7
7
  import { Configuration } from '../../../../../../libs/data-access/gn4/src'
8
8
  import { MdViewFacade } from '../state'
9
9
  import { BehaviorSubject, combineLatest, map } from 'rxjs'
10
- import { GN_UI_VERSION } from '../gn-ui-version.token'
11
10
  import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
12
11
  import { CommonModule } from '@angular/common'
13
12
  import { TranslateModule } from '@ngx-translate/core'
13
+ import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
14
14
 
15
15
  @Component({
16
16
  selector: 'gn-ui-data-view-web-component',
@@ -36,7 +36,7 @@ export class DataViewWebComponentComponent {
36
36
  if (config) {
37
37
  const { aggregation, xProperty, yProperty, chartType } = config
38
38
  return `<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist-${
39
- this.version
39
+ GEONETWORK_UI_TAG_NAME
40
40
  }/gn-wc.js"></script>
41
41
  <gn-dataset-view-chart
42
42
  api-url="${new URL(
@@ -59,7 +59,7 @@ export class DataViewWebComponentComponent {
59
59
  return ''
60
60
  } else if (viewType === 'table') {
61
61
  return `<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist-${
62
- this.version
62
+ GEONETWORK_UI_TAG_NAME
63
63
  }/gn-wc.js"></script>
64
64
  <gn-dataset-view-table
65
65
  api-url="${new URL(
@@ -76,7 +76,7 @@ export class DataViewWebComponentComponent {
76
76
  ></gn-dataset-view-table>`
77
77
  } else {
78
78
  return `<script src="https://cdn.jsdelivr.net/gh/geonetwork/geonetwork-ui@wc-dist-${
79
- this.version
79
+ GEONETWORK_UI_TAG_NAME
80
80
  }/gn-wc.js"></script>
81
81
  <gn-dataset-view-map
82
82
  api-url="${new URL(
@@ -97,7 +97,6 @@ export class DataViewWebComponentComponent {
97
97
 
98
98
  constructor(
99
99
  @Inject(Configuration) private config: Configuration,
100
- @Inject(GN_UI_VERSION) private version: string,
101
100
  private facade: MdViewFacade
102
101
  ) {}
103
102
  }
@@ -31,6 +31,7 @@
31
31
  #mapContainer
32
32
  [context]="mapContext$ | async"
33
33
  (featuresClick)="onMapFeatureSelect($event)"
34
+ (sourceLoadError)="onSourceLoadError($event)"
34
35
  ></gn-ui-map-container>
35
36
  <div
36
37
  class="top-[1em] right-[1em] p-3 bg-white absolute overflow-y-auto overflow-x-hidden max-h-72 w-56"
@@ -34,6 +34,7 @@ import {
34
34
  createViewFromLayer,
35
35
  MapContext,
36
36
  MapContextLayer,
37
+ SourceLoadErrorEvent,
37
38
  } from '@geospatial-sdk/core'
38
39
  import {
39
40
  FeatureDetailComponent,
@@ -49,16 +50,18 @@ import {
49
50
  ButtonComponent,
50
51
  DropdownSelectorComponent,
51
52
  } from '../../../../../../libs/ui/inputs/src'
52
- import { TranslateModule } from '@ngx-translate/core'
53
+ import { TranslateModule, TranslateService } from '@ngx-translate/core'
53
54
  import { ExternalViewerButtonComponent } from '../external-viewer-button/external-viewer-button.component'
54
55
  import {
55
56
  LoadingMaskComponent,
56
57
  PopupAlertComponent,
57
58
  } from '../../../../../../libs/ui/widgets/src'
58
59
  import { marker } from '@biesbjerg/ngx-translate-extract-marker'
60
+ import { FetchError } from '../../../../../../libs/util/data-fetcher/src'
59
61
 
60
62
  marker('map.dropdown.placeholder')
61
63
  marker('wfs.feature.limit')
64
+ marker('dataset.error.restrictedAccess')
62
65
 
63
66
  @Component({
64
67
  selector: 'gn-ui-map-view',
@@ -100,9 +103,6 @@ export class MapViewComponent implements AfterViewInit {
100
103
 
101
104
  onLegendStatusChange(status: boolean) {
102
105
  this.legendExists = status
103
- if (!status) {
104
- this.showLegend = false
105
- }
106
106
  }
107
107
 
108
108
  compatibleMapLinks$ = combineLatest([
@@ -146,11 +146,14 @@ export class MapViewComponent implements AfterViewInit {
146
146
  this.hidePreview = false
147
147
  this.loading = true
148
148
  this.error = null
149
+ if (link.accessRestricted) {
150
+ this.handleError('dataset.error.restrictedAccess')
151
+ return of([])
152
+ }
149
153
  return this.getLayerFromLink(link).pipe(
150
154
  map((layer) => [layer]),
151
155
  catchError((e) => {
152
- this.error = e.message
153
- console.warn(e.stack || e.message)
156
+ this.handleError(e)
154
157
  return of([])
155
158
  }),
156
159
  finalize(() => (this.loading = false))
@@ -192,7 +195,8 @@ export class MapViewComponent implements AfterViewInit {
192
195
  private mdViewFacade: MdViewFacade,
193
196
  private mapUtils: MapUtilsService,
194
197
  private dataService: DataService,
195
- private changeRef: ChangeDetectorRef
198
+ private changeRef: ChangeDetectorRef,
199
+ private translateService: TranslateService
196
200
  ) {}
197
201
 
198
202
  async ngAfterViewInit() {
@@ -210,6 +214,16 @@ export class MapViewComponent implements AfterViewInit {
210
214
  this.changeRef.detectChanges()
211
215
  }
212
216
 
217
+ onSourceLoadError(error: SourceLoadErrorEvent) {
218
+ if (error.httpStatus === 403 || error.httpStatus === 401) {
219
+ this.error = this.translateService.instant(`dataset.error.forbidden`)
220
+ } else {
221
+ this.error = this.translateService.instant(`dataset.error.http`, {
222
+ info: error.httpStatus,
223
+ })
224
+ }
225
+ }
226
+
213
227
  resetSelection(): void {
214
228
  if (this.selection) {
215
229
  // FIXME: restore styling of selected feature
@@ -255,4 +269,24 @@ export class MapViewComponent implements AfterViewInit {
255
269
  selectLinkToDisplay(link: number) {
256
270
  this.selectedLinkIndex$.next(link)
257
271
  }
272
+
273
+ handleError(error: FetchError | Error | string) {
274
+ if (error instanceof FetchError) {
275
+ this.error = this.translateService.instant(
276
+ `dataset.error.${error.type}`,
277
+ {
278
+ info: error.info,
279
+ }
280
+ )
281
+ console.warn(error.message)
282
+ } else if (error instanceof Error) {
283
+ this.error = this.translateService.instant(error.message)
284
+ console.warn(error.stack || error)
285
+ } else {
286
+ this.error = this.translateService.instant(error)
287
+ console.warn(error)
288
+ }
289
+ this.loading = false
290
+ this.changeRef.detectChanges()
291
+ }
258
292
  }
@@ -6,7 +6,7 @@ import {
6
6
  OnDestroy,
7
7
  } from '@angular/core'
8
8
  import { Meta } from '@angular/platform-browser'
9
- import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
9
+ import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
10
10
 
11
11
  @Component({
12
12
  selector: 'gn-ui-record-meta',
@@ -15,7 +15,7 @@ import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/mode
15
15
  standalone: true,
16
16
  })
17
17
  export class RecordMetaComponent implements OnDestroy, OnChanges {
18
- @Input() metadata: DatasetRecord
18
+ @Input() metadata: CatalogRecord
19
19
 
20
20
  constructor(private meta: Meta) {}
21
21
 
@@ -1,16 +1,18 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { Actions, createEffect, ofType } from '@ngrx/effects'
3
3
  import { exhaustMap, mergeMap, of } from 'rxjs'
4
- import { catchError, filter, map, switchMap, take } from 'rxjs/operators'
4
+ import { catchError, filter, 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
7
  import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
8
+ import { Router } from '@angular/router'
8
9
  @Injectable()
9
10
  export class MdViewEffects {
10
11
  constructor(
11
12
  private actions$: Actions,
12
13
  private recordsRepository: RecordsRepositoryInterface,
13
- private platformServiceInterface: PlatformServiceInterface
14
+ private platformServiceInterface: PlatformServiceInterface,
15
+ private router: Router
14
16
  ) {}
15
17
 
16
18
  /*
@@ -21,7 +23,7 @@ export class MdViewEffects {
21
23
  ofType(MdViewActions.loadFullMetadata),
22
24
  switchMap(({ uuid }) => this.recordsRepository.getRecord(uuid)),
23
25
  map((record) => {
24
- if (record === null) {
26
+ if (record === null || !this.router.url.includes(record.kind)) {
25
27
  return MdViewActions.loadFullMetadataFailure({ notFound: true })
26
28
  }
27
29
  return MdViewActions.loadFullMetadataSuccess({ full: record })
@@ -16,6 +16,7 @@ import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/
16
16
  import {
17
17
  CatalogRecord,
18
18
  DatasetServiceDistribution,
19
+ ServiceEndpoint,
19
20
  UserFeedback,
20
21
  } from '../../../../../../libs/common/domain/src/lib/model/record'
21
22
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
@@ -79,11 +80,7 @@ export class MdViewFacade {
79
80
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
80
81
 
81
82
  allLinks$ = this.metadata$.pipe(
82
- map((record) =>
83
- record.kind === 'dataset' && 'onlineResources' in record
84
- ? record.onlineResources
85
- : []
86
- )
83
+ map((record) => ('onlineResources' in record ? record.onlineResources : []))
87
84
  )
88
85
 
89
86
  apiLinks$ = this.allLinks$.pipe(
@@ -92,8 +89,8 @@ export class MdViewFacade {
92
89
  .filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
93
90
  // Put links to IGN Géoplateforme first
94
91
  .sort((dd1, dd2) => {
95
- return (dd2 as DatasetServiceDistribution).accessServiceProtocol ===
96
- 'GPFDL'
92
+ return (dd2 as DatasetServiceDistribution | ServiceEndpoint)
93
+ .accessServiceProtocol === 'GPFDL'
97
94
  ? 1
98
95
  : undefined // do not change the sorting otherwise
99
96
  })
@@ -4,6 +4,8 @@ export const ROUTER_STATE_KEY = 'router'
4
4
 
5
5
  export const ROUTER_ROUTE_SEARCH = 'search'
6
6
  export const ROUTER_ROUTE_DATASET = 'dataset'
7
+ export const ROUTER_ROUTE_SERVICE = 'service'
8
+ export const ROUTER_ROUTE_REUSE = 'reuse'
7
9
  export const ROUTER_ROUTE_ORGANIZATION = 'organization'
8
10
 
9
11
  export enum ROUTE_PARAMS {
@@ -4,6 +4,8 @@ export interface RouterConfigModel {
4
4
  searchStateId: string
5
5
  searchRouteComponent: Type<any>
6
6
  recordRouteComponent: Type<any>
7
+ serviceRouteComponent: Type<any>
8
+ reuseRouteComponent: Type<any>
7
9
  organizationRouteComponent: Type<any>
8
10
  }
9
11
 
@@ -3,6 +3,8 @@ import {
3
3
  ROUTER_ROUTE_DATASET,
4
4
  ROUTER_ROUTE_ORGANIZATION,
5
5
  ROUTER_ROUTE_SEARCH,
6
+ ROUTER_ROUTE_SERVICE,
7
+ ROUTER_ROUTE_REUSE,
6
8
  } from '.'
7
9
  import { Router, Routes } from '@angular/router'
8
10
  import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
@@ -34,6 +36,14 @@ export class RouterService {
34
36
  path: `${ROUTER_ROUTE_DATASET}/:metadataUuid`,
35
37
  component: this.routerConfig.recordRouteComponent,
36
38
  },
39
+ {
40
+ path: `${ROUTER_ROUTE_SERVICE}/:metadataUuid`,
41
+ component: this.routerConfig.recordRouteComponent,
42
+ },
43
+ {
44
+ path: `${ROUTER_ROUTE_REUSE}/:metadataUuid`,
45
+ component: this.routerConfig.recordRouteComponent,
46
+ },
37
47
  {
38
48
  path: `${ROUTER_ROUTE_ORGANIZATION}/:name`,
39
49
  component: this.routerConfig.organizationRouteComponent,
@@ -7,6 +7,8 @@ import { distinctUntilChanged, filter, map, take } from 'rxjs/operators'
7
7
  import {
8
8
  ROUTER_ROUTE_DATASET,
9
9
  ROUTER_ROUTE_SEARCH,
10
+ ROUTER_ROUTE_SERVICE,
11
+ ROUTER_ROUTE_REUSE,
10
12
  SearchRouteParams,
11
13
  } from '../constants'
12
14
  import {
@@ -32,12 +34,19 @@ export class RouterFacade {
32
34
  map(expandQueryParams)
33
35
  )
34
36
 
37
+ routeMap = {
38
+ dataset: ROUTER_ROUTE_DATASET,
39
+ service: ROUTER_ROUTE_SERVICE,
40
+ reuse: ROUTER_ROUTE_REUSE,
41
+ }
42
+
35
43
  constructor(
36
44
  private store: Store<RouterReducerState>,
37
45
  private routerService: RouterService
38
46
  ) {}
39
47
 
40
48
  goToMetadata(metadata: CatalogRecord) {
49
+ const selectedRoute = this.routeMap[metadata.kind] || ROUTER_ROUTE_DATASET
41
50
  this.pathParams$
42
51
  .pipe(
43
52
  take(1),
@@ -45,7 +54,7 @@ export class RouterFacade {
45
54
  )
46
55
  .subscribe(() => {
47
56
  this.go({
48
- path: `${ROUTER_ROUTE_DATASET}/${metadata.uniqueIdentifier}`,
57
+ path: `${selectedRoute}/${metadata.uniqueIdentifier}`,
49
58
  })
50
59
  this.store.dispatch(
51
60
  MdViewActions.setIncompleteMetadata({ incomplete: metadata })
@@ -1,6 +1,6 @@
1
1
  <div class="flex flex-row items-center">
2
2
  <span
3
- class="align-text-top mr-1.5"
3
+ class="align-text-top mr-1.5 mt-0.5"
4
4
  data-test="favorite-count"
5
5
  *ngIf="hasFavoriteCount && displayCount"
6
6
  >{{ favoriteCount }}</span
@@ -10,10 +10,4 @@
10
10
  (newValue)="toggleFavorite($event)"
11
11
  [disabled]="loading || (isAnonymous$ | async)"
12
12
  ></gn-ui-star-toggle>
13
- <span
14
- class="align-text-top ml-1.5"
15
- data-test="favorite-count"
16
- *ngIf="!displayCount"
17
- translate="datahub.record.addToFavorites"
18
- ></span>
19
13
  </div>
@@ -8,9 +8,15 @@ import {
8
8
  OnDestroy,
9
9
  ViewChild,
10
10
  } from '@angular/core'
11
- import { map, pairwise, withLatestFrom } from 'rxjs/operators'
11
+ import {
12
+ map,
13
+ pairwise,
14
+ startWith,
15
+ switchMap,
16
+ withLatestFrom,
17
+ } from 'rxjs/operators'
12
18
  import tippy from 'tippy.js'
13
- import { TranslateService } from '@ngx-translate/core'
19
+ import { TranslateModule, TranslateService } from '@ngx-translate/core'
14
20
  import { StarToggleComponent } from '../../../../../../../libs/ui/inputs/src'
15
21
  import { Observable, Subscription } from 'rxjs'
16
22
  import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
@@ -24,7 +30,7 @@ import { CommonModule } from '@angular/common'
24
30
  styleUrls: ['./favorite-star.component.css'],
25
31
  changeDetection: ChangeDetectionStrategy.OnPush,
26
32
  standalone: true,
27
- imports: [CommonModule, StarToggleComponent],
33
+ imports: [CommonModule, StarToggleComponent, TranslateModule],
28
34
  })
29
35
  export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
30
36
  @Input() displayCount? = true
@@ -46,11 +52,13 @@ export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
46
52
  favoriteCount: number | null
47
53
  loading = false
48
54
  loginUrl = this.authService.loginUrl
49
- loginMessage$: Observable<string> = this.translateService.get(
50
- 'favorite.not.authenticated.tooltip',
51
- {
52
- link: this.loginUrl,
53
- }
55
+ loginMessage$: Observable<string> = this.translateService.onLangChange.pipe(
56
+ startWith(null), // make sure to wait for translations to be loaded with and without language change
57
+ switchMap(() =>
58
+ this.translateService.get('favorite.not.authenticated.tooltip', {
59
+ link: this.loginUrl,
60
+ })
61
+ )
54
62
  )
55
63
  @ViewChild(StarToggleComponent, { read: ElementRef })
56
64
  starToggleRef: ElementRef