geonetwork-ui 2.6.0-dev.c4b99cdef → 2.6.0-dev.c5432f39f

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 (250) 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 +37 -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 +42 -9
  11. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  12. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  13. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  14. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  15. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  16. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  17. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +266 -11
  18. package/esm2022/libs/feature/record/src/index.mjs +2 -3
  19. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  20. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  21. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
  22. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
  23. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
  24. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
  25. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
  26. package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
  27. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  28. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  29. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  30. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  31. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  32. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +27 -53
  33. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
  34. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  35. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  36. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  37. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  38. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
  39. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  40. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  41. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  42. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  43. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  44. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  45. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  46. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
  47. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +65 -14
  48. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  49. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  50. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  51. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
  52. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  53. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  54. package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +19 -12
  55. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +27 -14
  56. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +10 -4
  57. package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +42 -1
  58. package/esm2022/libs/util/i18n/src/lib/language-codes.mjs +24 -2
  59. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  60. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  61. package/esm2022/translations/de.json +28 -2
  62. package/esm2022/translations/en.json +29 -5
  63. package/esm2022/translations/es.json +28 -2
  64. package/esm2022/translations/fr.json +28 -4
  65. package/esm2022/translations/it.json +60 -34
  66. package/esm2022/translations/nl.json +28 -2
  67. package/esm2022/translations/pt.json +28 -2
  68. package/fesm2022/geonetwork-ui.mjs +1657 -675
  69. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  70. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  71. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  72. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +0 -1
  73. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  74. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +1 -0
  75. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
  76. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  77. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  78. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  79. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  80. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
  81. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  82. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +7 -2
  83. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  84. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  85. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  86. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +3 -0
  87. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  88. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  89. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  90. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  91. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  92. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  93. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  94. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +48 -3
  95. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -1
  96. package/libs/feature/record/src/index.d.ts +1 -2
  97. package/libs/feature/record/src/index.d.ts.map +1 -1
  98. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  99. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
  100. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  101. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
  102. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  103. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
  104. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  105. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
  106. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  107. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
  108. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  109. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  110. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  111. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  112. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  113. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  114. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  115. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  116. package/libs/ui/elements/src/index.d.ts +2 -0
  117. package/libs/ui/elements/src/index.d.ts.map +1 -1
  118. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  119. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  120. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +3 -7
  121. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  122. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
  123. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
  124. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  125. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  126. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
  127. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  128. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  129. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  130. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  131. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  132. package/libs/ui/inputs/src/index.d.ts +1 -0
  133. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  134. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  135. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  136. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  137. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  138. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +15 -6
  139. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
  140. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  141. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  142. package/libs/ui/search/src/index.d.ts +1 -0
  143. package/libs/ui/search/src/index.d.ts.map +1 -1
  144. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  145. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +3 -3
  146. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
  147. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +5 -1
  148. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  149. package/libs/ui/search/src/lib/ui-search.module.d.ts +2 -1
  150. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  151. package/libs/util/i18n/src/lib/i18n.constants.d.ts +1 -0
  152. package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
  153. package/libs/util/i18n/src/lib/language-codes.d.ts +23 -1
  154. package/libs/util/i18n/src/lib/language-codes.d.ts.map +1 -1
  155. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  156. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  157. package/package.json +2 -2
  158. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  159. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
  160. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +55 -4
  161. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
  162. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -3
  163. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +5 -1
  164. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +8 -4
  165. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -1
  166. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
  167. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
  168. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +66 -7
  169. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  170. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +3 -0
  171. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  172. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  173. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
  174. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  175. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  176. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  177. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  178. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  179. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +117 -11
  180. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +316 -6
  181. package/src/libs/feature/record/src/index.ts +1 -2
  182. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
  183. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -1
  184. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  185. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
  186. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
  187. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
  188. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
  189. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
  190. package/src/libs/feature/search/src/lib/constants.ts +1 -0
  191. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  192. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  193. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  194. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  195. package/src/libs/ui/elements/src/index.ts +2 -0
  196. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  197. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  198. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  199. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +133 -138
  200. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +19 -47
  201. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
  202. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
  203. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
  204. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
  205. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
  206. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  207. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  208. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
  209. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
  210. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
  211. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  212. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
  213. package/src/libs/ui/inputs/src/index.ts +1 -0
  214. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  215. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  216. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  217. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  218. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
  219. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  220. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  221. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -0
  222. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +8 -10
  223. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +75 -7
  224. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  225. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  226. package/src/libs/ui/search/src/index.ts +1 -0
  227. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  228. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
  229. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  230. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  231. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  232. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +11 -3
  233. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +14 -11
  234. package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
  235. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +27 -17
  236. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +20 -10
  237. package/src/libs/ui/search/src/lib/ui-search.module.ts +3 -0
  238. package/src/libs/util/i18n/src/lib/i18n.constants.ts +42 -0
  239. package/src/libs/util/i18n/src/lib/language-codes.ts +23 -1
  240. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  241. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  242. package/tailwind.base.css +1 -1
  243. package/translations/de.json +28 -2
  244. package/translations/en.json +29 -5
  245. package/translations/es.json +28 -2
  246. package/translations/fr.json +28 -4
  247. package/translations/it.json +60 -34
  248. package/translations/nl.json +28 -2
  249. package/translations/pt.json +28 -2
  250. package/translations/sk.json +28 -2
