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

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 (193) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/resource-types.mjs +17 -15
  3. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  4. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  5. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  6. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  7. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  8. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
  9. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  10. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
  11. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  12. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  13. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  14. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  15. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  16. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  17. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  18. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  19. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
  20. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  21. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  22. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  23. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  25. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  27. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  28. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  29. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  30. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  31. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  32. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  33. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  34. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  35. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  36. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  37. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  38. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  39. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  40. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +56 -0
  41. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  42. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  43. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  44. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  45. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  46. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  47. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  48. package/esm2022/translations/de.json +8 -1
  49. package/esm2022/translations/en.json +10 -1
  50. package/esm2022/translations/es.json +8 -1
  51. package/esm2022/translations/fr.json +11 -2
  52. package/esm2022/translations/it.json +8 -1
  53. package/esm2022/translations/nl.json +8 -1
  54. package/esm2022/translations/pt.json +8 -1
  55. package/fesm2022/geonetwork-ui.mjs +527 -145
  56. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  57. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  58. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  59. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  60. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  61. package/libs/feature/editor/src/index.d.ts +1 -0
  62. package/libs/feature/editor/src/index.d.ts.map +1 -1
  63. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  64. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  65. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  66. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  67. package/libs/feature/search/src/index.d.ts +1 -1
  68. package/libs/feature/search/src/index.d.ts.map +1 -1
  69. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  70. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  71. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  72. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  73. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  74. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  75. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  76. package/libs/ui/elements/src/index.d.ts +1 -0
  77. package/libs/ui/elements/src/index.d.ts.map +1 -1
  78. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  79. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  80. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  81. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  82. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
  83. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  84. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  85. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  86. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  87. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  88. package/libs/ui/inputs/src/index.d.ts +1 -0
  89. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  90. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  91. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  92. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  93. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  94. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  95. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  96. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  97. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  98. package/libs/ui/layout/src/index.d.ts +1 -0
  99. package/libs/ui/layout/src/index.d.ts.map +1 -1
  100. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  101. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  102. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +18 -0
  103. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  104. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  105. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  106. package/libs/ui/search/src/index.d.ts +1 -0
  107. package/libs/ui/search/src/index.d.ts.map +1 -1
  108. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  109. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  110. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  111. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  112. package/package.json +1 -1
  113. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  114. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  115. package/src/libs/feature/editor/src/index.ts +1 -0
  116. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  117. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  118. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  119. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +14 -10
  120. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  121. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  122. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  123. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +21 -15
  124. package/src/libs/feature/search/src/index.ts +1 -1
  125. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
  126. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  127. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  128. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  129. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  130. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  131. package/src/libs/ui/elements/src/index.ts +1 -0
  132. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  133. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  134. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  135. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  136. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  137. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  138. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  139. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
  140. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
  141. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  142. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  143. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  144. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +9 -9
  145. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  146. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +7 -3
  147. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  148. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
  149. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  150. package/src/libs/ui/inputs/src/index.ts +1 -0
  151. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  152. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  153. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  154. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  155. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  156. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  157. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +0 -0
  158. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
  159. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  160. package/src/libs/ui/layout/src/index.ts +1 -0
  161. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  162. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  163. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  164. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  165. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  166. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  167. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  168. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  169. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +46 -0
  170. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +62 -0
  171. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  172. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  173. package/src/libs/ui/search/src/index.ts +1 -0
  174. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  175. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
  176. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  177. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  178. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -1
  179. package/tailwind.base.config.js +3 -0
  180. package/tailwind.base.css +1 -13
  181. package/translations/de.json +8 -1
  182. package/translations/en.json +10 -1
  183. package/translations/es.json +8 -1
  184. package/translations/fr.json +11 -2
  185. package/translations/it.json +8 -1
  186. package/translations/nl.json +8 -1
  187. package/translations/pt.json +8 -1
  188. package/translations/sk.json +8 -1
  189. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  190. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  191. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  192. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  193. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ui-layout.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/layout/src/lib/ui-layout.module.ts"],"names":[],"mappings":";;;;;;AAOA,qBAUa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
