geonetwork-ui 2.6.0-dev.186d57931 → 2.6.0-dev.34911f182

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 (225) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/resource-types.mjs +17 -15
  3. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +2 -1
  4. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  5. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  6. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  7. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  8. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  9. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  10. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  11. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  12. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  13. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
  14. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  15. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
  16. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  17. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  18. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  19. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  20. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  21. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  22. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  23. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  25. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
  27. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  28. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  29. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  30. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  31. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  32. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
  33. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  34. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  35. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  36. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  37. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  38. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  39. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  40. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  41. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  42. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  43. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  44. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  45. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  46. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  47. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +56 -0
  48. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  49. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  50. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  51. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  52. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  53. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  54. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  55. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  56. package/esm2022/translations/de.json +8 -1
  57. package/esm2022/translations/en.json +10 -1
  58. package/esm2022/translations/es.json +8 -1
  59. package/esm2022/translations/fr.json +11 -2
  60. package/esm2022/translations/it.json +8 -1
  61. package/esm2022/translations/nl.json +8 -1
  62. package/esm2022/translations/pt.json +8 -1
  63. package/fesm2022/geonetwork-ui.mjs +638 -168
  64. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  65. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  66. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  67. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  68. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  69. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  70. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +2 -0
  71. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  72. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  73. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  74. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  75. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  76. package/libs/feature/editor/src/index.d.ts +1 -0
  77. package/libs/feature/editor/src/index.d.ts.map +1 -1
  78. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  79. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  80. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  81. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  82. package/libs/feature/search/src/index.d.ts +1 -1
  83. package/libs/feature/search/src/index.d.ts.map +1 -1
  84. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  85. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  86. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  87. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  88. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  89. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  90. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  91. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  92. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  93. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  94. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  95. package/libs/ui/elements/src/index.d.ts +1 -0
  96. package/libs/ui/elements/src/index.d.ts.map +1 -1
  97. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  98. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  99. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  100. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  101. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
  102. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  103. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  104. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  105. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  106. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  107. package/libs/ui/inputs/src/index.d.ts +1 -0
  108. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  109. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  110. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  111. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  112. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  113. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  114. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  115. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  116. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  117. package/libs/ui/layout/src/index.d.ts +1 -0
  118. package/libs/ui/layout/src/index.d.ts.map +1 -1
  119. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  120. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  121. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +18 -0
  122. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  123. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  124. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  125. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  126. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  127. package/libs/ui/search/src/index.d.ts +1 -0
  128. package/libs/ui/search/src/index.d.ts.map +1 -1
  129. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  130. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  131. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  132. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  133. package/package.json +1 -1
  134. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  135. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  136. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -0
  137. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +2 -2
  138. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  139. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  140. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  141. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  142. package/src/libs/feature/editor/src/index.ts +1 -0
  143. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  144. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  145. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  146. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +16 -10
  147. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  148. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  149. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  150. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +25 -16
  151. package/src/libs/feature/search/src/index.ts +1 -1
  152. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
  153. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  154. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  155. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  156. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  157. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  158. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  159. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  160. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  161. package/src/libs/ui/elements/src/index.ts +1 -0
  162. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  163. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  164. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  165. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  166. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  167. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  168. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  169. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
  170. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
  171. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  172. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  173. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  174. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +9 -9
  175. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  176. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +7 -3
  177. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  178. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
  179. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  180. package/src/libs/ui/inputs/src/index.ts +1 -0
  181. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  182. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  183. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  184. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  185. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  186. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  187. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +0 -0
  188. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
  189. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  190. package/src/libs/ui/layout/src/index.ts +1 -0
  191. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  192. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  193. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  194. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  195. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  196. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  197. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  198. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  199. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +46 -0
  200. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +62 -0
  201. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  202. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  203. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  204. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  205. package/src/libs/ui/search/src/index.ts +1 -0
  206. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  207. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
  208. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  209. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  210. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +1 -1
  211. package/tailwind.base.config.js +3 -0
  212. package/tailwind.base.css +1 -13
  213. package/translations/de.json +8 -1
  214. package/translations/en.json +10 -1
  215. package/translations/es.json +8 -1
  216. package/translations/fr.json +11 -2
  217. package/translations/it.json +8 -1
  218. package/translations/nl.json +8 -1
  219. package/translations/pt.json +8 -1
  220. package/translations/sk.json +8 -1
  221. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  222. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  223. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  224. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  225. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
