geonetwork-ui 2.6.0-dev.857b51517 → 2.6.0-dev.9b9a26109

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 (274) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +3 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +40 -4
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +8 -4
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +5 -2
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +4 -4
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
  8. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +2 -1
  9. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +3 -3
  10. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +66 -12
  11. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +7 -1
  12. package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +2 -1
  13. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  14. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  15. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  16. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  17. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  18. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  19. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +266 -11
  20. package/esm2022/libs/feature/record/src/index.mjs +2 -3
  21. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  22. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  23. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
  24. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
  25. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
  26. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
  27. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
  28. package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
  29. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  30. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +13 -10
  31. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  32. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  33. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  34. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  35. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +42 -83
  36. package/esm2022/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.mjs +59 -0
  37. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
  38. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  39. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  40. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  41. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  42. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
  43. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  44. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  45. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  46. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  47. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  48. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  49. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  50. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +20 -10
  51. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +65 -14
  52. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  53. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  54. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  55. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  56. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
  57. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  58. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  59. package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +21 -12
  60. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +39 -18
  61. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +10 -4
  62. package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +42 -1
  63. package/esm2022/libs/util/i18n/src/lib/language-codes.mjs +24 -2
  64. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  65. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  66. package/esm2022/translations/de.json +37 -7
  67. package/esm2022/translations/en.json +37 -9
  68. package/esm2022/translations/es.json +36 -6
  69. package/esm2022/translations/fr.json +37 -9
  70. package/esm2022/translations/it.json +66 -36
  71. package/esm2022/translations/nl.json +36 -6
  72. package/esm2022/translations/pt.json +36 -6
  73. package/fesm2022/geonetwork-ui.mjs +1847 -751
  74. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  75. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  76. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  77. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +0 -1
  78. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  79. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +1 -0
  80. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
  81. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  82. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  83. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  84. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  85. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
  86. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  87. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +13 -2
  88. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  89. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -0
  90. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  91. package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts +1 -0
  92. package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
  93. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  94. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  95. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +6 -0
  96. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  97. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  98. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  99. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  100. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  101. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  102. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  103. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +48 -3
  104. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -1
  105. package/libs/feature/record/src/index.d.ts +1 -2
  106. package/libs/feature/record/src/index.d.ts.map +1 -1
  107. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  108. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
  109. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  110. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
  111. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  112. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
  113. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  114. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
  115. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  116. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
  117. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  118. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  119. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  120. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  121. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +6 -5
  122. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  123. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  124. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  125. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  126. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  127. package/libs/ui/elements/src/index.d.ts +2 -0
  128. package/libs/ui/elements/src/index.d.ts.map +1 -1
  129. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  130. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  131. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +6 -13
  132. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  133. package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts +14 -0
  134. package/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.d.ts.map +1 -0
  135. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
  136. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
  137. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  138. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  139. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
  140. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  141. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  142. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  143. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  144. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  145. package/libs/ui/inputs/src/index.d.ts +1 -0
  146. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  147. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  148. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  149. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  150. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  151. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +4 -2
  152. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
  153. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +15 -6
  154. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
  155. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  156. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  157. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  158. package/libs/ui/search/src/index.d.ts +1 -0
  159. package/libs/ui/search/src/index.d.ts.map +1 -1
  160. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  161. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -3
  162. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
  163. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +10 -4
  164. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  165. package/libs/ui/search/src/lib/ui-search.module.d.ts +2 -1
  166. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  167. package/libs/util/i18n/src/lib/i18n.constants.d.ts +1 -0
  168. package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
  169. package/libs/util/i18n/src/lib/language-codes.d.ts +23 -1
  170. package/libs/util/i18n/src/lib/language-codes.d.ts.map +1 -1
  171. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  172. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  173. package/package.json +2 -2
  174. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  175. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
  176. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +62 -4
  177. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
  178. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -3
  179. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +5 -1
  180. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +8 -4
  181. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -1
  182. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
  183. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
  184. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +105 -12
  185. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
  186. package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -0
  187. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  188. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +6 -0
  189. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  190. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  191. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +50 -1
  192. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  193. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  194. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  195. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  196. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  197. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +117 -11
  198. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +316 -6
  199. package/src/libs/feature/record/src/index.ts +1 -2
  200. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
  201. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -1
  202. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  203. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
  204. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
  205. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
  206. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
  207. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
  208. package/src/libs/feature/search/src/lib/constants.ts +1 -0
  209. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  210. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
  211. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +13 -3
  212. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  213. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  214. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  215. package/src/libs/ui/elements/src/index.ts +2 -0
  216. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  217. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  218. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  219. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +68 -141
  220. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +38 -97
  221. package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.html +69 -0
  222. package/src/libs/ui/elements/src/lib/internal-link-card-contact/internal-link-card-contact.component.ts +61 -0
  223. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
  224. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
  225. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
  226. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
  227. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
  228. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  229. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  230. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
  231. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
  232. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
  233. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  234. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
  235. package/src/libs/ui/inputs/src/index.ts +1 -0
  236. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  237. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  238. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  239. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  240. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
  241. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  242. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  243. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -2
  244. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -6
  245. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +8 -10
  246. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +75 -7
  247. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  248. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  249. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  250. package/src/libs/ui/search/src/index.ts +1 -0
  251. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  252. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
  253. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  254. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  255. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  256. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +16 -6
  257. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +15 -11
  258. package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
  259. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +31 -27
  260. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +33 -15
  261. package/src/libs/ui/search/src/lib/ui-search.module.ts +3 -0
  262. package/src/libs/util/i18n/src/lib/i18n.constants.ts +42 -0
  263. package/src/libs/util/i18n/src/lib/language-codes.ts +23 -1
  264. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  265. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  266. package/tailwind.base.css +1 -1
  267. package/translations/de.json +37 -7
  268. package/translations/en.json +37 -9
  269. package/translations/es.json +36 -6
  270. package/translations/fr.json +37 -9
  271. package/translations/it.json +66 -36
  272. package/translations/nl.json +36 -6
  273. package/translations/pt.json +36 -6
  274. package/translations/sk.json +36 -6