1
+ {"version":3,"file":"ui-layout.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/layout/src/lib/ui-layout.module.ts"],"names":[],"mappings":";;;;;;AAOA,qBAMa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"spatial-extent.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;;AAEnG,qBAOa,sBAAsB;IACjC,IAAa,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAExD;IACD,eAAe,0CAAkD;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,CAwClC;IAED,KAAK,SAAK;IAEV,oBAAoB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ;yCAjD3D,sBAAsB;2CAAtB,sBAAsB;CA8DlC"}
1
+ {"version":3,"file":"spatial-extent.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,OAAO,EAEL,UAAU,EAEX,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;;AAEnG,qBAOa,sBAAsB;IACjC,IAAa,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAExD;IACD,eAAe,0CAAkD;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,CAyClC;IAED,KAAK,SAAK;IAEV,oBAAoB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ;yCAlD3D,sBAAsB;2CAAtB,sBAAsB;CA+DlC"}
@@ -16,6 +16,7 @@ export * from './lib/record-preview-text/record-preview-text.component';
16
16
  export * from './lib/record-preview-title/record-preview-title.component';
17
17
  export * from './lib/record-metric/record-metric.component';
18
18
  export * from './lib/results-list-item/results-list-item.component';
19
+ export * from './lib/results-hits-search-kind/results-hits-search-kind.component';
19
20
  export * from './lib/results-hits-number/results-hits-number.component';
20
21
  export * from './lib/results-table/results-table.component';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/search/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3E,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,wBAAwB,CAAA;AACtC,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AACzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,uDAAuD,CAAA;AACrE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qDAAqD,CAAA;AACnE,cAAc,yDAAyD,CAAA;AACvE,cAAc,6CAA6C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/search/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3E,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,wBAAwB,CAAA;AACtC,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AACzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,uDAAuD,CAAA;AACrE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qDAAqD,CAAA;AACnE,cAAc,mEAAmE,CAAA;AACjF,cAAc,yDAAyD,CAAA;AACvE,cAAc,6CAA6C,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { Choice } from '../../../../../../libs/ui/inputs/src';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ResultsHitsSearchKindComponent implements OnChanges {
5
+ selected: string[];
6
+ choices: Choice[];
7
+ selectionChanged: EventEmitter<string[]>;
8
+ availableChoices: Choice[];
9
+ ngOnChanges(changes: SimpleChanges): void;
10
+ buildFilterChoices(availableValues: Choice[]): Choice[];
11
+ onSelectedValues(values: string[]): void;
12
+ isSelectedChoice(choiceValue: string): boolean;
13
+ isAllChoice(choiceValue: string): boolean;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResultsHitsSearchKindComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ResultsHitsSearchKindComponent, "gn-ui-results-hits-search-kind", never, { "selected": { "alias": "selected"; "required": false; }; "choices": { "alias": "choices"; "required": false; }; }, { "selectionChanged": "selectionChanged"; }, never, never, false, never>;
16
+ }
17
+ //# sourceMappingURL=results-hits-search-kind.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results-hits-search-kind.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAEZ,SAAS,EACT,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAA;;AAE7D,qBAIa,8BAA+B,YAAW,SAAS;IACrD,QAAQ,EAAE,MAAM,EAAE,CAAK;IACvB,OAAO,EAAE,MAAM,EAAE,CAAK;IACrB,gBAAgB,yBAA+B;IAEzD,gBAAgB,EAAE,MAAM,EAAE,CAAK;IAE/B,WAAW,CAAC,OAAO,EAAE,aAAa;IAMlC,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE;IAY5C,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE;IAMjC,gBAAgB,CAAC,WAAW,EAAE,MAAM;IAIpC,WAAW,CAAC,WAAW,EAAE,MAAM;yCAnCpB,8BAA8B;2CAA9B,8BAA8B;CAsC1C"}
@@ -7,27 +7,29 @@ import * as i5 from "./record-preview-title/record-preview-title.component";
7
7
  import * as i6 from "./record-metric/record-metric.component";
