geonetwork-ui 2.6.0-dev.d216c4dea → 2.6.0-dev.e052ad8ba

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 (266) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +3 -1
  3. package/esm2022/libs/api/metadata-converter/src/lib/common/resource-types.mjs +17 -15
  4. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +2 -1
  5. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +5 -2
  6. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  7. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  8. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  9. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +54 -2
  10. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  11. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  12. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  13. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  14. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  15. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  16. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +34 -7
  17. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +63 -13
  18. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  19. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
  20. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  21. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  22. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  23. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  24. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  25. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  26. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  27. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  28. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  29. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  30. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
  31. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  32. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  33. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  34. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  35. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  36. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  37. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
  38. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  39. package/esm2022/libs/ui/inputs/src/index.mjs +3 -1
  40. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  41. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  42. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  43. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  44. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  45. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  46. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  47. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  48. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  49. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  50. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  51. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  52. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  53. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  54. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +107 -0
  55. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  56. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  57. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  58. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  59. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  60. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  61. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  62. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  63. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  64. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  65. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  66. package/esm2022/translations/de.json +16 -1
  67. package/esm2022/translations/en.json +18 -1
  68. package/esm2022/translations/es.json +16 -1
  69. package/esm2022/translations/fr.json +19 -2
  70. package/esm2022/translations/it.json +16 -1
  71. package/esm2022/translations/nl.json +16 -1
  72. package/esm2022/translations/pt.json +16 -1
  73. package/fesm2022/geonetwork-ui.mjs +1036 -198
  74. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  75. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  76. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  77. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  78. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  79. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  80. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  81. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  82. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  83. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  84. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  85. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  86. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  87. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  88. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  89. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  90. package/libs/feature/editor/src/index.d.ts +1 -0
  91. package/libs/feature/editor/src/index.d.ts.map +1 -1
  92. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  93. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  94. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  95. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  96. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  97. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +26 -21
  98. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  99. package/libs/feature/search/src/index.d.ts +1 -1
  100. package/libs/feature/search/src/index.d.ts.map +1 -1
  101. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  102. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  103. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  104. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  105. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  106. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  107. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  108. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  109. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  110. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  111. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  112. package/libs/ui/elements/src/index.d.ts +2 -0
  113. package/libs/ui/elements/src/index.d.ts.map +1 -1
  114. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  115. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  116. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  117. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  118. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
  119. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  120. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  121. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  122. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  123. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  124. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  125. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  126. package/libs/ui/inputs/src/index.d.ts +2 -0
  127. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  128. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  129. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  130. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  131. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  132. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  133. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  134. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  135. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  136. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  137. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  138. package/libs/ui/layout/src/index.d.ts +1 -0
  139. package/libs/ui/layout/src/index.d.ts.map +1 -1
  140. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  141. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  142. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  143. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  144. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +27 -0
  145. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  146. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  147. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  148. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  149. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  150. package/libs/ui/search/src/index.d.ts +1 -0
  151. package/libs/ui/search/src/index.d.ts.map +1 -1
  152. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  153. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  154. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  155. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  156. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  157. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  158. package/package.json +2 -2
  159. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  160. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  161. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  162. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -0
  163. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +4 -1
  164. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  165. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  166. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  167. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  168. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  169. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +60 -0
  170. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  171. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  172. package/src/libs/feature/editor/src/index.ts +1 -0
  173. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  174. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  175. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  176. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +16 -10
  177. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  178. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  179. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  180. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +25 -16
  181. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +36 -4
  182. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +70 -14
  183. package/src/libs/feature/search/src/index.ts +1 -1
  184. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
  185. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  186. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  187. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  188. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  189. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  190. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  191. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  192. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  193. package/src/libs/ui/elements/src/index.ts +2 -0
  194. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  195. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  196. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  197. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  198. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  199. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  200. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  201. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
  202. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
  203. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  204. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  205. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  206. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +12 -9
  207. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  208. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +11 -3
  209. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  210. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  211. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  212. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
  213. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
  214. package/src/libs/ui/inputs/src/index.ts +2 -0
  215. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  216. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  217. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  218. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  219. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  220. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  221. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  222. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  223. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  224. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
  225. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  226. package/src/libs/ui/layout/src/index.ts +1 -0
  227. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  228. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  229. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  230. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  231. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  232. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  233. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  234. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  235. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  236. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  237. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +44 -0
  238. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +130 -0
  239. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  240. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  241. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  242. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  243. package/src/libs/ui/search/src/index.ts +1 -0
  244. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  245. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
  246. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  247. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  248. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  249. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -1
  250. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  251. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  252. package/tailwind.base.config.js +3 -0
  253. package/tailwind.base.css +1 -13
  254. package/translations/de.json +16 -1
  255. package/translations/en.json +18 -1
  256. package/translations/es.json +16 -1
  257. package/translations/fr.json +19 -2
  258. package/translations/it.json +16 -1
  259. package/translations/nl.json +16 -1
  260. package/translations/pt.json +16 -1
  261. package/translations/sk.json +16 -1
  262. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  263. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  264. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  265. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  266. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
