geonetwork-ui 2.6.0-dev.c4b99cdef → 2.6.0-dev.ceb4be4c1

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 (212) 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 +37 -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/iso19139/read-parts.mjs +2 -2
  5. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +2 -1
  6. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +3 -3
  7. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +29 -5
  8. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  9. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  10. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  11. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  12. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  13. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  14. package/esm2022/libs/feature/record/src/index.mjs +2 -3
  15. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  16. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  17. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
  18. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
  19. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
  20. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
  21. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
  22. package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
  23. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  24. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  25. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  26. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  27. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  28. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +27 -53
  29. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
  30. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  31. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  32. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  33. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  34. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
  35. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  36. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  37. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  38. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  39. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  40. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  41. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  42. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
  43. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +65 -14
  44. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  45. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  46. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
  47. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  48. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  49. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +27 -14
  50. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  51. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  52. package/esm2022/translations/de.json +7 -2
  53. package/esm2022/translations/en.json +8 -5
  54. package/esm2022/translations/es.json +7 -2
  55. package/esm2022/translations/fr.json +7 -4
  56. package/esm2022/translations/it.json +39 -34
  57. package/esm2022/translations/nl.json +7 -2
  58. package/esm2022/translations/pt.json +7 -2
  59. package/fesm2022/geonetwork-ui.mjs +1106 -600
  60. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  61. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  62. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  63. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +0 -1
  64. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  65. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  66. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  67. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
  68. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  69. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +3 -0
  70. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  71. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  72. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  73. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +2 -0
  74. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  75. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  76. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  77. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  78. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  79. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  80. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  81. package/libs/feature/record/src/index.d.ts +1 -2
  82. package/libs/feature/record/src/index.d.ts.map +1 -1
  83. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  84. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
  85. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  86. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
  87. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  88. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
  89. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  90. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
  91. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  92. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
  93. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  94. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  95. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  96. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  97. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  98. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  99. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  100. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  101. package/libs/ui/elements/src/index.d.ts +2 -0
  102. package/libs/ui/elements/src/index.d.ts.map +1 -1
  103. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  104. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  105. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +3 -7
  106. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  107. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
  108. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
  109. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  110. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  111. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
  112. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  113. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  114. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  115. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  116. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  117. package/libs/ui/inputs/src/index.d.ts +1 -0
  118. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  119. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  120. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  121. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  122. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  123. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +15 -6
  124. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
  125. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  126. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  127. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  128. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +5 -1
  129. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  130. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  131. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  132. package/package.json +2 -2
  133. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  134. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +55 -4
  135. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
  136. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
  137. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
  138. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
  139. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +50 -5
  140. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  141. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +2 -0
  142. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  143. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  144. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
  145. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  146. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  147. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  148. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  149. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  150. package/src/libs/feature/record/src/index.ts +1 -2
  151. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
  152. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -1
  153. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  154. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
  155. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
  156. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
  157. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
  158. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
  159. package/src/libs/feature/search/src/lib/constants.ts +1 -0
  160. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  161. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  162. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  163. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  164. package/src/libs/ui/elements/src/index.ts +2 -0
  165. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  166. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  167. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  168. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +133 -138
  169. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +19 -47
  170. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
  171. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
  172. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
  173. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
  174. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
  175. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  176. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  177. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
  178. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
  179. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
  180. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  181. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
  182. package/src/libs/ui/inputs/src/index.ts +1 -0
  183. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  184. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  185. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  186. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  187. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
  188. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  189. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  190. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -0
  191. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +8 -10
  192. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +75 -7
  193. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  194. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  195. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  196. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
  197. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  198. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  199. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  200. package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
  201. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +26 -16
  202. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +20 -10
  203. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  204. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  205. package/translations/de.json +7 -2
  206. package/translations/en.json +8 -5
  207. package/translations/es.json +7 -2
  208. package/translations/fr.json +7 -4
  209. package/translations/it.json +39 -34
  210. package/translations/nl.json +7 -2
  211. package/translations/pt.json +7 -2
  212. package/translations/sk.json +7 -2
@@ -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*',
@@ -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
  ) {}