8
8
  import * as i7 from "./results-list/results-list.component";
9
9
  import * as i8 from "./results-hits-number/results-hits-number.component";
10
- import * as i9 from "./results-list-item/results-list-item.component";
11
- import * as i10 from "./record-preview-feed/record-preview-feed.component";
12
- import * as i11 from "./record-preview-row/record-preview-row.component";
13
- import * as i12 from "@angular/common";
14
- import * as i13 from "@ngx-translate/core";
15
- import * as i14 from "ngx-dropzone";
16
- import * as i15 from "./facets/facets.module";
17
- import * as i16 from "@angular/forms";
18
- import * as i17 from "ngx-chips";
19
- import * as i18 from "../../../../util/shared/src/lib/util-shared.module";
20
- import * as i19 from "../../../widgets/src/lib/ui-widgets.module";
21
- import * as i20 from "../../../inputs/src/lib/ui-inputs.module";
22
- import * as i21 from "../../../elements/src/lib/ui-elements.module";
23
- import * as i22 from "@angular/material/checkbox";
24
- import * as i23 from "@angular/router";
25
- import * as i24 from "../../../layout/src/lib/interactive-table/interactive-table.component";
26
- import * as i25 from "@ng-icons/core";
27
- import * as i26 from "../../../elements/src/lib/metadata-quality/metadata-quality.component";
10
+ import * as i9 from "./results-hits-search-kind/results-hits-search-kind.component";
11
+ import * as i10 from "./results-list-item/results-list-item.component";
12
+ import * as i11 from "./record-preview-feed/record-preview-feed.component";
13
+ import * as i12 from "./record-preview-row/record-preview-row.component";
14
+ import * as i13 from "@angular/common";
15
+ import * as i14 from "@ngx-translate/core";
16
+ import * as i15 from "ngx-dropzone";
17
+ import * as i16 from "./facets/facets.module";
18
+ import * as i17 from "@angular/forms";
19
+ import * as i18 from "ngx-chips";
20
+ import * as i19 from "../../../../util/shared/src/lib/util-shared.module";
21
+ import * as i20 from "../../../widgets/src/lib/ui-widgets.module";
22
+ import * as i21 from "../../../inputs/src/lib/ui-inputs.module";
23
+ import * as i22 from "../../../elements/src/lib/ui-elements.module";
24
+ import * as i23 from "@angular/material/checkbox";
25
+ import * as i24 from "@angular/router";
26
+ import * as i25 from "../../../layout/src/lib/interactive-table/interactive-table.component";
27
+ import * as i26 from "@ng-icons/core";
28
+ import * as i27 from "../../../elements/src/lib/kind-badge/kind-badge.component";
29
+ import * as i28 from "../../../elements/src/lib/metadata-quality/metadata-quality.component";
28
30
  export declare class UiSearchModule {
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<UiSearchModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<UiSearchModule, [typeof i1.RecordPreviewComponent, typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.ResultsListItemComponent, typeof i10.RecordPreviewFeedComponent, typeof i11.RecordPreviewRowComponent], [typeof i12.CommonModule, typeof i13.TranslateModule, typeof i14.NgxDropzoneModule, typeof i15.FacetsModule, typeof i16.FormsModule, typeof i16.ReactiveFormsModule, typeof i17.TagInputModule, typeof i18.UtilSharedModule, typeof i19.UiWidgetsModule, typeof i20.UiInputsModule, typeof i21.UiElementsModule, typeof i22.MatCheckboxModule, typeof i23.RouterLink, typeof i24.InteractiveTableComponent, typeof i25.NgIconsModule, typeof i26.MetadataQualityComponent], [typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i15.FacetsModule, typeof i1.RecordPreviewComponent, typeof i8.ResultsHitsNumberComponent, typeof i10.RecordPreviewFeedComponent, typeof i11.RecordPreviewRowComponent]>;
32
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UiSearchModule, [typeof i1.RecordPreviewComponent, typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.ResultsHitsSearchKindComponent, typeof i10.ResultsListItemComponent, typeof i11.RecordPreviewFeedComponent, typeof i12.RecordPreviewRowComponent], [typeof i13.CommonModule, typeof i14.TranslateModule, typeof i15.NgxDropzoneModule, typeof i16.FacetsModule, typeof i17.FormsModule, typeof i17.ReactiveFormsModule, typeof i18.TagInputModule, typeof i19.UtilSharedModule, typeof i20.UiWidgetsModule, typeof i21.UiInputsModule, typeof i22.UiElementsModule, typeof i23.MatCheckboxModule, typeof i24.RouterLink, typeof i25.InteractiveTableComponent, typeof i26.NgIconsModule, typeof i27.KindBadgeComponent, typeof i28.MetadataQualityComponent], [typeof i2.RecordPreviewListComponent, typeof i3.RecordPreviewCardComponent, typeof i4.RecordPreviewTextComponent, typeof i5.RecordPreviewTitleComponent, typeof i6.RecordMetricComponent, typeof i7.ResultsListComponent, typeof i16.FacetsModule, typeof i1.RecordPreviewComponent, typeof i8.ResultsHitsNumberComponent, typeof i9.ResultsHitsSearchKindComponent, typeof i11.RecordPreviewFeedComponent, typeof i12.RecordPreviewRowComponent]>;
31
33
  static ɵinj: i0.ɵɵInjectorDeclaration<UiSearchModule>;
32
34
  }