@@ -1,4 +1,4 @@
1
- <div class="px-5 my-1">
1
+ <div>
2
2
  <mat-tab-group
3
3
  [selectedIndex]="0"
4
4
  animationDuration="0ms"
@@ -1,9 +1,9 @@
1
1
  <gn-ui-button
2
2
  *ngIf="externalViewer"
3
3
  (buttonClick)="openInExternalViewer()"
4
- type="secondary"
4
+ type="primary"
5
5
  [title]="'record.externalViewer.open' | translate"
6
- extraClass="ms-2 !rounded-lg"
6
+ [extraClass]="extraClass + 'bg-primary ms-2 !rounded-lg'"
7
7
  >
8
8
  <ng-icon name="matOpenInNew"></ng-icon>
9
9
  </gn-ui-button>
@@ -36,6 +36,7 @@ export const EXTERNAL_VIEWER_OPEN_NEW_TAB = new InjectionToken<boolean>(
36
36
  })
37
37
  export class ExternalViewerButtonComponent {
38
38
  @Input() link: DatasetOnlineResource
39
+ @Input() extraClass = ''
39
40
 
40
41
  get externalViewer() {
41
42
  return !!this.urlTemplate && !!this.supportedLinkLayerType
@@ -1,18 +1,24 @@
1
- <div class="w-full h-full flex flex-col p-1">
2
- <div class="w-full flex justify-end">
3
- <gn-ui-dropdown-selector
4
- [ngClass]="{ hidden: !displaySource }"
5
- class="truncate p-1 -mx-1 mb-1"
6
- extraBtnClass="!text-primary font-sans font-medium"
7
- [title]="'map.select.layer' | translate"
8
- [choices]="dropdownChoices$ | async"
9
- (selectValue)="selectLinkToDisplay($event)"
10
- ></gn-ui-dropdown-selector>
11
- <gn-ui-external-viewer-button
12
- class="shrink-0 py-1 place-self-end"
13
- [link]="selectedLink$ | async"
14
- >
15
- </gn-ui-external-viewer-button>
1
+ <div class="w-full h-full flex flex-col gap-[13px]">
2
+ <div
3
+ class="flex py-4 px-5 bg-white border border-color-border rounded-lg mt-6"
4
+ >
5
+ <div class="grow min-w-0">
6
+ <gn-ui-dropdown-selector
7
+ [ngClass]="{ hidden: !displaySource }"
8
+ class="w-full"
9
+ extraBtnClass="font-sans font-bold"
10
+ [title]="'map.select.layer' | translate"
11
+ [choices]="dropdownChoices$ | async"
12
+ (selectValue)="selectLinkToDisplay($event)"
13
+ ></gn-ui-dropdown-selector>
14
+ </div>
15
+ <div class="self-end">
16
+ <gn-ui-external-viewer-button
17
+ extraClass="w-[44px] h-[44px]"
18
+ [link]="selectedLink$ | async"
19
+ >
20
+ </gn-ui-external-viewer-button>
21
+ </div>
16
22
  </div>
17
23
  <ng-container *ngIf="hidePreview; else mapView">
18
24
  <gn-ui-popup-alert
@@ -49,7 +55,10 @@
49
55
  >
50
56
  <ng-icon name="matClose" class="align-middle text-sm"></ng-icon>
51
57
  </gn-ui-button>
52
- <gn-ui-feature-detail [feature]="selection"></gn-ui-feature-detail>
58
+ <gn-ui-feature-detail
59
+ [featureCatalog]="mdViewFacade.featureCatalog$ | async"
60
+ [feature]="selection"
61
+ ></gn-ui-feature-detail>
53
62
  </div>
54
63
 
55
64
  <div
@@ -39,8 +39,8 @@ import {
39
39
  import {
40
40
  FeatureDetailComponent,
41
41
  MapContainerComponent,
42
- prioritizePageScroll,
43
42
  MapLegendComponent,
43
+ prioritizePageScroll,
44
44
  } from '../../../../../../libs/ui/map/src'
45
45
  import { Feature } from 'geojson'
46
46
  import { NgIconComponent, provideIcons } from '@ng-icons/core'
@@ -109,9 +109,20 @@ export class MapViewComponent implements AfterViewInit {
109
109
  this.mdViewFacade.mapApiLinks$,
110
110
  this.mdViewFacade.geoDataLinksWithGeometry$,
111
111
  ]).pipe(
112
- map(([mapApiLinks, geoDataLinksWithGeometry]) => {
113
- return [...mapApiLinks, ...geoDataLinksWithGeometry]
114
- })
112
+ switchMap(async ([mapApiLinks, geoDataLinksWithGeometry]) => {
113
+ // looking for TMS links to process
114
+ let processedMapApiLinks = await Promise.all(
115
+ mapApiLinks.map((link) => {
116
+ if (link.type === 'service' && link.accessServiceProtocol === 'tms') {
117
+ return this.dataService.getGeodataLinksFromTms(link)
118
+ }
119
+ return link
120
+ })
121
+ )
122
+ processedMapApiLinks = processedMapApiLinks.flat()
123
+ return [...processedMapApiLinks, ...geoDataLinksWithGeometry]
124
+ }),
125
+ shareReplay(1)
115
126
  )
116
127
 
117
128
  dropdownChoices$ = this.compatibleMapLinks$.pipe(
@@ -153,6 +164,7 @@ export class MapViewComponent implements AfterViewInit {
153
164
  return this.getLayerFromLink(link).pipe(
154
165
  map((layer) => [layer]),
155
166
  catchError((e) => {
167
+ console.error(e)
156
168
  this.handleError(e)
157
169
  return of([])
158
170
  }),
@@ -239,6 +251,26 @@ export class MapViewComponent implements AfterViewInit {
239
251
  type: 'wms',
240
252
  name: link.name,
241
253
  })
254
+ } else if (
255
+ link.type === 'service' &&
256
+ link.accessServiceProtocol === 'tms'
257
+ ) {
258
+ // FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
259
+ return of({
260
+ url: link.url.toString().replace(/\/?$/, '/{z}/{x}/{y}.pbf'),
261
+ type: 'xyz',
262
+ tileFormat: 'application/vnd.mapbox-vector-tile',
263
+ name: link.name,
264
+ })
265
+ } else if (
266
+ link.type === 'service' &&
267
+ link.accessServiceProtocol === 'maplibre-style'
268
+ ) {
269
+ return of({
270
+ type: 'maplibre-style',
271
+ name: link.name,
272
+ styleUrl: link.url.toString(),
273
+ })
242
274
  } else if (
243
275
  link.type === 'service' &&
244
276
  link.accessServiceProtocol === 'wmts'
@@ -2,10 +2,12 @@ import { Injectable } from '@angular/core'
2
2
  import { select, Store } from '@ngrx/store'
3
3
  import {
4
4
  catchError,
5
+ concatMap,
5
6
  defaultIfEmpty,
6
7
  filter,
7
8
  map,
8
9
  mergeMap,
10
+ shareReplay,
9
11
  switchMap,
10
12
  toArray,
11
13
  } from 'rxjs/operators'
@@ -16,12 +18,11 @@ import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/
16
18
  import {
17
19
  CatalogRecord,
18
20
  DatasetServiceDistribution,
19
- ServiceEndpoint,
20
21
  UserFeedback,
21
22
  } from '../../../../../../libs/common/domain/src/lib/model/record'
22
23
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
23
24
  import { OgcApiRecord } from '@camptocamp/ogc-client'
24
- import { from, of } from 'rxjs'
25
+ import { from, of, Observable } from 'rxjs'
25
26
  import { DataService } from '../../../../../../libs/feature/dataviz/src'
26
27
 
27
28
  @Injectable()
@@ -80,21 +81,22 @@ export class MdViewFacade {
80
81
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
81
82
 
82
83
  allLinks$ = this.metadata$.pipe(
83
- map((record) => ('onlineResources' in record ? record.onlineResources : []))
84
+ map((record) =>
85
+ 'onlineResources' in record ? record.onlineResources : []
86
+ ),
87
+ shareReplay(1)
84
88
  )
85
89
 
86
90
  apiLinks$ = this.allLinks$.pipe(
87
91
  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
- )
92
+ links.filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
93
+ ),
94
+ // switchMap((apiLinks) =>
95
+ // this.processLinksForTmsWithStyles(
96
+ // apiLinks as DatasetServiceDistribution[]
97
+ // )
98
+ // ),
99
+ shareReplay(1)
98
100
  )
99
101
 
100
102
  mapApiLinks$ = this.allLinks$.pipe(
@@ -102,7 +104,13 @@ export class MdViewFacade {
102
104
  links.filter((link) =>
103
105
  this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
104
106
  )
105
- )
107
+ ),
108
+ // switchMap((mapApiLinks) =>
109
+ // this.processLinksForTmsWithStyles(
110
+ // mapApiLinks as DatasetServiceDistribution[]
111
+ // )
112
+ // ),
113
+ shareReplay(1)
106
114
  )
107
115
 
108
116
  downloadLinks$ = this.allLinks$.pipe(
@@ -216,4 +224,52 @@ export class MdViewFacade {
216
224
  loadUserFeedbacks(datasetUuid: string) {
217
225
  this.store.dispatch(MdViewActions.loadUserFeedbacks({ datasetUuid }))
218
226
  }
227
+
228
+ // private processLinksForTmsWithStyles(
229
+ // links: DatasetServiceDistribution[]
230
+ // ): Observable<DatasetServiceDistribution[]> {
231
+ // return from(links).pipe(
232
+ // concatMap((link) => this.createOneTmsLinkPerStyle(link)),
233
+ // toArray(),
234
+ // map((links) => links.flat())
235
+ // )
236
+ // }
237
+ //
238
+ // private createOneTmsLinkPerStyle(
239
+ // link: DatasetServiceDistribution
240
+ // ): Observable<DatasetServiceDistribution[]> {
241
+ // if (
242
+ // link.type === 'service' &&
243
+ // link.accessServiceProtocol === 'tms' &&
244
+ // !link.styleInfo
245
+ // ) {
246
+ // return from(this.dataService.getStylesFromTms(link.url.href)).pipe(
247
+ // map((styles) =>
248
+ // styles
249
+ // ? styles.map((style) => ({
250
+ // ...link,
251
+ // name: `${link.name} - ${style.name}`,
252
+ // url: new URL(style.href),
253
+ // styleInfo: {
254
+ // name: style.name,
255
+ // href: style.href,
256
+ // },
257
+ // }))
258
+ // : [link]
259
+ // ),
260
+ // catchError((e) => {
261
+ // console.error('Error fetching TMS styles:', e)
262
+ // return of([link])
263
+ // })
264
+ // )
265
+ // }
266
+ // return of([link])
267
+ // }
268
+
269
+ /**
270
+ * loadFeatureCatalog
271
+ */
272
+ loadFeatureCatalog(metadata: CatalogRecord) {
273
+ this.store.dispatch(MdViewActions.loadFeatureCatalog({ metadata }))
274
+ }
219
275
  }
@@ -17,7 +17,7 @@ export * from './lib/facets/facets.module'
17
17
  export * from './lib/facets/facets-container/facets-container.component'
18
18
  export * from './lib/records-metrics/records-metrics.component'
19
19
  export * from './lib/favorites/favorite-star/favorite-star.component'
20
- export * from './lib/results-hits-number/results-hits.container.component'
20
+ export * from './lib/results-hits/results-hits.container.component'
21
21
  export * from './lib/results-layout/results-layout.component'
22
22
  export * from './lib/sort-by/sort-by.component'
23
23
  export * from './lib/state/container/search-state.container.directive'
@@ -4,6 +4,7 @@ import { UiSearchModule } from '../../../../../libs/ui/search/src'
4
4
  import { EffectsModule } from '@ngrx/effects'
5
5
  import { StoreModule } from '@ngrx/store'
6
6
  import { TranslateModule } from '@ngx-translate/core'
7
+ import { NgIconsModule } from '@ng-icons/core'
7
8
  import { FacetsModule } from './facets/facets.module'
8
9
  import { FuzzySearchComponent } from './fuzzy-search/fuzzy-search.component'
9
10
  import { RecordsMetricsComponent } from './records-metrics/records-metrics.component'
@@ -12,7 +13,7 @@ import { ResultsListContainerComponent } from './results-list/results-list.conta
12
13
  import { SortByComponent } from './sort-by/sort-by.component'
13
14
  import { SearchEffects } from './state/effects'
14
15
  import { initialState, reducer, SEARCH_FEATURE_KEY } from './state/reducer'
15
- import { ResultsHitsContainerComponent } from './results-hits-number/results-hits.container.component'
16
+ import { ResultsHitsContainerComponent } from './results-hits/results-hits.container.component'
16
17
  import { SearchStateContainerDirective } from './state/container/search-state.container.directive'
17
18
  import {
18
19
  AutocompleteComponent,
@@ -20,7 +21,11 @@ import {
20
21
  UiInputsModule,
21
22
  } from '../../../../../libs/ui/inputs/src'
22
23
  import { NgModule } from '@angular/core'
23
- import { ErrorComponent, UiElementsModule } from '../../../../../libs/ui/elements/src'
24
+ import {
25
+ ErrorComponent,
26
+ KindBadgeComponent,
27
+ UiElementsModule,
28
+ } from '../../../../../libs/ui/elements/src'
24
29
  import { FilterDropdownComponent } from './filter-dropdown/filter-dropdown.component'
25
30
  import {
26
31
  SpinningLoaderComponent,
@@ -58,6 +63,8 @@ import { FavoriteStarComponent } from './favorites/favorite-star/favorite-star.c
58
63
  ErrorComponent,
59
64
  FavoriteStarComponent,
60
65
  DateRangeDropdownComponent,
66
+ NgIconsModule,
67
+ KindBadgeComponent,
61
68
  ],
62
69
  exports: [
63
70
  SortByComponent,
@@ -0,0 +1,16 @@
1
+ <div
2
+ class="flex flex-col gap-3 sm:flex-row justify-between"
3
+ [ngClass]="{
4
+ 'sm:items-center': (searchFacade.resultsHits$ | async) !== 0,
5
+ }"
6
+ >
7
+ <gn-ui-results-hits-number
8
+ [loading]="searchFacade.isLoading$ | async"
9
+ [hits]="searchFacade.resultsHits$ | async"
10
+ ></gn-ui-results-hits-number>
11
+ <gn-ui-results-hits-search-kind
12
+ (selectionChanged)="onSelectionChanged($event)"
13
+ [choices]="filterChoices$ | async"
14
+ [selected]="selected$ | async"
15
+ ></gn-ui-results-hits-search-kind>
16
+ </div>
@@ -0,0 +1,59 @@
1
+ import {
2
+ catchError,
3
+ filter,
4
+ map,
5
+ Observable,
6
+ of,
7
+ startWith,
8
+ switchMap,
9
+ } from 'rxjs'
10
+ import { Component, OnInit } from '@angular/core'
11
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
12
+ import { SearchFacade } from '../state/search.facade'
13
+ import { FieldAvailableValue, FieldValue } from '../utils/service/fields'
14
+ import { SearchService } from '../utils/service/search.service'
15
+ import { FieldsService } from '../utils/service/fields.service'
16
+
17
+ marker('search.filters.recordKind.all')
18
+ marker('search.filters.recordKind.dataset')
19
+ marker('search.filters.recordKind.service')
20
+ marker('search.filters.recordKind.reuse')
21
+
22
+ @Component({
23
+ selector: 'gn-ui-results-hits',
24
+ templateUrl: './results-hits.container.component.html',
25
+ styleUrls: ['./results-hits.container.component.css'],
26
+ })
27
+ export class ResultsHitsContainerComponent implements OnInit {
28
+ fieldName = 'recordKind'
29
+ filterChoices$: Observable<FieldAvailableValue[]>
30
+ selected$: Observable<FieldValue[]>
31
+
32
+ constructor(
33
+ protected searchFacade: SearchFacade,
34
+ private searchService: SearchService,
35
+ private fieldsService: FieldsService
36
+ ) {}
37
+
38
+ ngOnInit() {
39
+ this.selected$ = this.searchFacade.searchFilters$.pipe(
40
+ switchMap((filters) =>
41
+ this.fieldsService.readFieldValuesFromFilters(filters)
42
+ ),
43
+ map((fieldValues) => fieldValues[this.fieldName]),
44
+ filter((selected) => !!selected),
45
+ startWith([]),
46
+ catchError(() => of([]))
47
+ ) as Observable<FieldValue[]>
48
+
49
+ this.filterChoices$ = <Observable<FieldAvailableValue[]>>(
50
+ this.fieldsService.getAvailableValues(this.fieldName)
51
+ )
52
+ }
53
+
54
+ onSelectionChanged(values: string[]) {
55
+ this.fieldsService
56
+ .buildFiltersFromFieldValues({ [this.fieldName]: values })
57
+ .subscribe((filters) => this.searchService.updateFilters(filters))
58
+ }
59
+ }
@@ -10,8 +10,10 @@ import {
10
10
  MultilingualSearchField,
11
11
  OrganizationSearchField,
12
12
  OwnerSearchField,
13
+ ResourceTypeLegacyField,
13
14
  SimpleSearchField,
14
15
  TranslatedSearchField,
16
+ RecordKindField,
15
17
  UserSearchField,
16
18
  } from './fields'
17
19
  import { forkJoin, Observable, of } from 'rxjs'
@@ -47,11 +49,8 @@ export class FieldsService {
47
49
  protected fields = {
48
50
  organization: new OrganizationSearchField(this.injector),
49
51
  format: new SimpleSearchField('format', this.injector, 'asc'),
50
- resourceType: new TranslatedSearchField(
51
- 'resourceType',
52
- this.injector,
53
- 'asc'
54
- ),
52
+ resourceType: new ResourceTypeLegacyField(this.injector), // Deprecated, use `recordKind` instead
53
+ recordKind: new RecordKindField(this.injector),
55
54
  representationType: new TranslatedSearchField(
56
55
  'cl_spatialRepresentationType.key',
57
56
  this.injector,
@@ -22,6 +22,7 @@ import {
22
22
  } from '../../../../../../../libs/api/repository/src'
23
23
  import { LangService } from '../../../../../../../libs/util/i18n/src'
24
24
  import { formatUserInfo } from '../../../../../../../libs/util/shared/src'
25
+ import { PossibleResourceTypes } from '../../../../../../../libs/api/metadata-converter/src'
25
26
 
26
27
  export type FieldType = 'values' | 'dateRange'
27
28
 
@@ -29,6 +30,7 @@ export type FieldValue = string | number
29
30
  export interface FieldAvailableValue {
30
31
  value: FieldValue
31
32
  label: string
33
+ count?: number
32
34
  }
33
35
 
34
36
  export abstract class AbstractSearchField {
@@ -80,6 +82,7 @@ export class SimpleSearchField implements AbstractSearchField {
80
82
  const bucketPromises = buckets.map(async (bucket) => ({
81
83
  label: `${await this.getBucketLabel(bucket)} (${bucket.count})`,
82
84
  value: bucket.term.toString(),
85
+ count: bucket.count,
83
86
  }))
84
87
  return Promise.all(bucketPromises)
85
88
  })
@@ -480,3 +483,99 @@ export class AvailableServicesField extends SimpleSearchField {
480
483
  return of(values)
481
484
  }
482
485
  }
486
+
487
+ /**
488
+ * This class is meant to be used with the legacy filter on `resourceType` (now deprecated, the use of `recordKind` field is recommended).
489
+ * Since creating filters on the same ES field is not possible, in order to make the resource type filter still working,
490
+ * we create an ES on the fly: `resourceTypeLegacy` that references the `resourceType` under the hood.
491
+ * @deprecated Use `recordKind` field instead.
492
+ */
493
+ export class ResourceTypeLegacyField extends TranslatedSearchField {
494
+ constructor(injector: Injector) {
495
+ super('resourceTypeLegacy', injector, 'asc')
496
+
497
+ // Ask ES to create a field on the fly: 'resourceTypeLegacy' that is in fact, 'resourceType'
498
+ this.esService.registerRuntimeField(
499
+ 'resourceTypeLegacy',
500
+ `for (resourceType in doc.resourceType) { emit(resourceType) }`
501
+ )
502
+ }
503
+ }
504
+
505
+ export class RecordKindField extends SimpleSearchField {
506
+ TYPE_MAPPING = {
507
+ dataset: ['dataset', 'series', 'featureCatalog'],
508
+ service: ['service'],
509
+ reuse: Object.entries(PossibleResourceTypes)
510
+ .filter(([_, v]) => v === 'reuse')
511
+ .map(([k]) => k), // = ['application', 'map', 'staticMap', 'interactiveMap', ...]
512
+ }
513
+
514
+ constructor(injector: Injector) {
515
+ super('resourceType', injector, 'asc')
516
+ }
517
+
518
+ getAvailableValues(): Observable<FieldAvailableValue[]> {
519
+ return this.repository.aggregate(this.getAggregations()).pipe(
520
+ map(
521
+ (response) =>
522
+ (response[this.esFieldName] as AggregationBuckets).buckets || []
523
+ ),
524
+ map((buckets: TermBucket[]) => {
525
+ const counts = buckets.reduce(
526
+ (acc, { term, count }) => {
527
+ const value = term.toString()
528
+ const key = this.TYPE_MAPPING.reuse.includes(value)
529
+ ? 'reuse'
530
+ : this.TYPE_MAPPING.dataset.includes(value)
531
+ ? 'dataset'
532
+ : value
533
+
534
+ acc[key] = (acc[key] || 0) + count
535
+ return acc
536
+ },
537
+ {} as Record<string, number>
538
+ )
539
+
540
+ return Object.keys(this.TYPE_MAPPING).map((type) => ({
541
+ label: type,
542
+ value: type,
543
+ count: counts[type] ?? 0,
544
+ }))
545
+ })
546
+ )
547
+ }
548
+
549
+ getFiltersForValues(values: FieldValue[]): Observable<FieldFilters> {
550
+ const filters = {
551
+ [this.esFieldName]: values.reduce((acc, value) => {
552
+ if (value === '') return { ...acc, [value]: true }
553
+
554
+ const keysToAdd = this.TYPE_MAPPING[value] || [value]
555
+ keysToAdd.forEach((key: string) => (acc[key] = true))
556
+
557
+ return acc
558
+ }, {}),
559
+ }
560
+
561
+ return of(filters)
562
+ }
563
+
564
+ getValuesForFilter(filters: FieldFilters): Observable<FieldValue[]> {
565
+ const filter = filters[this.esFieldName]
566
+ if (!filter) return of([])
567
+
568
+ const activeValues = Object.keys(filter).filter((v) => filter[v])
569
+ const activeTypes = Object.keys(this.TYPE_MAPPING).filter((type) =>
570
+ this.TYPE_MAPPING[type].every((t: string) => activeValues.includes(t))
571
+ )
572
+
573
+ // Allow unknown values eg. 'type=somethingnotexist' (for UI to select none)
574
+ const allTypes = [].concat(...Object.values(this.TYPE_MAPPING))
575
+ const unknownValues = activeValues.filter(
576
+ (value) => !allTypes.includes(value)
577
+ )
578
+
579
+ return of([...activeTypes, ...unknownValues])
580
+ }
581
+ }
@@ -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
@@ -7,6 +7,7 @@ export * from './lib/downloads-list/downloads-list.component'
7
7
  export * from './lib/error/error.component'
8
8
  export * from './lib/image-input/image-input.component'
9
9
  export * from './lib/image-overlay-preview/image-overlay-preview.component'
10
+ export * from './lib/kind-badge/kind-badge.component'
10
11
  export * from './lib/link-card/link-card.component'
11
12
  export * from './lib/markdown-editor/markdown-editor.component'
12
13
  export * from './lib/markdown-parser/markdown-parser.component'
@@ -25,3 +26,4 @@ export * from './lib/user-preview/user-preview.component'
25
26
  export * from './lib/application-banner/application-banner.component'
26
27
  export * from './lib/internal-link-card/internal-link-card.component'
27
28
  export * from './lib/service-capabilities/service-capabilities.component'
29
+ export * from './lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component'
@@ -1,12 +1,12 @@
1
1
  <div
2
- class="group flex justify-between rounded filter overflow-hidden"
2
+ class="group flex justify-between rounded filter overflow-hidden card-shadow"
3
3
  [ngClass]="cardClass"
4
4
  >
5
5
  <ng-container *ngIf="size !== 'S'">
6
- <div>
6
+ <div class="flex-1 min-w-0">
7
7
  <ng-container *ngTemplateOutlet="content"></ng-container>
8
8
  </div>
9
- <div class="flex items-center">
9
+ <div class="flex items-center min-w-[32px]">
10
10
  <ng-container *ngTemplateOutlet="buttons"></ng-container>
11
11
  </div>
12
12
  </ng-container>
@@ -51,7 +51,7 @@
51
51
  </ng-template>
52
52
 
53
53
  <ng-template #content>
54
- <div>
54
+ <div class="flex-1 min-w-0">
55
55
  <div class="gn-ui-card-title">
56
56
  {{ link.description || link.name }}
57
57
  </div>