@@ -1,15 +1,325 @@
1
- import { Component } from '@angular/core'
1
+ import {
2
+ ChangeDetectorRef,
3
+ Component,
4
+ ElementRef,
5
+ Input,
6
+ OnDestroy,
7
+ QueryList,
8
+ ViewChildren,
9
+ ViewContainerRef,
10
+ } from '@angular/core'
2
11
  import { CommonModule } from '@angular/common'
3
- import { CheckToggleComponent } from '../../../../../../../libs/ui/inputs/src'
4
- import { TranslateModule } from '@ngx-translate/core'
12
+ import { ButtonComponent, CheckToggleComponent } from '../../../../../../../libs/ui/inputs/src'
13
+ import { TranslateModule, TranslateService } from '@ngx-translate/core'
14
+ import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
15
+ import {
16
+ NgIconComponent,
17
+ provideIcons,
18
+ provideNgIconsConfig,
19
+ } from '@ng-icons/core'
20
+ import {
21
+ iconoirCheckCircle,
22
+ iconoirCircle,
23
+ iconoirSettings,
24
+ } from '@ng-icons/iconoir'
25
+ import { matMoreHorizOutline } from '@ng-icons/material-icons/outline'
26
+ import { EditorFacade } from '../../+state/editor.facade'
27
+ import { ConfirmationDialogComponent } from '../../../../../../../libs/ui/elements/src'
28
+ import { MatDialog } from '@angular/material/dialog'
29
+ import { RecordsRepositoryInterface } from '../../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
30
+ import { map, Subscription } from 'rxjs'
31
+ import { Overlay, OverlayRef } from '@angular/cdk/overlay'
32
+ import { TemplatePortal } from '@angular/cdk/portal'
33
+ import { ActionMenuComponent } from '../../../../../../../libs/ui/search/src'
34
+
35
+ const extraFlagMap: { [key: string]: string } = {
36
+ ar: 'arab',
37
+ en: 'gb',
38
+ ko: 'kr',
39
+ cs: 'cz',
40
+ zh: 'cn',
41
+ ca: 'es-ct',
42
+ rm: 'ch',
43
+ da: 'dk',
44
+ sv: 'se',
45
+ cy: 'gb-wls',
46
+ hy: 'am',
47
+ ka: 'ge',
48
+ uk: 'ua',
49
+ }
5
50
 
