geonetwork-ui 2.6.0-dev.186d57931 → 2.6.0-dev.25158f859

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 (306) 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/elasticsearch/constant.mjs +2 -1
  6. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +5 -2
  7. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  8. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  9. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  10. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  11. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  12. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  13. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  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/data-view-share/data-view-share.component.mjs +3 -3
  17. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  18. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  19. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +11 -13
  20. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  21. package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
  22. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
  23. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  24. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  25. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  26. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  27. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  28. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  29. package/esm2022/libs/ui/elements/src/index.mjs +4 -1
  30. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  31. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  32. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  33. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  34. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  35. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +27 -53
  36. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +68 -0
  37. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  38. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  39. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  40. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  41. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  42. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  43. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
  44. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  45. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
  46. package/esm2022/libs/ui/inputs/src/index.mjs +3 -1
  47. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  48. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  49. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  50. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  51. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  52. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  53. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  54. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  55. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  56. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  57. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  58. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  59. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  60. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  61. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +107 -0
  62. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  63. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  64. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  65. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  66. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  67. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  68. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  69. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  70. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  71. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  72. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  73. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  74. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  75. package/esm2022/translations/de.json +14 -3
  76. package/esm2022/translations/en.json +15 -4
  77. package/esm2022/translations/es.json +14 -3
  78. package/esm2022/translations/fr.json +15 -4
  79. package/esm2022/translations/it.json +43 -32
  80. package/esm2022/translations/nl.json +14 -3
  81. package/esm2022/translations/pt.json +14 -3
  82. package/fesm2022/geonetwork-ui.mjs +1443 -648
  83. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  84. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  85. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  86. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  87. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  88. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  89. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  90. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  91. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  92. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  93. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  94. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  95. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  96. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  97. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  98. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  99. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  100. package/libs/feature/editor/src/index.d.ts +1 -0
  101. package/libs/feature/editor/src/index.d.ts.map +1 -1
  102. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  103. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  104. package/libs/feature/record/src/index.d.ts +1 -2
  105. package/libs/feature/record/src/index.d.ts.map +1 -1
  106. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  107. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  108. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  109. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +26 -21
  110. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  111. package/libs/feature/search/src/index.d.ts +1 -1
  112. package/libs/feature/search/src/index.d.ts.map +1 -1
  113. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  114. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  115. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  116. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  117. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  118. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  119. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  120. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  121. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  122. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  123. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  124. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  125. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  126. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  127. package/libs/ui/elements/src/index.d.ts +3 -0
  128. package/libs/ui/elements/src/index.d.ts.map +1 -1
  129. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  130. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  131. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  132. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  133. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  134. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  135. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +3 -7
  136. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  137. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +13 -0
  138. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  139. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  140. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  141. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  142. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  143. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
  144. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  145. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  146. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  147. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
  148. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  149. package/libs/ui/inputs/src/index.d.ts +2 -0
  150. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  151. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  152. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  153. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  154. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  155. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  156. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  157. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  158. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  159. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  160. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  161. package/libs/ui/layout/src/index.d.ts +1 -0
  162. package/libs/ui/layout/src/index.d.ts.map +1 -1
  163. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  164. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  165. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  166. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  167. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +27 -0
  168. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  169. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  170. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  171. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  172. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  173. package/libs/ui/search/src/index.d.ts +1 -0
  174. package/libs/ui/search/src/index.d.ts.map +1 -1
  175. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  176. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  177. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  178. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  179. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  180. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  181. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  182. package/package.json +2 -2
  183. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  184. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  185. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  186. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -0
  187. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
  188. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +4 -1
  189. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  190. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  191. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  192. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
  193. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  194. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  195. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  196. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  197. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  198. package/src/libs/feature/editor/src/index.ts +1 -0
  199. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  200. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  201. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  202. package/src/libs/feature/record/src/index.ts +1 -2
  203. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +16 -10
  204. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  205. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  206. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  207. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +25 -16
  208. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  209. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +18 -15
  210. package/src/libs/feature/search/src/index.ts +1 -1
  211. package/src/libs/feature/search/src/lib/constants.ts +1 -0
  212. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
  213. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  214. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  215. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  216. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  217. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  218. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  219. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  220. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  221. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  222. package/src/libs/ui/elements/src/index.ts +3 -0
  223. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  224. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  225. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  226. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  227. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  228. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  229. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  230. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  231. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  232. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +133 -138
  233. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +19 -47
  234. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  235. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +11 -0
  236. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +70 -0
  237. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  238. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  239. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  240. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +12 -9
  241. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  242. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +11 -3
  243. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  244. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  245. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  246. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
  247. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
  248. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +16 -2
  249. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  250. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -1
  251. package/src/libs/ui/inputs/src/index.ts +2 -0
  252. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  253. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  254. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  255. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  256. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  257. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  258. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  259. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  260. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  261. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +3 -4
  262. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  263. package/src/libs/ui/layout/src/index.ts +1 -0
  264. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  265. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  266. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  267. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  268. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  269. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  270. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  271. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  272. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  273. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  274. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +44 -0
  275. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +130 -0
  276. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  277. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  278. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  279. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  280. package/src/libs/ui/search/src/index.ts +1 -0
  281. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  282. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  283. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +25 -0
  284. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  285. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  286. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  287. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  288. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  289. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +1 -1
  290. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  291. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  292. package/tailwind.base.config.js +3 -0
  293. package/tailwind.base.css +1 -13
  294. package/translations/de.json +14 -3
  295. package/translations/en.json +15 -4
  296. package/translations/es.json +14 -3
  297. package/translations/fr.json +15 -4
  298. package/translations/it.json +43 -32
  299. package/translations/nl.json +14 -3
  300. package/translations/pt.json +14 -3
  301. package/translations/sk.json +14 -3
  302. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  303. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  304. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  305. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  306. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
