geonetwork-ui 2.6.0-dev.857b51517 → 2.6.0-dev.97a89c313

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 (178) 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 +2 -1
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +2 -2
  4. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +2 -1
  5. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +7 -4
  6. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  7. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  8. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  9. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  10. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  11. package/esm2022/libs/feature/record/src/index.mjs +2 -3
  12. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  13. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  14. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +11 -13
  15. package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
  16. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
  17. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  18. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  19. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  20. package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
  21. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +27 -53
  22. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
  23. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  25. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  27. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
  28. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
  29. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  30. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  31. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  32. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  33. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  34. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  35. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +65 -14
  36. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  37. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  38. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
  39. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
  40. package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
  41. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  42. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  43. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  44. package/esm2022/translations/de.json +6 -2
  45. package/esm2022/translations/en.json +7 -5
  46. package/esm2022/translations/es.json +6 -2
  47. package/esm2022/translations/fr.json +6 -4
  48. package/esm2022/translations/it.json +38 -34
  49. package/esm2022/translations/nl.json +6 -2
  50. package/esm2022/translations/pt.json +6 -2
  51. package/fesm2022/geonetwork-ui.mjs +1002 -588
  52. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  53. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  54. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  55. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  56. package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
  57. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  58. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  59. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  60. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  61. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  62. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  63. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  64. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  65. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  66. package/libs/feature/record/src/index.d.ts +1 -2
  67. package/libs/feature/record/src/index.d.ts.map +1 -1
  68. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  69. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +26 -21
  70. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  71. package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
  72. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
  73. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  74. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  75. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  76. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  77. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  78. package/libs/ui/elements/src/index.d.ts +2 -0
  79. package/libs/ui/elements/src/index.d.ts.map +1 -1
  80. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
  81. package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
  82. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +3 -7
  83. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
  84. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
  85. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
  86. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  87. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  88. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
  89. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  90. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
  91. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
  92. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  93. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  94. package/libs/ui/inputs/src/index.d.ts +1 -0
  95. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  96. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  97. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  98. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  99. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  100. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +15 -6
  101. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
  102. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  103. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  104. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  105. package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
  106. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  107. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  108. package/package.json +2 -2
  109. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  110. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -0
  111. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
  112. package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
  113. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +9 -3
  114. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  115. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  116. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  117. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
  118. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  119. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  120. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  121. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  122. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  123. package/src/libs/feature/record/src/index.ts +1 -2
  124. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
  125. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -1
  126. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  127. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +18 -15
  128. package/src/libs/feature/search/src/lib/constants.ts +1 -0
  129. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
  130. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  131. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  132. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  133. package/src/libs/ui/elements/src/index.ts +2 -0
  134. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
  135. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
  136. package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
  137. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +133 -138
  138. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +19 -47
  139. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
  140. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
  141. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
  142. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
  143. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
  144. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  145. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  146. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
  147. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
  148. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
  149. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
  150. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
  151. package/src/libs/ui/inputs/src/index.ts +1 -0
  152. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  153. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  154. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  155. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  156. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
  157. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  158. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  159. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +8 -10
  160. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +75 -7
  161. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  162. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  163. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  164. package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
  165. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
  166. package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
  167. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  168. package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
  169. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  170. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  171. package/translations/de.json +6 -2
  172. package/translations/en.json +7 -5
  173. package/translations/es.json +6 -2
  174. package/translations/fr.json +6 -4
  175. package/translations/it.json +38 -34
  176. package/translations/nl.json +6 -2
  177. package/translations/pt.json +6 -2
  178. package/translations/sk.json +6 -2
@@ -4,6 +4,7 @@
4
4
  *ngIf="tableData$ | async as dataset"
5
5
  class="overflow-auto grow"
6
6
  [dataset]="dataset"
7
+ [featureAttributes]="featureAttributes"
7
8
  (selected)="onTableSelect($event)"
8
9
  ></gn-ui-data-table>
9
10
  <gn-ui-loading-mask
