geonetwork-ui 2.6.0-dev.0716b5712 → 2.6.0-dev.128618187

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 (189) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/base.converter.mjs +1 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +8 -3
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +3 -3
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +4 -4
  5. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -10
  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 +5 -1
  8. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +5 -1
  9. package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +2 -3
  10. package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +1 -1
  11. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +5 -5
  12. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +6 -1
  13. package/esm2022/libs/feature/record/src/lib/record-meta/record-meta.component.mjs +1 -1
  14. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +8 -5
  15. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -6
  16. package/esm2022/libs/feature/router/src/lib/default/constants.mjs +3 -1
  17. package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
  18. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +10 -2
  19. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +9 -3
  20. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +8 -7
  21. package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -2
  22. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +26 -10
  23. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/index.mjs +3 -1
  25. package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +163 -0
  26. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  27. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +8 -5
  28. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  29. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +161 -0
  30. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
  31. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  32. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +4 -3
  33. package/esm2022/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.mjs +43 -3
  34. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +15 -3
  35. package/esm2022/libs/ui/map/src/index.mjs +2 -1
  36. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +79 -0
  37. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +5 -4
  38. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  39. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -1
  40. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +13 -6
  41. package/esm2022/translations/de.json +32 -4
  42. package/esm2022/translations/en.json +32 -4
  43. package/esm2022/translations/es.json +32 -4
  44. package/esm2022/translations/fr.json +34 -6
  45. package/esm2022/translations/it.json +32 -4
  46. package/esm2022/translations/nl.json +32 -4
  47. package/esm2022/translations/pt.json +32 -4
  48. package/fesm2022/geonetwork-ui.mjs +1042 -448
  49. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  50. package/libs/api/metadata-converter/src/lib/base.converter.d.ts.map +1 -1
  51. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  52. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  53. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +5 -2
  54. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  55. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  56. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +1 -1
  57. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  58. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -1
  59. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +6 -6
  60. package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -1
  61. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  62. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +9 -1
  63. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  64. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  65. package/libs/feature/record/src/lib/record-meta/record-meta.component.d.ts +2 -2
  66. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +3 -1
  67. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  68. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
  69. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  70. package/libs/feature/router/src/lib/default/constants.d.ts +2 -0
  71. package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
  72. package/libs/feature/router/src/lib/default/router.config.d.ts +2 -0
  73. package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
  74. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  75. package/libs/feature/router/src/lib/default/state/router.facade.d.ts +5 -0
  76. package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
  77. package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
  78. package/libs/feature/search/src/lib/record-url.token.d.ts +3 -1
  79. package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -1
  80. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +5 -3
  81. package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
  82. package/libs/ui/elements/src/index.d.ts +2 -0
  83. package/libs/ui/elements/src/index.d.ts.map +1 -1
  84. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +43 -0
  85. package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -0
  86. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +2 -2
  87. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  88. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +30 -0
  89. package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -0
  90. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
  91. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  92. package/libs/ui/inputs/src/index.d.ts +0 -1
  93. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  94. package/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.d.ts.map +1 -1
  95. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts +10 -3
  96. package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts.map +1 -1
  97. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +2 -0
  98. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
  99. package/libs/ui/map/src/index.d.ts +1 -0
  100. package/libs/ui/map/src/index.d.ts.map +1 -1
  101. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts +15 -0
  102. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -0
  103. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  104. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
  105. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  106. package/libs/util/shared/src/lib/links/link-utils.d.ts +14 -7
  107. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  108. package/package.json +1 -1
  109. package/src/libs/api/metadata-converter/src/lib/base.converter.ts +1 -4
  110. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.service+eaux-usees.ts +2 -2
  111. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +2 -2
  112. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +2 -2
  113. package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.service+napitswallonia.ts +2 -2
  114. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +8 -2
  115. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
  116. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +3 -3
  117. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -9
  118. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +5 -2
  119. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +26 -26
  120. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +2 -2
  121. package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +5 -5
  122. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -0
  123. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -0
  124. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +1 -2
  125. package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -2
  126. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +2 -2
  127. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +2 -2
  128. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +5 -0
  129. package/src/libs/feature/record/src/lib/record-meta/record-meta.component.ts +2 -2
  130. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -3
  131. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -7
  132. package/src/libs/feature/router/src/lib/default/constants.ts +2 -0
  133. package/src/libs/feature/router/src/lib/default/router.config.ts +2 -0
  134. package/src/libs/feature/router/src/lib/default/router.service.ts +10 -0
  135. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +10 -1
  136. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +1 -7
  137. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +16 -8
  138. package/src/libs/feature/search/src/lib/record-url.token.ts +10 -1
  139. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.css +6 -0
  140. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.html +1 -0
  141. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +24 -5
  142. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
  143. package/src/libs/ui/elements/src/index.ts +2 -0
  144. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +156 -0
  145. package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +190 -0
  146. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
  147. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +9 -0
  148. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +13 -4
  149. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -4
  150. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +4 -2
  151. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.css +0 -0
  152. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +96 -0
  153. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +183 -0
  154. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -0
  155. package/src/libs/ui/inputs/src/index.ts +0 -1
  156. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +5 -5
  157. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +2 -1
  158. package/src/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.ts +46 -2
  159. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -7
  160. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -0
  161. package/src/libs/ui/map/src/index.ts +1 -0
  162. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.css +0 -0
  163. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.html +4 -0
  164. package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts → ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts} +7 -8
  165. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +7 -4
  166. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +2 -1
  167. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -2
  168. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +12 -3
  169. package/src/libs/util/shared/src/lib/links/link-utils.ts +30 -12
  170. package/tailwind.base.css +18 -13
  171. package/translations/de.json +32 -4
  172. package/translations/en.json +32 -4
  173. package/translations/es.json +32 -4
  174. package/translations/fr.json +34 -6
  175. package/translations/it.json +32 -4
  176. package/translations/nl.json +32 -4
  177. package/translations/pt.json +32 -4
  178. package/translations/sk.json +32 -4
  179. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +0 -79
  180. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +0 -16
  181. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +0 -15
  182. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +0 -1
  183. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts +0 -8
  184. package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts.map +0 -1
  185. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +0 -1
  186. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +0 -3
  187. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +0 -9
  188. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.ts +0 -15
  189. /package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.css → ui/elements/src/lib/internal-link-card/internal-link-card.component.css} +0 -0
