geonetwork-ui 2.6.0-dev.b306f1194 → 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 (363) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/base.converter.mjs +1 -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 +8 -3
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +3 -3
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +4 -4
  7. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -10
  8. package/esm2022/libs/api/repository/src/lib/gn4/gn4.provider.mjs +7 -1
  9. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  10. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +5 -1
  11. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +5 -1
  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/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +2 -3
  15. package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +1 -1
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +5 -5
  17. package/esm2022/libs/feature/record/src/index.mjs +1 -2
  18. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  19. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +5 -9
  20. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  21. package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +7 -11
  22. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  23. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +8 -3
  24. package/esm2022/libs/feature/record/src/lib/record-meta/record-meta.component.mjs +1 -1
  25. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +8 -5
  26. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -6
  27. package/esm2022/libs/feature/router/src/lib/default/constants.mjs +3 -1
  28. package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
  29. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +10 -2
  30. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +9 -3
  31. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  32. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +8 -7
  33. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +13 -19
  34. package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -2
  35. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  36. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +26 -10
  37. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  38. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  39. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
  40. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  41. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  42. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  43. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  44. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  45. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +3 -3
  46. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
  47. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  48. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  49. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  50. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +8 -5
  51. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  52. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +161 -0
  53. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
  54. package/esm2022/libs/ui/inputs/src/index.mjs +2 -2
  55. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  56. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  57. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  58. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  59. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  60. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +4 -3
  61. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  62. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  63. package/esm2022/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.mjs +43 -3
  64. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  65. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  66. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +15 -3
  67. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  68. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  69. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +56 -0
  70. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  71. package/esm2022/libs/ui/map/src/index.mjs +2 -1
  72. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +80 -0
  73. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  74. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  75. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  76. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +5 -4
  77. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  78. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  79. package/esm2022/libs/util/app-config/src/lib/app-config.mjs +2 -1
  80. package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +2 -1
  81. package/esm2022/libs/util/shared/src/index.mjs +2 -1
  82. package/esm2022/libs/util/shared/src/lib/gn-ui-version.mjs +6 -0
  83. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -1
  84. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +13 -6
  85. package/esm2022/translations/de.json +35 -5
  86. package/esm2022/translations/en.json +38 -6
  87. package/esm2022/translations/es.json +35 -5
  88. package/esm2022/translations/fr.json +38 -6
  89. package/esm2022/translations/it.json +35 -5
  90. package/esm2022/translations/nl.json +35 -5
  91. package/esm2022/translations/pt.json +35 -5
  92. package/fesm2022/geonetwork-ui.mjs +1474 -601
  93. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  94. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  95. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  96. package/libs/api/metadata-converter/src/lib/base.converter.d.ts.map +1 -1
  97. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  98. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  99. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  100. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  101. package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts.map +1 -1
  102. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +5 -2
  103. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  104. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  105. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +1 -1
  106. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  107. package/libs/feature/editor/src/index.d.ts +1 -0
  108. package/libs/feature/editor/src/index.d.ts.map +1 -1
  109. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  110. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  111. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -1
  112. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +6 -6
  113. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -1
  114. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  115. package/libs/feature/record/src/index.d.ts +0 -1
  116. package/libs/feature/record/src/index.d.ts.map +1 -1
  117. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +9 -1
  118. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  119. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +2 -3
  120. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
  121. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +1 -2
  122. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
  123. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  124. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  125. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  126. package/libs/feature/record/src/lib/record-meta/record-meta.component.d.ts +2 -2
  127. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +3 -1
  128. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  129. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
  130. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  131. package/libs/feature/router/src/lib/default/constants.d.ts +2 -0
  132. package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
  133. package/libs/feature/router/src/lib/default/router.config.d.ts +2 -0
  134. package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
  135. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  136. package/libs/feature/router/src/lib/default/state/router.facade.d.ts +5 -0
  137. package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
  138. package/libs/feature/search/src/index.d.ts +1 -1
  139. package/libs/feature/search/src/index.d.ts.map +1 -1
  140. package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
  141. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  142. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  143. package/libs/feature/search/src/lib/record-url.token.d.ts +3 -1
  144. package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -1
  145. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  146. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  147. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +5 -3
  148. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  149. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  150. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  151. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  152. package/libs/ui/elements/src/index.d.ts +2 -0
  153. package/libs/ui/elements/src/index.d.ts.map +1 -1
  154. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  155. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  156. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  157. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  158. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
  159. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  160. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  161. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  162. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +2 -2
  163. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  164. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +30 -0
  165. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -0
  166. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
  167. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  168. package/libs/ui/inputs/src/index.d.ts +1 -1
  169. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  170. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  171. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  172. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  173. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  174. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  175. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  176. package/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.d.ts.map +1 -1
  177. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  178. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  179. package/libs/ui/layout/src/index.d.ts +1 -0
  180. package/libs/ui/layout/src/index.d.ts.map +1 -1
  181. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts +10 -3
  182. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts.map +1 -1
  183. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  184. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  185. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +2 -0
  186. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
  187. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +18 -0
  188. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  189. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  190. package/libs/ui/map/src/index.d.ts +1 -0
  191. package/libs/ui/map/src/index.d.ts.map +1 -1
  192. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts +15 -0
  193. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -0
  194. package/libs/ui/search/src/index.d.ts +1 -0
  195. package/libs/ui/search/src/index.d.ts.map +1 -1
  196. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  197. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  198. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  199. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  200. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  201. package/libs/util/app-config/src/lib/app-config.d.ts.map +1 -1
  202. package/libs/util/app-config/src/lib/fixtures.d.ts.map +1 -1
  203. package/libs/util/shared/src/index.d.ts +1 -0
  204. package/libs/util/shared/src/index.d.ts.map +1 -1
  205. package/libs/util/shared/src/lib/gn-ui-version.d.ts +3 -0
  206. package/libs/util/shared/src/lib/gn-ui-version.d.ts.map +1 -0
  207. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
  208. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  209. package/libs/util/shared/src/lib/links/link-utils.d.ts +14 -7
  210. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  211. package/package.json +1 -1
  212. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  213. package/src/libs/api/metadata-converter/src/lib/base.converter.ts +1 -4
  214. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  215. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.service+eaux-usees.ts +2 -2
  216. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +2 -2
  217. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +2 -2
  218. package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.service+napitswallonia.ts +2 -2
  219. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +8 -2
  220. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
  221. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +3 -3
  222. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -9
  223. package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +6 -0
  224. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +5 -2
  225. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +26 -26
  226. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +2 -2
  227. package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +5 -5
  228. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -0
  229. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -0
  230. package/src/libs/feature/editor/src/index.ts +1 -0
  231. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  232. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  233. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +1 -2
  234. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -2
  235. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +2 -2
  236. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +2 -2
  237. package/src/libs/feature/record/src/index.ts +0 -1
  238. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +14 -10
  239. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +2 -3
  240. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  241. package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +4 -5
  242. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  243. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  244. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +21 -15
  245. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +5 -0
  246. package/src/libs/feature/record/src/lib/record-meta/record-meta.component.ts +2 -2
  247. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -3
  248. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -7
  249. package/src/libs/feature/router/src/lib/default/constants.ts +2 -0
  250. package/src/libs/feature/router/src/lib/default/router.config.ts +2 -0
  251. package/src/libs/feature/router/src/lib/default/router.service.ts +10 -0
  252. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +10 -1
  253. package/src/libs/feature/search/src/index.ts +1 -1
  254. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +0 -6
  255. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +16 -8
  256. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -10
  257. package/src/libs/feature/search/src/lib/record-url.token.ts +10 -1
  258. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  259. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  260. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  261. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.css +6 -0
  262. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.html +1 -0
  263. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +24 -5
  264. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  265. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  266. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
  267. package/src/libs/ui/elements/src/index.ts +2 -0
  268. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  269. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  270. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  271. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  272. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  273. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  274. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +2 -2
  275. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  276. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
  277. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
  278. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  279. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  280. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  281. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +9 -9
  282. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +9 -0
  283. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +20 -7
  284. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -4
  285. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  286. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.css +0 -0
  287. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +96 -0
  288. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +183 -0
  289. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -0
  290. package/src/libs/ui/inputs/src/index.ts +1 -1
  291. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  292. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  293. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  294. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  295. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  296. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  297. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +0 -0
  298. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +6 -6
  299. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +2 -1
  300. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  301. package/src/libs/ui/layout/src/index.ts +1 -0
  302. package/src/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.ts +46 -2
  303. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  304. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  305. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  306. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  307. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  308. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -7
  309. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -0
  310. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  311. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  312. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  313. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +46 -0
  314. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +62 -0
  315. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  316. package/src/libs/ui/map/src/index.ts +1 -0
  317. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.css +0 -0
  318. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.html +4 -0
  319. package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts → ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts} +8 -8
  320. package/src/libs/ui/search/src/index.ts +1 -0
  321. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  322. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
  323. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  324. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +7 -4
  325. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +2 -1
  326. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  327. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -1
  328. package/src/libs/util/app-config/src/lib/app-config.ts +1 -0
  329. package/src/libs/util/app-config/src/lib/fixtures.ts +1 -0
  330. package/src/libs/util/shared/src/index.ts +1 -0
  331. package/src/libs/util/shared/src/lib/gn-ui-version.ts +8 -0
  332. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +12 -3
  333. package/src/libs/util/shared/src/lib/links/link-utils.ts +30 -12
  334. package/tailwind.base.config.js +3 -0
  335. package/tailwind.base.css +19 -26
  336. package/translations/de.json +35 -5
  337. package/translations/en.json +38 -6
  338. package/translations/es.json +35 -5
  339. package/translations/fr.json +38 -6
  340. package/translations/it.json +35 -5
  341. package/translations/nl.json +35 -5
  342. package/translations/pt.json +35 -5
  343. package/translations/sk.json +35 -5
  344. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +0 -79
  345. package/esm2022/libs/feature/record/src/lib/gn-ui-version.token.mjs +0 -3
  346. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  347. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +0 -16
  348. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +0 -15
  349. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +0 -1
  350. package/libs/feature/record/src/lib/gn-ui-version.token.d.ts +0 -3
  351. package/libs/feature/record/src/lib/gn-ui-version.token.d.ts.map +0 -1
  352. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  353. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  354. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts +0 -8
  355. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts.map +0 -1
  356. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +0 -1
  357. package/src/libs/feature/record/src/lib/gn-ui-version.token.ts +0 -3
  358. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  359. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
  360. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +0 -3
  361. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +0 -9
  362. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.ts +0 -15
  363. /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-map-container/form-field-map-container.component.css → multilingual-panel/multilingual-panel.component.css} +0 -0