@@ -27,7 +27,7 @@ type CardSize = 'L' | 'M' | 'S' | 'XS'
27
27
  ],
28
28
  })
29
29
  export class DownloadItemComponent {
30
- private _size: 'L' | 'M' | 'S' | 'XS'
30
+ private _size: CardSize
31
31
  @Input() link: DatasetOnlineResource
32
32
  @Input() color: string
33
33
  @Input() format: string
@@ -43,7 +43,7 @@ export class DownloadItemComponent {
43
43
  this._size = value
44
44
  this.cardClass = this.sizeClassMap[value]
45
45
  }
46
- get size(): 'L' | 'M' | 'S' | 'XS' {
46
+ get size(): CardSize {
47
47
  return this._size
48
48
  }
49
49
  cardClass = ''
@@ -2,12 +2,23 @@
2
2
  class="flex flex-wrap justify-between items-center pb-4"
3
3
  *ngIf="links && links.length > 0"
4
4
  >
5
- <div
6
- class="font-title text-xl text-title font-medium mr-4 text-center sm:text-left"
7
- translate
8
- >
9
- record.metadata.download
5
+ <div class="flex flex-row items-center gap-x-4">
6
+ <div>
7
+ <h3
8
+ class="inline-block font-title text-xl text-title font-medium mr-4"
9
+ translate
10
+ >
11
+ record.metadata.download
12
+ </h3>
13
+ <span class="px-3">({{ linksCount }})</span>
14
+ </div>
15
+ <gn-ui-previous-next-buttons
16
+ class="md:block hidden"
17
+ *ngIf="_list?.pagesCount > 1"
18
+ [listComponent]="_list"
19
+ ></gn-ui-previous-next-buttons>
10
20
  </div>
21
+
11
22
  <div
12
23
  class="flex flex-wrap justify-start sm:justify-end"
13
24
  data-cy="download-format-filters"
@@ -26,9 +37,29 @@
26
37
  </gn-ui-button>
27
38
  </div>
28
39
  </div>
29
- <div class="mb-2 sm:mb-3" *ngFor="let link of filteredLinks">
40
+
41
+ <ng-container>
42
+ <gn-ui-block-list
43
+ class="md:block hidden"
44
+ #blockList
45
+ (listChanges)="updateList($event)"
46
+ containerClass="gap-4 pt-5 pb-7"
47
+ >
48
+ <gn-ui-download-item
49
+ #block
50
+ *ngFor="let link of filteredLinks"
51
+ [link]="link"
52
+ [color]="getLinkColor(link)"
53
+ [format]="getLinkFormat(link)"
54
+ [isFromApi]="isFromApi(link)"
55
+ [size]="blockList.subComponentSize"
56
+ ></gn-ui-download-item>
57
+ </gn-ui-block-list>
58
+ </ng-container>
59
+
60
+ <div class="mb-5 md:hidden block" *ngFor="let link of filteredLinks">
30
61
  <gn-ui-download-item
31
- size="L"
62
+ size="M"
32
63
  [link]="link"
33
64
  [color]="getLinkColor(link)"
34
65
  [format]="getLinkFormat(link)"
@@ -1,4 +1,11 @@
1
- import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
1
+ import {
2
+ AfterViewInit,
3
+ ChangeDetectionStrategy,
4
+ ChangeDetectorRef,
5
+ Component,
6
+ Input,
7
+ ViewChild,
8
+ } from '@angular/core'
2
9
  import { TranslateModule, TranslateService } from '@ngx-translate/core'
3
10
  import { marker } from '@biesbjerg/ngx-translate-extract-marker'
4
11
  import { getBadgeColor, getFileFormat } from '../../../../../../libs/util/shared/src'
@@ -6,6 +13,11 @@ import { DatasetDownloadDistribution } from '../../../../../../libs/common/domai
6
13
  import { CommonModule } from '@angular/common'
7
14
  import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
8
15
  import { DownloadItemComponent } from '../download-item/download-item.component'
16
+ import {
17
+ BlockListComponent,
18
+ Paginable,
19
+ PreviousNextButtonsComponent,
20
+ } from '../../../../../../libs/ui/layout/src'
9
21
 
10
22
  marker('datahub.search.filter.all')
11
23
  marker('datahub.search.filter.others')
@@ -22,17 +34,32 @@ type FilterFormat = (typeof FILTER_FORMATS)[number]
22
34
  imports: [
23
35
  CommonModule,
24
36
  ButtonComponent,
37
+ BlockListComponent,
25
38
  DownloadItemComponent,
26
39
  TranslateModule,
40
+ PreviousNextButtonsComponent,
27
41
  ],
28
42
  })
