geonetwork-ui 2.6.0-dev.857b51517 → 2.6.0-dev.86c0fa7b5

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 (301) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +3 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +40 -4
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +8 -4
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +5 -2
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +4 -4
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
  8. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +5 -2
  9. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +4 -4
  10. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +79 -16
  11. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +7 -1
  12. package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +2 -1
  13. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  14. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  15. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  16. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  17. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +35 -3
  18. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  19. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +266 -11
  20. package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +1 -1
  21. package/esm2022/libs/feature/record/src/index.mjs +2 -3
  22. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +17 -16
  23. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +93 -19
  24. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
  25. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
  26. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
  27. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
  28. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
  29. package/esm2022/libs/feature/search/src/lib/constants.mjs +4 -2
  30. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +5 -3
  31. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  32. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +13 -10
  33. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  34. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  35. package/esm2022/libs/ui/elements/src/index.mjs +3 -2
  36. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  37. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +42 -83
  38. package/esm2022/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.mjs +59 -0
  39. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
  40. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  41. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  42. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +37 -12
  43. package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +5 -1
  44. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +72 -0
  45. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  46. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +14 -4
  47. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  48. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  49. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  50. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  51. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  52. package/esm2022/libs/ui/layout/src/lib/cell-popin/cell-popin.component.mjs +110 -0
  53. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  54. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +20 -10
  55. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +38 -21
  56. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +2 -2
  57. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  58. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  59. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  60. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  61. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
  62. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  63. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  64. package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +21 -12
  65. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +39 -18
  66. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +10 -4
  67. package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +42 -1
  68. package/esm2022/libs/util/i18n/src/lib/language-codes.mjs +24 -2
  69. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  70. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  71. package/esm2022/translations/de.json +47 -7
  72. package/esm2022/translations/en.json +47 -9
  73. package/esm2022/translations/es.json +46 -6
  74. package/esm2022/translations/fr.json +47 -9
  75. package/esm2022/translations/it.json +76 -36
  76. package/esm2022/translations/nl.json +46 -6
  77. package/esm2022/translations/pt.json +46 -6
  78. package/fesm2022/geonetwork-ui.mjs +2514 -1215
  79. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  80. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  81. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  82. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +0 -1
  83. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  84. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +1 -0
  85. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
  86. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  87. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  88. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  89. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  90. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
  91. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  92. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +13 -2
  93. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  94. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -0
  95. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  96. package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts +1 -0
  97. package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
  98. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +21 -15
  99. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  100. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +6 -0
  101. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  102. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  103. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  104. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  105. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  106. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  107. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  108. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +48 -3
  109. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -1
  110. package/libs/feature/record/src/index.d.ts +1 -2
  111. package/libs/feature/record/src/index.d.ts.map +1 -1
  112. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +7 -4
  113. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  114. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +13 -6
  115. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  116. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
  117. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  118. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
  119. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  120. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
  121. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  122. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
  123. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  124. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
  125. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  126. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  127. package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +2 -1
  128. package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
  129. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  130. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  131. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +6 -5
  132. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  133. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  134. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  135. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  136. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  137. package/libs/ui/elements/src/index.d.ts +2 -1
  138. package/libs/ui/elements/src/index.d.ts.map +1 -1
  139. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  140. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  141. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +6 -13
  142. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  143. package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts +14 -0
  144. package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts.map +1 -0
  145. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
  146. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
  147. package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +3 -0
  148. package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
  149. package/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.d.ts.map +1 -1
  150. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +27 -0
  151. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  152. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  153. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  154. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
  155. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  156. package/libs/ui/inputs/src/index.d.ts +1 -0
  157. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  158. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  159. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  160. package/libs/ui/layout/src/index.d.ts +1 -0
  161. package/libs/ui/layout/src/index.d.ts.map +1 -1
  162. package/libs/ui/layout/src/lib/cell-popin/cell-popin.component.d.ts +28 -0
  163. package/libs/ui/layout/src/lib/cell-popin/cell-popin.component.d.ts.map +1 -0
  164. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  165. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  166. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +4 -2
  167. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
  168. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +13 -9
  169. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
  170. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  171. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  172. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  173. package/libs/ui/search/src/index.d.ts +1 -0
  174. package/libs/ui/search/src/index.d.ts.map +1 -1
  175. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  176. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -3
  177. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
  178. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +10 -4
  179. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  180. package/libs/ui/search/src/lib/ui-search.module.d.ts +2 -1
  181. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  182. package/libs/util/i18n/src/lib/i18n.constants.d.ts +1 -0
  183. package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
  184. package/libs/util/i18n/src/lib/language-codes.d.ts +23 -1
  185. package/libs/util/i18n/src/lib/language-codes.d.ts.map +1 -1
  186. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  187. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  188. package/package.json +2 -2
  189. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  190. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
  191. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +62 -4
  192. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
  193. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -3
  194. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +5 -1
  195. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +8 -4
  196. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -1
  197. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +4 -1
  198. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +3 -3
  199. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +118 -16
  200. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
  201. package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -0
  202. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +22 -9
  203. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +6 -0
  204. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  205. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  206. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +62 -1
  207. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  208. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  209. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +40 -1
  210. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  211. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  212. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +117 -11
  213. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +316 -6
  214. package/src/libs/feature/record/src/index.ts +1 -2
  215. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +3 -1
  216. package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +17 -15
  217. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +31 -10
  218. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +128 -19
  219. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
  220. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
  221. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
  222. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
  223. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
  224. package/src/libs/feature/search/src/lib/constants.ts +3 -1
  225. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
  226. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +1 -0
  227. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  228. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
  229. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +13 -3
  230. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  231. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  232. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  233. package/src/libs/ui/elements/src/index.ts +2 -1
  234. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  235. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  236. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  237. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +68 -141
  238. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +38 -97
  239. package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.html +69 -0
  240. package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.ts +61 -0
  241. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
  242. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
  243. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
  244. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
  245. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
  246. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +48 -9
  247. package/src/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.ts +4 -0
  248. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +107 -0
  249. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +83 -0
  250. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
  251. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  252. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -1
  253. package/src/libs/ui/inputs/src/index.ts +1 -0
  254. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  255. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  256. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  257. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
  258. package/src/libs/ui/layout/src/index.ts +1 -0
  259. package/src/libs/ui/layout/src/lib/cell-popin/cell-popin.component.html +40 -0
  260. package/src/libs/ui/layout/src/lib/cell-popin/cell-popin.component.ts +141 -0
  261. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  262. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  263. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -2
  264. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -6
  265. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +25 -44
  266. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +46 -17
  267. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -1
  268. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  269. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  270. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  271. package/src/libs/ui/search/src/index.ts +1 -0
  272. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  273. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
  274. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  275. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  276. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  277. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +16 -6
  278. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +15 -11
  279. package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
  280. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +31 -27
  281. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +33 -15
  282. package/src/libs/ui/search/src/lib/ui-search.module.ts +3 -0
  283. package/src/libs/util/i18n/src/lib/i18n.constants.ts +42 -0
  284. package/src/libs/util/i18n/src/lib/language-codes.ts +23 -1
  285. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  286. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  287. package/tailwind.base.css +1 -1
  288. package/translations/de.json +47 -7
  289. package/translations/en.json +47 -9
  290. package/translations/es.json +46 -6
  291. package/translations/fr.json +47 -9
  292. package/translations/it.json +76 -36
  293. package/translations/nl.json +46 -6
  294. package/translations/pt.json +46 -6
  295. package/translations/sk.json +46 -6
  296. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +0 -46
  297. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +0 -12
  298. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +0 -1
  299. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +0 -30
  300. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +0 -48
  301. /package/src/libs/ui/{elements/src/lib/related-record-card/related-record-card.component.css → inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css} +0 -0