@@ -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'
@@ -26,3 +27,4 @@ export * from './lib/user-preview/user-preview.component'
26
27
  export * from './lib/application-banner/application-banner.component'
27
28
  export * from './lib/internal-link-card/internal-link-card.component'
28
29
  export * from './lib/service-capabilities/service-capabilities.component'
30
+ 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
+ }
@@ -1,156 +1,151 @@
1
- <div
2
- class="rounded-lg group card-shadow cursor-pointer overflow-hidden hover:bg-gray-50"
3
- [ngClass]="cardClass"
4
- >
5
- <div class="flex flex-row justify-between w-full">
1
+ <a [attr.href]="linkHref" [target]="linkTarget">
2
+ <div
3
+ class="group rounded-md bg-white hover:cursor-pointer hover:bg-slate-50 overflow-hidden w-full"
4
+ [ngClass]="cardClass"
5
+ >
6
6
  <div
7
- *ngIf="shouldShowThumbnail"
8
- [ngClass]="thumbnailContainerClass"
9
- class="mr-4 flex flex-col"
7
+ class="flex flex-row md:gap-0 justify-between w-full"
8
+ [ngClass]="{ 'flex-wrap md:flex-nowrap gap-3': size === 'L' }"
10
9
  >
11
- <gn-ui-thumbnail
12
- class="w-full h-full object-cover"
13
- [thumbnailUrl]="record.overviews?.[0]?.url?.toString() || ''"
14
- [fit]="'cover'"
15
- ></gn-ui-thumbnail>
16
- </div>
17
- <div
18
- class="flex flex-col flex-1 relative"
19
- [ngClass]="{
20
- 'justify-between': record.ownerOrganization?.name && size !== 'XS',
21
- }"
22
- >
23
- <div class="flex items-center space-x-2">
24
- <span
25
- *ngIf="getKindInfo().text"
26
- class="badge-btn text-white text-xs px-2 py-0.5 font-bold shrink-0 bg-primary leading-tight flex items-center justify-evenly h-6 min-h-6"
27
- >
28
- <ng-icon
29
- class="text-[0.9em] text-white mr-1"
30
- [name]="getKindInfo().icon"
31
- ></ng-icon>
32
- <span class="font-medium text-white text-xs" translate>
33
- {{ getKindInfo().text }}
34
- </span>
35
- </span>
36
- <span
37
- *ngIf="isGeodata"
38
- class="badge-btn text-black text-xs px-2 py-0.5 font-bold shrink-0 bg-primary-white leading-tight flex items-center justify-evenly h-6 min-h-6"
39
- [ngClass]="size === 'L' ? 'w-[164px]' : 'w-8'"
40
- >
41
- <ng-icon
42
- class="text-[0.9em] text-primary-darkest"
43
- name="matLocationSearchingOutline"
44
- ></ng-icon>
45
- <ng-container *ngIf="size === 'L'">
46
- <span
47
- class="font-medium text-primary-darkest text-xs ml-1"
48
- translate
49
- >
50
- record.metadata.type
51
- </span>
52
- </ng-container>
53
- </span>
54
- <div class="flex items-center">
55
- <gn-ui-metadata-quality
56
- [smaller]="true"
57
- [metadata]="record"
58
- [metadataQualityDisplay]="metadataQualityDisplay"
59
- ></gn-ui-metadata-quality>
60
- </div>
61
- <div class="absolute top-0 right-0 items-center">
62
- <ng-container
63
- *ngIf="size !== 'XS'"
64
- [ngTemplateOutlet]="favoriteTemplate"
65
- [ngTemplateOutletContext]="{ $implicit: record }"
66
- ></ng-container>
67
- </div>
68
- </div>
69
10
  <div
70
- class="font-medium text-title group-hover:text-primary overflow-hidden break-words"
71
- [ngClass]="getTitleClass()"
11
+ *ngIf="shouldShowThumbnail"
12
+ [ngClass]="thumbnailContainerClass"
13
+ class="border mr-4 flex flex-col"
72
14
  >