@@ -16,17 +16,31 @@
16
16
  <div class="h-14 md:w-2/5 w-full mb-4 flex flex-row relative">
17
17
  <gn-ui-text-input
18
18
  class="w-full"
19
+ [(value)]="searchQuery"
19
20
  [extraClass]="getExtraInputClass()"
20
21
  [placeholder]="'service.metadata.search' | translate"
21
22
  (input)="onSearchChange($event)"
22
23
  (keydown.enter)="onSearchEnter($event)"
23
24
  >
24
25
  </gn-ui-text-input>
26
+ <div
27
+ class="absolute right-14 h-14 w-14 flex items-center justify-center"
28
+ >
29
+ <button
30
+ #inputBtn
31
+ *ngIf="searchQuery"
32
+ [aria-label]="'service.metadata.search.clear' | translate"
33
+ (click)="clearSearch()"
34
+ class="h-12 w-12 border-0 flex items-center justify-center"
35
+ >
36
+ <ng-icon name="matClose"></ng-icon>
37
+ </button>
38
+ </div>
25
39
  <div class="border-l absolute border-gray-200 right-0 h-14 w-14">
26
40
  <gn-ui-button
27
41
  #inputBtn
28
42
  type="outline"
29
- extraClass="h-12 w-12 border-0 absolute right-1 top-1"
43
+ extraClass="h-12 w-12 border-0 absolute right-1 top-1 bg-white"
30
44
  (buttonClick)="searchLayers()"
31
45
  >
32
46
  <ng-icon name="iconoirSearch"></ng-icon>
@@ -16,6 +16,7 @@ import {
16
16
  WmsLayerFull,
17
17
  WmtsLayer,
18
18
  } from '@camptocamp/ogc-client'
19
+ import { matClose } from '@ng-icons/material-icons/baseline'
19
20
 
20
21
  marker(`service.metadata.search`)
21
22
  marker(`service.metadata.capabilities.title`)
@@ -48,6 +49,7 @@ marker(`service.metadata.capabilities.attribution`)
48
49
  provideIcons({
49
50
  iconoirSearch,
50
51
  matInfoOutline,
52
+ matClose,
51
53
  }),
52
54
  ],
53
55
  templateUrl: './service-capabilities.component.html',
@@ -104,6 +106,12 @@ export class ServiceCapabilitiesComponent implements OnInit {
104
106
  }
105
107
  }
106
108
 