@@ -46,6 +46,10 @@ export class TableViewComponent {
46
46
  switchMap((link) => {
47
47
  this.error = null
48
48
  if (!link) return of(undefined)
49
+ if (link.accessRestricted) {
50
+ this.handleError('dataset.error.restrictedAccess')
51
+ return of([])
52
+ }
49
53
  this.loading = true
50
54
  return this.getDatasetReader(link).pipe(
51
55
  catchError((error) => {
@@ -66,9 +66,8 @@ export class OnlineResourceCardComponent {
66
66
  get subtitle(): string {
67
67
  switch (this.onlineResource.type) {
68
68
  case 'service':
69
- return `${this.onlineResource.accessServiceProtocol}`
70
69
  case 'endpoint':
71
- return `${this.onlineResource.protocol}`
70
+ return `${this.onlineResource.accessServiceProtocol}`
72
71
  case 'link':
73
72
  case 'download':
74
73
  return this.getFormat(this.onlineResource)
@@ -81,8 +81,8 @@ export class OnlineServiceResourceInputComponent {
81
81
  errorMessage = false
82
82
  resetUrlOnChange = Math.random()
83
83
 
84
- layersSubject = new BehaviorSubject<{ name: string; title: string }[]>([])
85
- layers$: Observable<{ name: string; title: string }[]> =
84
+ layersSubject = new BehaviorSubject<{ name?: string; title?: string }[]>([])
85
+ layers$: Observable<{ name?: string; title?: string }[]> =
86
86
  this.layersSubject.asObservable()
87
87
 
88
88
  protocolOptions: {
@@ -8,8 +8,8 @@
8
8
  >
9
9
  </gn-ui-generic-keywords>
10
10
  <div class="w-full h-96 mt-2">
11
- <gn-ui-form-field-map-container
11
+ <gn-ui-spatial-extent
12
12
  [spatialExtents]="spatialExtents$ | async"
13
- ></gn-ui-form-field-map-container>
13
+ ></gn-ui-spatial-extent>
14
14
  </div>
15
15
  </div>
@@ -9,9 +9,9 @@ import { PlatformServiceInterface } from '../../../../../../../../../libs/common
9
9
  import { firstValueFrom, map, shareReplay } from 'rxjs'
10
10
  import { EditorFacade } from '../../../../+state/editor.facade'
11
11
  import { switchMap } from 'rxjs/operators'
12
- import { FormFieldMapContainerComponent } from '../form-field-map-container/form-field-map-container.component'
13
12
  import { TranslateModule, TranslateService } from '@ngx-translate/core'
14
13
  import { SPATIAL_SCOPES } from '../../../../fields.config'
14
+ import { SpatialExtentComponent } from '../../../../../../../../../libs/ui/map/src'
15
15
 
16
16
  // This intermediary type will let us keep track of which keyword is bound to
17
17
  // which extent; these properties will not be persisted
@@ -35,8 +35,8 @@ type KeywordWithExtent = Keyword & {
35
35
  imports: [
36
36
  CommonModule,
37
37
  GenericKeywordsComponent,
38
- FormFieldMapContainerComponent,
39
38
  TranslateModule,
39
+ SpatialExtentComponent,
40
40
  ],
41
41
  })
42
42
  export class FormFieldSpatialExtentComponent {
@@ -61,6 +61,7 @@ import { FetchError } from '../../../../../../libs/util/data-fetcher/src'
61
61
 
62
62
  marker('map.dropdown.placeholder')
63
63
  marker('wfs.feature.limit')
64
+ marker('dataset.error.restrictedAccess')
64
65
 
65
66
  @Component({
66
67
  selector: 'gn-ui-map-view',
@@ -145,6 +146,10 @@ export class MapViewComponent implements AfterViewInit {
145
146
  this.hidePreview = false
146
147
  this.loading = true
147
148
  this.error = null
149
+ if (link.accessRestricted) {
150
+ this.handleError('dataset.error.restrictedAccess')
151
+ return of([])
152
+ }
148
153
  return this.getLayerFromLink(link).pipe(
149
154
  map((layer) => [layer]),
150
155
  catchError((e) => {
@@ -6,7 +6,7 @@ import {
6
6
  OnDestroy,
7
7
  } from '@angular/core'
8
8
  import { Meta } from '@angular/platform-browser'
9
- import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
9
+ import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
10
10
 
11
11
  @Component({
12
12
  selector: 'gn-ui-record-meta',
@@ -15,7 +15,7 @@ import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/mode
15
15
  standalone: true,
16
16
  })
17
17
  export class RecordMetaComponent implements OnDestroy, OnChanges {
18
- @Input() metadata: DatasetRecord
18
+ @Input() metadata: CatalogRecord
19
19
 
20
20
  constructor(private meta: Meta) {}
21
21
 
@@ -1,16 +1,18 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { Actions, createEffect, ofType } from '@ngrx/effects'
3
3
  import { exhaustMap, mergeMap, of } from 'rxjs'
4
- import { catchError, filter, map, switchMap, take } from 'rxjs/operators'
4
+ import { catchError, filter, map, switchMap } from 'rxjs/operators'
5
5
  import * as MdViewActions from './mdview.actions'
6
6
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
7
7
  import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
8
+ import { Router } from '@angular/router'
8
9
  @Injectable()
9
10
  export class MdViewEffects {
10
11
  constructor(
11
12
  private actions$: Actions,
12
13
  private recordsRepository: RecordsRepositoryInterface,
13
- private platformServiceInterface: PlatformServiceInterface
14
+ private platformServiceInterface: PlatformServiceInterface,
15
+ private router: Router
14
16
  ) {}
15
17
 
16
18
  /*
@@ -21,7 +23,7 @@ export class MdViewEffects {
21
23
  ofType(MdViewActions.loadFullMetadata),
22
24
  switchMap(({ uuid }) => this.recordsRepository.getRecord(uuid)),
23
25
  map((record) => {
24
- if (record === null) {
26
+ if (record === null || !this.router.url.includes(record.kind)) {
25
27
  return MdViewActions.loadFullMetadataFailure({ notFound: true })
26
28
  }
27
29
  return MdViewActions.loadFullMetadataSuccess({ full: record })
@@ -16,6 +16,7 @@ import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/
16
16
  import {
17
17
  CatalogRecord,
18
18
  DatasetServiceDistribution,
19
+ ServiceEndpoint,
19
20
  UserFeedback,
20
21
  } from '../../../../../../libs/common/domain/src/lib/model/record'
21
22
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
@@ -79,11 +80,7 @@ export class MdViewFacade {
79
80
  chartConfig$ = this.store.pipe(select(MdViewSelectors.getChartConfig))
80
81
 
81
82
  allLinks$ = this.metadata$.pipe(
82
- map((record) =>
83
- record.kind === 'dataset' && 'onlineResources' in record
84
- ? record.onlineResources
85
- : []
86
- )
83
+ map((record) => ('onlineResources' in record ? record.onlineResources : []))
87
84
  )
88
85
 
89
86
  apiLinks$ = this.allLinks$.pipe(
@@ -92,8 +89,8 @@ export class MdViewFacade {
92
89
  .filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
93
90
  // Put links to IGN Géoplateforme first
94
91
  .sort((dd1, dd2) => {
95
- return (dd2 as DatasetServiceDistribution).accessServiceProtocol ===
96
- 'GPFDL'
92
+ return (dd2 as DatasetServiceDistribution | ServiceEndpoint)
93
+ .accessServiceProtocol === 'GPFDL'
97
94
  ? 1
98
95
  : undefined // do not change the sorting otherwise
99
96
  })
@@ -4,6 +4,8 @@ export const ROUTER_STATE_KEY = 'router'
4
4
 
5
5
  export const ROUTER_ROUTE_SEARCH = 'search'
6
6
  export const ROUTER_ROUTE_DATASET = 'dataset'
7
+ export const ROUTER_ROUTE_SERVICE = 'service'
8
+ export const ROUTER_ROUTE_REUSE = 'reuse'
7
9
  export const ROUTER_ROUTE_ORGANIZATION = 'organization'
8
10
 
9
11
  export enum ROUTE_PARAMS {
@@ -4,6 +4,8 @@ export interface RouterConfigModel {
4
4
  searchStateId: string
5
5
  searchRouteComponent: Type<any>
6
6
  recordRouteComponent: Type<any>
7
+ serviceRouteComponent: Type<any>
8
+ reuseRouteComponent: Type<any>
7
9
  organizationRouteComponent: Type<any>
8
10
  }
9
11
 
@@ -3,6 +3,8 @@ import {
3
3
  ROUTER_ROUTE_DATASET,
4
4
  ROUTER_ROUTE_ORGANIZATION,
5
5
  ROUTER_ROUTE_SEARCH,
6
+ ROUTER_ROUTE_SERVICE,
7
+ ROUTER_ROUTE_REUSE,
6
8
  } from '.'
7
9
  import { Router, Routes } from '@angular/router'
8
10
  import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
@@ -34,6 +36,14 @@ export class RouterService {
34
36
  path: `${ROUTER_ROUTE_DATASET}/:metadataUuid`,
35
37
  component: this.routerConfig.recordRouteComponent,
36
38
  },
39
+ {
40
+ path: `${ROUTER_ROUTE_SERVICE}/:metadataUuid`,
41
+ component: this.routerConfig.recordRouteComponent,
42
+ },
43
+ {
44
+ path: `${ROUTER_ROUTE_REUSE}/:metadataUuid`,
45
+ component: this.routerConfig.recordRouteComponent,
46
+ },
37
47
  {
38
48
  path: `${ROUTER_ROUTE_ORGANIZATION}/:name`,
39
49
  component: this.routerConfig.organizationRouteComponent,
@@ -7,6 +7,8 @@ import { distinctUntilChanged, filter, map, take } from 'rxjs/operators'
7
7
  import {
8
8
  ROUTER_ROUTE_DATASET,
9
9
  ROUTER_ROUTE_SEARCH,
10
+ ROUTER_ROUTE_SERVICE,
11
+ ROUTER_ROUTE_REUSE,
10
12
  SearchRouteParams,
11
13
  } from '../constants'
12
14
  import {
@@ -32,12 +34,19 @@ export class RouterFacade {
32
34
  map(expandQueryParams)
33
35
  )
34
36
 
37
+ routeMap = {
38
+ dataset: ROUTER_ROUTE_DATASET,
39
+ service: ROUTER_ROUTE_SERVICE,
40
+ reuse: ROUTER_ROUTE_REUSE,
41
+ }
42
+
35
43
  constructor(
36
44
  private store: Store<RouterReducerState>,
37
45
  private routerService: RouterService
38
46
  ) {}
39
47
 
40
48
  goToMetadata(metadata: CatalogRecord) {
49
+ const selectedRoute = this.routeMap[metadata.kind] || ROUTER_ROUTE_DATASET
41
50
  this.pathParams$
42
51
  .pipe(
43
52
  take(1),
@@ -45,7 +54,7 @@ export class RouterFacade {
45
54
  )
46
55
  .subscribe(() => {
47
56
  this.go({
48
- path: `${ROUTER_ROUTE_DATASET}/${metadata.uniqueIdentifier}`,
57
+ path: `${selectedRoute}/${metadata.uniqueIdentifier}`,
49
58
  })
50
59
  this.store.dispatch(
51
60
  MdViewActions.setIncompleteMetadata({ incomplete: metadata })
@@ -1,6 +1,6 @@
1
1
  <div class="flex flex-row items-center">
2
2
  <span
3
- class="align-text-top mr-1.5"
3
+ class="align-text-top mr-1.5 mt-0.5"
4
4
  data-test="favorite-count"
5
5
  *ngIf="hasFavoriteCount && displayCount"
6
6
  >{{ favoriteCount }}</span
@@ -10,10 +10,4 @@
10
10
  (newValue)="toggleFavorite($event)"
11
11
  [disabled]="loading || (isAnonymous$ | async)"
12
12
  ></gn-ui-star-toggle>
13
- <span
14
- class="align-text-top ml-1.5"
15
- data-test="favorite-count"
16
- *ngIf="!displayCount"
17
- translate="datahub.record.addToFavorites"
18
- ></span>
19
13
  </div>
@@ -8,9 +8,15 @@ import {
8
8
  OnDestroy,
9
9
  ViewChild,
10
10
  } from '@angular/core'
11
- import { map, pairwise, withLatestFrom } from 'rxjs/operators'
11
+ import {
12
+ map,
13
+ pairwise,
14
+ startWith,
15
+ switchMap,
16
+ withLatestFrom,
17
+ } from 'rxjs/operators'
12
18
  import tippy from 'tippy.js'
13
- import { TranslateService } from '@ngx-translate/core'
19
+ import { TranslateModule, TranslateService } from '@ngx-translate/core'
14
20
  import { StarToggleComponent } from '../../../../../../../libs/ui/inputs/src'
15
21
  import { Observable, Subscription } from 'rxjs'
16
22
  import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
@@ -24,7 +30,7 @@ import { CommonModule } from '@angular/common'
24
30
  styleUrls: ['./favorite-star.component.css'],
25
31
  changeDetection: ChangeDetectionStrategy.OnPush,
26
32
  standalone: true,
27
- imports: [CommonModule, StarToggleComponent],
33
+ imports: [CommonModule, StarToggleComponent, TranslateModule],
28
34
  })
29
35
  export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
30
36
  @Input() displayCount? = true
@@ -46,11 +52,13 @@ export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
46
52
  favoriteCount: number | null
47
53
  loading = false
48
54
  loginUrl = this.authService.loginUrl
49
- loginMessage$: Observable<string> = this.translateService.get(
50
- 'favorite.not.authenticated.tooltip',
51
- {
52
- link: this.loginUrl,
53
- }
55
+ loginMessage$: Observable<string> = this.translateService.onLangChange.pipe(
56
+ startWith(null), // make sure to wait for translations to be loaded with and without language change
57
+ switchMap(() =>
58
+ this.translateService.get('favorite.not.authenticated.tooltip', {
59
+ link: this.loginUrl,
60
+ })
61
+ )
54
62
  )
55
63
  @ViewChild(StarToggleComponent, { read: ElementRef })
56
64
  starToggleRef: ElementRef
@@ -1,4 +1,13 @@
1
1
  import { InjectionToken } from '@angular/core'
2
2
 
3
3
  // expects the replacement key ${uuid}
4
- export const RECORD_URL_TOKEN = new InjectionToken<string>('record-url-token')
4
+ export const RECORD_DATASET_URL_TOKEN = new InjectionToken<string>(
5
+ 'record-dataset-url-token'
6
+ )
7
+ export const RECORD_SERVICE_URL_TOKEN = new InjectionToken<string>(
8
+ 'record-service-url-token'
9
+ )
10
+
11
+ export const RECORD_REUSE_URL_TOKEN = new InjectionToken<string>(
12
+ 'record-reuse-url-token'
13
+ )
@@ -0,0 +1,6 @@
1
+ :host {
2
+ --gn-ui-button-height: 24px;
3
+ --gn-ui-button-width: 24px;
4
+ --gn-ui-button-color: var(--color-secondary);
5
+ --gn-ui-button-border-width: 0px;
6
+ }
@@ -16,6 +16,7 @@
16
16
  type="secondary"
17
17
  (buttonClick)="onShowMore()"
18
18
  extraClass="m-auto !p-[22px]"
19
+ [style.--gn-ui-button-width]="!auto"
19
20
  >
20
21
  <span class="uppercase font-medium tracking-widest" translate
21
22
  >results.showMore</span
@@ -17,7 +17,11 @@ import {
17
17
  ResultsLayoutConfigItem,
18
18
  ResultsLayoutConfigModel,
19
19
  } from '../../../../../../libs/ui/search/src'
20
- import { RECORD_URL_TOKEN } from '../record-url.token'
20
+ import {
21
+ RECORD_DATASET_URL_TOKEN,
22
+ RECORD_SERVICE_URL_TOKEN,
23
+ RECORD_REUSE_URL_TOKEN,
24
+ } from '../record-url.token'
21
25
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
22
26
 
23
27
  export type ResultsListShowMoreStrategy = 'auto' | 'button' | 'none'
@@ -49,8 +53,12 @@ export class ResultsListContainerComponent implements OnInit {
49
53
  @Inject(RESULTS_LAYOUT_CONFIG)
50
54
  private resultsLayoutConfig: ResultsLayoutConfigModel,
51
55
  @Optional()
52
- @Inject(RECORD_URL_TOKEN)
53
- private recordUrlTemplate: string
56
+ @Inject(RECORD_DATASET_URL_TOKEN)
57
+ private recordDatasetUrlTemplate: string,
58
+ @Inject(RECORD_SERVICE_URL_TOKEN)
59
+ private recordServiceUrlTemplate: string,
60
+ @Inject(RECORD_REUSE_URL_TOKEN)
61
+ private recordReuseUrlTemplate: string
54
62
  ) {}
55
63
 
56
64
  ngOnInit(): void {
@@ -103,7 +111,18 @@ export class ResultsListContainerComponent implements OnInit {
103
111
  }
104
112
 
105
113
  getRecordUrl(metadata: CatalogRecord) {
106
- if (!this.recordUrlTemplate) return null
107
- return this.recordUrlTemplate.replace('${uuid}', metadata.uniqueIdentifier)
114
+ const tokenMap = {
115
+ dataset: this.recordDatasetUrlTemplate,
116
+ service: this.recordServiceUrlTemplate,
117
+ reuse: this.recordReuseUrlTemplate,
118
+ }
119
+ if (
120
+ !this.recordDatasetUrlTemplate &&
121
+ !this.recordServiceUrlTemplate &&
122
+ !this.recordReuseUrlTemplate
123
+ )
124
+ return null
125
+ const urlKind = tokenMap[metadata.kind]
126
+ return urlKind.replace('${uuid}', metadata.uniqueIdentifier)
108
127
  }
109
128
  }
@@ -5,6 +5,6 @@
5
5
  [selected]="currentLang"
6
6
  ariaName="languages"
7
7
  [showTitle]="false"
8
- extraBtnClass="bg-transparent flex justify-items-center !pl-2 !py-1"
8
+ extraBtnClass="bg-transparent flex justify-items-center !pl-2 !py-1 rounded-lg"
9
9
  >
10
10
  </gn-ui-dropdown-selector>
@@ -23,3 +23,5 @@ export * from './lib/ui-elements.module'
23
23
  export * from './lib/user-feedback-item/user-feedback-item.component'
24
24
  export * from './lib/user-preview/user-preview.component'
25
25
  export * from './lib/application-banner/application-banner.component'
26
+ export * from './lib/internal-link-card/internal-link-card.component'
27
+ export * from './lib/service-capabilities/service-capabilities.component'
@@ -0,0 +1,156 @@
1
+ <div
2
+ class="rounded-lg group card-shadow cursor-pointer overflow-hidden hover:bg-gray-50"
3
+ [ngClass]="cardClass"
4
+ >
5
+ <div class="flex flex-row justify-between w-full">
6
+ <div
7
+ *ngIf="shouldShowThumbnail"
8
+ [ngClass]="thumbnailContainerClass"
9
+ class="mr-4 flex flex-col"
10
+ >
11
+ <gn-ui-thumbnail
12
+ class="w-full h-full object-cover"
13
+ [thumbnailUrl]="record.overviews?.[0]?.url?.toString() || ''"
14
+ [fit]="'cover'"
15
+ ></gn-ui-thumbnail>
16
+ </div>
17
+ <div
18
+ class="flex flex-col flex-1 relative"
19
+ [ngClass]="{
20
+ 'justify-between': record.ownerOrganization?.name && size !== 'XS',
21
+ }"
22
+ >
23
+ <div class="flex items-center space-x-2">
24
+ <span
25
+ *ngIf="getKindInfo().text"
26
+ class="badge-btn text-white text-xs px-2 py-0.5 font-bold shrink-0 bg-primary leading-tight flex items-center justify-evenly h-6 min-h-6"
27
+ >
28
+ <ng-icon
29
+ class="text-[0.9em] text-white mr-1"
30
+ [name]="getKindInfo().icon"
31
+ ></ng-icon>
32
+ <span class="font-medium text-white text-xs" translate>
33
+ {{ getKindInfo().text }}
34
+ </span>
35
+ </span>
36
+ <span
37
+ *ngIf="isGeodata"
38
+ class="badge-btn text-black text-xs px-2 py-0.5 font-bold shrink-0 bg-primary-white leading-tight flex items-center justify-evenly h-6 min-h-6"
39
+ [ngClass]="size === 'L' ? 'w-[164px]' : 'w-8'"
40
+ >
41
+ <ng-icon
42
+ class="text-[0.9em] text-primary-darkest"
43
+ name="matLocationSearchingOutline"
44
+ ></ng-icon>
45
+ <ng-container *ngIf="size === 'L'">
46
+ <span
47
+ class="font-medium text-primary-darkest text-xs ml-1"
48
+ translate
49
+ >
50
+ record.metadata.type
51
+ </span>
52
+ </ng-container>
53
+ </span>
54
+ <div class="flex items-center">
55
+ <gn-ui-metadata-quality
56
+ [smaller]="true"
57
+ [metadata]="record"
58
+ [metadataQualityDisplay]="metadataQualityDisplay"
59
+ ></gn-ui-metadata-quality>
60
+ </div>
61
+ <div class="absolute top-0 right-0 items-center">
62
+ <ng-container
63
+ *ngIf="size !== 'XS'"
64
+ [ngTemplateOutlet]="favoriteTemplate"
65
+ [ngTemplateOutletContext]="{ $implicit: record }"
66
+ ></ng-container>
67
+ </div>
68
+ </div>
69
+ <div
70
+ class="font-medium text-title group-hover:text-primary overflow-hidden break-words"
71
+ [ngClass]="getTitleClass()"
72
+ >
73
+ {{ record.title }}
74
+ </div>
75
+ <div
76
+ *ngIf="size === 'L'"
77
+ class="mt-1 mb-2 font-normal text-xs text-gray-900 line-clamp-2 overflow-hidden"
78
+ >
79
+ <gn-ui-markdown-parser
80
+ [textContent]="abstract"
81
+ [whitoutStyles]="true"
82
+ ></gn-ui-markdown-parser>
83
+ </div>
84
+ <div
85
+ *ngIf="size !== 'XS' && record.ownerOrganization?.name"
86
+ class="flex items-center justify-evenly bg-gray-50 rounded-lg h-[53px] px-2"
87
+ >
88
+ <div class="flex items-center flex-1 min-w-0">
89
+ <div
90
+ class="w-[45px] h-[45px] rounded-lg overflow-hidden shrink-0 mr-3"
91
+ >
92
+ <gn-ui-thumbnail
93
+ [thumbnailUrl]="
94
+ record.ownerOrganization?.logoUrl?.toString() || ''
95
+ "
96
+ [fit]="'contain'"
97
+ class="w-full h-full rounded-lg"
98
+ ></gn-ui-thumbnail>
99
+ </div>
100
+ <div *ngIf="organization?.name" class="flex-1 w-0 overflow-hidden">
101
+ <div
102
+ class="text-xs text-black font-normal leading-tight truncate"
103
+ translate
104
+ >
105
+ record.card.metadata.contact
106
+ </div>
107
+ <div class="text-xl text-primary-black font-medium truncate">
108
+ {{ organization.name }}
109
+ </div>
110
+ </div>
111
+ </div>
112
+ <div *ngIf="size === 'L'" class="ml-2 flex space-x-2">
113
+ <div *ngIf="organization?.website" class="flex">
114
+ <button
115
+ [title]="organization.website"
116
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
117
+ (click)="openExternalUrl($event, organization.website)"
118
+ >
119
+ <ng-icon name="iconoirInternet"></ng-icon>
120
+ </button>
121
+ </div>
122
+ <div *ngIf="contacts[0]?.email" class="flex">
123
+ <button
124
+ [title]="contacts[0].email"
125
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest"
126
+ data-cy="contact-email"
127
+ (click)="openMailto($event, contacts[0].email)"
128
+ >
129
+ <ng-icon name="matEmailOutline"></ng-icon>
130
+ </button>
131
+ </div>
132
+ <div *ngIf="contacts[0]?.phone" class="flex">
133
+ <button
134
+ [title]="'Copy to clipboard'"
135
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
136
+ data-cy="contact-phone"
137
+ (click)="copyToClipboard($event, contacts[0].phone)"
138
+ >
139
+ <ng-icon name="matPhoneOutline"></ng-icon>
140
+ </button>
141
+ </div>
142
+ <div *ngIf="contacts[0]?.address" class="flex">
143
+ <button
144
+ [title]="'Copy to clipboard'"
145
+ class="w-[40px] h-[32px] flex items-center justify-center rounded-lg border border-[#D4D3D7] px-[8px] py-[4px] hover:bg-primary-lightest relative group"
146
+ data-cy="contact-phone"
147
+ (click)="copyToClipboard($event, contacts[0].address)"
148
+ >
149
+ <ng-icon name="matLocationOnOutline"></ng-icon>
150
+ </button>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>