6
51
  @Component({
7
52
  selector: 'gn-ui-multilingual-panel',
8
53
  standalone: true,
9
- imports: [CommonModule, CheckToggleComponent, TranslateModule],
54
+ imports: [
55
+ CommonModule,
56
+ CheckToggleComponent,
57
+ TranslateModule,
58
+ ButtonComponent,
59
+ NgIconComponent,
60
+ ActionMenuComponent,
61
+ ],
62
+ providers: [
63
+ provideIcons({
64
+ iconoirSettings,
65
+ matMoreHorizOutline,
66
+ iconoirCheckCircle,
67
+ iconoirCircle,
68
+ }),
69
+ provideNgIconsConfig({
70
+ size: '1.25em',
71
+ }),
72
+ ],
10
73
  templateUrl: './multilingual-panel.component.html',
11
74
  styleUrl: './multilingual-panel.component.css',
12
75
  })
13
- export class MultilingualPanelComponent {
14
- translationsEnabled = false
76
+ export class MultilingualPanelComponent implements OnDestroy {
77
+ isMultilingual: boolean
78
+ _record: CatalogRecord
79
+ editTranslations: boolean
80
+ selectedLanguages = []
81
+ recordLanguages = []
82
+ formLanguage = ''
83
+ @Input() set record(value: CatalogRecord) {
84
+ this._record = value
85
+ this.isMultilingual = value.otherLanguages.length > 0
86
+ this.editTranslations = false
87
+ this.recordLanguages = [...value.otherLanguages, value.defaultLanguage]
88
+ this.selectedLanguages = this.recordLanguages
89
+ this.formLanguage = value.defaultLanguage
90
+ }
91
+ @ViewChildren('actionMenuButton', { read: ElementRef })
92
+ actionMenuButtons!: QueryList<ElementRef>
93
+ private overlayRef!: OverlayRef
94
+
95
+ isActionMenuOpen = false
96
+ subscription = new Subscription()
97
+
98
+ supportedLanguages$ = this.recordsRepository
99
+ .getApplicationLanguages()
100
+ .pipe(map((languages) => this.sortLanguages(languages)))
101
+
102
+ constructor(
103
+ public facade: EditorFacade,
104
+ public dialog: MatDialog,
105
+ private translateService: TranslateService,
106
+ private recordsRepository: RecordsRepositoryInterface,
107
+ private overlay: Overlay,
108
+ private viewContainerRef: ViewContainerRef,
109
+ private cdr: ChangeDetectorRef
110
+ ) {}
111
+
112
+ ngOnDestroy() {
113
+ this.subscription.unsubscribe()
114
+ }
115
+
116
+ sortLanguages(languages: string[]) {
117
+ return languages
118
+ .map((lang) => {
119
+ const label = this.translateService.instant('language.' + lang)
120
+ const isTranslated = label !== 'language.' + lang
121
+
122
+ return {
123
+ lang,
124
+ label,
125
+ isTranslated,
126
+ }
127
+ })
128
+ .sort((a, b) => {
129
+ if (a.isTranslated && !b.isTranslated) return -1
130
+ if (!a.isTranslated && b.isTranslated) return 1
131
+
132
+ return a.label.localeCompare(b.label)
133
+ })
134
+ .map((item) => item.lang)
135
+ }
136
+
137
+ toggleLanguageSelection() {
138
+ this.editTranslations = !this.editTranslations
139
+ }
140
+
141
+ getIconClass(lang: string) {
142
+ return extraFlagMap[lang]
143
+ ? `fi fi-${extraFlagMap[lang]} w-4 h-3`
144
+ : `fi fi-${lang} w-4 h-3`
145
+ }
146
+
147
+ switchMultilingual() {
148
+ if (this.isMultilingual && this.selectedLanguages.length > 1) {
149
+ this.confirmDeleteAction()
150
+ } else {
151
+ this.isMultilingual = true
152
+ this.editTranslations = true
153
+ }
154
+ }
155
+
156
+ getExtraClass(lang: string) {
157
+ const baseClass = 'h-[34px] w-full font-bold justify-start hover:bg-white'
158
+ if (this.selectedLanguages.includes(lang)) {
159
+ return `${baseClass} bg-white border border-black`
160
+ }
161
+ return baseClass
162
+ }
163
+
164
+ toggleLanguage(lang: string) {
165
+ if (this.selectedLanguages.includes(lang)) {
166
+ this.removeSelectedLanguage(lang)
167
+ } else {
168
+ this.selectedLanguages.push(lang)
169
+ }
170
+ }
171
+
172
+ removeSelectedLanguage(lang: string) {
173
+ this.selectedLanguages = this.selectedLanguages.filter(
174
+ (language) => language !== lang
175
+ )
176
+ }
177
+
178
+ validateTranslations() {
179
+ const equalLength =
180
+ this.selectedLanguages.length === this.recordLanguages.length
181
+ if (
182
+ this.selectedLanguages.length < this.recordLanguages.length ||
183
+ (equalLength && this.selectedLanguages !== this.recordLanguages)
184
+ ) {
185
+ this.confirmDeleteAction(this.selectedLanguages)
186
+ } else {
187
+ this.updateTranslations()
188
+ }
189
+ }
190
+
191
+ updateTranslations() {
192
+ this.facade.updateRecordField(
193
+ 'otherLanguages',
194
+ this.selectedLanguages.filter((lang) => lang !== this.formLanguage)
195
+ )
196
+ this.recordLanguages = this.selectedLanguages
197
+ this.editTranslations = false
198
+ }
199
+
200
+ switchFormLang(lang) {
201
+ // TO IMPLEMENT FURTHER
202
+ }
203
+
204
+ switchDefaultLang(lang: string) {
205
+ this.formLanguage = lang
206
+ this.facade.updateRecordField('defaultLanguage', lang)
207
+ this.facade.updateRecordField(
208
+ 'otherLanguages',
209
+ this.selectedLanguages.filter((lang) => lang !== this.formLanguage)
210
+ )
211
+ this.closeActionMenu()
212
+ }
213
+
214
+ confirmDeleteAction(lang?: string[] | string) {
215
+ const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
216
+ data: {
217
+ title: this.translateService.instant(
218
+ 'editor.record.multilingual.confirmation.title'
219
+ ),
220
+ message: this.translateService.instant(
221
+ 'editor.record.multilingual.confirmation.message'
222
+ ),
223
+ confirmText: this.translateService.instant(
224
+ 'editor.record.multilingual.confirmation.confirmText'
225
+ ),
226
+ cancelText: this.translateService.instant(
227
+ 'editor.record.multilingual.confirmation.cancelText'
228
+ ),
229
+ },
230
+ restoreFocus: true,
231
+ })
232
+ this.subscription.add(
233
+ dialogRef.afterClosed().subscribe((confirmed) => {
234
+ if (confirmed) {
235
+ if (lang) {
236
+ if (!Array.isArray(lang)) {
237
+ this.removeSelectedLanguage(lang)
238
+ this.closeActionMenu()
239
+ }
240
+ this.updateTranslations()
241
+ } else {
242
+ this.facade.updateRecordField('otherLanguages', [])
243
+ this.isMultilingual = false
244
+ this.selectedLanguages = []
245
+ }
246
+ } else {
247
+ this.isMultilingual = true
248
+ this.selectedLanguages = this.recordLanguages
249
+ }
250
+ this.editTranslations = false
251
+ })
252
+ )
253
+ }
254
+
255
+ isFirstUnsupported(index: number): boolean {
256
+ const langs = this.sortLanguages(this.recordLanguages)
257
+ return (
258
+ langs[index].length === 3 &&
259
+ langs.slice(0, index).every((lang) => lang.length !== 3)
260
+ )
261
+ }
262
+
263
+ isLangSupported(lang: string) {
264
+ return lang.length === 2
265
+ }
266
+
267
+ getToggleTitle(lang: string) {
268
+ if (lang === this._record.defaultLanguage) {
269
+ return this.translateService.instant(
270
+ 'editor.record.form.multilingual.forbidden'
271
+ )
272
+ }
273
+ return ''
274
+ }
275
+
276
+ openActionMenu(item: string, template) {
277
+ this.isActionMenuOpen = true
278
+ const index = this.sortLanguages(this.selectedLanguages).indexOf(item)
279
+ const buttonElement = this.actionMenuButtons.toArray()[index]
280
+
281
+ const positionStrategy = this.overlay
282
+ .position()
283
+ .flexibleConnectedTo(buttonElement)
284
+ .withFlexibleDimensions(true)
285
+ .withPush(true)
286
+ .withPositions([
287
+ {
288
+ originX: 'end',
289
+ originY: 'bottom',
290
+ overlayX: 'end',
291
+ overlayY: 'top',
292
+ },
293
+ {
294
+ originX: 'end',
295
+ originY: 'top',
296
+ overlayX: 'end',
297
+ overlayY: 'bottom',
298
+ },
299
+ ])
300
+
301
+ this.overlayRef = this.overlay.create({
302
+ hasBackdrop: true,
303
+ backdropClass: 'cdk-overlay-transparent-backdrop',
304
+ positionStrategy: positionStrategy,
305
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
306
+ })
307
+
308
+ const portal = new TemplatePortal(template, this.viewContainerRef)
309
+
310
+ this.overlayRef.attach(portal)
311
+ this.subscription.add(
312
+ this.overlayRef.backdropClick().subscribe(() => {
313
+ this.closeActionMenu()
314
+ })
315
+ )
316
+ }
317
+
318
+ closeActionMenu() {
319
+ if (this.overlayRef) {
320
+ this.isActionMenuOpen = false
321
+ this.overlayRef.dispose()
322
+ this.cdr.markForCheck()
323
+ }
324
+ }
15
325
  }