29
43
  export class DownloadsListComponent {
30
- constructor(private translateService: TranslateService) {}
44
+ constructor(
45
+ private translateService: TranslateService,
46
+ private changeDetector: ChangeDetectorRef
47
+ ) {}
31
48
 
49
+ _list: BlockListComponent
32
50
  @Input() links: DatasetDownloadDistribution[]
33
51
 
52
+ get linksCount(): number {
53
+ return this.filteredLinks?.length || 0
54
+ }
55
+
34
56
  activeFilterFormats: FilterFormat[] = ['all']
35
57
 
58
+ updateList($event: BlockListComponent) {
59
+ this._list = $event
60
+ this.changeDetector.detectChanges()
61
+ }
62
+
36
63
  private removeDuplicateFormats(
37
64
  links: DatasetDownloadDistribution[]
38
65
  ): DatasetDownloadDistribution[] {
@@ -5,7 +5,7 @@
5
5
  <div
6
6
  *ngIf="imageUrl"
7
7
  data-cy="record-thumbnail"
8
- class="shrink-0 bg-gray-100 rounded-lg overflow-hidden border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-full w-full"
8
+ class="shrink-0 rounded-lg overflow-hidden group-hover:shadow-xl group-hover:border-0 h-full w-full"
9
9
  >
10
10
  <gn-ui-thumbnail
11
11
  class="relative h-full w-full"
@@ -0,0 +1,6 @@
1
+ :host gn-ui-badge ng-icon {
2
+ font-size: 1.2rem;
3
+ width: 1.2rem;
4
+ height: 1.2rem;
5
+ transform: translateY(-2px);
6
+ }
@@ -0,0 +1,9 @@
1
+ <ng-icon [name]="iconKind" class="mr-1"></ng-icon>
2
+
3
+ <ng-container *ngIf="contentTemplate; else defaultContent">
4
+ <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
5
+ </ng-container>
6
+
7
+ <ng-template #defaultContent>
8
+ {{ kind | translate }}
9
+ </ng-template>
@@ -0,0 +1,51 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ Input,
6
+ TemplateRef,
7
+ } from '@angular/core'
8
+ import { provideIcons } from '@ng-icons/core'
9
+ import {
10
+ iconoirAppleWallet,
11
+ iconoirAppleShortcuts,
12
+ iconoirCode,
13
+ iconoirCreditCard,
14
+ } from '@ng-icons/iconoir'
15
+ import { NgIconsModule } from '@ng-icons/core'
16
+ import { BadgeComponent } from '../../../../../../libs/ui/inputs/src'
17
+ import { TranslateModule } from '@ngx-translate/core'
18
+
19
+ enum KindConfig {
20
+ all = 'iconoirAppleWallet', // (this one is for filter)
21
+ dataset = 'iconoirAppleShortcuts',
22
+ service = 'iconoirCode',
23
+ reuse = 'iconoirCreditCard',
24
+ }
25
+
26
+ @Component({
27
+ selector: 'gn-ui-kind-badge',
28
+ templateUrl: './kind-badge.component.html',
29
+ styleUrls: ['./kind-badge.component.css'],
30
+ viewProviders: [
31
+ provideIcons({
32
+ iconoirAppleWallet,
33
+ iconoirAppleShortcuts,
34
+ iconoirCode,
35
+ iconoirCreditCard,
36
+ }),
37
+ ],
38
+ changeDetection: ChangeDetectionStrategy.OnPush,
39
+ standalone: true,
40
+ imports: [NgIconsModule, CommonModule, BadgeComponent, TranslateModule],
41
+ })
42
+ export class KindBadgeComponent {
43
+ @Input() contentTemplate: TemplateRef<unknown>
44
+ @Input() kind: string
45
+
46
+ hasProjectedContent = false
47
+
48
+ get iconKind() {
49
+ return KindConfig[this.kind] || KindConfig.dataset
50
+ }
51
+ }
@@ -5,7 +5,7 @@
5
5
  [ngClass]="cardClass"
6
6
  [title]="title"
7
7
  >
8
- <div class="flex flex-col justify-between">
8
+ <div class="flex flex-col justify-between flex-1 min-w-0">
9
9
  <div class="gn-ui-card-title">
10
10
  {{ link.description || link.name }}
11
11
  </div>
@@ -26,7 +26,10 @@
26
26
  >
27
27
  </div>
28
28
  </div>
29
- <div class="flex" [ngClass]="size === 'S' ? 'items-end' : 'items-center'">
29
+ <div
30
+ class="flex min-w-[32px]"
31
+ [ngClass]="size === 'S' ? 'items-end' : 'items-center'"
32
+ >
30
33
  <div class="gn-ui-card-icon">
31
34
  <ng-icon
32
35
  class="inline-block card-icon align-middle"
@@ -1,9 +1,5 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
- import {
3
- DatasetDownloadDistribution,
4
- DatasetOnlineResource,
5
- DatasetServiceDistribution,
6
- } from '../../../../../../libs/common/domain/src/lib/model/record'
2
+ import { DatasetOnlineResource } from '../../../../../../libs/common/domain/src/lib/model/record'
7
3
  import { CommonModule } from '@angular/common'
8
4
  import {
9
5
  NgIconComponent,
@@ -30,7 +26,7 @@ type CardSize = 'L' | 'M' | 'S' | 'XS'
30
26
  ],
31
27
  })
