geonetwork-ui 2.8.0-dev.0c9b29721 → 2.8.0-dev.2abe6a279

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 (129) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +5 -1
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +3 -1
  4. package/esm2022/libs/api/repository/src/lib/gn4/auth/auth.service.mjs +2 -2
  5. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +10 -10
  6. package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +3 -2
  7. package/esm2022/libs/common/domain/src/index.mjs +3 -0
  8. package/esm2022/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.mjs +1 -1
  9. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +3 -1
  10. package/esm2022/libs/common/domain/src/lib/model/search/sort-by.model.mjs +6 -1
  11. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  12. package/esm2022/libs/feature/dataviz/src/index.mjs +2 -1
  13. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +3 -1
  14. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +18 -7
  15. package/esm2022/libs/feature/dataviz/src/lib/stac-view/stac-view.component.mjs +51 -0
  16. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -4
  17. package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +23 -8
  18. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +2 -1
  19. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +2 -1
  20. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +5 -1
  21. package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +9 -7
  22. package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +8 -12
  23. package/esm2022/libs/ui/elements/src/lib/external-link-card/external-link-card.component.mjs +11 -4
  24. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  25. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +2 -3
  26. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +5 -1
  27. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +12 -1
  28. package/esm2022/libs/util/shared/src/lib/services/proxy.service.mjs +9 -11
  29. package/esm2022/libs/util/shared/src/lib/utils/sort-by.mjs +9 -6
  30. package/esm2022/translations/de.json +14 -3
  31. package/esm2022/translations/en.json +14 -4
  32. package/esm2022/translations/es.json +13 -2
  33. package/esm2022/translations/fr.json +14 -3
  34. package/esm2022/translations/it.json +15 -4
  35. package/esm2022/translations/nl.json +13 -2
  36. package/esm2022/translations/pt.json +13 -2
  37. package/esm2022/translations/sk.json +14 -3
  38. package/fesm2022/geonetwork-ui.mjs +285 -82
  39. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  40. package/index.d.ts +1 -0
  41. package/index.d.ts.map +1 -1
  42. package/index.ts +1 -0
  43. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  44. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  45. package/libs/api/repository/src/lib/gn4/auth/auth.service.d.ts.map +1 -1
  46. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +7 -7
  47. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  48. package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
  49. package/libs/common/domain/src/index.d.ts +3 -0
  50. package/libs/common/domain/src/index.d.ts.map +1 -0
  51. package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts +1 -1
  52. package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts.map +1 -1
  53. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +1 -1
  54. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  55. package/libs/common/domain/src/lib/model/search/sort-by.model.d.ts.map +1 -1
  56. package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -1
  57. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  58. package/libs/feature/dataviz/src/index.d.ts +1 -0
  59. package/libs/feature/dataviz/src/index.d.ts.map +1 -1
  60. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  61. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  62. package/libs/feature/dataviz/src/lib/stac-view/stac-view.component.d.ts +16 -0
  63. package/libs/feature/dataviz/src/lib/stac-view/stac-view.component.d.ts.map +1 -0
  64. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +3 -2
  65. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
  66. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +3 -2
  67. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.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 +24 -24
  70. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  71. package/libs/feature/router/src/lib/default/router.service.d.ts +2 -0
  72. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  73. package/libs/feature/router/src/lib/default/state/router.effects.d.ts +3 -1
  74. package/libs/feature/router/src/lib/default/state/router.effects.d.ts.map +1 -1
  75. package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts +4 -3
  76. package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts.map +1 -1
  77. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  78. package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +3 -2
  79. package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts.map +1 -1
  80. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
  81. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  82. package/libs/util/shared/src/lib/links/link-utils.d.ts +6 -0
  83. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  84. package/libs/util/shared/src/lib/services/proxy.service.d.ts +5 -4
  85. package/libs/util/shared/src/lib/services/proxy.service.d.ts.map +1 -1
  86. package/libs/util/shared/src/lib/utils/sort-by.d.ts.map +1 -1
  87. package/package.json +1 -1
  88. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +2 -0
  89. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +2 -0
  90. package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -1
  91. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +37 -36
  92. package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -2
  93. package/src/libs/common/domain/src/index.ts +2 -0
  94. package/src/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.ts +1 -1
  95. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +4 -0
  96. package/src/libs/common/domain/src/lib/model/search/sort-by.model.ts +5 -0
  97. package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -1
  98. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +5 -0
  99. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +19 -0
  100. package/src/libs/feature/dataviz/src/index.ts +1 -0
  101. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +1 -0
  102. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +16 -5
  103. package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.css +0 -0
  104. package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.html +40 -0
  105. package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.ts +62 -0
  106. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +7 -1
  107. package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +23 -4
  108. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +1 -0
  109. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +11 -1
  110. package/src/libs/feature/router/src/lib/default/router.service.ts +8 -0
  111. package/src/libs/feature/router/src/lib/default/state/router.effects.ts +6 -7
  112. package/src/libs/feature/search/src/lib/sort-by/sort-by.component.ts +8 -12
  113. package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.html +43 -22
  114. package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.ts +12 -3
  115. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +56 -14
  116. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +4 -2
  117. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +4 -0
  118. package/src/libs/util/shared/src/lib/links/link-utils.ts +11 -0
  119. package/src/libs/util/shared/src/lib/services/proxy.service.ts +6 -2
  120. package/src/libs/util/shared/src/lib/utils/sort-by.ts +8 -5
  121. package/translations/de.json +14 -3
  122. package/translations/en.json +14 -4
  123. package/translations/es.json +13 -2
  124. package/translations/fr.json +14 -3
  125. package/translations/it.json +15 -4
  126. package/translations/nl.json +13 -2
  127. package/translations/pt.json +13 -2
  128. package/translations/sk.json +14 -3
  129. package/src/libs/common/domain/src/lib/index.ts +0 -2