@@ -0,0 +1,183 @@
1
+ import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { TranslateModule, TranslateService } from '@ngx-translate/core'
4
+ import { getLayers } from '../../../../../../libs/util/shared/src'
5
+ import { ButtonComponent, TextInputComponent } from '../../../../../../libs/ui/inputs/src'
6
+ import { NgIcon, provideIcons } from '@ng-icons/core'
7
+ import { iconoirSearch } from '@ng-icons/iconoir'
8
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
9
+ import { matInfoOutline } from '@ng-icons/material-icons/outline'
10
+ import {
11
+ PopoverComponent,
12
+ SpinningLoaderComponent,
13
+ } from '../../../../../../libs/ui/widgets/src'
14
+ import {
15
+ WfsFeatureTypeFull,
16
+ WmsLayerFull,
17
+ WmtsLayer,
18
+ } from '@camptocamp/ogc-client'
19
+
20
+ marker(`service.metadata.search`)
21
+ marker(`service.metadata.capabilities.title`)
22
+ marker(`service.metadata.capabilities.abstract`)
23
+ marker(`service.metadata.capabilities.name`)
24
+ marker(`service.metadata.capabilities.defaultCrs`)
25
+ marker(`service.metadata.capabilities.availableCrs`)
26
+ marker(`service.metadata.capabilities.otherCrs`)
27
+ marker(`service.metadata.capabilities.objectCount`)
28
+ marker(`service.metadata.capabilities.geometryName`)
29
+ marker(`service.metadata.capabilities.geometryType`)
30
+ marker(`service.metadata.capabilities.keywords`)
31
+ marker(`service.metadata.capabilities.outputFormats`)
32
+ marker(`service.metadata.capabilities.resourceLinks`)
33
+ marker(`service.metadata.capabilities.attribution`)
34
+
35
+ @Component({
36
+ selector: 'gn-ui-service-capabilities',
37
+ standalone: true,
38
+ imports: [
39
+ CommonModule,
40
+ TranslateModule,
41
+ ButtonComponent,
42
+ TextInputComponent,
43
+ NgIcon,
44
+ PopoverComponent,
45
+ SpinningLoaderComponent,
46
+ ],
47
+ viewProviders: [
48
+ provideIcons({
49
+ iconoirSearch,
50
+ matInfoOutline,
51
+ }),
52
+ ],
53
+ templateUrl: './service-capabilities.component.html',
54
+ styleUrl: './service-capabilities.component.css',
55
+ })
56
+ export class ServiceCapabilitiesComponent implements OnInit {
57
+ @Input() apiLinks = []
58
+ availableLayers = []
59
+ filteredLayers = []
60
+ selectedLayer = null
61
+ layerInformation = []
62
+ searchQuery = ''
63
+ loading = false
64
+ searchActive
65
+
66
+ capabilitiesKeys = [
67
+ 'title',
68
+ 'abstract',
69
+ 'name',
70
+ 'defaultCrs',
71
+ 'availableCrs',
72
+ 'otherCrs',
73
+ 'objectCount',
74
+ 'geometryName',
75
+ 'geometryType',
76
+ 'keywords',
77
+ 'outputFormats',
78
+ 'resourceLinks',
79
+ 'attribution',
80
+ ]
81
+
82
+ constructor(
83
+ private cdr: ChangeDetectorRef,
84
+ private translateService: TranslateService
85
+ ) {}
86
+
87
+ ngOnInit() {
88
+ this.loadLayers()
89
+ }
90
+
91
+ onSearchChange(event: Event) {
92
+ const input = event.target as HTMLInputElement
93
+ this.searchQuery = input.value
94
+ if (!input.value) {
95
+ this.searchActive = false
96
+ this.filteredLayers = this.availableLayers
97
+ }
98
+ }
99
+
100
+ onSearchEnter(event: KeyboardEvent) {
101
+ if (event.key === 'Enter') {
102
+ this.searchActive = true
103
+ this.searchLayers()
104
+ }
105
+ }
106
+
107
+ async loadLayers() {
108
+ if (
109
+ this.apiLinks.length > 0 &&
110
+ this.apiLinks[0].accessServiceProtocol !== 'ogcFeatures'
111
+ ) {
112
+ this.loading = true
113
+ this.availableLayers = await getLayers(
114
+ this.apiLinks[0].url.href,
115
+ this.apiLinks[0].accessServiceProtocol
116
+ )
117
+ this.loading = false
118
+ this.cdr.detectChanges()
119
+ this.filteredLayers = this.availableLayers
120
+ } else {
121
+ this.availableLayers = []
122
+ }
123
+ }
124
+
125
+ selectLayer(layer: WfsFeatureTypeFull | WmsLayerFull | WmtsLayer) {
126
+ if (layer === this.selectedLayer) {
127
+ this.selectedLayer = null
128
+ this.layerInformation = []
129
+ return
130
+ }
131
+
132
+ this.selectedLayer = layer
133
+ const filteredInfo = []
134
+ Object.keys(layer).map((key) => {
135
+ if (this.capabilitiesKeys.includes(key)) {
136
+ const displayName = this.translateService.instant(
137
+ `service.metadata.capabilities.${key}`
138
+ )
139
+ if (key in layer && layer[key]?.length) {
140
+ filteredInfo.push({ displayName, value: layer[key] })
141
+ }
142
+ }
143
+ })
144
+
145
+ this.layerInformation = filteredInfo
146
+ }
147
+
148
+ isList(value: string | string[]) {
149
+ return Array.isArray(value)
150
+ }
151
+
152
+ getExtraInputClass() {
153
+ if (this.searchActive) {
154
+ return 'h-14 border rounded-lg border-primary text-primary focus:border-primary hover:border-primary'
155
+ }
156
+ return 'h-14 border rounded-lg'
157
+ }
158
+
159
+ searchLayers() {
160
+ this.searchActive = true
161
+ this.filteredLayers = this.availableLayers.filter((layer) => {
162
+ const query = this.searchQuery.toLowerCase()
163
+ if (layer.title) {
164
+ return (
165
+ layer.title.toLowerCase().includes(query) ||
166
+ layer.abstract?.toLowerCase().includes(query)
167
+ )
168
+ } else {
169
+ return layer.name.toLowerCase().includes(query)
170
+ }
171
+ })
172
+ if (!this.filteredLayers.includes(this.selectedLayer)) {
173
+ this.selectedLayer = null
174
+ this.layerInformation = []
175
+ }
176
+ }
177
+
178
+ getExtraClass(layerItem) {
179
+ return layerItem.title === this.selectedLayer?.title
180
+ ? `h-8 rounded-lg bg-primary-darker text-white hover:text-primary-darker hover:bg-white`
181
+ : `h-8 rounded-lg`
182
+ }
183
+ }
@@ -16,11 +16,13 @@ import { TranslateModule } from '@ngx-translate/core'
16
16
  import { AvatarComponent } from './avatar/avatar.component'