73
- {{ record.title }}
15
+ <gn-ui-thumbnail
16
+ class="w-full h-full object-cover"
17
+ [thumbnailUrl]="record.overviews?.[0]?.url?.toString() || ''"
18
+ [fit]="'cover'"
19
+ ></gn-ui-thumbnail>
74
20
  </div>
75
- <div
76
- *ngIf="size === 'L'"
77
- class="mt-1 mb-2 font-normal text-xs text-gray-900 line-clamp-2 overflow-hidden"
78
- >
79
- <gn-ui-markdown-parser
80
- [textContent]="abstract"
81
- [whitoutStyles]="true"
82
- ></gn-ui-markdown-parser>
83
- </div>
84
- <div
85
- *ngIf="size !== 'XS' && record.ownerOrganization?.name"
86
- class="flex items-center justify-evenly bg-gray-50 rounded-lg h-[53px] px-2"
87
- >
88
- <div class="flex items-center flex-1 min-w-0">
89
- <div
90
- class="w-[45px] h-[45px] rounded-lg overflow-hidden shrink-0 mr-3"
91
- >
92
- <gn-ui-thumbnail
93
- [thumbnailUrl]="
94
- record.ownerOrganization?.logoUrl?.toString() || ''
95
- "
96
- [fit]="'contain'"
97
- class="w-full h-full rounded-lg"
98
- ></gn-ui-thumbnail>
21
+ <div class="grow flex flex-col gap-3">
22
+ <div class="flex items-center gap-2">
23
+ <div class="grow flex flex-wrap items-center gap-2">
24
+ <gn-ui-kind-badge
25
+ [styling]="'default'"
26
+ [kind]="record?.kind"
27
+ ></gn-ui-kind-badge>
28
+ <gn-ui-geo-data-badge
29
+ [showLabel]="size === 'L'"
30
+ [styling]="'light'"
31
+ [record]="record"
32
+ ></gn-ui-geo-data-badge>
33
+ <gn-ui-metadata-quality
34
+ class="flex items-center"
35
+ [smaller]="true"
36
+ [metadata]="record"
37
+ [metadataQualityDisplay]="metadataQualityDisplay"
38
+ ></gn-ui-metadata-quality>
99
39
  </div>
100
- <div *ngIf="organization?.name" class="flex-1 w-0 overflow-hidden">
101
- <div
102
- class="text-xs text-black font-normal leading-tight truncate"
103
- translate
104
- >
105
- record.card.metadata.contact
106
- </div>
107
- <div class="text-xl text-primary-black font-medium truncate">
108
- {{ organization.name }}
109
- </div>
40
+ <div *ngIf="size !== 'XS'" data-cy="recordFav">
41
+ <ng-container
42
+ [ngTemplateOutlet]="favoriteTemplate"
43
+ [ngTemplateOutletContext]="{ $implicit: record }"
44
+ ></ng-container>
110
45
  </div>
111
46
  </div>
112
- <div *ngIf="size === 'L'" class="ml-2 flex space-x-2">
113
- <div *ngIf="organization?.website" class="flex">
114
- <button
115
- [title]="organization.website"
116
- class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
117
- (click)="openExternalUrl($event, organization.website)"
47
+
48
+ <div class="grow flex flex-col gap-2">
49
+ <div
50
+ class="font-medium text-title group-hover:text-primary"
51
+ [title]="record.title"
52
+ >
53
+ <h4
54
+ class="mr-6 overflow-hidden"
55
+ [ngClass]="getTitleClass()"
56
+ data-cy="recordTitle"
57
+ [title]="record.title"
118
58
  >
119
- <ng-icon name="iconoirInternet"></ng-icon>
120
- </button>
59
+ {{ record.title }}
60
+ </h4>
121
61
  </div>
122
- <div *ngIf="contacts[0]?.email" class="flex">
123
- <button
124
- [title]="contacts[0].email"
125
- class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
126
- data-cy="contact-email"
127
- (click)="openMailto($event, contacts[0].email)"
128
- >
129
- <ng-icon name="matEmailOutline"></ng-icon>
130
- </button>
62
+ <div
63
+ *ngIf="size === 'L'"
64
+ class="mr-6 text-xs text-gray-900 line-clamp-2 overflow-hidden"
65
+ data-cy="recordAbstract"
66
+ >
67
+ <gn-ui-markdown-parser
68
+ [textContent]="abstract"
69
+ [whitoutStyles]="true"
70
+ ></gn-ui-markdown-parser>
131
71
  </div>