@@ -5,7 +5,6 @@ export * from './lib/data-view/data-view.component'
5
5
  export * from './lib/data-view-share/data-view-share.component'
6
6
  export * from './lib/data-view-web-component/data-view-web-component.component'
7
7
  export * from './lib/external-viewer-button/external-viewer-button.component'
8
- export * from './lib/map-view/map-view.component'
9
8
  export * from './lib/gpf-api-dl/gpf-api-dl.component'
9
+ export * from './lib/map-view/map-view.component'
10
10
  export * from './lib/record-meta/record-meta.component'
11
- export * from './lib/external-viewer-button/external-viewer-button.component'
@@ -27,12 +27,14 @@
27
27
  *ngIf="mode === 'table'"
28
28
  [cacheActive]="cacheActive$ | async"
29
29
  [link]="selectedLink$ | async"
30
+ [featureCatalog]="mdViewFacade.featureCatalog$ | async"
30
31
  ></gn-ui-table-view>
31
32
  <gn-ui-chart-view
32
33
  *ngIf="mode === 'chart'"
33
34
  (chartConfig$)="setChartConfig($event)"
34
35
  [cacheActive]="cacheActive$ | async"
35
36
  [link]="selectedLink$ | async"
37
+ [featureCatalog]="mdViewFacade.featureCatalog$ | async"
36
38
  ></gn-ui-chart-view>