@@ -6,11 +6,15 @@ import {
6
6
  shareReplay,
7
7
  startWith,
8
8
  switchMap,
9
+ tap,
9
10
  } from 'rxjs/operators'
10
11
  import { BaseReader, FetchError } from '../../../../../../libs/util/data-fetcher/src'
11
12
  import { DataService } from '../service/data.service'
12
13
  import { DataTableComponent } from '../../../../../../libs/ui/dataviz/src'
13
- import { DatasetOnlineResource } from '../../../../../../libs/common/domain/src/lib/model/record'
14
+ import {
15
+ DatasetFeatureCatalog,
16
+ DatasetOnlineResource,
17
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
14
18
  import { TranslateModule, TranslateService } from '@ngx-translate/core'
15
19
  import {
16
20
  LoadingMaskComponent,
@@ -33,6 +37,8 @@ import { CommonModule } from '@angular/common'
33
37
  standalone: true,
34
38
  })
35
39
  export class TableViewComponent {
40
+ featureAttributes = []
41
+ @Input() featureCatalog: DatasetFeatureCatalog
36
42
  @Input() cacheActive = true
37
43
  @Input() set link(value: DatasetOnlineResource) {
38
44
  this.currentLink$.next(value)
@@ -52,6 +58,7 @@ export class TableViewComponent {
52
58
  }
53
59
  this.loading = true
54
60
  return this.getDatasetReader(link).pipe(
61
+ tap((dataset: BaseReader) => this.setProperties(dataset)),
55
62
  catchError((error) => {
56
63
  this.handleError(error)
57
64
  return of(undefined)
@@ -96,4 +103,23 @@ export class TableViewComponent {
96
103
  }
97
104
  this.loading = false
98
105
  }
106
+
107
+ setProperties(dataset: BaseReader) {
108
+ dataset.properties.then((properties) => {
109
+ const updatedProperties = properties.map((p) => {
110
+ let label = p.name
111
+ if (this.featureCatalog) {
112
+ const attributes = this.featureCatalog.featureTypes[0].attributes
113
+ const matchingAttribute = attributes.find(
114
+ (attr) => attr.name === p.name
115
+ )
116
+ if (matchingAttribute && matchingAttribute.code) {
117
+ label = matchingAttribute.code
118
+ }
119
+ }
120
+ return { value: p.name, label }
121
+ })
122
+ this.featureAttributes = updatedProperties
123
+ })
124
+ }
99
125
  }
@@ -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'
@@ -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()
@@ -80,21 +79,17 @@ export class MdViewFacade {
80
79
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
81
80
 
82
81
  allLinks$ = this.metadata$.pipe(
83
- map((record) => ('onlineResources' in record ? record.onlineResources : []))
82
+ map((record) =>
83
+ 'onlineResources' in record ? record.onlineResources : []
84
+ ),
85
+ shareReplay(1)
84
86
  )
85
87
 
86
88
  apiLinks$ = this.allLinks$.pipe(
87
89
  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
- )
90
+ links.filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
91
+ ),
92
+ shareReplay(1)
98
93
  )
99
94
 
100
95
  mapApiLinks$ = this.allLinks$.pipe(
@@ -102,7 +97,8 @@ export class MdViewFacade {
102
97
  links.filter((link) =>
103
98
  this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
104
99
  )
105
- )
100
+ ),
101
+ shareReplay(1)
106
102
  )
107
103
 
108
104
  downloadLinks$ = this.allLinks$.pipe(
@@ -216,4 +212,11 @@ export class MdViewFacade {
216
212
  loadUserFeedbacks(datasetUuid: string) {
217
213
  this.store.dispatch(MdViewActions.loadUserFeedbacks({ datasetUuid }))
218
214
  }
215
+
216
+ /**
217
+ * loadFeatureCatalog
218
+ */
219
+ loadFeatureCatalog(metadata: CatalogRecord) {
220
+ this.store.dispatch(MdViewActions.loadFeatureCatalog({ metadata }))
221
+ }
219
222
  }
@@ -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
@@ -5,6 +5,7 @@ export * from './lib/content-ghost/content-ghost.component'
5
5
  export * from './lib/download-item/download-item.component'
6
6
  export * from './lib/downloads-list/downloads-list.component'
7
7
  export * from './lib/error/error.component'
8
+ export * from './lib/geo-data-badge/geo-data-badge.component'
8
9
  export * from './lib/image-input/image-input.component'
9
10
  export * from './lib/image-overlay-preview/image-overlay-preview.component'
10
11
  export * from './lib/kind-badge/kind-badge.component'
@@ -26,3 +27,4 @@ export * from './lib/user-preview/user-preview.component'
26
27
  export * from './lib/application-banner/application-banner.component'
27
28
  export * from './lib/internal-link-card/internal-link-card.component'
28
29
  export * from './lib/service-capabilities/service-capabilities.component'
30
+ export * from './lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component'
@@ -0,0 +1,4 @@
1
+ :host {
2
+ --gn-ui-geo-data-badge-background-color: var(--color-primary-white);
3
+ --gn-ui-geo-data-badge-text-color: var(--color-primary-darkest);
4
+ }
@@ -0,0 +1,13 @@
1
+ <div
2
+ [class]="badgeClasses"
3
+ [title]="'record.metadata.isGeographical' | translate"
4
+ *ngIf="isGeodata()"
5
+ >
6
+ <ng-icon
7
+ class="shrink-0 text-[0.75em]"
8
+ name="matLocationSearchingOutline"
9
+ ></ng-icon>
10
+ <span class="ml-1 hidden sm:inline-block shrink-0" *ngIf="showLabel" translate
11
+ >record.metadata.isGeographical</span
12
+ >
13
+ </div>
@@ -0,0 +1,54 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
+ import { matLocationSearchingOutline } from '@ng-icons/material-icons/outline'
3
+ import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
4
+ import { CommonModule } from '@angular/common'
5
+ import { TranslateModule } from '@ngx-translate/core'
6
+ import { NgIcon, provideIcons } from '@ng-icons/core'
7
+ import { LinkClassifierService, LinkUsage } from '../../../../../../libs/util/shared/src'
8
+
9
+ @Component({
10
+ selector: 'gn-ui-geo-data-badge',
11
+ templateUrl: './geo-data-badge.component.html',
12
+ styleUrls: ['./geo-data-badge.component.css'],
13
+ changeDetection: ChangeDetectionStrategy.OnPush,
14
+ standalone: true,
15
+ imports: [CommonModule, NgIcon, TranslateModule],
16
+ viewProviders: [
17
+ provideIcons({
18
+ matLocationSearchingOutline,
19
+ }),
20
+ ],
21
+ })
22
+ export class GeoDataBadgeComponent {
23
+ @Input() showLabel = true
24
+ @Input() styling = 'default'
25
+ @Input() record: CatalogRecord
26
+
27
+ isGeodata() {
28
+ const links =
29
+ 'onlineResources' in this.record ? this.record.onlineResources : []
30
+ const hasMapApi = links.some((link) =>
31
+ this.linkClassifier.hasUsage(link, LinkUsage.MAP_API)
32
+ )
33
+ const hasGeoData = links.some((link) =>
34
+ this.linkClassifier.hasUsage(link, LinkUsage.GEODATA)
35
+ )
36
+ return hasMapApi || hasGeoData
37
+ }
38
+
39
+ get badgeClasses(): string {
40
+ const baseClasses =
41
+ 'flex shrink-0 items-center badge-btn text-xs px-2 h-6 min-h-6'
42
+
43
+ switch (this.styling) {
44
+ case 'light':
45
+ return `${baseClasses} bg-primary-white text-primary-darkest`
46
+ case 'default':
47
+ return `${baseClasses} bg-primary-darker text-white`
48
+ default:
49
+ return 'flex shrink-0 items-center'
50
+ }
51
+ }
52
+
53
+ constructor(public linkClassifier: LinkClassifierService) {}
54
+ }