17
17
  import { ImageInputComponent } from './image-input/image-input.component'
18
18
  import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
19
+ import { KindBadgeComponent } from './kind-badge/kind-badge.component'
19
20
  import { ThumbnailComponent } from './thumbnail/thumbnail.component'
20
21
  import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
21
22
  import { UserPreviewComponent } from './user-preview/user-preview.component'
22
23
  import { ApplicationBannerComponent } from './application-banner/application-banner.component'
23
24
  import { InternalLinkCardComponent } from './internal-link-card/internal-link-card.component'
25
+ import { ServiceCapabilitiesComponent } from './service-capabilities/service-capabilities.component'
24
26
 
25
27
  @NgModule({
26
28
  imports: [
@@ -44,6 +46,8 @@ import { InternalLinkCardComponent } from './internal-link-card/internal-link-ca
44
46
  ImageInputComponent,
45
47
  ApplicationBannerComponent,
46
48
  InternalLinkCardComponent,
49
+ ServiceCapabilitiesComponent,
50
+ KindBadgeComponent,
47
51
  ],
48
52
  providers: [
49
53
  provideNgIconsConfig({
@@ -59,6 +63,8 @@ import { InternalLinkCardComponent } from './internal-link-card/internal-link-ca
59
63
  ImageInputComponent,
60
64
  ApplicationBannerComponent,
61
65
  InternalLinkCardComponent,
66
+ ServiceCapabilitiesComponent,
67
+ KindBadgeComponent,
62
68
  ],
63
69
  })
64
70
  export class UiElementsModule {}
@@ -15,7 +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/navigation-button/navigation-button.component'
18
+ export * from './lib/inline-filter/inline-filter.component'
19
19
  export * from './lib/search-input/search-input.component'
20
20
  export * from './lib/star-toggle/star-toggle.component'
21
21
  export * from './lib/switch-toggle/switch-toggle.component'
@@ -56,14 +56,14 @@ export class ButtonComponent {
56
56
 
57
57
  @Input() disabled = false
58
58
  @Input() extraClass = ''
59
- @Output() buttonClick = new EventEmitter<void>()
59
+ @Output() buttonClick = new EventEmitter<Event>()
60
60
 
61
61
  get classList() {
62
62
  return `${this.btnClass} ${this.extraClass}`
63
63
  }
64
64
 
65
65
  handleClick(event: MouseEvent) {
66
- this.buttonClick.emit()
66
+ this.buttonClick.emit(event)
67
67
  event.preventDefault()
68
68
  ;(event.currentTarget as HTMLElement).blur()
69
69
  propagateToDocumentOnly(event)
@@ -59,7 +59,7 @@
59
59
  #overlayContainer
60
60
  >
61
61
  <div
62
- class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
62
+ class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-[2px] flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
63
63
  >
64
64
  <button
65
65
  type="button"
@@ -19,7 +19,7 @@
19
19
  (keydown)="handleTriggerKeydown($event)"
20
20
  [disabled]="disabled"
21
21
  >
22
- <div class="grow font-medium truncate py-1 mr-2 text-left">
22
+ <div class="grow truncate py-1 mr-2 text-left">
23
23
  {{ getChoiceLabel() | translate }}
24
24
  </div>
25
25
  <ng-icon
@@ -0,0 +1,23 @@
1
+ <ul class="flex flex-wrap list-none gap-2">
2
+ <li *ngFor="let choice of choices">
3
+ <label
4
+ class=""
5
+ [ngClass]="{
6
+ selected: isSelected(choice),
7
+ }"
8
+ >
9
+ <input
10
+ class="hidden"
11
+ type="checkbox"
12
+ #checkBox
13
+ [checked]="isSelected(choice)"
14
+ (change)="select(choice, checkBox.checked)"
15
+ [attr.data-cy]="'inlineFilter-' + choice.value"
16
+ />
17
+ <ng-container
18
+ *ngTemplateOutlet="itemTemplate; context: { $implicit: choice }"
19
+ >
20
+ </ng-container>
21
+ </label>
22
+ </li>
23
+ </ul>
@@ -0,0 +1,44 @@
1
+ import {
2
+ Component,
3
+ ContentChild,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ TemplateRef,
8
+ } from '@angular/core'
9
+ import { Choice } from './inline-filter.model'
10
+
11
+ @Component({
12
+ selector: 'gn-ui-inline-filter',
13
+ templateUrl: './inline-filter.component.html',
14
+ })
15
+ export class InlineFilterComponent {
16
+ @Input() choices: Choice[]
17
+ @Input() selected: unknown[] = []
18
+
19
+ @Output() selectValues = new EventEmitter<unknown[]>()
20
+
21
+ @ContentChild(TemplateRef) itemTemplate: TemplateRef<any>
22
+
23
+ isSelected(choice: Choice) {
24
+ return (
25
+ this.selected.indexOf(choice.value) > -1 ||
26
+ (this.selected.length === 0 && choice.value === 'all')
27
+ )
28
+ }
29
+
30
+ select(choice: Choice, selected: boolean) {
31
+ if (choice.value === 'all' && selected) {
32
+ this.selected = [choice.value]
33
+ } else {
34
+ this.selected = selected
35
+ ? [...this.selected.filter((v) => v !== choice.value), choice.value]
36
+ : this.selected.filter((v) => v !== choice.value)
37
+
38
+ // If any value selected, unselect all
39
+ this.selected = this.selected.filter((v) => v !== 'all')
40
+ }
41
+
42
+ this.selectValues.emit(this.selected)
43
+ }
44
+ }
@@ -0,0 +1,5 @@
1
+ export interface Choice {
2
+ value: unknown
3
+ label: string
4
+ icon?: string
5
+ }
@@ -1,17 +1,17 @@
1
1
  <div class="inline-block relative align-middle" style="line-height: 0.7em">
2
- <button
3
- type="button"
2
+ <gn-ui-button
3
+ [type]="'outline'"
4
+ [disabled]="disabled"
4
5
  class="-m-[8px] p-[8px]"
5
- (click)="toggle($event)"
6
+ (buttonClick)="toggle($event)"
6
7
  [ngClass]="{
7
8
  enabled: toggled,
8
- 'disabled opacity-45': !toggled,
9
+ disabled: !toggled || disabled,
9
10
  'transition hover:scale-125 will-change-transform': !disabled,
10
- 'cursor-default': disabled,
11
11
  }"
12
12
  >
13
13
  <ng-icon [name]="toggled ? 'matStar' : 'matStarBorder'"></ng-icon>
14
- </button>
14
+ </gn-ui-button>
15
15
  <svg
16
16
  #starOverlay
17
17
  class="star-toggle-overlay"
@@ -11,6 +11,7 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
11
11
  import { NgIcon, provideIcons } from '@ng-icons/core'
12
12
  import { CommonModule } from '@angular/common'
13
13
  import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
14
+ import { ButtonComponent } from '../button/button.component'
14
15
 
15
16
  @Component({
16
17
  selector: 'gn-ui-star-toggle',
@@ -18,7 +19,7 @@ import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
18
19
  styleUrls: ['./star-toggle.component.css'],
19
20
  changeDetection: ChangeDetectionStrategy.OnPush,
20
21
  standalone: true,
21
- imports: [CommonModule, NgIcon],
22
+ imports: [CommonModule, NgIcon, ButtonComponent],
22
23
  viewProviders: [provideIcons({ matStar, matStarBorder })],
23
24
  })
24
25
  export class StarToggleComponent {
@@ -33,6 +33,7 @@ import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-a
33
33
  import { DropdownMultiselectComponent } from './dropdown-multiselect/dropdown-multiselect.component'
34
34
  import { DropdownSelectorComponent } from './dropdown-selector/dropdown-selector.component'
35
35
  import { EditableLabelDirective } from './editable-label/editable-label.directive'
36
+ import { InlineFilterComponent } from './inline-filter/inline-filter.component'
36
37
  import { TextAreaComponent } from './text-area/text-area.component'
37
38
  import { ViewportIntersectorComponent } from './viewport-intersector/viewport-intersector.component'
38
39
 
@@ -42,6 +43,7 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
42
43
  DropdownMultiselectComponent,
43
44
  ViewportIntersectorComponent,
44
45
  CheckboxComponent,
46
+ InlineFilterComponent,
45
47
  ],
46
48
  imports: [
47
49
  CommonModule,
@@ -75,9 +77,6 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
75
77
  matExpandMore,
76
78
  matExpandLess,
77
79
  }),
78
- provideNgIconsConfig({
79
- size: '0.9em',
80
- }),
81
80
  ],