32
28
  export class LinkCardComponent {
33
- private _size: 'L' | 'M' | 'S' | 'XS'
29
+ private _size: CardSize
34
30
  @Input() link: DatasetOnlineResource
35
31
  private readonly sizeClassMap: Record<CardSize, string> = {
36
32
  L: 'gn-ui-card-l py-2 px-5',
@@ -43,7 +39,7 @@ export class LinkCardComponent {
43
39
  this._size = value
44
40
  this.cardClass = this.sizeClassMap[value]
45
41
  }
46
- get size(): 'L' | 'M' | 'S' | 'XS' {
42
+ get size(): CardSize {
47
43
  return this._size
48
44
  }
49
45
  cardClass = ''
@@ -1,8 +1,6 @@
1
- <div>
2
- <p class="text-gray-900 text-xs mb-3 uppercase" translate>
3
- record.metadata.catalog
4
- </p>
5
- <p class="text-primary font-title text-21 mb-1">
1
+ <div class="text-black">
2
+ <p class="text-base mb-3" translate>record.metadata.catalog</p>
3
+ <p class="font-title text-21 mb-1">
6
4
  {{ sourceLabel }}
7
5
  </p>
8
6
  </div>
@@ -1,7 +1,7 @@
1
- <div class="py-5 px-5 rounded bg-gray-100 text-black">
2
- <div class="grid gap-3 overflow-hidden">
1
+ <div class="py-5 px-5 rounded-lg bg-gray-100 text-black">
2
+ <div class="grid grid-cols-1 gap-3 overflow-hidden">
3
3
  <div>
4
- <p class="text-sm font-medium" translate>record.metadata.contact</p>
4
+ <p class="text-base font-medium" translate>record.metadata.contact</p>
5
5
  </div>
6
6
  <div
7
7
  *ngIf="shownOrganization?.logoUrl?.href"
@@ -13,10 +13,10 @@
13
13
  fit="contain"
14
14
  ></gn-ui-thumbnail>
15
15
  </div>
16
- <div class="grid gap-1">
16
+ <div class="grid grid-cols-1 gap-1">
17
17
  <div class="flex">
18
18
  <div
19
- class="text-primary font-title text-21 mr-2 cursor-pointer hover:underline"
19
+ class="font-title text-21 mr-2 cursor-pointer hover:underline"
20
20
  (click)="onOrganizationClick()"
21
21
  data-cy="organization-name"
22
22
  >
@@ -27,7 +27,7 @@
27
27
  <a
28
28
  [href]="shownOrganization.website"
29
29
  target="_blank"
30
- class="contact-website text-primary text-sm cursor-pointer hover:underline transition-all"
30
+ class="contact-website text-sm cursor-pointer hover:underline transition-all"
31
31
  >{{ shownOrganization.website }}
32
32
  <ng-icon
33
33
  class="!w-[12px] !h-[12px] opacity-75 shrink-0"
@@ -36,7 +36,7 @@
36
36
  </a>
37
37
  </div>
38
38
  </div>
39
- <div class="grid gap-5 py-3 overflow-hidden">
39
+ <div class="grid grid-cols-1 gap-5 py-3 overflow-hidden">
40
40
  <div *ngIf="contacts[0]?.phone">
41
41
  <div class="flex">
42
42
  <ng-icon
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
  </div>
51
51
  <div *ngIf="contacts[0]?.email">
52
- <div class="flex">
52
+ <div class="flex gap-2">
53
53
  <ng-icon
54
54
  class="!w-5 !h-5 !text-[20px] opacity-75 shrink-0"
55
55
  name="matMailOutline"
@@ -57,7 +57,7 @@
57
57
  <a
58
58
  *ngIf="contacts.length"
59
59
  [href]="'mailto:' + contacts[0].email"
60
- class="text-sm hover:underline ml-2"
60
+ class="break-all text-sm hover:underline"
61
61
  target="_blank"
62
62
  data-cy="contact-email"
63
63
  >{{ contacts[0].email }}</a
@@ -17,6 +17,6 @@
17
17
  --gn-ui-badge-text-color: var(--color-primary-darkest);
18
18
  }
19
19
 
20
- :host ::ng-deep gn-ui-badge:hover {
20
+ :host .metadata-info-keywords ::ng-deep gn-ui-badge:hover {
21
21
  --gn-ui-badge-text-color: white;
22
22
  }
@@ -25,7 +25,7 @@
25
25
  [showContent]="fieldReady('keywords')"
26
26
  >
27
27
  <div *ngIf="metadata.keywords?.length">
28
- <div class="sm:pb-4 flex flex-wrap gap-2">
28
+ <div class="metadata-info-keywords sm:pb-4 flex flex-wrap gap-2">
29
29
  <gn-ui-badge
30
30
  class="inline-block lowercase"
31
31
  (click)="onKeywordClick(keyword)"
@@ -79,9 +79,12 @@
79
79
  </ng-container>
80
80
  <ng-container *ngIf="otherConstraints.length">
81
81
  <div gnUiLinkify *ngFor="let constraint of otherConstraints">
82
- <h5 translate class="font-medium text-black text-sm mb-[2px] mt-[16px]">
82
+ <span
83
+ translate
84
+ class="font-medium text-black text-sm mb-[2px] mt-[16px]"
85
+ >
83
86
  record.metadata.otherConstraints
84
- </h5>
87
+ </span>
85
88
  <div class="mb-6">
86
89
  <gn-ui-markdown-parser [textContent]="constraint">
87
90
  </gn-ui-markdown-parser>
@@ -276,6 +279,7 @@
276
279
  <p class="text-sm mb-1" translate>record.metadata.topics</p>
277
280
  <div class="sm:pb-4 sm:pr-16">
278
281
  <gn-ui-badge
282
+ [clickable]="false"
279
283
  class="inline-block mr-2 mb-2 lowercase"
280
284
  *ngFor="let topic of metadata.topics"
281
285
  >{{ topic }}</gn-ui-badge
@@ -1,9 +1,8 @@
1
1
  <div *ngIf="metadataQualityDisplay" class="metadata-quality">
2
2
  <div
3
3
  class="flex items-center"
4
- [class]="
5
- smaller ? 'leading-[8px] min-w-[120px] m-h-[120px]' : 'min-w-[200px]'
6
- "
4
+ [class]="min - w - 0"
5
+ [ngClass]="{ 'leading-[8px] m-h-[120px]': smaller }"
7
6
  >
8
7
  <gn-ui-progress-bar
9
8
  tabindex="0"
@@ -1,5 +1,5 @@
1
1
  <div style="height: 652px" id="preview" *ngIf="apiLinks.length > 0">
2
- <div class="bg-primary-opacity-10 overflow-visible" style="height: 512px">
2
+ <div class="bg-primary-opacity-10 overflow-visible" style="height: 420px">
3
3
  <div class="container-lg px-4 lg:mx-auto">
4
4
  <div>
5
5
  <div class="gn-ui-section-title mb-6" translate>
@@ -16,6 +16,7 @@ import { TranslateModule } from '@ngx-translate/core'
16
16
  import { AvatarComponent } from './avatar/avatar.component'
17
17
  import { ImageInputComponent } from './image-input/image-input.component'
18
18
  import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
19
+ import { KindBadgeComponent } from './kind-badge/kind-badge.component'
19
20
  import { ThumbnailComponent } from './thumbnail/thumbnail.component'
20
21
  import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
21
22
  import { UserPreviewComponent } from './user-preview/user-preview.component'
@@ -46,6 +47,7 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
46
47
  ApplicationBannerComponent,
47
48
  InternalLinkCardComponent,
48
49
  ServiceCapabilitiesComponent,
50
+ KindBadgeComponent,
49
51
  ],
50
52
  providers: [
51
53
  provideNgIconsConfig({
@@ -62,6 +64,7 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
62
64
  ApplicationBannerComponent,
63
65
  InternalLinkCardComponent,
64
66
  ServiceCapabilitiesComponent,
67
+ KindBadgeComponent,
65
68
  ],
66
69
  })
67
70
  export class UiElementsModule {}
@@ -15,6 +15,7 @@ export * from './lib/dropdown-selector/dropdown-selector.model'
15
15
  export * from './lib/editable-label/editable-label.directive'
16
16
  export * from './lib/file-input/file-input.component'
17
17
  export * from './lib/files-drop/files-drop.directive'
18
+ export * from './lib/inline-filter/inline-filter.component'
18
19
  export * from './lib/search-input/search-input.component'
19
20
  export * from './lib/star-toggle/star-toggle.component'
20
21
  export * from './lib/switch-toggle/switch-toggle.component'
@@ -56,14 +56,14 @@ export class ButtonComponent {
56
56
 
57
57
  @Input() disabled = false
58
58
  @Input() extraClass = ''
59
- @Output() buttonClick = new EventEmitter<void>()
59
+ @Output() buttonClick = new EventEmitter<Event>()
60
60
 
61
61
  get classList() {
62
62
  return `${this.btnClass} ${this.extraClass}`
63
63
  }
64
64
 
65
65
  handleClick(event: MouseEvent) {
66
- this.buttonClick.emit()
66
+ this.buttonClick.emit(event)
67
67
  event.preventDefault()
68
68
  ;(event.currentTarget as HTMLElement).blur()
69
69
  propagateToDocumentOnly(event)
@@ -59,7 +59,7 @@
59
59
  #overlayContainer
60
60
  >
61
61
  <div
62
- class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
62
+ class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-[2px] flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
63
63
  >
64
64
  <button
65
65
  type="button"
@@ -19,7 +19,7 @@
19
19
  (keydown)="handleTriggerKeydown($event)"
20
20
  [disabled]="disabled"
21
21
  >
22
- <div class="grow font-medium truncate py-1 mr-2 text-left">
22
+ <div class="grow truncate py-1 mr-2 text-left">
23
23
  {{ getChoiceLabel() | translate }}
24
24
  </div>
25
25
  <ng-icon
@@ -0,0 +1,23 @@
1
+ <ul class="flex flex-wrap list-none gap-2">
2
+ <li *ngFor="let choice of choices">
3
+ <label
4
+ class=""
5
+ [ngClass]="{
6
+ selected: isSelected(choice),
7
+ }"
8
+ >
9
+ <input
10
+ class="hidden"
11
+ type="checkbox"
12
+ #checkBox
13
+ [checked]="isSelected(choice)"
14
+ (change)="select(choice, checkBox.checked)"
15
+ [attr.data-cy]="'inlineFilter-' + choice.value"
16
+ />
17
+ <ng-container
18
+ *ngTemplateOutlet="itemTemplate; context: { $implicit: choice }"
19
+ >
20
+ </ng-container>
21
+ </label>
22
+ </li>
23
+ </ul>
@@ -0,0 +1,44 @@
1
+ import {
2
+ Component,
3
+ ContentChild,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ TemplateRef,
8
+ } from '@angular/core'
9
+ import { Choice } from './inline-filter.model'
10
+
11
+ @Component({
12
+ selector: 'gn-ui-inline-filter',
13
+ templateUrl: './inline-filter.component.html',
14
+ })
15
+ export class InlineFilterComponent {
16
+ @Input() choices: Choice[]
17
+ @Input() selected: unknown[] = []
18
+
19
+ @Output() selectValues = new EventEmitter<unknown[]>()
20
+
21
+ @ContentChild(TemplateRef) itemTemplate: TemplateRef<any>
22
+
23
+ isSelected(choice: Choice) {
24
+ return (
25
+ this.selected.indexOf(choice.value) > -1 ||
26
+ (this.selected.length === 0 && choice.value === 'all')
27
+ )
28
+ }
29
+
30
+ select(choice: Choice, selected: boolean) {
31
+ if (choice.value === 'all' && selected) {
32
+ this.selected = [choice.value]
33
+ } else {
34
+ this.selected = selected
35
+ ? [...this.selected.filter((v) => v !== choice.value), choice.value]
36
+ : this.selected.filter((v) => v !== choice.value)
37
+
38
+ // If any value selected, unselect all
39
+ this.selected = this.selected.filter((v) => v !== 'all')
40
+ }
41
+
42
+ this.selectValues.emit(this.selected)
43
+ }
44
+ }
@@ -0,0 +1,5 @@
1
+ export interface Choice {
2
+ value: unknown
3
+ label: string
4
+ icon?: string
5
+ }
@@ -1,13 +1,13 @@
1
1
  <div class="inline-block relative align-middle" style="line-height: 0.7em">
2
2
  <gn-ui-button
3
3
  [type]="'outline'"
4
+ [disabled]="disabled"
4
5
  class="-m-[8px] p-[8px]"
5
6
  (buttonClick)="toggle($event)"
6
7
  [ngClass]="{
7
8
  enabled: toggled,
8
- disabled: !toggled,
9
+ disabled: !toggled || disabled,
9
10
  'transition hover:scale-125 will-change-transform': !disabled,
10
- 'cursor-default': disabled,
11
11
  }"
12
12
  >
13
13
  <ng-icon [name]="toggled ? 'matStar' : 'matStarBorder'"></ng-icon>
@@ -33,6 +33,7 @@ import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-a
33
33
  import { DropdownMultiselectComponent } from './dropdown-multiselect/dropdown-multiselect.component'
34
34
  import { DropdownSelectorComponent } from './dropdown-selector/dropdown-selector.component'
35
35
  import { EditableLabelDirective } from './editable-label/editable-label.directive'
36
+ import { InlineFilterComponent } from './inline-filter/inline-filter.component'
36
37
  import { TextAreaComponent } from './text-area/text-area.component'
37
38
  import { ViewportIntersectorComponent } from './viewport-intersector/viewport-intersector.component'
38
39
 
@@ -42,6 +43,7 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
42
43
  DropdownMultiselectComponent,
43
44
  ViewportIntersectorComponent,
44
45
  CheckboxComponent,
46
+ InlineFilterComponent,
45
47
  ],
46
48
  imports: [
47
49
  CommonModule,
@@ -75,9 +77,6 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
75
77
  matExpandMore,
76
78
  matExpandLess,
77
79
  }),