@@ -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)"
@@ -46,6 +46,7 @@
46
46
  metadata.otherConstraints
47
47
  "
48
48
  [title]="'record.metadata.usage' | translate"
49
+ data-test="usage-panel"
49
50
  >
50
51
  <div class="flex flex-col gap-[10px] mr-4 py-[12px] rounded text-gray-900">
51
52
  <ng-container *ngFor="let license of licenses">
@@ -79,9 +80,12 @@
79
80
  </ng-container>
80
81
  <ng-container *ngIf="otherConstraints.length">
81
82
  <div gnUiLinkify *ngFor="let constraint of otherConstraints">
82
- <h5 translate class="font-medium text-black text-sm mb-[2px] mt-[16px]">
83
+ <span
84
+ translate
85
+ class="font-medium text-black text-sm mb-[2px] mt-[16px]"
86
+ >
83
87
  record.metadata.otherConstraints
84
- </h5>
88
+ </span>
85
89
  <div class="mb-6">
86
90
  <gn-ui-markdown-parser [textContent]="constraint">
87
91
  </gn-ui-markdown-parser>
@@ -102,6 +106,7 @@
102
106
  (metadata.kind === 'dataset' && metadata.status)
103
107
  "
104
108
  [title]="'record.metadata.details' | translate"
109
+ data-test="details-panel"
105
110
  >
106
111
  <div *ngIf="metadata.lineage" class="text-gray-900 flex flex-col mt-4 gap-2">
107
112
  <p class="whitespace-pre-line break-words text-gray-900" gnUiLinkify>
@@ -228,6 +233,7 @@
228
233
  <gn-ui-expandable-panel
229
234
  *ngIf="metadata.kind !== 'dataset' && metadata.spatialExtents"
230
235
  [title]="'service.metadata.spatialExtent' | translate"
236
+ data-test="spatial-extent-panel"
231
237
  >
232
238
  <gn-ui-spatial-extent
233
239
  class="flex h-[271px] w-full rounded-lg border border-gray-100 mt-3 mb-6"
@@ -237,6 +243,7 @@
237
243
  <gn-ui-expandable-panel
238
244
  *ngIf="metadata.landingPage"
239
245
  [title]="'service.metadata.other' | translate"
246
+ data-test="other-panel"
240
247
  >
241
248
  <div class="flex flex-col gap-4 mr-4 py-5 rounded text-gray-700">
242
249
  <div *ngIf="metadata.recordUpdated">
@@ -276,6 +283,7 @@
276
283
  <p class="text-sm mb-1" translate>record.metadata.topics</p>
277
284
  <div class="sm:pb-4 sm:pr-16">
278
285
  <gn-ui-badge
286
+ [clickable]="false"
279
287
  class="inline-block mr-2 mb-2 lowercase"
280
288
  *ngFor="let topic of metadata.topics"