82
81
  exports: [
83
82
  DropdownSelectorComponent,
@@ -90,6 +89,7 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
90
89
  CheckboxComponent,
91
90
  DateRangePickerComponent,
92
91
  EditableLabelDirective,
92
+ InlineFilterComponent,
93
93
  BadgeComponent,
94
94
  ],
95
95
  })
@@ -16,3 +16,4 @@ export * from './lib/pagination-dots/pagination-dots.component'
16
16
  export * from './lib/previous-next-buttons/previous-next-buttons.component'
17
17
  export * from './lib/paginable.interface'
18
18
  export * from './lib/ui-layout.module'
19
+ export * from './lib/truncated-text/truncated-text.component'
@@ -1,4 +1,5 @@
1
1
  import {
2
+ AfterViewChecked,
2
3
  ChangeDetectorRef,
3
4
  Directive,
4
5
  HostBinding,
@@ -11,20 +12,34 @@ import {
11
12
  @Directive({
12
13
  selector: '[gnUiAnchorLink]',
13
14
  })
14
- export class AnchorLinkDirective implements OnInit, OnDestroy {
15
+ export class AnchorLinkDirective
16
+ implements OnInit, AfterViewChecked, OnDestroy
17
+ {
15
18
  @Input('gnUiAnchorLink') targetId: string
16
19
  @Input('gnUiAnchorLinkDisabledClass') disabledClass: string
17
20
  @Input('gnUiAnchorLinkEnabledClass') enabledClass: string
21
+ @Input('gnUiAnchorLinkInViewClass') inViewClass: string
22
+ @Input('gnUiAnchorLinkOutOfViewClass') outOfViewClass: string
18
23
 
19
24
  @HostBinding('class')
20
25
  get elementClass(): string {
21
- return this.disabled ? this.disabledClass : this.enabledClass
26
+ if (this.disabled) {
27
+ return this.disabledClass
28
+ }
29
+ if (this.inView) {
30
+ return `${this.inViewClass} ${this.enabledClass}`
31
+ } else {
32
+ return `${this.outOfViewClass} ${this.enabledClass}`
33
+ }
22
34
  }
23
35
 
24
36
  disabled = false
25
37
  observer = new MutationObserver(() => {
26
38
  this.refreshDisabledState()
27
39
  })
40
+ inView = false
41
+ intersectionObserver: IntersectionObserver
42
+ initialized = false
28
43
 
29
44
  constructor(private changeDetector: ChangeDetectorRef) {}
30
45
 
@@ -36,8 +51,37 @@ export class AnchorLinkDirective implements OnInit, OnDestroy {
36
51
  this.refreshDisabledState()
37
52
  }
38
53
 
54
+ ngAfterViewChecked() {
55
+ if (!this.initialized && !this.disabled) {
56
+ const target = document.getElementById(this.targetId)
57
+ if (target) {
58
+ this.initializeIntersectionObserver(target)
59
+ this.initialized = true
60
+ }
61
+ }
62
+ }
63
+
64
+ initializeIntersectionObserver(target: HTMLElement) {
65
+ this.intersectionObserver = new IntersectionObserver(
66
+ (entries) => {
67
+ entries.forEach((entry) => {
68
+ this.inView = entry.isIntersecting
69
+ this.changeDetector.detectChanges()
70
+ })
71
+ },
72
+ {
73
+ root: null,
74
+ rootMargin: '-30% 0% -60% 0%',
75
+ }
76
+ )
77
+ this.intersectionObserver.observe(target)
78
+ }
79
+
39
80
  ngOnDestroy() {
40
81
  this.observer.disconnect()
82
+ if (this.intersectionObserver) {
83
+ this.intersectionObserver.disconnect()
84
+ }
41
85
  }
42
86
 
43
87
  refreshDisabledState() {
@@ -5,3 +5,25 @@
5
5
  :host {
6
6
  position: relative;
7
7
  }
8
+
9
+ @media screen and (min-width: 769px) {
10
+ .size-L {
11
+ grid-template-columns: repeat(1, minmax(0, 1fr));
12
+ grid-auto-rows: minmax(0, min-content);
13
+ }
14
+
15
+ .size-M {
16
+ grid-template-columns: repeat(2, minmax(0, 1fr));
17
+ grid-auto-rows: minmax(0, min-content);
18
+ }
19
+
20
+ .size-S {
21
+ grid-template-columns: repeat(3, minmax(0, 1fr));
22
+ grid-auto-rows: minmax(0, min-content);
23
+ }
24
+
25
+ .size-XS {
26
+ grid-template-columns: repeat(2, minmax(0, 1fr));
27
+ grid-auto-rows: minmax(0, min-content);
28
+ }
29
+ }
@@ -1,7 +1,7 @@
1
1
  <div
2
- class="block-list-container flex flex-col"
2
+ class="grid gap-4 w-full md:grid-cols-2"
3
3
  #blockContainer
4
- [ngClass]="containerClass"
4
+ [ngClass]="[containerClass, 'size-' + subComponentSize]"
5
5
  [ngStyle]="{ minHeight: minHeight + 'px' }"
6
6
  >
7
7
  <ng-content></ng-content>
@@ -5,7 +5,9 @@ import {
5
5
  Component,
6
6
  ContentChildren,
7
7
  ElementRef,
8
+ EventEmitter,
8
9
  Input,
10
+ Output,
9
11
  QueryList,
10
12
  ViewChild,
11
13
  } from '@angular/core'
@@ -13,6 +15,7 @@ import { CommonModule } from '@angular/common'
13
15
  import { Paginable } from '../paginable.interface'
14
16
  import { PaginationDotsComponent } from '../pagination-dots/pagination-dots.component'
15
17
 
18
+ type ComponentSize = 'L' | 'M' | 'S' | 'XS'
16
19
  @Component({
17
20
  selector: 'gn-ui-block-list',
18
21
  templateUrl: './block-list.component.html',
@@ -22,15 +25,16 @@ import { PaginationDotsComponent } from '../pagination-dots/pagination-dots.comp
22
25
  imports: [CommonModule, PaginationDotsComponent],
23
26
  })
24
27
  export class BlockListComponent implements AfterViewInit, Paginable {
25
- @Input() pageSize = 5
28
+ pageSize = 4
26
29
  @Input() containerClass = ''
27
30
  @Input() paginationContainerClass = 'w-full bottom-0 top-auto'
28
31
  @ContentChildren('block', { read: ElementRef }) blocks: QueryList<
29
32
  ElementRef<HTMLElement>
30
33
  >
31
34
  @ViewChild('blockContainer') blockContainer: ElementRef<HTMLElement>
32
-
33
35
  protected minHeight = 0
36
+ @Output() listChanges = new EventEmitter<BlockListComponent>()
37
+ subComponentSize: ComponentSize = 'M'
34
38
 
35
39
  protected currentPage_ = 0
36
40
  protected get pages() {
@@ -47,18 +51,26 @@ export class BlockListComponent implements AfterViewInit, Paginable {
47
51
  return this.blocks ? Math.ceil(this.blocks.length / this.pageSize) : 1
48
52
  }
49
53
  get currentPage() {
50
- return this.currentPage_ + 1 // this is 1-based
54
+ return this.currentPage_ + 1
51
55
  }
52
56
 
53
57
  constructor(private changeDetector: ChangeDetectorRef) {}
54
58
 
55
59
  ngAfterViewInit() {
56
- this.blocks.changes.subscribe(this.refreshBlocksVisibility)
60
+ this.blocks.changes.subscribe(() => {
61
+ this.updateSizes()
62
+ this.refreshBlocksVisibility()
63
+ this.goToPage(1)
64
+ this.changeDetector.detectChanges()
65
+ this.listChanges.emit(this)
66
+ })
67
+ this.updateSizes()
57
68
  this.refreshBlocksVisibility()
58
69
 
59
70
  // we store the first height as the min-height of the list container
60
71
  this.minHeight = this.blockContainer.nativeElement.clientHeight
61
72
  this.changeDetector.detectChanges()
73
+ this.listChanges.emit(this)
62
74
  }
63
75
 
64
76
  protected refreshBlocksVisibility = () => {
@@ -71,7 +83,33 @@ export class BlockListComponent implements AfterViewInit, Paginable {
71
83
  })
72
84
  }
73
85
 
74
- // pageIndex is 1-based
86
+ protected updateSizes() {
87
+ this.subComponentSize = this.computeSubComponentSize()
88
+ this.pageSize = this.computePageSize()
89
+ }
90
+
91
+ protected computeSubComponentSize(): ComponentSize {
92
+ if (!this.blocks) return 'M'
93
+ const subComponentsCount = this.blocks.length
94
+ if (subComponentsCount <= 3) return 'L'
95
+ if (subComponentsCount <= 12) return 'M'
96
+ if (subComponentsCount <= 18) return 'S'
97
+ return 'XS'
98
+ }
99
+
100
+ protected computePageSize(): number {
101
+ switch (this.subComponentSize) {
102
+ case 'L':
103
+ return 3
104
+ case 'S':
105
+ return 6
106
+ case 'XS':
107
+ return 8
108
+ default:
109
+ return 4
110
+ }
111
+ }
112
+
75
113
  public goToPage(pageIndex: number) {
76
114
  this.currentPage_ = Math.max(
77
115
  Math.min(pageIndex - 1, this.pagesCount - 1),
@@ -1,4 +1,3 @@
1
1
  :host {
2
2
  position: relative;
3
- display: block;
4
3
  }
@@ -1,4 +1,4 @@
1
- <div #carouselOverflowContainer class="w-full">
1
+ <div #carouselOverflowContainer class="w-full block">
2
2
  <div class="carousel-container flex" [ngClass]="containerClass">
3
3
  <ng-content></ng-content>
4
4
  </div>
@@ -31,11 +31,7 @@
31
31
  *ngFor="let item of items"
32
32
  (click)="handleRowClick(item)"
33
33
  data-cy="table-row"
34
- [title]="
35
- !item.extras?.edit && !isDraftPage
36
- ? ('editor.record.lock.reason' | translate)
37
- : ''
38
- "
34
+ [title]="getItemTitle(item) | translate"
39
35
  >
40
36
  <div
41
37
  class="relative h-0"
@@ -52,9 +48,9 @@
52
48
  class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate border-b border-gray-200"
53
49
  [ngClass]="{
54
50
  'text-purple-light cursor-default':
55
- !item.extras?.edit && !isDraftPage,
51
+ (!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset',
56
52
  'group-hover:text-main group-hover:bg-gray-50':
57
- item.extras?.edit || isDraftPage,
53
+ (item.extras?.edit || isDraftPage) && item.kind === 'dataset',
58
54
  }"
59
55
  >
60
56
  <ng-container