37
39
  </div>
38
40
  </ng-template>
@@ -55,7 +55,10 @@
55
55
  >
56
56
  <ng-icon name="matClose" class="align-middle text-sm"></ng-icon>
57
57
  </gn-ui-button>
58
- <gn-ui-feature-detail [feature]="selection"></gn-ui-feature-detail>
58
+ <gn-ui-feature-detail
59
+ [featureCatalog]="mdViewFacade.featureCatalog$ | async"
60
+ [feature]="selection"
61
+ ></gn-ui-feature-detail>
59
62
  </div>
60
63
 
61
64
  <div
@@ -39,8 +39,8 @@ import {
39
39
  import {
40
40
  FeatureDetailComponent,
41
41
  MapContainerComponent,
42
- prioritizePageScroll,
43
42
  MapLegendComponent,
43
+ prioritizePageScroll,
44
44
  } from '../../../../../../libs/ui/map/src'
45
45
  import { Feature } from 'geojson'
46
46
  import { NgIconComponent, provideIcons } from '@ng-icons/core'
@@ -109,9 +109,20 @@ export class MapViewComponent implements AfterViewInit {
109
109
  this.mdViewFacade.mapApiLinks$,
110
110
  this.mdViewFacade.geoDataLinksWithGeometry$,
111
111
  ]).pipe(
112
- map(([mapApiLinks, geoDataLinksWithGeometry]) => {
113
- return [...mapApiLinks, ...geoDataLinksWithGeometry]
114
- })
112
+ switchMap(async ([mapApiLinks, geoDataLinksWithGeometry]) => {
113
+ // looking for TMS links to process
114
+ let processedMapApiLinks = await Promise.all(
115
+ mapApiLinks.map((link) => {
116
+ if (link.type === 'service' && link.accessServiceProtocol === 'tms') {
117
+ return this.dataService.getGeodataLinksFromTms(link)
118
+ }
119
+ return link
120
+ })
121
+ )
122
+ processedMapApiLinks = processedMapApiLinks.flat()
123
+ return [...processedMapApiLinks, ...geoDataLinksWithGeometry]
124
+ }),
125
+ shareReplay(1)
115
126
  )