281
289
  >{{ 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]="{ 'text-xs leading-[8px] m-h-[120px]': smaller }"
7
6
  >
8
7
  <gn-ui-progress-bar
9
8
  tabindex="0"
@@ -0,0 +1,48 @@
1
+ <div class="flex flex-col gap-2 py-5 px-5 h-[562px] overflow-y-auto">
2
+ <div
3
+ *ngFor="let featureType of filteredFeatureCatalog?.featureTypes"
4
+ class="rounded shadow bg-white"
5
+ >
6
+ <gn-ui-expandable-panel
7
+ [collapsed]="filteredFeatureCatalog?.featureTypes?.length !== 1"
8
+ iconColor="black"
9
+ >
10
+ <ng-template #titleTemplate>
11
+ <div class="px-2">
12
+ <div class="text-lg font-bold">{{ featureType.name }}</div>
13
+ <div class="text-sm" *ngIf="featureType.definition">
14
+ {{ featureType.definition }}
15
+ </div>
16
+ </div>
17
+ </ng-template>
18
+ <div
19
+ class="grid gap-0"
20
+ [style.grid-template-columns]="gridTemplateColumns"
21
+ data-cy="feature-type-content"
22
+ >
23
+ <div
24
+ class="py-1 px-2 text-sm font-bold text-left border-t"
25
+ [class.border-l]="i > 0"
26
+ [class.border-gray-300]="i > 0"
27
+ *ngFor="let col of columns; let i = index"
28
+ data-test="column-label"
29
+ >
30
+ {{ col.label | translate }}
31
+ </div>
32
+ <ng-container *ngFor="let row of featureType.attributes">
33
+ <div
34
+ class="bg-white text-sm font-normal text-left border-t"
35
+ [class.border-l]="i > 0"
36
+ [class.border-gray-300]="i > 0"
37
+ *ngFor="let col of columns; let i = index"
38
+ >
39
+ <gn-ui-truncated-text
40
+ extraClass="py-3 px-2"
41
+ [text]="row[col.key]"
42
+ ></gn-ui-truncated-text>
43
+ </div>
44
+ </ng-container>
45
+ </div>
46
+ </gn-ui-expandable-panel>
47
+ </div>
48
+ </div>
@@ -0,0 +1,52 @@
1
+ import { Component, Input, OnInit } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { TranslateModule } from '@ngx-translate/core'
4
+ import { DatasetFeatureCatalog } from '../../../../../../../libs/common/domain/src/lib/model/record'
5
+ import {
6
+ ExpandablePanelComponent,
7
+ TruncatedTextComponent,
8
+ } from '../../../../../../../libs/ui/layout/src'
9
+
10
+ @Component({
11
+ selector: 'gn-ui-feature-catalog-list',
12
+ templateUrl: './feature-catalog-list.component.html',
13
+ standalone: true,
14
+ imports: [
15
+ CommonModule,
16
+ TranslateModule,
17
+ ExpandablePanelComponent,
18
+ TruncatedTextComponent,
19
+ ],
20
+ })
21
+ export class FeatureCatalogListComponent implements OnInit {
22
+ @Input() filteredFeatureCatalog: DatasetFeatureCatalog
23
+
24
+ columns = [
25
+ {
26
+ key: 'type',
27
+ label: 'feature.catalog.attribute.type',
28
+ width: '19%',
29
+ },
30
+ {
31
+ key: 'name',
32
+ label: 'feature.catalog.attribute.name',
33
+ width: '32%',
34
+ },
35
+ {
36
+ key: 'code',
37
+ label: 'feature.catalog.attribute.code',
38
+ width: '24%',
39
+ },
40
+ {
41
+ key: 'title',
42
+ label: 'feature.catalog.attribute.description',
43
+ width: '25%',
44
+ },
45
+ ]
46
+
47
+ gridTemplateColumns = ''
48
+
49
+ ngOnInit(): void {
50
+ this.gridTemplateColumns = this.columns.map((col) => col.width).join(' ')
51
+ }
52
+ }
@@ -1,30 +1,9 @@
1
- <a
2
- [class]="classList"
3
- [routerLink]="['/dataset', record.uniqueIdentifier]"
4
- target="_blank"
1
+ <gn-ui-internal-link-card
2
+ [linkHref]="linkHref"
3
+ [linkTarget]="'_blank'"
4
+ [record]="record"
5
+ [favoriteTemplate]="favoriteTemplate"
6
+ [metadataQualityDisplay]="metadataQualityDisplay"
7
+ [size]="size"
5
8
  >
6
- <div class="h-52 bg-gray-100">
7
- <gn-ui-thumbnail
8
- class="h-52 w-full object-cover"
9
- [thumbnailUrl]="record.overviews?.[0]?.url.toString()"
10
- ></gn-ui-thumbnail>
11
- </div>
12
- <div class="flex flex-col justify-between h-44 px-5 pt-4 pb-6">
13
- <h4
14
- class="max-h-24 font-title text-21 text-black text-ellipsis overflow-hidden"
15
- >
16
- {{ record.title }}
17
- </h4>
18
- <div>
19
- <button
20
- [matTooltip]="'tooltip.url.open' | translate"
21
- matTooltipPosition="above"
22
- >
23
- <ng-icon
24
- class="align-middle text-secondary"
25
- name="matOpenInNew"
26
- ></ng-icon>
27
- </button>
28
- </div>
29
- </div>
30
- </a>
9
+ </gn-ui-internal-link-card>
@@ -1,11 +1,19 @@
1
- import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
2
8
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
3
9
  import { ThumbnailComponent } from '../thumbnail/thumbnail.component'
10
+ import { InternalLinkCardComponent } from '../internal-link-card/internal-link-card.component'
4
11
  import { RouterLink } from '@angular/router'
5
12
  import { MatTooltipModule } from '@angular/material/tooltip'
6
13
  import { NgIcon, provideIcons } from '@ng-icons/core'
7
14
  import { TranslateModule } from '@ngx-translate/core'
8
15
  import { matOpenInNew } from '@ng-icons/material-icons/baseline'
16
+ import { TemplateRef } from '@angular/core'
9
17
 
10
18
  @Component({
11
19
  selector: 'gn-ui-related-record-card',
@@ -13,6 +21,7 @@ import { matOpenInNew } from '@ng-icons/material-icons/baseline'
13
21
  styleUrls: ['./related-record-card.component.css'],
14
22
  changeDetection: ChangeDetectionStrategy.OnPush,
15
23
  imports: [
24
+ InternalLinkCardComponent,
16
25
  ThumbnailComponent,
17
26
  RouterLink,
18
27
  MatTooltipModule,
@@ -25,8 +34,12 @@ import { matOpenInNew } from '@ng-icons/material-icons/baseline'
25
34
  export class RelatedRecordCardComponent {
26
35
  private readonly baseClasses: string
27
36
 
37
+ @Input() linkHref: string = null
28
38
  @Input() record: CatalogRecord
29
39
  @Input() extraClass = ''
40
+ @Input() favoriteTemplate: TemplateRef<{ $implicit: CatalogRecord }>
41
+ @Input() metadataQualityDisplay: boolean
42
+ @Input() size: string
30
43
 
31
44
  constructor() {
32
45
  this.baseClasses = [
@@ -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,17 +16,31 @@
16
16
  <div class="h-14 md:w-2/5 w-full mb-4 flex flex-row relative">
17
17
  <gn-ui-text-input
18
18
  class="w-full"
19
+ [(value)]="searchQuery"
19
20
  [extraClass]="getExtraInputClass()"
20
21
  [placeholder]="'service.metadata.search' | translate"
21
22
  (input)="onSearchChange($event)"
22
23
  (keydown.enter)="onSearchEnter($event)"
23
24
  >
24
25
  </gn-ui-text-input>
26
+ <div
27
+ class="absolute right-14 h-14 w-14 flex items-center justify-center"
28
+ >
29
+ <button
30
+ #inputBtn
31
+ *ngIf="searchQuery"
32
+ [aria-label]="'service.metadata.search.clear' | translate"
33
+ (click)="clearSearch()"
34
+ class="h-12 w-12 border-0 flex items-center justify-center"
35
+ >
36
+ <ng-icon name="matClose"></ng-icon>
37
+ </button>
38
+ </div>
25
39
  <div class="border-l absolute border-gray-200 right-0 h-14 w-14">
26
40
  <gn-ui-button
27
41
  #inputBtn
28
42
  type="outline"
29
- extraClass="h-12 w-12 border-0 absolute right-1 top-1"
43
+ extraClass="h-12 w-12 border-0 absolute right-1 top-1 bg-white"
30
44
  (buttonClick)="searchLayers()"
31
45
  >
32
46
  <ng-icon name="iconoirSearch"></ng-icon>
@@ -16,6 +16,7 @@ import {
16
16
  WmsLayerFull,
17
17
  WmtsLayer,
18
18
  } from '@camptocamp/ogc-client'
19
+ import { matClose } from '@ng-icons/material-icons/baseline'
19
20
 
20
21
  marker(`service.metadata.search`)
21
22
  marker(`service.metadata.capabilities.title`)
@@ -48,6 +49,7 @@ marker(`service.metadata.capabilities.attribution`)
48
49
  provideIcons({
49
50
  iconoirSearch,
50
51
  matInfoOutline,
52
+ matClose,
51
53
  }),
52
54
  ],
53
55
  templateUrl: './service-capabilities.component.html',
@@ -104,6 +106,12 @@ export class ServiceCapabilitiesComponent implements OnInit {
104
106
  }
105
107
  }
106
108
 
109
+ clearSearch() {
110
+ this.searchActive = false
111
+ this.searchQuery = ''
112
+ this.filteredLayers = this.availableLayers
113
+ }
114
+
107
115
  async loadLayers() {
108
116
  if (
109
117
  this.apiLinks.length > 0 &&
@@ -176,7 +184,7 @@ export class ServiceCapabilitiesComponent implements OnInit {
176
184
  }
177
185
 
178
186
  getExtraClass(layerItem) {
179
- return layerItem.title === this.selectedLayer?.title
187
+ return layerItem === this.selectedLayer
180
188
  ? `h-8 rounded-lg bg-primary-darker text-white hover:text-primary-darker hover:bg-white`
181
189
  : `h-8 rounded-lg`
182
190
  }
@@ -15,14 +15,15 @@ import { provideNgIconsConfig } from '@ng-icons/core'
15
15
  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
+ import { GeoDataBadgeComponent } from './geo-data-badge/geo-data-badge.component'
18
19
  import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
20
+ import { KindBadgeComponent } from './kind-badge/kind-badge.component'
19
21
  import { ThumbnailComponent } from './thumbnail/thumbnail.component'
20
22
  import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
21
23
  import { UserPreviewComponent } from './user-preview/user-preview.component'
22
24
  import { ApplicationBannerComponent } from './application-banner/application-banner.component'
23
25
  import { InternalLinkCardComponent } from './internal-link-card/internal-link-card.component'
24
26
  import { ServiceCapabilitiesComponent } from './service-capabilities/service-capabilities.component'
25
-
26
27
  @NgModule({
27
28
  imports: [
28
29
  CommonModule,
@@ -46,6 +47,8 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
46
47
  ApplicationBannerComponent,
47
48
  InternalLinkCardComponent,
48
49
  ServiceCapabilitiesComponent,
50
+ KindBadgeComponent,
51
+ GeoDataBadgeComponent,
49
52
  ],
50
53
  providers: [
51
54
  provideNgIconsConfig({
@@ -62,6 +65,8 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
62
65
  ApplicationBannerComponent,
63
66
  InternalLinkCardComponent,
64
67
  ServiceCapabilitiesComponent,
68
+ KindBadgeComponent,
69
+ GeoDataBadgeComponent,
65
70
  ],
66
71
  })
67
72
  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'
@@ -23,3 +24,4 @@ export * from './lib/text-input/text-input.component'
23
24
  export * from './lib/ui-inputs.module'
24
25
  export * from './lib/url-input/url-input.component'
25
26
  export * from './lib/viewport-intersector/viewport-intersector.component'
27
+ export * from './lib/search-feature-catalog/search-feature-catalog.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
+ }
@@ -0,0 +1,43 @@
1
+ <div
2
+ class="flex items-center justify-between p-3 mt-8 bg-white rounded-lg border-b solid border-gray-300"
3
+ >
4
+ <div
5
+ class="relative shrink-0"
6
+ *ngIf="featureCatalog?.featureTypes?.length > 1"
7
+ >
8
+ <input
9
+ type="text"
10
+ [placeholder]="'search.filter.into.feature.catalog' | translate"
11
+ class="w-[220px] h-8 pl-3 pr-10 py-2 border rounded-md"
12
+ [(ngModel)]="searchTerm"
13
+ (ngModelChange)="filterAction(searchTerm)"
14
+ />
15
+ <ng-icon
16
+ class="absolute right-2.5 top-1 w-6 h-6 text-black"
17
+ name="iconoirSearch"
18
+ ></ng-icon>
19
+ </div>
20
+ <div class="text-sm px-1 ml-auto hidden sm:inline">
21
+ <ng-container *ngIf="featureCatalog?.featureTypes?.length > 1">
22
+ <span
23
+ class="text-sm font-medium text-gray-900"
24
+ data-cy="total-objects-label"
25
+ translate
26
+ >record.feature.catalog.number.total.object</span
27
+ ><span
28
+ class="text-sm font-bold px-1 text-gray-900"
29
+ data-cy="total-objects"
30
+ >{{ totalObjects }}</span
31
+ >
32
+ <span class="px-1.5">|</span>
33
+ </ng-container>
34
+ <span
35
+ class="text-sm font-medium px-1 text-gray-900"
36
+ data-cy="total-attributes-label"
37
+ translate
38
+ >record.feature.catalog.number.total.attribute</span
39
+ ><span class="text-sm font-bold text-gray-900" data-cy="total-attributes">{{
40
+ totalAttributes
41
+ }}</span>
42
+ </div>
43
+ </div>
@@ -0,0 +1,77 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { TranslateModule } from '@ngx-translate/core'
4
+ import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
5
+ import { DatasetFeatureCatalog } from '../../../../../../libs/common/domain/src/lib/model/record'
6
+ import { FormsModule } from '@angular/forms'
7
+ import { of } from 'rxjs'
8
+ import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'
9
+ import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
10
+ import { iconoirSearch } from '@ng-icons/iconoir'
11
+
12
+ @Component({
13
+ selector: 'gn-ui-search-feature-catalog',
14
+ templateUrl: './search-feature-catalog.component.html',
15
+ styleUrls: ['./search-feature-catalog.component.css'],
16
+ standalone: true,
17
+ imports: [CommonModule, NgIcon, TranslateModule, FormsModule],
18
+ viewProviders: [
19
+ provideIcons({ iconoirSearch }),
20
+ provideNgIconsConfig({
21
+ size: '1.5rem',
22
+ }),
23
+ ],
24
+ })
25
+ export class SearchFeatureCatalogComponent {
26
+ private _featureCatalog: DatasetFeatureCatalog
27
+ searchTerm: any
28
+ @Input() set featureCatalog(value: DatasetFeatureCatalog) {
29
+ this._featureCatalog = value
30
+ this.filteredFeatureCatalog = value
31
+ }
32
+ get featureCatalog(): DatasetFeatureCatalog {
33
+ return this._featureCatalog
34
+ }
35
+
36
+ @Output() filteredFeatureCatalogChange =
37
+ new EventEmitter<DatasetFeatureCatalog>()
38
+ filteredFeatureCatalog: DatasetFeatureCatalog
39
+
40
+ filterAction = (searchTerm: string): void => {
41
+ of(searchTerm)
42
+ .pipe(
43
+ debounceTime(300),
44
+ distinctUntilChanged(),
45
+ tap(() => {
46
+ const filtered = (this.featureCatalog?.featureTypes || []).filter(
47
+ (featureType) => {
48
+ const fuzzyFilter = createFuzzyFilter(searchTerm)
49
+ return (
50
+ fuzzyFilter(featureType.name) ||
51
+ (featureType.definition && fuzzyFilter(featureType.definition))
52
+ )
53
+ }
54
+ )
55
+ this.filteredFeatureCatalog = {
56
+ ...this.featureCatalog,
57
+ featureTypes: filtered,
58
+ }
59
+ this.filteredFeatureCatalogChange.emit(this.filteredFeatureCatalog)
60
+ })
61
+ )
62
+ .subscribe()
63
+ }
64
+
65
+ get totalObjects(): number {
66
+ return this.filteredFeatureCatalog?.featureTypes?.length || 0
67
+ }
68
+
69
+ get totalAttributes(): number {
70
+ return (
71
+ this.filteredFeatureCatalog?.featureTypes?.reduce(
72
+ (total, featureType) => total + (featureType.attributes?.length || 0),
73
+ 0
74
+ ) || 0
75
+ )
76
+ }
77
+ }
@@ -1,13 +1,12 @@
1
- <div class="inline-block relative align-middle" style="line-height: 0.7em">
1
+ <div class="inline-block relative align-middle">
2
2
  <gn-ui-button
3
3
  [type]="'outline'"
4
- class="-m-[8px] p-[8px]"
4
+ [disabled]="disabled"
5
5
  (buttonClick)="toggle($event)"
6
6
  [ngClass]="{
7
7
  enabled: toggled,
8
- disabled: !toggled,
8
+ disabled: !toggled || disabled,
9
9
  'transition hover:scale-125 will-change-transform': !disabled,
10
- 'cursor-default': disabled,
11
10
  }"
12
11
  >
13
12
  <ng-icon [name]="toggled ? 'matStar' : 'matStarBorder'"></ng-icon>