@@ -1,18 +1,19 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import { InjectionToken, Injector } from '@angular/core';
2
2
  import { Location } from '@angular/common';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare const PROXY_PATH: InjectionToken<string>;
5
5
  export declare class ProxyService {
6
- private proxyPath;
6
+ private injector;
7
7
  private location;
8
- constructor(proxyPath: string, location: Location);
8
+ private get proxyPath();
9
+ constructor(injector: Injector, location: Location);
9
10
  /**
10
11
  * Transforms the URL to go through a proxy specified with the PROXY_PATH
11
12
  * injection token.
12
13
  * @param url
13
14
  */
14
15
  getProxiedUrl(url: string): string;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<ProxyService, [{ optional: true; }, null]>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProxyService, never>;
16
17
  static ɵprov: i0.ɵɵInjectableDeclaration<ProxyService>;
17
18
  }
18
19
  //# sourceMappingURL=proxy.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/services/proxy.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAY,MAAM,eAAe,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;;AAE1C,eAAO,MAAM,UAAU,wBAA0C,CAAA;AAEjE,qBAGa,YAAY;IAEW,OAAO,CAAC,SAAS;IACjD,OAAO,CAAC,QAAQ;gBADwB,SAAS,EAAE,MAAM,EACjD,QAAQ,EAAE,QAAQ;IAG5B;;;;OAIG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;yCAXvB,YAAY;6CAAZ,YAAY;CA6BxB"}