132
- <div *ngIf="contacts[0]?.phone" class="flex">
133
- <button
134
- [title]="'Copy to clipboard'"
135
- class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
136
- data-cy="contact-phone"
137
- (click)="copyToClipboard($event, contacts[0].phone)"
72
+ </div>
73
+
74
+ <div
75
+ data-cy="recordOrg"
76
+ *ngIf="size !== 'XS' && record.ownerOrganization?.name"
77
+ class="flex items-center justify-evenly bg-gray-50 rounded-lg h-[53px] px-2"
78
+ >
79
+ <div class="flex items-center flex-1 min-w-0">
80
+ <div
81
+ class="w-[45px] h-[45px] rounded-lg overflow-hidden shrink-0 mr-3"
138
82
  >
139
- <ng-icon name="matPhoneOutline"></ng-icon>
140
- </button>
83
+ <gn-ui-thumbnail
84
+ [thumbnailUrl]="
85
+ record.ownerOrganization?.logoUrl?.toString() || ''
86
+ "
87
+ [fit]="'contain'"
88
+ class="w-full h-full rounded-lg"
89
+ ></gn-ui-thumbnail>
90
+ </div>
91
+ <div *ngIf="organization?.name" class="flex-1 w-0 overflow-hidden">
92
+ <div
93
+ class="text-xs text-black font-normal leading-tight truncate"
94
+ translate
95
+ >
96
+ record.card.metadata.contact
97
+ </div>
98
+ <div
99
+ data-cy="recordOrgName"
100
+ class="text-xl text-primary-black font-medium truncate"
101
+ >
102
+ {{ organization.name }}
103
+ </div>
104
+ </div>
141
105
  </div>
142
- <div *ngIf="contacts[0]?.address" class="flex">
143
- <button
144
- [title]="'Copy to clipboard'"
145
- class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
146
- data-cy="contact-phone"
147
- (click)="copyToClipboard($event, contacts[0].address)"
148
- >
149
- <ng-icon name="matLocationOnOutline"></ng-icon>
150
- </button>
106
+ <div *ngIf="size === 'L'" class="ml-2 flex space-x-2">
107
+ <div *ngIf="organization?.website" class="flex">
108
+ <button
109
+ [title]="organization.website"
110
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
111
+ (click)="openExternalUrl($event, organization.website)"
112
+ >
113
+ <ng-icon name="iconoirInternet"></ng-icon>
114
+ </button>
115
+ </div>
116
+ <div *ngIf="contacts[0]?.email" class="flex">
117
+ <button
118
+ [title]="contacts[0].email"
119
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
120
+ data-cy="contact-email"
121
+ (click)="openMailto($event, contacts[0].email)"
122
+ >
123
+ <ng-icon name="matEmailOutline"></ng-icon>
124
+ </button>
125
+ </div>
126
+ <div *ngIf="contacts[0]?.phone" class="flex">
127
+ <button
128
+ [title]="'Copy to clipboard'"
129
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
130
+ data-cy="contact-phone"
131
+ (click)="copyToClipboard($event, contacts[0].phone)"
132
+ >
133
+ <ng-icon name="matPhoneOutline"></ng-icon>
134
+ </button>
135
+ </div>
136
+ <div *ngIf="contacts[0]?.address" class="flex">
137
+ <button
138
+ [title]="'Copy to clipboard'"
139
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
140
+ data-cy="contact-phone"
141
+ (click)="copyToClipboard($event, contacts[0].address)"
142
+ >
143
+ <ng-icon name="matLocationOnOutline"></ng-icon>
144
+ </button>
145
+ </div>
151
146
  </div>
152
147
  </div>
153
148
  </div>
154
149
  </div>
155
150
  </div>
156
- </div>
151
+ </a>