116
127
 
117
128
  dropdownChoices$ = this.compatibleMapLinks$.pipe(
@@ -239,6 +250,26 @@ export class MapViewComponent implements AfterViewInit {
239
250
  type: 'wms',
240
251
  name: link.name,
241
252
  })
253
+ } else if (
254
+ link.type === 'service' &&
255
+ link.accessServiceProtocol === 'tms'
256
+ ) {
257
+ // FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
258
+ return of({
259
+ url: link.url.toString().replace(/\/?$/, '/{z}/{x}/{y}.pbf'),
260
+ type: 'xyz',
261
+ tileFormat: 'application/vnd.mapbox-vector-tile',
262
+ name: link.name,
263
+ })
264
+ } else if (
265
+ link.type === 'service' &&
266
+ link.accessServiceProtocol === 'maplibre-style'
267
+ ) {
268
+ return of({
269
+ type: 'maplibre-style',
270
+ name: link.name,
271
+ styleUrl: link.url.toString(),
272
+ })
242
273
  } else if (
243
274
  link.type === 'service' &&
244
275
  link.accessServiceProtocol === 'wmts'
@@ -54,6 +54,16 @@ export const setRelated = createAction(
54
54
  props<{ related: CatalogRecord[] }>()
55
55
  )
56
56
 
57
+ export const setSources = createAction(
58
+ '[Metadata view] Set sources',
59
+ props<{ sources: CatalogRecord[] }>()
60
+ )
61
+
62
+ export const setSourceOf = createAction(
63
+ '[Metadata view] Set has sources',
64
+ props<{ sourceOf: CatalogRecord[] }>()
65
+ )
66
+
57
67
  /*
58
68
  ChartConfig actions
59
69
  */
@@ -68,6 +68,28 @@ export class MdViewEffects {
68
68
  )
69
69
  )
70
70
 
71
+ loadSources$ = createEffect(() =>
72
+ this.actions$.pipe(
73
+ ofType(MdViewActions.loadFullMetadataSuccess),
74
+ switchMap(({ full }) => this.recordsRepository.getSources(full)),
75
+ map((sources) => {
76
+ return MdViewActions.setSources({ sources })
77
+ }),
78
+ catchError(() => of(MdViewActions.setSources({ sources: null })))
79
+ )
80
+ )
81
+
82
+ loadSourceOf$ = createEffect(() =>
83
+ this.actions$.pipe(
84
+ ofType(MdViewActions.loadFullMetadataSuccess),
85
+ switchMap(({ full }) => this.recordsRepository.getSourceOf(full)),
86
+ map((sourceOf) => {
87
+ return MdViewActions.setSourceOf({ sourceOf })
88
+ }),
89
+ catchError(() => of(MdViewActions.setSourceOf({ sourceOf: null })))
90
+ )
91
+ )
92
+
71
93
  /*
72
94
  UserFeedback effects
73
95
  */
@@ -6,6 +6,7 @@ import {
6
6
  filter,
7
7
  map,
8
8
  mergeMap,
9
+ shareReplay,
9
10
  switchMap,
10
11
  toArray,
11
12
  } from 'rxjs/operators'