1
+ {"version":3,"file":"proxy.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/services/proxy.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;;AAE1C,eAAO,MAAM,UAAU,wBAA0C,CAAA;AAEjE,qBAGa,YAAY;IAMrB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,QAAQ;IANlB,OAAO,KAAK,SAAS,GAEpB;gBAGS,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ;IAG5B;;;;OAIG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;yCAfvB,YAAY;6CAAZ,YAAY;CAiCxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"sort-by.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/sort-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAA;AAEvF,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,CAG7D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,CAKlE"}
1
+ {"version":3,"file":"sort-by.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/sort-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAA;AAEvF,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,CAG7D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,CAQlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.8.0-dev.0c9b29721",
3
+ "version": "2.8.0-dev.2abe6a279",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -9,6 +9,8 @@ export function matchProtocol(protocol: string): ServiceProtocol {
9
9
  if (/ogc\W*api\W*features/i.test(protocol)) return 'ogcFeatures'
10
10
  if (/esri/i.test(protocol)) return 'esriRest'
11
11
  if (/DOWNLOAD-1/i.test(protocol)) return 'GPFDL'
12
+ if (/DB:POSTGIS/i.test(protocol)) return 'postgis'
13
+ if (/stac\W*items/i.test(protocol)) return 'stac'
12
14
  return 'other'
13
15
  }
14
16
 
@@ -512,6 +512,8 @@ export class Gn4FieldMapper {
512
512
  /^OGC:WMTS/.test(protocol) ||
513
513
  /TMS/i.test(protocol) ||
514
514
  /ogc\W*api\W*features/i.test(protocol) ||
515
+ /^DB:POSTGIS/i.test(protocol) ||
516
+ /stac\W*items/i.test(protocol) ||
515
517
  (/^WWW:DOWNLOAD-/.test(protocol) && /data.geopf.fr/.test(url)) // TO DO : change with the good protocol when decided
516
518
  ) {
517
519
  return 'service'
@@ -33,7 +33,10 @@ export class AuthService {
33
33
  return baseUrl
34
34
  .replace(
35
35
  '${current_url}',
36
- new URL(this.location.path(), window.location.href).toString()
36
+ new URL(
37
+ this.location.prepareExternalUrl(this.location.path()),
38
+ window.location.href
39
+ ).toString()
37
40
  )
38
41
  .replace('${lang2}', toLang2(this.translateService.currentLang))
39
42
  .replace('${lang3}', toLang3(this.translateService.currentLang))
@@ -1,12 +1,21 @@
1
+ import { HttpClient, HttpEventType } from '@angular/common/http'
1
2
  import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'
2
3
  import {
3
- catchError,
4
- filter,
5
- map,
6
- mergeMap,
7
- shareReplay,
8
- tap,
9
- } from 'rxjs/operators'
4
+ KeywordApiResponse,
5
+ ThesaurusApiResponse,
6
+ } from '../../../../../../../libs/api/metadata-converter/src'
7
+ import {
8
+ CatalogRecord,
9
+ Keyword,
10
+ Organization,
11
+ UserFeedback,
12
+ } from '../../../../../../../libs/common/domain/src/lib/model/record'
13
+ import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
14
+ import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
15
+ import {
16
+ PlatformServiceInterface,
17
+ UploadEvent,
18
+ } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
10
19
  import {
11
20
  MeApiService,
12
21
  RecordsApiService,
@@ -15,26 +24,9 @@ import {
15
24
  UserfeedbackApiService,
16
25
  UsersApiService,
17
26
  } from '../../../../../../../libs/data-access/gn4/src'
18
- import {
19
- PlatformServiceInterface,
20
- UploadEvent,
21
- } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
22
- import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
23
- import {
24
- CatalogRecord,
25
- Keyword,
26
- Organization,
27
- UserFeedback,
28
- } from '../../../../../../../libs/common/domain/src/lib/model/record'
29
- import { Gn4PlatformMapper } from './gn4-platform.mapper'
30
- import { ltr } from 'semver'
31
- import { HttpClient, HttpEventType } from '@angular/common/http'
32
- import {
33
- KeywordApiResponse,
34
- ThesaurusApiResponse,
35
- } from '../../../../../../../libs/api/metadata-converter/src'
36
- import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
27
+ import { toLang3 } from '../../../../../../../libs/util/i18n/src'
37
28
  import { noDuplicateFileName } from '../../../../../../../libs/util/shared/src'
29
+ import { TranslateService } from '@ngx-translate/core'
38
30
  import {
39
31
  combineLatest,
40
32
  forkJoin,
@@ -43,9 +35,17 @@ import {
43
35
  switchMap,
44
36
  throwError,
45
37
  } from 'rxjs'
46
- import { TranslateService } from '@ngx-translate/core'
47
- import { toLang3 } from '../../../../../../../libs/util/i18n/src'
38
+ import {
39
+ catchError,
40
+ filter,
41
+ map,
42
+ mergeMap,
43
+ shareReplay,
44
+ tap,
45
+ } from 'rxjs/operators'
46
+ import { ltr } from 'semver'
48
47
  import { Gn4SettingsService } from '../settings/gn4-settings.service'
48
+ import { Gn4PlatformMapper } from './gn4-platform.mapper'
49
49
 
50
50
  const minApiVersion = '4.2.2'
51
51
 
@@ -56,7 +56,6 @@ export const DISABLE_AUTH = new InjectionToken<boolean>('gnDisableAuth', {
56
56
  @Injectable()
57
57
  export class Gn4PlatformService implements PlatformServiceInterface {
58
58
  private readonly type = 'GeoNetwork'
59
- private readonly me$: Observable<UserModel>
60
59
  private readonly users$: Observable<UserModel[]>
61
60
  private readonly isUserAnonymous$: Observable<boolean>
62
61
  private readonly gnParseVersion = '4.2.5'
@@ -70,6 +69,15 @@ export class Gn4PlatformService implements PlatformServiceInterface {
70
69
  }),
71
70
  shareReplay(1)
72
71
  )
72
+
73
+ private me$ = this.disableAuth
74
+ ? of(null)
75
+ : of(true).pipe(
76
+ switchMap(() => this.meApi.getMe()),
77
+ switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)),
78
+ shareReplay({ bufferSize: 1, refCount: true })
79
+ )
80
+
73
81
  /**
74
82
  * A map of already loaded thesauri (groups of keywords); the key is a URI
75
83
  * @private
@@ -93,13 +101,6 @@ export class Gn4PlatformService implements PlatformServiceInterface {
93
101
  private settingsService: Gn4SettingsService,
94
102
  @Inject(DISABLE_AUTH) @Optional() private disableAuth: boolean
95
103
  ) {
96
- this.me$ = this.disableAuth
97
- ? of(null)
98
- : this.meApi.getMe().pipe(
99
- switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)),
100
- shareReplay({ bufferSize: 1, refCount: true })
101
- )
102
-
103
104
  this.isUserAnonymous$ = this.me$.pipe(
104
105
  map((user) => !user || !('id' in user))
105
106
  )
@@ -1,7 +1,7 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { SiteApiService } from '../../../../../../../libs/data-access/gn4/src'
3
+ import { Observable, of, switchMap } from 'rxjs'
3
4
  import { map, shareReplay } from 'rxjs/operators'
4
- import { Observable } from 'rxjs'
5
5
 
6
6
  @Injectable({
7
7
  providedIn: 'root',
@@ -25,7 +25,8 @@ export class Gn4SettingsService {
25
25
  constructor(private siteApiService: SiteApiService) {}
26
26
 
27
27
  private getSettingsSetValueByKey(key: string) {
28
- return this.siteApiService.getSettingsSet(null, [key]).pipe(
28
+ return of(true).pipe(
29
+ switchMap(() => this.siteApiService.getSettingsSet(null, [key])),
29
30
  map((v) => v[key]),
30
31
  shareReplay({ bufferSize: 1, refCount: true })
31
32
  )
@@ -0,0 +1,2 @@
1
+ export * from './lib/organizations.service.interface'
2
+ export * from './lib/platform.service.interface'
@@ -24,5 +24,5 @@ export interface DatavizConfigModel {
24
24
  view: string
25
25
  source: DatasetOnlineResource
26
26
  chartConfig?: DatavizChartConfigModel
27
- styleTMSIndex: number
27
+ styleTMSIndex?: number
28
28
  }
@@ -163,6 +163,8 @@ export type ServiceProtocol =
163
163
  | 'GPFDL'
164
164
  | 'tms'
165
165
  | 'maplibre-style'
166
+ | 'postgis'
167
+ | 'stac'
166
168
  | 'other'
167
169
 
168
170
  marker('record.metadata.api.accessServiceProtocol.wms')
@@ -174,6 +176,8 @@ marker('record.metadata.api.accessServiceProtocol.ogcFeatures')
174
176
  marker('record.metadata.api.accessServiceProtocol.GPFDL')
175
177
  marker('record.metadata.api.accessServiceProtocol.tms')
176
178
  marker('record.metadata.api.accessServiceProtocol.maplibre-style')
179
+ marker('record.metadata.api.accessServiceProtocol.postgis')
180
+ marker('record.metadata.api.accessServiceProtocol.stac')
177
181
  marker('record.metadata.api.accessServiceProtocol.other')
178
182
 
179
183
  export type OnlineResourceType = 'service' | 'download' | 'link' | 'endpoint'
@@ -6,4 +6,9 @@ export const SortByEnum: Record<string, SortByField> = {
6
6
  RELEVANCY: ['desc', '_score'],
7
7
  QUALITY_SCORE: ['desc', 'qualityScore'],
8
8
  CHANGE_DATE: ['desc', 'changeDate'],
9
+ RESOURCE_DATES: [
10
+ ['desc', 'revisionDateForResource'],
11
+ ['desc', 'publicationDateForResource'],
12
+ ['desc', 'creationDateForResource'],
13
+ ],
9
14
  }
@@ -45,6 +45,7 @@ export abstract class PlatformServiceInterface {
45
45
  thesaurusId: string
46
46
  ): Observable<Keyword[]>
47
47
 
48
+ abstract getFeedbacksAllowed(): Observable<boolean>
48
49
  abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
49
50
  abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
50
51
 
@@ -58,5 +59,4 @@ export abstract class PlatformServiceInterface {
58
59
  removeDuplicate?: boolean
59
60
  ): Observable<UploadEvent>
60
61
  abstract getFileContent(url: URL): Observable<any>
61
- abstract getFeedbacksAllowed(): Observable<boolean>
62
62
  }
@@ -154,4 +154,9 @@ export const elasticLinkFixture = (): Record<string, unknown> => ({
154
154
  name: 'myothertmslayer',
155
155
  url: 'https://my.tms.server/MapServer',
156
156
  },
157
+ stacItems: {
158
+ accessServiceProtocol: 'STAC:Items',
159
+ name: 'stac layer',
160
+ url: ' https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/collections/lidarhd/items',
161
+ },
157
162
  })
@@ -259,4 +259,23 @@ export const aSetOfLinksFixture = () => ({
259
259
  accessServiceProtocol: 'wms',
260
260
  type: 'endpoint',
261
261
  }) as ServiceEndpoint,
262
+ postgisLink: () =>
263
+ ({
264
+ name: 'France_Regions',
265
+ description:
266
+ 'Boundaries for the administrative regions of metropolitan France.',
267
+ url: new URL('http://geo.local:5432/france_demo'),
268
+ type: 'service',
269
+ accessServiceProtocol: 'postgis',
270
+ }) as DatasetServiceDistribution,
271
+ stacLink: () =>
272
+ ({
273
+ name: 'Lidar HD point cloud (COPC)',
274
+ description: 'Lidar HD classified point clouds from IGN',
275
+ url: new URL(
276
+ 'https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/collections/lidarhd/items'
277
+ ),
278
+ type: 'service',
279
+ accessServiceProtocol: 'stac',
280
+ }) as DatasetServiceDistribution,
262
281
  })
@@ -3,3 +3,4 @@ export * from './lib/chart-view/chart-view.component'
3
3
  export * from './lib/figure/figure-container/figure-container.component'
4
4
  export * from './lib/geo-table-view/geo-table-view.component'
5
5
  export * from './lib/table-view/table-view.component'
6
+ export * from './lib/stac-view/stac-view.component'
@@ -108,6 +108,7 @@ export class ChartViewComponent {
108
108
  chartType$ = new BehaviorSubject<InputChartType>('bar')
109
109
 
110
110
  @Input() set userChartConfig(config: DatavizChartConfigModel) {
111
+ if (!config) return
111
112
  this.aggregation$.next(config.aggregation)
112
113
  this.xProperty$.next(config.xProperty)
113
114
  this.yProperty$.next(config.yProperty)
@@ -97,16 +97,27 @@ export class DataService {
97
97
  if (!featureType) {
98
98
  throw new Error('wfs.featuretype.notfound')
99
99
  }
100
+
101
+ const wfsVersion = endpoint.getVersion()
102
+ const addSrsName = wfsVersion === '1.1.0' || wfsVersion === '2.0.0'
103
+ const defaultCrs = featureType.defaultCrs
104
+
105
+ const shouldAddOutputCrs = addSrsName && defaultCrs
106
+
100
107
  return {
101
- all: featureType.outputFormats.reduce(
102
- (prev, curr) => ({
108
+ all: featureType.outputFormats.reduce((prev, curr) => {
109
+ const isJsonFormat = curr.toLowerCase().includes('json')
110
+ return {
103
111
  ...prev,
104
112
  [curr]: endpoint.getFeatureUrl(featureType.name, {
105
113
  outputFormat: curr,
114
+ ...(shouldAddOutputCrs &&
115
+ !isJsonFormat && {
116
+ outputCrs: defaultCrs,
117
+ }),
106
118
  }),
107
- }),
108
- {}
109
- ),
119
+ }
120
+ }, {}),
110
121
  geojson: endpoint.supportsJson(featureType.name)
111
122
  ? endpoint.getFeatureUrl(featureType.name, {
112
123
  asJson: true,
@@ -0,0 +1,40 @@
1
+ <div
2
+ class="w-full h-full flex flex-row mt-6 bg-white border border-gray-300 rounded-lg overflow-hidden"
3
+ >
4
+ <div class="flex-1 flex flex-col">
5
+ <div class="m-8">
6
+ <p class="mb-4" translate>stac.filter.period</p>
7
+ <p translate>stac.filter.from</p>
8
+ <gn-ui-date-picker
9
+ id="start-date-picker"
10
+ [date]="currentTemporalExtent?.start"
11
+ (dateChange)="onStartDateChange($event)"
12
+ />
13
+ <p class="mt-4" translate>stac.filter.to</p>
14
+ <gn-ui-date-picker
15
+ id="end-date-picker"
16
+ [date]="currentTemporalExtent?.end"
17
+ (dateChange)="onEndDateChange($event)"
18
+ />
19
+ </div>
20
+
21
+ <div class="mt-auto mb-8 mx-8" *ngIf="isTemporalFilterModified">
22
+ <button
23
+ id="reset-filters-button"
24
+ type="button"
25
+ class="flex items-center"
26
+ (click)="onResetFilters()"
27
+ >
28
+ <span translate>stac.filter.reset</span>
29
+ <ng-icon
30
+ name="matDeleteOutline"
31
+ class="pointer-events-none ml-2"
32
+ ></ng-icon>
33
+ </button>
34
+ </div>
35
+ </div>
36
+
37
+ <div class="w-[655px] flex-shrink-0 flex items-center justify-center">
38
+ <span>Map...</span>
39
+ </div>
40
+ </div>
@@ -0,0 +1,62 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ Input,
6
+ OnInit,
7
+ } from '@angular/core'
8
+ import {
9
+ DatasetServiceDistribution,
10
+ DatasetTemporalExtent,
11
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
12
+ import { DatePickerComponent } from '../../../../../../libs/ui/inputs/src'
13
+ import { NgIconComponent, provideIcons } from '@ng-icons/core'
14
+ import { matDeleteOutline } from '@ng-icons/material-icons/outline'
15
+ import { TranslateDirective } from '@ngx-translate/core'
16
+
17
+ @Component({
18
+ selector: 'gn-ui-stac-view',
19
+ templateUrl: './stac-view.component.html',
20
+ styleUrls: ['./stac-view.component.css'],
21
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
+ standalone: true,
23
+ imports: [
24
+ CommonModule,
25
+ DatePickerComponent,
26
+ NgIconComponent,
27
+ TranslateDirective,
28
+ ],
29
+ viewProviders: [provideIcons({ matDeleteOutline })],
30
+ })
31
+ export class StacViewComponent implements OnInit {
32
+ @Input() link: DatasetServiceDistribution
33
+ @Input() initialTemporalExtent: DatasetTemporalExtent | null
34
+
35
+ currentTemporalExtent: DatasetTemporalExtent | null = null
36
+ isTemporalFilterModified = false
37
+
38
+ onStartDateChange(date: Date) {
39
+ this.currentTemporalExtent = {
40
+ ...this.currentTemporalExtent,
41
+ start: date,
42
+ }
43
+ this.isTemporalFilterModified = true
44
+ }
45
+
46
+ onEndDateChange(date: Date) {
47
+ this.currentTemporalExtent = {
48
+ ...this.currentTemporalExtent,
49
+ end: date,
50
+ }
51
+ this.isTemporalFilterModified = true
52
+ }
53
+
54
+ onResetFilters() {
55
+ this.currentTemporalExtent = this.initialTemporalExtent
56
+ this.isTemporalFilterModified = false
57
+ }
58
+
59
+ ngOnInit() {
60
+ this.currentTemporalExtent = this.initialTemporalExtent
61
+ }
62
+ }
@@ -12,7 +12,7 @@ import { MdViewFacade } from '../state'
12
12
  import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
13
13
  import { CommonModule } from '@angular/common'
14
14
  import { TranslatePipe } from '@ngx-translate/core'
15
- import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
15
+ import { GEONETWORK_UI_TAG_NAME, PROXY_PATH } from '../../../../../../libs/util/shared/src'
16
16
 
17
17
  export const WEB_COMPONENT_EMBEDDER_URL = new InjectionToken<string>(
18
18
  'webComponentEmbedderUrl'
@@ -60,6 +60,9 @@ export class DataViewPermalinkComponent {
60
60
  url.searchParams.append('e', `gn-dataset-view-map`)
61
61
  }
62
62
  url.searchParams.append('a', `api-url=${this.config.basePath}`)
63
+ if (this.proxyPath) {
64
+ url.searchParams.append('a', `proxy-path=${this.proxyPath}`)
65
+ }
63
66
  url.searchParams.append('a', `dataset-id=${metadata.uniqueIdentifier}`)
64
67
  url.searchParams.append('a', `primary-color=#0f4395`)
65
68
  url.searchParams.append('a', `secondary-color=#8bc832`)
@@ -72,6 +75,9 @@ export class DataViewPermalinkComponent {
72
75
  constructor(
73
76
  @Inject(Configuration) private config: Configuration,
74
77
  @Optional()
78
+ @Inject(PROXY_PATH)
79
+ private proxyPath: string,
80
+ @Optional()
75
81
  @Inject(WEB_COMPONENT_EMBEDDER_URL)
76
82
  protected wcEmbedderBaseUrl: string,
77
83
  private facade: MdViewFacade
@@ -3,6 +3,7 @@ import {
3
3
  Component,
4
4
  Inject,
5
5
  Input,
6
+ Optional,
6
7
  } from '@angular/core'
7
8
  import { Configuration } from '../../../../../../libs/data-access/gn4/src'
8
9
  import { MdViewFacade } from '../state'
@@ -10,7 +11,7 @@ import { BehaviorSubject, combineLatest, map } from 'rxjs'
10
11
  import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
11
12
  import { CommonModule } from '@angular/common'
12
13
  import { TranslatePipe } from '@ngx-translate/core'
13
- import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
14
+ import { GEONETWORK_UI_TAG_NAME, PROXY_PATH } from '../../../../../../libs/util/shared/src'
14
15
 
15
16
  @Component({
16
17
  selector: 'gn-ui-data-view-web-component',
@@ -42,7 +43,12 @@ export class DataViewWebComponentComponent {
42
43
  api-url="${new URL(
43
44
  this.config.basePath,
44
45
  window.location.origin
45
- ).toString()}"
46
+ ).toString()}"${
47
+ this.proxyPath
48
+ ? `
49
+ proxy-path="${this.proxyPath}"`
50
+ : ''
51
+ }
46
52
  dataset-id="${metadata.uniqueIdentifier}"
47
53
  aggregation="${aggregation}"
48
54
  x-property="${xProperty}"
@@ -65,7 +71,12 @@ export class DataViewWebComponentComponent {
65
71
  api-url="${new URL(
66
72
  this.config.basePath,
67
73
  window.location.origin
68
- ).toString()}"
74
+ ).toString()}"${
75
+ this.proxyPath
76
+ ? `
77
+ proxy-path="${this.proxyPath}"`
78
+ : ''
79
+ }
69
80
  dataset-id="${metadata.uniqueIdentifier}"
70
81
  primary-color="#0f4395"
71
82
  secondary-color="#8bc832"
@@ -82,7 +93,12 @@ export class DataViewWebComponentComponent {
82
93
  api-url="${new URL(
83
94
  this.config.basePath,
84
95
  window.location.origin
85
- ).toString()}"
96
+ ).toString()}"${
97
+ this.proxyPath
98
+ ? `
99
+ proxy-path="${this.proxyPath}"`
100
+ : ''
101
+ }
86
102
  dataset-id="${metadata.uniqueIdentifier}"
87
103
  primary-color="#0f4395"
88
104
  secondary-color="#8bc832"
@@ -97,6 +113,9 @@ export class DataViewWebComponentComponent {
97
113
 
98
114
  constructor(
99
115
  @Inject(Configuration) private config: Configuration,
116
+ @Optional()
117
+ @Inject(PROXY_PATH)
118
+ private proxyPath: string,
100
119
  private facade: MdViewFacade
101
120
  ) {}
102
121
  }
@@ -114,6 +114,7 @@ export class MapViewComponent implements AfterViewInit {
114
114
  _styleFromConfig = null
115
115
 
116
116
  linkMap: Map<string, DatasetOnlineResource> = new Map()
117
+ // FIXME the map view component should not need a selectedView
117
118
  @Input() set selectedView(value: string) {
118
119
  this.selectedView$.next(value)
119
120
  }
@@ -20,7 +20,7 @@ import {
20
20
  } from '../../../../../../libs/common/domain/src/lib/model/record'
21
21
  import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
22
22
  import { OgcApiRecord } from '@camptocamp/ogc-client'
23
- import { from, of, Observable } from 'rxjs'
23
+ import { from, of } from 'rxjs'
24
24
  import { DataService } from '../../../../../../libs/feature/dataviz/src'
25
25
 
26
26
  @Injectable()
@@ -105,6 +105,16 @@ export class MdViewFacade {
105
105
  shareReplay(1)
106
106
  )
107
107
 
108
+ stacLinks$ = this.allLinks$.pipe(
109
+ map((links) =>
110
+ links.filter(
111
+ (link) =>
112
+ link.type === 'service' && link.accessServiceProtocol === 'stac'
113
+ )
114
+ ),
115
+ shareReplay(1)
116
+ )
117
+
108
118
  downloadLinks$ = this.allLinks$.pipe(
109
119
  map((links) =>
110
120
  links.filter((link) =>
@@ -8,6 +8,10 @@ import {
8
8
  } from '.'
9
9
  import { Router, Routes } from '@angular/router'
10
10
  import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
11
+ import {
12
+ SortByEnum,
13
+ SortByField,
14
+ } from '../../../../../../libs/common/domain/src/lib/model/search'
11
15
 
12
16
  @Injectable({
13
17
  providedIn: 'root',
@@ -58,4 +62,8 @@ export class RouterService {
58
62
  getOrganizationPageRoute(): string {
59
63
  return ROUTER_ROUTE_ORGANIZATION
60
64
  }
65
+
66
+ getDefaultSort(): SortByField {
67
+ return SortByEnum.RESOURCE_DATES
68
+ }
61
69
  }