78
- provideNgIconsConfig({
79
- size: '0.9em',
80
- }),
81
80
  ],
82
81
  exports: [
83
82
  DropdownSelectorComponent,
@@ -90,6 +89,7 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
90
89
  CheckboxComponent,
91
90
  DateRangePickerComponent,
92
91
  EditableLabelDirective,
92
+ InlineFilterComponent,
93
93
  BadgeComponent,
94
94
  ],
95
95
  })
@@ -16,3 +16,4 @@ export * from './lib/pagination-dots/pagination-dots.component'
16
16
  export * from './lib/previous-next-buttons/previous-next-buttons.component'
17
17
  export * from './lib/paginable.interface'
18
18
  export * from './lib/ui-layout.module'
19
+ export * from './lib/truncated-text/truncated-text.component'
@@ -5,3 +5,25 @@
5
5
  :host {
6
6
  position: relative;
7
7
  }
8
+
9
+ @media screen and (min-width: 769px) {
10
+ .size-L {
11
+ grid-template-columns: repeat(1, minmax(0, 1fr));
12
+ grid-auto-rows: minmax(0, min-content);
13
+ }
14
+
15
+ .size-M {
16
+ grid-template-columns: repeat(2, minmax(0, 1fr));
17
+ grid-auto-rows: minmax(0, min-content);
18
+ }
19
+
20
+ .size-S {
21
+ grid-template-columns: repeat(3, minmax(0, 1fr));
22
+ grid-auto-rows: minmax(0, min-content);
23
+ }
24
+
25
+ .size-XS {
26
+ grid-template-columns: repeat(2, minmax(0, 1fr));
27
+ grid-auto-rows: minmax(0, min-content);
28
+ }
29
+ }
@@ -1,7 +1,7 @@
1
1
  <div
2
- class="block-list-container flex flex-col"
2
+ class="grid gap-4 w-full md:grid-cols-2"
3
3
  #blockContainer
4
- [ngClass]="containerClass"
4
+ [ngClass]="[containerClass, 'size-' + subComponentSize]"
5
5
  [ngStyle]="{ minHeight: minHeight + 'px' }"
6
6
  >
7
7
  <ng-content></ng-content>