109
+ clearSearch() {
110
+ this.searchActive = false
111
+ this.searchQuery = ''
112
+ this.filteredLayers = this.availableLayers
113
+ }
114
+
107
115
  async loadLayers() {
108
116
  if (
109
117
  this.apiLinks.length > 0 &&
@@ -176,7 +184,7 @@ export class ServiceCapabilitiesComponent implements OnInit {
176
184
  }
177
185
 
178
186
  getExtraClass(layerItem) {
179
- return layerItem.title === this.selectedLayer?.title
187
+ return layerItem === this.selectedLayer
180
188
  ? `h-8 rounded-lg bg-primary-darker text-white hover:text-primary-darker hover:bg-white`
181
189
  : `h-8 rounded-lg`
182
190
  }
@@ -15,6 +15,7 @@ import { provideNgIconsConfig } from '@ng-icons/core'
15
15
  import { TranslateModule } from '@ngx-translate/core'
16
16
  import { AvatarComponent } from './avatar/avatar.component'
17
17
  import { ImageInputComponent } from './image-input/image-input.component'
18
+ import { GeoDataBadgeComponent } from './geo-data-badge/geo-data-badge.component'
18
19
  import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
19
20
  import { KindBadgeComponent } from './kind-badge/kind-badge.component'
20
21
  import { ThumbnailComponent } from './thumbnail/thumbnail.component'
@@ -23,7 +24,6 @@ import { UserPreviewComponent } from './user-preview/user-preview.component'
23
24
  import { ApplicationBannerComponent } from './application-banner/application-banner.component'
24
25
  import { InternalLinkCardComponent } from './internal-link-card/internal-link-card.component'
25
26
  import { ServiceCapabilitiesComponent } from './service-capabilities/service-capabilities.component'
26
-
27
27
  @NgModule({
28
28
  imports: [
29
29
  CommonModule,
@@ -48,6 +48,7 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
48
48
  InternalLinkCardComponent,
49
49
  ServiceCapabilitiesComponent,
50
50
  KindBadgeComponent,
51
+ GeoDataBadgeComponent,
51
52
  ],
52
53
  providers: [
53
54
  provideNgIconsConfig({
@@ -65,6 +66,7 @@ import { ServiceCapabilitiesComponent } from './service-capabilities/service-cap
65
66
  InternalLinkCardComponent,
66
67
  ServiceCapabilitiesComponent,
67
68
  KindBadgeComponent,
69
+ GeoDataBadgeComponent,
68
70
  ],
69
71
  })
70
72
  export class UiElementsModule {}
@@ -24,3 +24,4 @@ export * from './lib/text-input/text-input.component'
24
24
  export * from './lib/ui-inputs.module'
25
25
  export * from './lib/url-input/url-input.component'
26
26
  export * from './lib/viewport-intersector/viewport-intersector.component'
27
+ export * from './lib/search-feature-catalog/search-feature-catalog.component'
@@ -79,7 +79,7 @@
79
79
  <mat-option
80
80
  *ngFor="let suggestion of suggestions$ | async"
81
81
  [value]="suggestion"
82
- class="p-2 suggestion"
82
+ class="p-2 suggestion text-start"
83
83
  >
84
84
  {{ displayWithFnInternal(suggestion) }}
85
85
  </mat-option>
@@ -0,0 +1,43 @@
1
+ <div
2
+ class="flex items-center justify-between p-3 mt-8 bg-white rounded-lg border-b solid border-gray-300"
3
+ >
4
+ <div
5
+ class="relative shrink-0"
6
+ *ngIf="featureCatalog?.featureTypes?.length > 1"
7
+ >
8
+ <input
9
+ type="text"
10
+ [placeholder]="'search.filter.into.feature.catalog' | translate"
11
+ class="w-[220px] h-8 pl-3 pr-10 py-2 border rounded-md"
12
+ [(ngModel)]="searchTerm"
13
+ (ngModelChange)="filterAction(searchTerm)"
14
+ />
15
+ <ng-icon
16
+ class="absolute right-2.5 top-1 w-6 h-6 text-black"
17
+ name="iconoirSearch"
18
+ ></ng-icon>
19
+ </div>
20
+ <div class="text-sm px-1 ml-auto hidden sm:inline">
21
+ <ng-container *ngIf="featureCatalog?.featureTypes?.length > 1">
22
+ <span
23
+ class="text-sm font-medium text-gray-900"
24
+ data-cy="total-objects-label"
25
+ translate
26
+ >record.feature.catalog.number.total.object</span
27
+ ><span
28
+ class="text-sm font-bold px-1 text-gray-900"
29
+ data-cy="total-objects"
30
+ >{{ totalObjects }}</span
31
+ >
32
+ <span class="px-1.5">|</span>
33
+ </ng-container>
34
+ <span
35
+ class="text-sm font-medium px-1 text-gray-900"
36
+ data-cy="total-attributes-label"
37
+ translate
38
+ >record.feature.catalog.number.total.attribute</span
39
+ ><span class="text-sm font-bold text-gray-900" data-cy="total-attributes">{{
40
+ totalAttributes
41
+ }}</span>
42
+ </div>
43
+ </div>
@@ -0,0 +1,77 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { TranslateModule } from '@ngx-translate/core'
4
+ import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
5
+ import { DatasetFeatureCatalog } from '../../../../../../libs/common/domain/src/lib/model/record'
6
+ import { FormsModule } from '@angular/forms'
7
+ import { of } from 'rxjs'
8
+ import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'
9
+ import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
10
+ import { iconoirSearch } from '@ng-icons/iconoir'
11
+
12
+ @Component({
13
+ selector: 'gn-ui-search-feature-catalog',
14
+ templateUrl: './search-feature-catalog.component.html',
15
+ styleUrls: ['./search-feature-catalog.component.css'],
16
+ standalone: true,
17
+ imports: [CommonModule, NgIcon, TranslateModule, FormsModule],
18
+ viewProviders: [
19
+ provideIcons({ iconoirSearch }),
20
+ provideNgIconsConfig({
21
+ size: '1.5rem',
22
+ }),
23
+ ],
24
+ })
25
+ export class SearchFeatureCatalogComponent {
26
+ private _featureCatalog: DatasetFeatureCatalog
27
+ searchTerm: any
28
+ @Input() set featureCatalog(value: DatasetFeatureCatalog) {
29
+ this._featureCatalog = value
30
+ this.filteredFeatureCatalog = value
31
+ }
32
+ get featureCatalog(): DatasetFeatureCatalog {
33
+ return this._featureCatalog
34
+ }
35
+
36
+ @Output() filteredFeatureCatalogChange =
37
+ new EventEmitter<DatasetFeatureCatalog>()
38
+ filteredFeatureCatalog: DatasetFeatureCatalog
39
+
40
+ filterAction = (searchTerm: string): void => {
41
+ of(searchTerm)
42
+ .pipe(
43
+ debounceTime(300),
44
+ distinctUntilChanged(),
45
+ tap(() => {
46
+ const filtered = (this.featureCatalog?.featureTypes || []).filter(
47
+ (featureType) => {
48
+ const fuzzyFilter = createFuzzyFilter(searchTerm)
49
+ return (
50
+ fuzzyFilter(featureType.name) ||
51
+ (featureType.definition && fuzzyFilter(featureType.definition))
52
+ )
53
+ }
54
+ )
55
+ this.filteredFeatureCatalog = {
56
+ ...this.featureCatalog,
57
+ featureTypes: filtered,
58
+ }
59
+ this.filteredFeatureCatalogChange.emit(this.filteredFeatureCatalog)
60
+ })
61
+ )
62
+ .subscribe()
63
+ }
64
+
65
+ get totalObjects(): number {
66
+ return this.filteredFeatureCatalog?.featureTypes?.length || 0
67
+ }
68
+
69
+ get totalAttributes(): number {
70
+ return (
71
+ this.filteredFeatureCatalog?.featureTypes?.reduce(
72
+ (total, featureType) => total + (featureType.attributes?.length || 0),
73
+ 0
74
+ ) || 0
75
+ )
76
+ }
77
+ }
@@ -1,8 +1,7 @@
1
- <div class="inline-block relative align-middle" style="line-height: 0.7em">
1
+ <div class="inline-block relative align-middle">
2
2
  <gn-ui-button
3
3
  [type]="'outline'"
4
4
  [disabled]="disabled"
5
- class="-m-[8px] p-[8px]"
6
5
  (buttonClick)="toggle($event)"
7
6
  [ngClass]="{
8
7
  enabled: toggled,
@@ -1,22 +1,38 @@
1
1
  <div
2
- class="group flex align-middle title border-b border-gray-100 cursor-pointer pt-2.5"
2
+ class="group flex items-center justify-between title border-b border-gray-100 cursor-pointer"
3
3
  (click)="toggle()"
4
+ data-cy="expandable-panel-header"
4
5
  >
5
- <div class="grow font-medium text-black text-sm">
6
- {{ title }}
6
+ <div class="grow py-2.5">
7
+ <ng-container *ngIf="titleTemplate; else simpleTitle">
8
+ <div data-cy="expandable-panel-custom-title">
9
+ <ng-container *ngTemplateOutlet="titleTemplate"></ng-container>
10
+ </div>
11
+ </ng-container>
12
+ <ng-template #simpleTitle>
13
+ <div
14
+ class="font-medium text-black text-sm"
15
+ data-cy="expandable-panel-title"
16
+ >
17
+ {{ title }}
18
+ </div>
19
+ </ng-template>
7
20
  </div>
8
21
  <div
9
- class="w-8 opacity-25 text-primary group-hover:opacity-100 transition-opacity"
22
+ class="w-8 opacity-25 text-primary group-hover:opacity-100 transition-opacity flex items-center shrink-0"
10
23
  >
11
- <ng-icon name="matAdd" *ngIf="collapsed"></ng-icon>
12
- <ng-icon name="matRemove" *ngIf="!collapsed"></ng-icon>
24
+ <ng-icon
25
+ [name]="collapsed ? 'matAdd' : 'matRemove'"
26
+ [style.color]="iconColor"
27
+ ></ng-icon>
13
28
  </div>
14
29
  </div>
15
30
  <div
16
- class="content overflow-hidden transition-[max-height] duration-300"
31
+ class="content overflow-hidden transition-all duration-300"
17
32
  [ngClass]="collapsed ? 'ease-out' : 'ease-in'"
18
- [style.maxHeight]="maxHeight"
19
33
  #contentDiv
34
+ *ngIf="!collapsed"
35
+ data-cy="expandable-panel-content"
20
36
  >
21
37
  <ng-content></ng-content>
22
38
  </div>
@@ -1,9 +1,14 @@
1
1
  import {
2
2
  ChangeDetectionStrategy,
3
3
  Component,
4
+ ContentChild,
4
5
  ElementRef,
5
6
  Input,
7
+ TemplateRef,
6
8
  ViewChild,
9
+ OnDestroy,
10
+ ChangeDetectorRef,
11
+ AfterViewInit,
7
12
  } from '@angular/core'
8
13
  import { NgIcon, provideIcons } from '@ng-icons/core'
9
14
  import { CommonModule } from '@angular/common'
@@ -18,20 +23,41 @@ import { matAdd, matRemove } from '@ng-icons/material-icons/baseline'
18
23
  imports: [CommonModule, NgIcon],
19
24
  viewProviders: [provideIcons({ matAdd, matRemove })],
20
25
  })
21
- export class ExpandablePanelComponent {
22
- @Input() title: string
23
- @Input() collapsed = true
24
- @ViewChild('contentDiv') contentDiv: ElementRef
25
- maxHeight = this.setMaxHeight()
26
+ export class ExpandablePanelComponent implements AfterViewInit, OnDestroy {
27
+ @Input() title?: string
28
+ @Input() iconColor? = ''
29
+ @ContentChild('titleTemplate') titleTemplate?: TemplateRef<HTMLElement>
30
+ @ViewChild('contentDiv') contentDiv?: ElementRef
31
+
32
+ private _collapsed = true
33
+ private contentObserver?: ResizeObserver
34
+
35
+ constructor(private readonly changeDetector: ChangeDetectorRef) {}
36
+
37
+ ngAfterViewInit() {
38
+ if (this.contentDiv) {
39
+ this.contentObserver = new ResizeObserver(() => {
40
+ this.changeDetector.detectChanges()
41
+ })
42
+ this.contentObserver.observe(this.contentDiv.nativeElement)
43
+ }
44
+ }
45
+
46
+ @Input() set collapsed(value: boolean) {
47
+ this._collapsed = value
48
+ }
49
+
50
+ get collapsed(): boolean {
51
+ return this._collapsed
52
+ }
26
53
 
27
54
  toggle(): void {
28
55
  this.collapsed = !this.collapsed
29
- this.maxHeight = this.setMaxHeight()
30
56
  }
31
57
 
32
- setMaxHeight() {
33
- return `${
34
- this.collapsed ? '0' : this.contentDiv.nativeElement.scrollHeight
35
- }px`
58
+ ngOnDestroy() {
59
+ if (this.contentObserver) {
60
+ this.contentObserver.disconnect()
61
+ }
36
62
  }
37
63
  }
@@ -31,6 +31,7 @@
31
31
  *ngFor="let item of items"
32
32
  (click)="handleRowClick(item)"
33
33
  data-cy="table-row"
34
+ [attr.data-cy-title]="item.title"
34
35
  [title]="getItemTitle(item) | translate"
35
36
  >
36
37
  <div
@@ -48,9 +49,9 @@
48
49
  class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate border-b border-gray-200"
49
50
  [ngClass]="{
50
51
  'text-purple-light cursor-default':
51
- (!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset',
52
+ (canEditItem(item) | async) === false,
52
53
  'group-hover:text-main group-hover:bg-gray-50':
53
- (item.extras?.edit || isDraftPage) && item.kind === 'dataset',
54
+ canEditItem(item) | async,
54
55
  }"
55
56
  >
56
57
  <ng-container
@@ -14,9 +14,11 @@ import { iconoirNavArrowDown, iconoirNavArrowUp } from '@ng-icons/iconoir'
14
14
  import { TranslateModule } from '@ngx-translate/core'
15
15
  import { marker } from '@biesbjerg/ngx-translate-extract-marker'
16
16
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
17
+ import { Observable, of } from 'rxjs'
17
18
 
18
- marker('editor.record.lock.reason')
19
- marker('editor.record.lock.format')
19
+ marker('editor.record.lock.resourceType')
20
+ marker('editor.record.lock.harvested')
21
+ marker('editor.record.lock.owner')
20
22
  @Component({
21
23
  selector: 'gn-ui-interactive-table',
22
24
  templateUrl: './interactive-table.component.html',
@@ -31,6 +33,7 @@ export class InteractiveTableComponent {
31
33
  columns: QueryList<InteractiveTableColumnComponent>
32
34
 
33
35
  @Input() items: unknown[] = []
36
+ @Input() canEditItem: (item: unknown) => Observable<boolean> = () => of(true)
34
37
  @Input() isDraftPage = false
35
38
  @Output() itemClick = new EventEmitter<unknown>()
36
39
 
@@ -49,10 +52,14 @@ export class InteractiveTableComponent {
49
52
  }
50
53
 
51
54
  getItemTitle(item: CatalogRecord) {
52
- if (!item.extras?.edit && !this.isDraftPage && item.kind === 'dataset') {
53
- return 'editor.record.lock.reason'
54
- } else if (item.kind !== 'dataset') {
55
- return 'editor.record.lock.format'
55
+ if (!this.isDraftPage) {
56
+ if (item.kind !== 'dataset') {
57
+ return 'editor.record.lock.resourceType'
58
+ } else if (item.extras?.isHarvested) {
59
+ return 'editor.record.lock.harvested'
60
+ } else if (!item.extras?.edit) {
61
+ return 'editor.record.lock.owner'
62
+ }
56
63
  }
57
64
  return ''
58
65
  }
@@ -1,6 +1,7 @@
1
1
  <div
2
2
  class="flex items-center justify-between w-full gap-2"
3
3
  cdkOverlayOrigin
4
+ [class]="extraClass"
4
5
  #trigger="cdkOverlayOrigin"
5
6
  >
6
7
  <span #textElement class="truncate">
@@ -19,18 +20,15 @@
19
20
  cdkConnectedOverlay
20
21
  [cdkConnectedOverlayOrigin]="trigger"
21
22
  [cdkConnectedOverlayOpen]="isOpen"
22
- [cdkConnectedOverlayPositions]="[
23
- {
24
- originX: 'end',
25
- originY: 'top',
26
- overlayX: 'end',
27
- overlayY: 'top',
28
- },
29
- ]"
30
- (detach)="isOpen = false"
23
+ [cdkConnectedOverlayPositions]="[overlayPosition]"
24
+ cdkConnectedOverlayPush
25
+ [cdkConnectedOverlayWidth]="'auto'"
26
+ [cdkConnectedOverlayFlexibleDimensions]="true"
27
+ [cdkConnectedOverlayGrowAfterOpen]="true"
28
+ (detach)="close()"
31
29
  >
32
30
  <div class="bg-white shadow-lg border border-gray-300 flex">
33
- <div class="w-64">
31
+ <div class="sm:w-64 xs:w-32">
34
32
  <p class="m-2">{{ text }}</p>
35
33
  </div>
36
34
  <gn-ui-button
@@ -4,16 +4,22 @@ import {
4
4
  Component,
5
5
  ElementRef,
6
6
  Input,
7
+ OnDestroy,
7
8
  ViewChild,
9
+ NgZone,
8
10
  } from '@angular/core'
9
11
  import { CommonModule } from '@angular/common'
10
- import { provideIcons } from '@ng-icons/core'
12
+ import { provideIcons, NgIconComponent } from '@ng-icons/core'
11
13
  import { iconoirExpand, iconoirReduce } from '@ng-icons/iconoir'
12
14
  import { TranslateModule } from '@ngx-translate/core'
13
15
  import { MatButtonModule } from '@angular/material/button'
14
- import { OverlayModule } from '@angular/cdk/overlay'
16
+ import {
17
+ OverlayModule,
18
+ ViewportRuler,
19
+ ConnectedPosition,
20
+ } from '@angular/cdk/overlay'
15
21
  import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
16
- import { NgIconComponent } from '@ng-icons/core'
22
+ import { Subscription } from 'rxjs'
17
23
 
18
24
  @Component({
19
25
  selector: 'gn-ui-truncated-text',
@@ -30,24 +36,85 @@ import { NgIconComponent } from '@ng-icons/core'
30
36
  templateUrl: './truncated-text.component.html',
31
37
  styles: [],
32
38
  })
33
- export class TruncatedTextComponent implements AfterViewInit {
39
+ export class TruncatedTextComponent implements AfterViewInit, OnDestroy {
34
40
  @Input() text = ''
41
+ @Input() extraClass = ''
42
+
35
43
  @ViewChild('textElement') textElement: ElementRef<HTMLElement>
36
44
  isTextTruncated = false
37
45
  isOpen = false
46
+ overlayPosition: ConnectedPosition = {
47
+ originX: 'end',
48
+ originY: 'top',
49
+ overlayX: 'end',
50
+ overlayY: 'top',
51
+ }
52
+ private readonly resizeObserver: ResizeObserver
53
+ private readonly mutationObserver: MutationObserver
54
+ private readonly viewportSubscription: Subscription
55
+
56
+ constructor(
57
+ private readonly cd: ChangeDetectorRef,
58
+ private readonly ngZone: NgZone,
59
+ private readonly viewportRuler: ViewportRuler
60
+ ) {
61
+ this.resizeObserver = new ResizeObserver(() => {
62
+ this.ngZone.run(() => this.checkTextTruncation())
63
+ })
38
64
 
39
- constructor(private cd: ChangeDetectorRef) {}
65
+ this.mutationObserver = new MutationObserver(() => {
66
+ this.ngZone.run(() => {
67
+ this.checkTextTruncation()
68
+ this.close()
69
+ })
70
+ })
71
+
72
+ this.viewportSubscription = this.viewportRuler.change().subscribe(() => {
73
+ if (this.isOpen) {
74
+ this.updateOverlayPosition()
75
+ }
76
+ })
77
+ }
40
78
 
41
79
  ngAfterViewInit() {
80
+ const element = this.textElement.nativeElement
81
+ this.resizeObserver?.observe(element)
82
+ this.mutationObserver?.observe(element.parentElement, {
83
+ attributes: true,
84
+ childList: true,
85
+ subtree: true,
86
+ })
42
87
  this.checkTextTruncation()
43
88
  }
44
89
 
45
- ngOnChange() {
46
- this.checkTextTruncation()
90
+ ngOnDestroy() {
91
+ this.resizeObserver?.disconnect()
92
+ this.mutationObserver?.disconnect()
93
+ this.viewportSubscription?.unsubscribe()
94
+ this.close()
47
95
  }
48
96
 
49
97
  toggleOverlay() {
50
98
  this.isOpen = !this.isOpen
99
+ if (this.isOpen) {
100
+ this.updateOverlayPosition()
101
+ }
102
+ }
103
+
104
+ private updateOverlayPosition() {
105
+ const element = this.textElement.nativeElement
106
+ const rect = element.getBoundingClientRect()
107
+ const viewportWidth = this.viewportRuler.getViewportSize().width
108
+ const isMobile = viewportWidth < 640
109
+ const overlayWidth = isMobile ? 190 : 320
110
+ const isNearLeftEdge = rect.left < overlayWidth
111
+
112
+ this.overlayPosition = {
113
+ originX: isNearLeftEdge ? 'start' : 'end',
114
+ originY: 'top',
115
+ overlayX: isNearLeftEdge ? 'start' : 'end',
116
+ overlayY: 'top',
117
+ }
51
118
  }
52
119
 
53
120
  close() {
@@ -56,6 +123,7 @@ export class TruncatedTextComponent implements AfterViewInit {
56
123
 
57
124
  private checkTextTruncation() {
58
125
  const element = this.textElement.nativeElement
126
+
59
127
  this.isTextTruncated = element.scrollWidth > element.clientWidth
60
128
  this.cd.detectChanges()
61
129
  }
@@ -1,6 +1,6 @@
1
1
  <div *ngIf="feature" class="root">
2
- <div class="property" *ngFor="let propName of properties">
3
- <div>{{ propName }}</div>
4
- <div class="font-bold">{{ feature.properties[propName] }}</div>
2
+ <div class="property" *ngFor="let prop of properties | keyvalue">
3
+ <div>{{ prop.key }}</div>
4
+ <div class="font-bold">{{ prop.value }}</div>
5
5
  </div>
6
6
  </div>
@@ -1,6 +1,7 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
2
  import { CommonModule } from '@angular/common'
3
3
  import type { Feature } from 'geojson'
4
+ import { DatasetFeatureCatalog } from '../../../../../../../libs/common/domain/src/lib/model/record'
4
5
 
5
6
  const geometryKeys = ['geometry', 'the_geom']
6
7
 
@@ -14,11 +15,34 @@ const geometryKeys = ['geometry', 'the_geom']
14
15
  })
15
16
  export class FeatureDetailComponent {
16
17
  @Input() feature: Feature
18
+ _featureAttributes = []
19
+ @Input() set featureCatalog(value: DatasetFeatureCatalog) {
20
+ if (value) this._featureAttributes = value.featureTypes[0].attributes
21
+ }
17
22
 
18
23
  get properties() {
19
24
  if (!this.feature) return []
20
- return Object.keys(this.feature.properties).filter(
21
- (prop) => !geometryKeys.includes(prop)
22
- )
25
+ return this.setProperties()
26
+ }
27
+
28
+ setProperties() {
29
+ const properties = Object.keys(this.feature.properties)
30
+ .filter((p) => !geometryKeys.includes(p))
31
+ .reduce((acc, p) => {
32
+ let key = p
33
+ if (this._featureAttributes.length) {
34
+ const matchingAttribute = this._featureAttributes.find(
35
+ (attr) => attr.name === p
36
+ )
37
+
38
+ if (matchingAttribute && matchingAttribute.code) {
39
+ key = matchingAttribute.code
40
+ }
41
+ }
42
+ acc[key] = this.feature.properties[p]
43
+ return acc
44
+ }, {})
45
+
46
+ return properties
23
47
  }
24
48
  }
@@ -57,6 +57,7 @@ export class SpatialExtentComponent {
57
57
  style: {
58
58
  'stroke-color': 'black',
59
59
  'stroke-width': 2,
60
+ 'fill-color': 'rgba(153, 153, 153, 0.3)',
60
61
  },
61
62
  }
62
63
  const view = await createViewFromLayer(layer)
@@ -19,3 +19,4 @@ export * from './lib/results-list-item/results-list-item.component'
19
19
  export * from './lib/results-hits-search-kind/results-hits-search-kind.component'
20
20
  export * from './lib/results-hits-number/results-hits-number.component'
21
21
  export * from './lib/results-table/results-table.component'
22
+ export * from './lib/results-table/action-menu/action-menu.component'