@@ -15,13 +16,11 @@ import { LinkClassifierService, LinkUsage } from '../../../../../../libs/util/sh
15
16
  import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
16
17
  import {
17
18
  CatalogRecord,
18
- DatasetServiceDistribution,
19
- ServiceEndpoint,
20
19
  UserFeedback,
21
20
  } from '../../../../../../libs/common/domain/src/lib/model/record'
22
21
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
23
22
  import { OgcApiRecord } from '@camptocamp/ogc-client'
24
- import { from, of } from 'rxjs'
23
+ import { from, of, Observable } from 'rxjs'
25
24
  import { DataService } from '../../../../../../libs/feature/dataviz/src'
26
25
 
27
26
  @Injectable()
@@ -77,24 +76,24 @@ export class MdViewFacade {
77
76
 
78
77
  related$ = this.store.pipe(select(MdViewSelectors.getRelated))
79
78
 
79
+ sources$ = this.store.pipe(select(MdViewSelectors.getSources))
80
+
81
+ sourceOf$ = this.store.pipe(select(MdViewSelectors.getSourceOf))
82
+
80
83
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
81
84
 
82
85
  allLinks$ = this.metadata$.pipe(
83
- map((record) => ('onlineResources' in record ? record.onlineResources : []))
86
+ map((record) =>
87
+ 'onlineResources' in record ? record.onlineResources : []
88
+ ),
89
+ shareReplay(1)
84
90
  )
85
91
 
86
92
  apiLinks$ = this.allLinks$.pipe(
87
93
  map((links) =>
88
- links
89
- .filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
90
- // Put links to IGN Géoplateforme first
91
- .sort((dd1, dd2) => {
92
- return (dd2 as DatasetServiceDistribution | ServiceEndpoint)
93
- .accessServiceProtocol === 'GPFDL'
94
- ? 1
95
- : undefined // do not change the sorting otherwise
96
- })
97
- )
94
+ links.filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
95
+ ),
96
+ shareReplay(1)
98
97
  )
99
98
 
100
99
  mapApiLinks$ = this.allLinks$.pipe(
@@ -102,7 +101,8 @@ export class MdViewFacade {
102
101
  links.filter((link) =>
103
102
  this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
104
103
  )
105
- )
104
+ ),
105
+ shareReplay(1)
106
106
  )
107
107
 
108
108
  downloadLinks$ = this.allLinks$.pipe(
@@ -216,4 +216,11 @@ export class MdViewFacade {
216
216
  loadUserFeedbacks(datasetUuid: string) {
217
217
  this.store.dispatch(MdViewActions.loadUserFeedbacks({ datasetUuid }))
218
218
  }
219
+
220
+ /**
221
+ * loadFeatureCatalog
222
+ */
223
+ loadFeatureCatalog(metadata: CatalogRecord) {
224
+ this.store.dispatch(MdViewActions.loadFeatureCatalog({ metadata }))
225
+ }
219
226
  }
@@ -14,6 +14,8 @@ export interface MetadataViewState {
14
14
  error: { notFound?: boolean; otherError?: string } | null
15
15
  metadata?: Partial<CatalogRecord>
16
16
  related?: CatalogRecord[]
17
+ sources?: CatalogRecord[]
18
+ sourceOf?: CatalogRecord[]
17
19
  userFeedbacks?: UserFeedback[]
18
20
  allUserFeedbacksLoading: boolean
19
21
  addUserFeedbackLoading: boolean
@@ -75,6 +77,16 @@ const metadataViewReducer = createReducer(
75
77
  related,
76
78
  })),
77
79
 
80
+ on(MetadataViewActions.setSources, (state, { sources }) => ({
81
+ ...state,
82
+ sources,
83
+ })),
84
+
85
+ on(MetadataViewActions.setSourceOf, (state, { sourceOf }) => ({
86
+ ...state,
87
+ sourceOf,
88
+ })),
89
+
78
90
  /*
79
91
  ChartConfig reducers
80
92
  */
@@ -41,6 +41,15 @@ export const getRelated = createSelector(
41
41
  (state: MetadataViewState) => state.related
42
42
  )