@@ -3,7 +3,9 @@ import {
3
3
  ChangeDetectionStrategy,
4
4
  ChangeDetectorRef,
5
5
  Component,
6
+ EventEmitter,
6
7
  Input,
8
+ Output,
7
9
  ViewChild,
8
10
  } from '@angular/core'
9
11
  import { MapUtilsService } from '../../../../../../libs/feature/map/src'
@@ -25,11 +27,15 @@ import {
25
27
  map,
26
28
  shareReplay,
27
29
  switchMap,
30
+ take,
28
31
  tap,
29
32
  } from 'rxjs/operators'
30
33
  import { MdViewFacade } from '../state/mdview.facade'
31
34
  import { DataService } from '../../../../../../libs/feature/dataviz/src'
32
- import { DatasetOnlineResource } from '../../../../../../libs/common/domain/src/lib/model/record'
35
+ import {
36
+ DatasetOnlineResource,
37
+ DatasetServiceDistribution,
38
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
33
39
  import {
34
40
  createViewFromLayer,
35
41
  MapContext,
@@ -39,8 +45,8 @@ import {
39
45
  import {
40
46
  FeatureDetailComponent,
41
47
  MapContainerComponent,
42
- prioritizePageScroll,
43
48
  MapLegendComponent,
49
+ prioritizePageScroll,
44
50
  } from '../../../../../../libs/ui/map/src'
45
51
  import { Feature } from 'geojson'
46
52
  import { NgIconComponent, provideIcons } from '@ng-icons/core'
@@ -62,6 +68,7 @@ import { FetchError } from '../../../../../../libs/util/data-fetcher/src'
62
68
  marker('map.dropdown.placeholder')
63
69
  marker('wfs.feature.limit')
64
70
  marker('dataset.error.restrictedAccess')
71
+ marker('map.select.style')
65
72
 
66
73
  @Component({
67
74
  selector: 'gn-ui-map-view',
@@ -88,7 +95,15 @@ export class MapViewComponent implements AfterViewInit {
88
95
  @Input() set exceedsLimit(value: boolean) {
89
96
  this.excludeWfs$.next(value)
90
97
  }
98
+ @Input() set selectedView(value: string) {
99
+ if (value === 'map') {
100
+ this.selectedLink$.pipe(take(1)).subscribe((link) => {
101
+ this.linkSelected.emit(link)
102
+ })
103
+ }
104
+ }
91
105
  @Input() displaySource = true
106
+ @Output() linkSelected = new EventEmitter<DatasetOnlineResource>()
92
107
  @ViewChild('mapContainer') mapContainer: MapContainerComponent
93
108
 
94
109
  excludeWfs$ = new BehaviorSubject(false)
@@ -96,22 +111,33 @@ export class MapViewComponent implements AfterViewInit {
96
111
  selection: Feature
97
112
  showLegend = true
98
113
  legendExists = false
114
+ loading = false
115
+ error = null
116
+
117
+ selectLinkToDisplay(i: number) {
118
+ this.selectedLinkIndex$.next(i)
119
+ }
120
+
121
+ selectStyleToDisplay(i: number) {
122
+ this.selectedStyleIndex$.next(i)
123
+ }
99
124
 
100
125
  toggleLegend() {
101
126
  this.showLegend = !this.showLegend
102
127
  }
103
-
104
- onLegendStatusChange(status: boolean) {
105
- this.legendExists = status
128
+ onLegendStatusChange(v: boolean) {
129
+ this.legendExists = v
106
130
  }
107
131
 
108
132
  compatibleMapLinks$ = combineLatest([
109
133
  this.mdViewFacade.mapApiLinks$,
110
134
  this.mdViewFacade.geoDataLinksWithGeometry$,
111
135
  ]).pipe(
112
- map(([mapApiLinks, geoDataLinksWithGeometry]) => {
113
- return [...mapApiLinks, ...geoDataLinksWithGeometry]
114
- })
136
+ map(([mapApiLinks, geoDataLinksWithGeometry]) => [
137
+ ...mapApiLinks,
138
+ ...geoDataLinksWithGeometry,
139
+ ]),
140
+ shareReplay(1)
115
141
  )
116
142
 
117
143
  dropdownChoices$ = this.compatibleMapLinks$.pipe(
@@ -124,15 +150,84 @@ export class MapViewComponent implements AfterViewInit {
124
150
  : [{ label: 'map.dropdown.placeholder', value: 0 }]
125
151
  )
126
152
  )
127
- selectedLinkIndex$ = new BehaviorSubject(0)
128
153
 
129
- loading = false
130
- error = null
154
+ selectedLinkIndex$ = new BehaviorSubject(0)
155
+ private selectedStyleIndex$ = new BehaviorSubject(0)
131
156
 
132
- selectedLink$ = combineLatest([
157
+ selectedSourceLink$ = combineLatest([
133
158
  this.compatibleMapLinks$,
134
159
  this.selectedLinkIndex$.pipe(distinctUntilChanged()),
135
- ]).pipe(map(([links, index]) => links[index]))
160
+ ]).pipe(
161
+ tap(() => {
162
+ this.error = null
163
+ }),
164
+ map(([links, index]) => {
165
+ this.linkSelected.emit(links[index])
166
+ return links[index]
167
+ })
168
+ )
169
+
170
+ styleLinks$ = this.selectedSourceLink$.pipe(
171
+ switchMap((src) => {
172
+ if (
173
+ src &&
174
+ src.type === 'service' &&
175
+ src.accessServiceProtocol === 'tms'
176
+ ) {
177
+ return from(
178
+ // WARNING: when using "getGeodataLinksFromTms", make sure to add error handling to prevent the rest of the logic from failing
179
+ // this may happen when TMS endpoint is in error
180
+ this.dataService.getGeodataLinksFromTms(
181
+ src as DatasetServiceDistribution,
182
+ false
183
+ )
184
+ ).pipe(
185
+ // We need to check for maplibre-style links because when a TMS service has no styles,
186
+ // getGeodataLinksFromTms returns the original TMS link, which isn't a maplibre-style link
187
+ map(
188
+ (links) =>
189
+ links?.filter(
190
+ (link) =>
191
+ link.type === 'service' &&
192
+ link.accessServiceProtocol === 'maplibre-style'
193
+ ) || []
194
+ ),
195
+ catchError((error) => {
196
+ this.handleError(error)
197
+ return of(src)
198
+ })
199
+ )
200
+ }
201
+ return of([])
202
+ }),
203
+ tap(() => this.selectedStyleIndex$.next(0)),
204
+ shareReplay(1)
205
+ )
206
+
207
+ styleDropdownChoices$ = this.styleLinks$.pipe(
208
+ map((links) =>
209
+ links.length
210
+ ? links.map((link, index) => ({
211
+ label: getLinkLabel(link),
212
+ value: index,
213
+ }))
214
+ : [
215
+ {
216
+ label: '\u00A0\u00A0\u00A0\u00A0',
217
+ value: 0,
218
+ },
219
+ ]
220
+ )
221
+ )
222
+
223
+ selectedLink$ = combineLatest([
224
+ this.selectedSourceLink$,
225
+ this.styleLinks$,
226
+ this.selectedStyleIndex$.pipe(distinctUntilChanged()),
227
+ ]).pipe(
228
+ map(([src, styles, styleIdx]) => (styles.length ? styles[styleIdx] : src)),
229
+ shareReplay(1)
230
+ )
136
231
 
137
232
  currentLayers$ = combineLatest([this.selectedLink$, this.excludeWfs$]).pipe(
138
233
  switchMap(([link, excludeWfs]) => {
@@ -145,7 +240,6 @@ export class MapViewComponent implements AfterViewInit {
145
240
  }
146
241
  this.hidePreview = false
147
242
  this.loading = true
148
- this.error = null
149
243
  if (link.accessRestricted) {
150
244
  this.handleError('dataset.error.restrictedAccess')
151
245
  return of([])
@@ -239,6 +333,26 @@ export class MapViewComponent implements AfterViewInit {
239
333
  type: 'wms',
240
334
  name: link.name,
241
335
  })
336
+ } else if (
337
+ link.type === 'service' &&
338
+ link.accessServiceProtocol === 'tms'
339
+ ) {
340
+ // FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
341
+ return of({
342
+ url: link.url.toString().replace(/\/?$/, '/{z}/{x}/{y}.pbf'),
343
+ type: 'xyz',
344
+ tileFormat: 'application/vnd.mapbox-vector-tile',
345
+ name: link.name,
346
+ })
347
+ } else if (
348
+ link.type === 'service' &&
349
+ link.accessServiceProtocol === 'maplibre-style'
350
+ ) {
351
+ return of({
352
+ type: 'maplibre-style',
353
+ name: link.name,
354
+ styleUrl: link.url.toString(),
355
+ })
242
356
  } else if (
243
357
  link.type === 'service' &&
244
358
  link.accessServiceProtocol === 'wmts'
@@ -265,11 +379,6 @@ export class MapViewComponent implements AfterViewInit {
265
379
  }
266
380
  return throwError(() => 'protocol not supported')
267
381
  }
268
-
269
- selectLinkToDisplay(link: number) {
270
- this.selectedLinkIndex$.next(link)
271
- }
272
-
273
382
  handleError(error: FetchError | Error | string) {
274
383
  if (error instanceof FetchError) {
275
384
  this.error = this.translateService.instant(
@@ -54,6 +54,16 @@ export const setRelated = createAction(
54
54
  props<{ related: CatalogRecord[] }>()
55
55
  )
56
56
 
57
+ export const setSources = createAction(
58
+ '[Metadata view] Set sources',
59
+ props<{ sources: CatalogRecord[] }>()
60
+ )
61
+
62
+ export const setSourceOf = createAction(
63
+ '[Metadata view] Set has sources',
64
+ props<{ sourceOf: CatalogRecord[] }>()
65
+ )
66
+
57
67
  /*
58
68
  ChartConfig actions
59
69
  */
@@ -68,6 +68,28 @@ export class MdViewEffects {
68
68
  )
69
69
  )
70
70
 
71
+ loadSources$ = createEffect(() =>
72
+ this.actions$.pipe(
73
+ ofType(MdViewActions.loadFullMetadataSuccess),
74
+ switchMap(({ full }) => this.recordsRepository.getSources(full)),
75
+ map((sources) => {
76
+ return MdViewActions.setSources({ sources })
77
+ }),
78
+ catchError(() => of(MdViewActions.setSources({ sources: null })))
79
+ )
80
+ )
81
+
82
+ loadSourceOf$ = createEffect(() =>
83
+ this.actions$.pipe(
84
+ ofType(MdViewActions.loadFullMetadataSuccess),
85
+ switchMap(({ full }) => this.recordsRepository.getSourceOf(full)),
86
+ map((sourceOf) => {
87
+ return MdViewActions.setSourceOf({ sourceOf })
88
+ }),
89
+ catchError(() => of(MdViewActions.setSourceOf({ sourceOf: null })))
90
+ )
91
+ )
92
+
71
93
  /*
72
94
  UserFeedback effects
73
95
  */
@@ -6,6 +6,7 @@ import {
6
6
  filter,
7
7
  map,
8
8
  mergeMap,
9
+ shareReplay,
9
10
  switchMap,
10
11
  toArray,
11
12
  } from 'rxjs/operators'
@@ -15,13 +16,11 @@ import { LinkClassifierService, LinkUsage } from '../../../../../../libs/util/sh
15
16
  import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
16
17
  import {
17
18
  CatalogRecord,
18
- DatasetServiceDistribution,
19
- ServiceEndpoint,
20
19
  UserFeedback,
21
20
  } from '../../../../../../libs/common/domain/src/lib/model/record'
22
21
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
23
22
  import { OgcApiRecord } from '@camptocamp/ogc-client'
24
- import { from, of } from 'rxjs'
23
+ import { from, of, Observable } from 'rxjs'
25
24
  import { DataService } from '../../../../../../libs/feature/dataviz/src'
26
25
 
27
26
  @Injectable()
@@ -77,24 +76,24 @@ export class MdViewFacade {
77
76
 
78
77
  related$ = this.store.pipe(select(MdViewSelectors.getRelated))
79
78
 
79
+ sources$ = this.store.pipe(select(MdViewSelectors.getSources))
80
+
81
+ sourceOf$ = this.store.pipe(select(MdViewSelectors.getSourceOf))
82
+
80
83
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
81
84
 
82
85
  allLinks$ = this.metadata$.pipe(
83
- map((record) => ('onlineResources' in record ? record.onlineResources : []))
86
+ map((record) =>
87
+ 'onlineResources' in record ? record.onlineResources : []
88
+ ),
89
+ shareReplay(1)
84
90
  )
85
91
 
86
92
  apiLinks$ = this.allLinks$.pipe(
87
93
  map((links) =>
88
- links
89
- .filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
90
- // Put links to IGN Géoplateforme first
91
- .sort((dd1, dd2) => {
92
- return (dd2 as DatasetServiceDistribution | ServiceEndpoint)
93
- .accessServiceProtocol === 'GPFDL'
94
- ? 1
95
- : undefined // do not change the sorting otherwise
96
- })
97
- )
94
+ links.filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
95
+ ),
96
+ shareReplay(1)
98
97
  )
99
98
 
100
99
  mapApiLinks$ = this.allLinks$.pipe(
@@ -102,7 +101,8 @@ export class MdViewFacade {
102
101
  links.filter((link) =>
103
102
  this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
104
103
  )
105
- )
104
+ ),
105
+ shareReplay(1)
106
106
  )
107
107
 
108
108
  downloadLinks$ = this.allLinks$.pipe(
@@ -216,4 +216,11 @@ export class MdViewFacade {
216
216
  loadUserFeedbacks(datasetUuid: string) {
217
217
  this.store.dispatch(MdViewActions.loadUserFeedbacks({ datasetUuid }))
218
218
  }
219
+
220
+ /**
221
+ * loadFeatureCatalog
222
+ */
223
+ loadFeatureCatalog(metadata: CatalogRecord) {
224
+ this.store.dispatch(MdViewActions.loadFeatureCatalog({ metadata }))
225
+ }
219
226
  }
@@ -14,6 +14,8 @@ export interface MetadataViewState {
14
14
  error: { notFound?: boolean; otherError?: string } | null
15
15
  metadata?: Partial<CatalogRecord>
16
16
  related?: CatalogRecord[]
17
+ sources?: CatalogRecord[]
18
+ sourceOf?: CatalogRecord[]
17
19
  userFeedbacks?: UserFeedback[]
18
20
  allUserFeedbacksLoading: boolean
19
21
  addUserFeedbackLoading: boolean
@@ -75,6 +77,16 @@ const metadataViewReducer = createReducer(
75
77
  related,
76
78
  })),
77
79
 
80
+ on(MetadataViewActions.setSources, (state, { sources }) => ({
81
+ ...state,
82
+ sources,
83
+ })),
84
+
85
+ on(MetadataViewActions.setSourceOf, (state, { sourceOf }) => ({
86
+ ...state,
87
+ sourceOf,
88
+ })),
89
+
78
90
  /*
79
91
  ChartConfig reducers
80
92
  */
@@ -41,6 +41,15 @@ export const getRelated = createSelector(
41
41
  (state: MetadataViewState) => state.related
42
42
  )
43
43
 
44
+ export const getSources = createSelector(
45
+ getMdViewState,
46
+ (state: MetadataViewState) => state.sources
47
+ )
48
+
49
+ export const getSourceOf = createSelector(
50
+ getMdViewState,
51
+ (state: MetadataViewState) => state.sourceOf
52
+ )
44
53
  /*
45
54
  Metadata selectors
46
55
  */
@@ -12,6 +12,7 @@ export const FIELDS_SUMMARY: FieldName[] = [
12
12
  'overview',
13
13
  'logo',
14
14
  'codelist_status_text',
15
+ 'link',
15
16
  'linkProtocol',
16
17
  'contactForResource*.organisation*',
17
18
  'contact*.organisation*',
@@ -19,9 +20,10 @@ export const FIELDS_SUMMARY: FieldName[] = [
19
20
  'userSavedCount',
20
21
  'cl_topic',
21
22
  'cl_maintenanceAndUpdateFrequency',
22
- 'MD_LegalConstraintsUseLimitationObject',
23
+ 'MD_LegalConstraints*Object',
23
24
  'qualityScore',
24
25
  'allKeywords',
26
+ 'recordLink',
25
27
  ]
26
28
 
27
29
  export const FIELDS_BRIEF: FieldName[] = [
@@ -1,5 +1,5 @@
1
1
  <gn-ui-autocomplete
2
- [placeholder]="'search.field.any.placeholder' | translate"
2
+ [placeholder]="placeholder ?? ('search.field.any.placeholder' | translate)"
3
3
  [displayWithFn]="displayWithFn"
4
4
  [action]="autoCompleteAction"
5
5
  (itemSelected)="handleItemSelection($event)"
@@ -30,6 +30,7 @@ export class FuzzySearchComponent implements OnInit {
30
30
  @Input() autoFocus = false
31
31
  @Input() forceTrackPosition = false
32
32
  @Input() enterButton = false
33
+ @Input() placeholder?: string
33
34
  @Output() itemSelected = new EventEmitter<CatalogRecord>()
34
35
  @Output() inputSubmitted = new EventEmitter<string>()
35
36
  @Output() isSearchActive = new EventEmitter<boolean>()
@@ -55,8 +55,10 @@ export class ResultsListContainerComponent implements OnInit {
55
55
  @Optional()
56
56
  @Inject(RECORD_DATASET_URL_TOKEN)
57
57
  private recordDatasetUrlTemplate: string,
58
+ @Optional()
58
59
  @Inject(RECORD_SERVICE_URL_TOKEN)
59
60
  private recordServiceUrlTemplate: string,
61
+ @Optional()
60
62
  @Inject(RECORD_REUSE_URL_TOKEN)
61
63
  private recordReuseUrlTemplate: string
62
64
  ) {}
@@ -7,6 +7,7 @@
7
7
  [canDelete]="canDelete"
8
8
  [canDuplicate]="canDuplicate"
9
9
  [isDuplicating]="isDuplicating"
10
+ [canEdit]="canEdit"
10
11
  (recordClick)="handleRecordClick($event)"
11
12
  (duplicateRecord)="handleDuplicateRecord($event)"
12
13
  (deleteRecord)="handleDeleteRecord($event)"
@@ -12,7 +12,7 @@ import { SearchService } from '../utils/service/search.service'
12
12
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
13
13
  import { ResultsTableComponent } from '../../../../../../libs/ui/search/src'
14
14
  import { CommonModule } from '@angular/common'
15
- import { Subscription } from 'rxjs'
15
+ import { Observable, Subscription } from 'rxjs'
16
16
  import { NotificationsService } from '../../../../../../libs/feature/notifications/src'
17
17
  import { TranslateService } from '@ngx-translate/core'
18
18
 
@@ -24,8 +24,6 @@ import { TranslateService } from '@ngx-translate/core'
24
24
  imports: [CommonModule, ResultsTableComponent],
25
25
  })
26
26
  export class ResultsTableContainerComponent implements OnDestroy {
27
- @Input() canDuplicate: (record: CatalogRecord) => boolean = () => true
28
- @Input() canDelete: (record: CatalogRecord) => boolean = () => true
29
27
  @Input() isDuplicating: false
30
28
 
31
29
  @Output() recordClick = new EventEmitter<CatalogRecord>()
@@ -39,6 +37,18 @@ export class ResultsTableContainerComponent implements OnDestroy {
39
37
  hasDraft = (record: CatalogRecord): boolean =>
40
38
  this.recordsRepository.recordHasDraft(record.uniqueIdentifier)
41
39
 
40
+ canDuplicate = (record: CatalogRecord): boolean => {
41
+ return this.recordsRepository.canDuplicate(record)
42
+ }
43
+
44
+ canDelete = (record: CatalogRecord): Observable<boolean> => {
45
+ return this.recordsRepository.canDelete(record)
46
+ }
47
+
48
+ canEdit = (record: CatalogRecord): Observable<boolean> => {
49
+ return this.recordsRepository.canEditIndexedRecord(record)
50
+ }
51
+
42
52
  constructor(
43
53
  protected searchFacade: SearchFacade,
44
54
  private searchService: SearchService,
@@ -57,6 +57,7 @@ export class ChartComponent implements OnChanges, AfterViewInit {
57
57
  this.dataRaw = value
58
58
  }
59
59
  @Input() labelProperty: string
60
+ @Input() prettyLabel: string
60
61
  @Input() valueProperty: string
61
62
  @Input() secondaryValueProperty: string
62
63
  @Input() type: InputChartType = 'bar'
@@ -95,7 +96,7 @@ export class ChartComponent implements OnChanges, AfterViewInit {
95
96
  labels: this.getDataProxy(this.labelProperty) as string[],
96
97
  datasets: [
97
98
  {
98
- label: this.valueProperty,
99
+ label: this.prettyLabel,
99
100
  data,
100
101
  },
101
102
  ],
@@ -8,21 +8,24 @@
8
8
  [matSortDisableClear]="true"
9
9
  *ngrxLet="properties$ as properties"
10
10
  >
11
- <ng-container *ngFor="let prop of properties" [matColumnDef]="prop">
11
+ <ng-container
12
+ *ngFor="let attr of _featureAttributes"
13
+ [matColumnDef]="attr.value"
14
+ >
12
15
  <th
13
16
  mat-header-cell
14
17
  *matHeaderCellDef
15
18
  mat-sort-header
16
19
  class="text-sm text-black bg-white"
17
20
  >
18
- {{ prop }}
21
+ {{ attr.label }}
19
22
  </th>
20
23
  <td
21
24
  mat-cell
22
25
  *matCellDef="let element"
23
26
  class="whitespace-nowrap pr-1 truncate"
24
27
  >
25
- {{ element[prop] }}
28
+ {{ element[attr.value] }}
26
29
  </td>
27
30
  </ng-container>
28
31
 
@@ -61,13 +61,14 @@ export interface TableItemModel {
61
61
  changeDetection: ChangeDetectionStrategy.OnPush,
62
62
  })
63
63
  export class DataTableComponent implements OnInit, AfterViewInit, OnChanges {
64
+ _featureAttributes = []
65
+ @Input() set featureAttributes(value: { value: string; label: string }[]) {
66
+ this._featureAttributes = value
67
+ this.properties$.next(value.map((attr) => attr.value))
68
+ }
64
69
  @Input() set dataset(value: BaseReader) {
65
- this.properties$.next(null)
66
70
  this.dataset_ = value
67
71
  this.dataset_.load()
68
- this.dataset_.properties.then((properties) =>
69
- this.properties$.next(properties.map((p) => p.name))
70
- )
71
72
  this.dataset_.info.then((info) => (this.count = info.itemsCount))
72
73
  }
73
74
  @Input() activeId: TableItemId
@@ -5,6 +5,7 @@ export * from './lib/content-ghost/content-ghost.component'
5
5
  export * from './lib/download-item/download-item.component'
6
6
  export * from './lib/downloads-list/downloads-list.component'
7
7
  export * from './lib/error/error.component'
8
+ export * from './lib/geo-data-badge/geo-data-badge.component'
8
9
  export * from './lib/image-input/image-input.component'
9
10
  export * from './lib/image-overlay-preview/image-overlay-preview.component'
10
11
  export * from './lib/kind-badge/kind-badge.component'
@@ -18,7 +19,6 @@ export * from './lib/metadata-quality-item/metadata-quality-item.component'
18
19
  export * from './lib/metadata-quality/metadata-quality.component'
19
20
  export * from './lib/notification/notification.component'
20
21
  export * from './lib/record-api-form/record-api-form.component'
21
- export * from './lib/related-record-card/related-record-card.component'
22
22
  export * from './lib/thumbnail/thumbnail.component'
23
23
  export * from './lib/ui-elements.module'
24
24
  export * from './lib/user-feedback-item/user-feedback-item.component'
@@ -26,3 +26,4 @@ export * from './lib/user-preview/user-preview.component'
26
26
  export * from './lib/application-banner/application-banner.component'
27
27
  export * from './lib/internal-link-card/internal-link-card.component'
28
28
  export * from './lib/service-capabilities/service-capabilities.component'
29
+ export * from './lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component'
@@ -0,0 +1,4 @@
1
+ :host {
2
+ --gn-ui-geo-data-badge-background-color: var(--color-primary-white);
3
+ --gn-ui-geo-data-badge-text-color: var(--color-primary-darkest);
4
+ }
@@ -0,0 +1,13 @@
1
+ <div
2
+ [class]="badgeClasses"
3
+ [title]="'record.metadata.isGeographical' | translate"
4
+ *ngIf="isGeodata()"
5
+ >
6
+ <ng-icon
7
+ class="shrink-0 text-[0.75em]"
8
+ name="matLocationSearchingOutline"
9
+ ></ng-icon>
10
+ <span class="ml-1 hidden sm:inline-block shrink-0" *ngIf="showLabel" translate
11
+ >record.metadata.isGeographical</span
12
+ >
13
+ </div>
@@ -0,0 +1,54 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
+ import { matLocationSearchingOutline } from '@ng-icons/material-icons/outline'
3
+ import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
4
+ import { CommonModule } from '@angular/common'
5
+ import { TranslateModule } from '@ngx-translate/core'
6
+ import { NgIcon, provideIcons } from '@ng-icons/core'
7
+ import { LinkClassifierService, LinkUsage } from '../../../../../../libs/util/shared/src'
8
+
9
+ @Component({
10
+ selector: 'gn-ui-geo-data-badge',
11
+ templateUrl: './geo-data-badge.component.html',
12
+ styleUrls: ['./geo-data-badge.component.css'],
13
+ changeDetection: ChangeDetectionStrategy.OnPush,
14
+ standalone: true,
15
+ imports: [CommonModule, NgIcon, TranslateModule],
16
+ viewProviders: [
17
+ provideIcons({
18
+ matLocationSearchingOutline,
19
+ }),
20
+ ],
21
+ })
22
+ export class GeoDataBadgeComponent {
23
+ @Input() showLabel = true
24
+ @Input() styling = 'default'
25
+ @Input() record: CatalogRecord
26
+
27
+ isGeodata() {
28
+ const links =
29
+ 'onlineResources' in this.record ? this.record.onlineResources : []
30
+ const hasMapApi = links.some((link) =>
31
+ this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
32
+ )
33
+ const hasGeoData = links.some((link) =>
34
+ this.linkClassifier.hasUsage(link, LinkUsage.GEODATA)
35
+ )
36
+ return hasMapApi || hasGeoData
37
+ }
38
+
39
+ get badgeClasses(): string {
40
+ const baseClasses =
41
+ 'flex shrink-0 items-center badge-btn text-xs px-2 h-6 min-h-6'
42
+
43
+ switch (this.styling) {
44
+ case 'light':
45
+ return `${baseClasses} bg-primary-white text-primary-darkest`
46
+ case 'default':
47
+ return `${baseClasses} bg-primary-darker text-white`
48
+ default:
49
+ return 'flex shrink-0 items-center'
50
+ }
51
+ }
52
+
53
+ constructor(public linkClassifier: LinkClassifierService) {}
54
+ }