33
35
  //# sourceMappingURL=ui-search.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-search.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/search/src/lib/ui-search.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,qBA0Da,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
1
+ {"version":3,"file":"ui-search.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/search/src/lib/ui-search.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,qBA6Da,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.6.0-dev.d216c4dea",
3
+ "version": "2.6.0-dev.e61ca542f",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -5,3 +5,4 @@ export * from './lib/gn4'
5
5
  export * from './lib/dcat-ap'
6
6
  export * from './lib/xml-utils'
7
7
  export * from './lib/base.converter'
8
+ export * from './lib/common/resource-types'
@@ -4,23 +4,37 @@ import {
4
4
  ReuseType,
5
5
  } from '../../../../../../libs/common/domain/src/lib/model/record'
6
6
 
7
- export function getResourceType(type: string): RecordKind {
8
- const possibleResourceTypes = {
9
- application: 'reuse',
10
- dataset: 'dataset',
11
- map: 'reuse',
12
- 'map/static': 'reuse', // old index field
13
- 'map/interactive': 'reuse', // old index field
14
- 'map-interactive': 'reuse', // new index field since Oct 10, 2024
15
- 'map-static': 'reuse', // new index field
16
- mapDigital: 'reuse',
17
- interactiveMap: 'reuse',
18
- staticMap: 'reuse',
19
- service: 'service',
20
- } as const
7
+ export const PossibleResourceTypes = {
8
+ application: 'reuse',
9
+ dataset: 'dataset',
10
+ interactiveMap: 'reuse',
11
+ map: 'reuse',
12
+ 'map/static': 'reuse', // old index field
13
+ 'map/interactive': 'reuse', // old index field
14
+ 'map-interactive': 'reuse', // new index field since Oct 10, 2024
15
+ 'map-static': 'reuse', // new index field
16
+ mapDigital: 'reuse',
17
+ series: 'dataset',
18
+ service: 'service',
19
+ staticMap: 'reuse',
20
+ } as const
21
+
22
+ type KindType = keyof typeof PossibleResourceTypes
23
+ type ResourceType = 'reuse' | 'dataset' | 'service'
24
+ type PossibleResourceTypesGrouped = {
25
+ [K in ResourceType]: KindType[]
26
+ }
27
+
28
+ export const PossibleResourceTypesDefinition = Object.entries(
29
+ PossibleResourceTypes
30
+ ).reduce(
31
+ (acc, [key, val]) => ((acc[val] ??= []).push(key), acc),
32
+ {}
33
+ ) as PossibleResourceTypesGrouped
21
34
 
35
+ export function getResourceType(type: string): RecordKind {
22
36
  return (
23
- possibleResourceTypes[type as keyof typeof possibleResourceTypes] ||
37
+ PossibleResourceTypes[type as keyof typeof PossibleResourceTypes] ||
24
38
  'dataset'
25
39
  )
26
40
  }
@@ -11,3 +11,4 @@ export * from './lib/components/wizard/wizard.component'
11
11
  export * from './lib/components/wizard-field/wizard-field.component'
12
12
  export * from './lib/components/wizard-summarize/wizard-summarize.component'
13
13
  export * from './lib/components/record-form/form-field'
14
+ export * from './lib/components/multilingual-panel/multilingual-panel.component'
@@ -0,0 +1,14 @@
1
+ <div
2
+ class="flex flex-col h-full w-[302px] bg-neutral-100 border-l border-gray-300 py-9 px-3 gap-8"
3
+ >
4
+ <span class="text-3xl font-title text-black/80 px-2" translate
5
+ >editor.record.form.multilingual.title</span
6
+ >
7
+ <gn-ui-check-toggle
8
+ class="p-2"
9
+ [label]="'editor.record.form.multilingual.enable' | translate"
10
+ [color]="'primary'"
11
+ [value]="translationsEnabled"
12
+ (toggled)="translationsEnabled = $event"
13
+ ></gn-ui-check-toggle>
14
+ </div>
@@ -0,0 +1,15 @@
1
+ import { Component } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { CheckToggleComponent } from '../../../../../../../libs/ui/inputs/src'
4
+ import { TranslateModule } from '@ngx-translate/core'
5
+
6
+ @Component({
7
+ selector: 'gn-ui-multilingual-panel',
8
+ standalone: true,
9
+ imports: [CommonModule, CheckToggleComponent, TranslateModule],
10
+ templateUrl: './multilingual-panel.component.html',
11
+ styleUrl: './multilingual-panel.component.css',
12
+ })
13
+ export class MultilingualPanelComponent {
14
+ translationsEnabled = false
15
+ }
@@ -1,13 +1,17 @@
1
- <div class="w-full h-full flex flex-col p-1">
2
- <gn-ui-dropdown-selector
3
- *ngIf="dropdownChoices$ | async as choices"
4
- [ngClass]="{ hidden: !displaySource }"
5
- [title]="'table.select.data' | translate"
6
- class="truncate p-1 -mx-1 self-end mb-1"
7
- extraBtnClass="!text-primary font-sans font-medium"
8
- [choices]="choices"
9
- (selectValue)="selectLink($event)"
10
- ></gn-ui-dropdown-selector>
1
+ <div class="w-full h-full flex flex-col gap-[13px]">
2
+ <div
3
+ class="w-full py-4 px-5 bg-white border border-color-border rounded-lg mt-6"
4
+ >
5
+ <gn-ui-dropdown-selector
6
+ *ngIf="dropdownChoices$ | async as choices"
7
+ [ngClass]="{ hidden: !displaySource }"
8
+ [title]="'table.select.data' | translate"
9
+ class="h-[44px] w-full"
10
+ extraBtnClass="font-sans font-bold"
11
+ [choices]="choices"
12
+ (selectValue)="selectLink($event)"
13
+ ></gn-ui-dropdown-selector>
14
+ </div>
11
15
  <ng-container *ngIf="hidePreview; else dataView">
12
16
  <gn-ui-popup-alert
13
17
  type="warning"
@@ -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
@@ -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
+ }
@@ -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'
@@ -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>