43
43
 
44
+ export const getSources = createSelector(
45
+ getMdViewState,
46
+ (state: MetadataViewState) => state.sources
47
+ )
48
+
49
+ export const getSourceOf = createSelector(
50
+ getMdViewState,
51
+ (state: MetadataViewState) => state.sourceOf
52
+ )
44
53
  /*
45
54
  Metadata selectors
46
55
  */
@@ -12,6 +12,7 @@ export const FIELDS_SUMMARY: FieldName[] = [
12
12
  'overview',
13
13
  'logo',
14
14
  'codelist_status_text',
15
+ 'link',
15
16
  'linkProtocol',
16
17
  'contactForResource*.organisation*',
17
18
  'contact*.organisation*',
@@ -55,8 +55,10 @@ export class ResultsListContainerComponent implements OnInit {
55
55
  @Optional()
56
56
  @Inject(RECORD_DATASET_URL_TOKEN)
57
57
  private recordDatasetUrlTemplate: string,
58
+ @Optional()
58
59
  @Inject(RECORD_SERVICE_URL_TOKEN)
59
60
  private recordServiceUrlTemplate: string,
61
+ @Optional()
60
62
  @Inject(RECORD_REUSE_URL_TOKEN)
61
63
  private recordReuseUrlTemplate: string
62
64
  ) {}
@@ -57,6 +57,7 @@ export class ChartComponent implements OnChanges, AfterViewInit {
57
57
  this.dataRaw = value
58
58
  }
59
59
  @Input() labelProperty: string
60
+ @Input() prettyLabel: string
60
61
  @Input() valueProperty: string
61
62
  @Input() secondaryValueProperty: string
62
63
  @Input() type: InputChartType = 'bar'
@@ -95,7 +96,7 @@ export class ChartComponent implements OnChanges, AfterViewInit {
95
96
  labels: this.getDataProxy(this.labelProperty) as string[],
96
97
  datasets: [
97
98
  {
98
- label: this.valueProperty,
99
+ label: this.prettyLabel,
99
100
  data,
100
101
  },
101
102
  ],
@@ -8,21 +8,24 @@
8
8
  [matSortDisableClear]="true"
9
9
  *ngrxLet="properties$ as properties"
10
10
  >
11
- <ng-container *ngFor="let prop of properties" [matColumnDef]="prop">
11
+ <ng-container
12
+ *ngFor="let attr of _featureAttributes"
13
+ [matColumnDef]="attr.value"
14
+ >
12
15
  <th
13
16
  mat-header-cell
14
17
  *matHeaderCellDef
15
18
  mat-sort-header
16
19
  class="text-sm text-black bg-white"
17
20
  >
18
- {{ prop }}
21
+ {{ attr.label }}
19
22
  </th>
20
23
  <td
21
24
  mat-cell
22
25
  *matCellDef="let element"
23
26
  class="whitespace-nowrap pr-1 truncate"
24
27
  >
25
- {{ element[prop] }}
28
+ {{ element[attr.value] }}
26
29
  </td>
27
30
  </ng-container>
28
31
 
@@ -61,13 +61,14 @@ export interface TableItemModel {
61
61
  changeDetection: ChangeDetectionStrategy.OnPush,
62
62
  })
63
63
  export class DataTableComponent implements OnInit, AfterViewInit, OnChanges {
64
+ _featureAttributes = []
65
+ @Input() set featureAttributes(value: { value: string; label: string }[]) {
66
+ this._featureAttributes = value
67
+ this.properties$.next(value.map((attr) => attr.value))
68
+ }
64
69
  @Input() set dataset(value: BaseReader) {
65
- this.properties$.next(null)
66
70
  this.dataset_ = value
67
71
  this.dataset_.load()
68
- this.dataset_.properties.then((properties) =>
69
- this.properties$.next(properties.map((p) => p.name))
70
- )
71
72
  this.dataset_.info.then((info) => (this.count = info.itemsCount))
72
73
  }
73
74
  @Input() activeId: TableItemId