geonetwork-ui 2.4.0-dev.e1bb65c4 → 2.4.0-dev.e4dc8777

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 (144) hide show
  1. package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.mjs +2 -1
  2. package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +3 -1
  3. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +2 -2
  4. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +9 -5
  5. package/esm2022/libs/common/domain/src/lib/model/record/organization.model.mjs +1 -1
  6. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  7. package/esm2022/libs/data-access/gn4/src/openapi/model/user.api.model.mjs +1 -1
  8. package/esm2022/libs/feature/catalog/src/index.mjs +2 -1
  9. package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +1 -1
  10. package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +6 -6
  11. package/esm2022/libs/feature/catalog/src/lib/organization-url.token.mjs +4 -0
  12. package/esm2022/libs/feature/catalog/src/lib/records/records.service.mjs +4 -6
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +4 -2
  14. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +6 -3
  15. package/esm2022/libs/feature/router/src/lib/default/constants.mjs +2 -1
  16. package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
  17. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +9 -2
  18. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +8 -1
  19. package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
  20. package/esm2022/libs/feature/search/src/lib/state/selectors.mjs +4 -1
  21. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +7 -3
  22. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +5 -5
  23. package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +5 -2
  24. package/esm2022/libs/ui/dataviz/src/lib/figure/figure.component.mjs +5 -8
  25. package/esm2022/libs/ui/elements/src/index.mjs +1 -2
  26. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  27. package/esm2022/libs/ui/elements/src/lib/error/error.component.mjs +5 -3
  28. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +4 -4
  29. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +24 -5
  30. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +7 -9
  31. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  32. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +71 -0
  33. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +1 -1
  34. package/esm2022/translations/de.json +25 -4
  35. package/esm2022/translations/en.json +25 -4
  36. package/esm2022/translations/es.json +25 -4
  37. package/esm2022/translations/fr.json +26 -5
  38. package/esm2022/translations/it.json +25 -4
  39. package/esm2022/translations/nl.json +25 -4
  40. package/esm2022/translations/pt.json +25 -4
  41. package/fesm2022/geonetwork-ui.mjs +338 -136
  42. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  43. package/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.d.ts.map +1 -1
  44. package/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.d.ts.map +1 -1
  45. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -1
  46. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  47. package/libs/common/domain/src/lib/model/record/organization.model.d.ts +1 -0
  48. package/libs/common/domain/src/lib/model/record/organization.model.d.ts.map +1 -1
  49. package/libs/common/domain/src/lib/platform.service.interface.d.ts +2 -1
  50. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  51. package/libs/data-access/gn4/src/openapi/model/user.api.model.d.ts +1 -1
  52. package/libs/feature/catalog/src/index.d.ts +1 -0
  53. package/libs/feature/catalog/src/index.d.ts.map +1 -1
  54. package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +1 -1
  55. package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts.map +1 -1
  56. package/libs/feature/catalog/src/lib/organization-url.token.d.ts +3 -0
  57. package/libs/feature/catalog/src/lib/organization-url.token.d.ts.map +1 -0
  58. package/libs/feature/catalog/src/lib/records/records.service.d.ts.map +1 -1
  59. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
  60. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  61. package/libs/feature/router/src/lib/default/constants.d.ts +1 -0
  62. package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
  63. package/libs/feature/router/src/lib/default/router.config.d.ts +1 -0
  64. package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
  65. package/libs/feature/router/src/lib/default/router.service.d.ts +1 -0
  66. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  67. package/libs/feature/router/src/lib/default/state/router.facade.d.ts +1 -0
  68. package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
  69. package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -0
  70. package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
  71. package/libs/feature/search/src/lib/state/selectors.d.ts +1 -0
  72. package/libs/feature/search/src/lib/state/selectors.d.ts.map +1 -1
  73. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  74. package/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.d.ts +2 -2
  75. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts +2 -1
  76. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts.map +1 -1
  77. package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts +1 -2
  78. package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts.map +1 -1
  79. package/libs/ui/elements/src/index.d.ts +0 -1
  80. package/libs/ui/elements/src/index.d.ts.map +1 -1
  81. package/libs/ui/elements/src/lib/error/error.component.d.ts +3 -1
  82. package/libs/ui/elements/src/lib/error/error.component.d.ts.map +1 -1
  83. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +5 -1
  84. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  85. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +19 -19
  86. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  87. package/libs/ui/layout/src/index.d.ts +1 -0
  88. package/libs/ui/layout/src/index.d.ts.map +1 -1
  89. package/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.d.ts +2 -2
  90. package/libs/ui/layout/src/lib/max-lines/max-lines.component.d.ts.map +1 -0
  91. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  92. package/package.json +1 -1
  93. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +1 -0
  94. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +3 -1
  95. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +1 -1
  96. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +26 -15
  97. package/src/libs/common/domain/src/lib/model/record/organization.model.ts +1 -0
  98. package/src/libs/common/domain/src/lib/platform.service.interface.ts +5 -1
  99. package/src/libs/common/fixtures/src/lib/organisations.fixture.ts +28 -0
  100. package/src/libs/data-access/datafeeder/src/openapi/model/datasetMetadata.api.model.ts +4 -0
  101. package/src/libs/data-access/datafeeder/src/openapi/model/datasetUploadStatus.api.model.ts +2 -0
  102. package/src/libs/data-access/gn4/src/openapi/model/user.api.model.ts +1 -1
  103. package/src/libs/feature/catalog/src/index.ts +1 -0
  104. package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +0 -1
  105. package/src/libs/feature/catalog/src/lib/organisations/organisations.component.html +1 -1
  106. package/src/libs/feature/catalog/src/lib/organisations/organisations.component.ts +2 -2
  107. package/src/libs/feature/catalog/src/lib/organization-url.token.ts +6 -0
  108. package/src/libs/feature/catalog/src/lib/records/records.service.ts +6 -8
  109. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +8 -6
  110. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +6 -2
  111. package/src/libs/feature/router/src/lib/default/constants.ts +1 -0
  112. package/src/libs/feature/router/src/lib/default/router.config.ts +1 -0
  113. package/src/libs/feature/router/src/lib/default/router.service.ts +13 -1
  114. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +9 -1
  115. package/src/libs/feature/search/src/lib/state/search.facade.ts +5 -0
  116. package/src/libs/feature/search/src/lib/state/selectors.ts +7 -0
  117. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +16 -2
  118. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +8 -6
  119. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.ts +2 -2
  120. package/src/libs/ui/catalog/src/lib/ui-catalog.module.ts +2 -0
  121. package/src/libs/ui/dataviz/src/lib/figure/figure.component.html +11 -3
  122. package/src/libs/ui/dataviz/src/lib/figure/figure.component.ts +3 -7
  123. package/src/libs/ui/elements/src/index.ts +0 -1
  124. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +29 -29
  125. package/src/libs/ui/elements/src/lib/error/error.component.html +30 -6
  126. package/src/libs/ui/elements/src/lib/error/error.component.ts +2 -0
  127. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
  128. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +22 -1
  129. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +2 -4
  130. package/src/libs/ui/layout/src/index.ts +1 -0
  131. package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.html +1 -0
  132. package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.ts +9 -5
  133. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -1
  134. package/translations/de.json +25 -4
  135. package/translations/en.json +25 -4
  136. package/translations/es.json +25 -4
  137. package/translations/fr.json +26 -5
  138. package/translations/it.json +25 -4
  139. package/translations/nl.json +25 -4
  140. package/translations/pt.json +25 -4
  141. package/translations/sk.json +26 -5
  142. package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +0 -69
  143. package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +0 -1
  144. /package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.css +0 -0
@@ -5,7 +5,6 @@ import {
5
5
  MeApiService,
6
6
  RegistriesApiService,
7
7
  SiteApiService,
8
- ThesaurusInfoApiModel,
9
8
  ToolsApiService,
10
9
  UserfeedbackApiService,
11
10
  UsersApiService,
@@ -25,6 +24,7 @@ import {
25
24
  KeywordApiResponse,
26
25
  ThesaurusApiResponse,
27
26
  } from '../../../../../../../libs/api/metadata-converter/src'
27
+ import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
28
28
 
29
29
  const minApiVersion = '4.2.2'
30
30
 
@@ -146,25 +146,36 @@ export class Gn4PlatformService implements PlatformServiceInterface {
146
146
  )
147
147
  .pipe(
148
148
  map((thesaurus) => {
149
- // FIXME: find a better way to exclude place keywords
150
- // thesaurus[0].filter((thes) => thes.dname !== 'place')
151
149
  return thesaurus[0] as ThesaurusApiResponse[]
152
150
  }),
153
151
  shareReplay(1)
154
152
  )
155
153
 
156
- searchKeywords(query: string): Observable<Keyword[]> {
157
- const keywords$: Observable<KeywordApiResponse[]> =
158
- this.registriesApiService.searchKeywords(
159
- query,
160
- this.langService.iso3,
161
- 10,
162
- 0,
163
- null,
164
- null,
165
- null,
166
- `*${query}*`
167
- ) as Observable<KeywordApiResponse[]>
154
+ searchKeywords(
155
+ query: string,
156
+ keywordTypes: KeywordType[]
157
+ ): Observable<Keyword[]> {
158
+ const keywords$: Observable<KeywordApiResponse[]> = this.allThesaurus$.pipe(
159
+ switchMap((thesaurus) => {
160
+ const selectedThesauri = []
161
+ keywordTypes.map((keywordType) => {
162
+ selectedThesauri.push(
163
+ ...thesaurus.filter((thes) => thes.dname === keywordType)
164
+ )
165
+ })
166
+
167
+ return this.registriesApiService.searchKeywords(
168
+ query,
169
+ this.langService.iso3,
170
+ 10,
171
+ 0,
172
+ null,
173
+ selectedThesauri.map((thes) => thes.key),
174
+ null,
175
+ `*${query}*`
176
+ ) as Observable<KeywordApiResponse[]>
177
+ })
178
+ )
168
179
 
169
180
  return combineLatest([keywords$, this.allThesaurus$]).pipe(
170
181
  map(([keywords, thesaurus]) => {
@@ -1,5 +1,6 @@
1
1
  export interface Organization {
2
2
  name: string
3
+ email?: string
3
4
  description?: string
4
5
  website?: URL
5
6
  logoUrl?: URL
@@ -2,6 +2,7 @@ import type { Observable } from 'rxjs'
2
2
  import type { UserModel } from './model/user/user.model'
3
3
  import type { Organization } from './model/record/organization.model'
4
4
  import { Keyword, UserFeedback } from './model/record'
5
+ import { KeywordType } from './model/thesaurus'
5
6
 
6
7
  export abstract class PlatformServiceInterface {
7
8
  abstract getType(): string
@@ -15,7 +16,10 @@ export abstract class PlatformServiceInterface {
15
16
  ): Observable<UserModel[]>
16
17
  abstract getOrganizations(): Observable<Organization[]>
17
18
  abstract translateKey(key: string): Observable<string>
18
- abstract searchKeywords(query: string): Observable<Keyword[]>
19
+ abstract searchKeywords(
20
+ query: string,
21
+ keywordTypes: KeywordType[]
22
+ ): Observable<Keyword[]>
19
23
  abstract getKeywordsByUri(uri: string): Observable<Keyword[]>
20
24
  abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
21
25
  abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
@@ -5,84 +5,112 @@ export const ORGANISATIONS_FIXTURE: Organization[] = deepFreeze([
5
5
  {
6
6
  name: 'I Data Org',
7
7
  description: 'one org for testing',
8
+ email: 'test@gmail.com',
9
+ website: new URL('https://my-geonetwork.org/'),
8
10
  logoUrl: new URL('https://my-geonetwork.org/logo1.png'),
9
11
  recordCount: 12,
10
12
  },
11
13
  {
12
14
  name: 'H Data Org',
13
15
  description: 'another org for testing',
16
+ email: 'test@gmail.com',
17
+ website: new URL('https://my-geonetwork.org/'),
14
18
  logoUrl: new URL('https://my-geonetwork.org/logo2.png'),
15
19
  recordCount: 15,
16
20
  },
17
21
  {
18
22
  name: 'J Data Org',
19
23
  description: 'another org for testing',
24
+ email: 'test@gmail.com',
25
+ website: new URL('https://my-geonetwork.org/'),
20
26
  logoUrl: new URL('https://my-geonetwork.org/logo3.png'),
21
27
  recordCount: 6,
22
28
  },
23
29
  {
24
30
  name: 'G Data Org',
25
31
  description: 'another org for testing',
32
+ email: 'test@gmail.com',
33
+ website: new URL('https://my-geonetwork.org/'),
26
34
  logoUrl: new URL('https://my-geonetwork.org/logo4.png'),
27
35
  recordCount: 8,
28
36
  },
29
37
  {
30
38
  name: 'B Data Org',
31
39
  description: 'another org for testing',
40
+ email: 'test@gmail.com',
41
+ website: new URL('https://my-geonetwork.org/'),
32
42
  logoUrl: new URL('https://my-geonetwork.org/logo5.png'),
33
43
  recordCount: 2,
34
44
  },
35
45
  {
36
46
  name: 'D Data Org',
37
47
  description: 'another org for testing',
48
+ email: 'test@gmail.com',
49
+ website: new URL('https://my-geonetwork.org/'),
38
50
  logoUrl: new URL('https://my-geonetwork.org/logo6.png'),
39
51
  recordCount: 17,
40
52
  },
41
53
  {
42
54
  name: 'F Data Org',
43
55
  description: 'another org for testing',
56
+ email: 'test@gmail.com',
57
+ website: new URL('https://my-geonetwork.org/'),
44
58
  logoUrl: new URL('https://my-geonetwork.org/logo7.png'),
45
59
  recordCount: 14,
46
60
  },
47
61
  {
48
62
  name: 'A Data Org',
49
63
  description: 'another org for testing',
64
+ email: 'test@gmail.com',
65
+ website: new URL('https://my-geonetwork.org/'),
50
66
  logoUrl: new URL('https://my-geonetwork.org/logo8.png'),
51
67
  recordCount: 3,
52
68
  },
53
69
  {
54
70
  name: 'C Data Org',
55
71
  description: 'another org for testing',
72
+ email: 'test@gmail.com',
73
+ website: new URL('https://my-geonetwork.org/'),
56
74
  logoUrl: new URL('https://my-geonetwork.org/logo9.png'),
57
75
  recordCount: 9,
58
76
  },
59
77
  {
60
78
  name: 'E Data Org',
61
79
  description: 'another org for testing',
80
+ email: 'test@gmail.com',
81
+ website: new URL('https://my-geonetwork.org/'),
62
82
  logoUrl: new URL('https://my-geonetwork.org/logo10.png'),
63
83
  recordCount: 1,
64
84
  },
65
85
  {
66
86
  name: 'é Data Org',
67
87
  description: 'another org for testing',
88
+ email: 'test@gmail.com',
89
+ website: new URL('https://my-geonetwork.org/'),
68
90
  logoUrl: new URL('https://my-geonetwork.org/logo10.png'),
69
91
  recordCount: 2,
70
92
  },
71
93
  {
72
94
  name: 'wizard-org',
73
95
  description: 'another org for testing',
96
+ email: 'test@gmail.com',
97
+ website: new URL('https://my-geonetwork.org/'),
74
98
  logoUrl: new URL('https://my-geonetwork.org/logo11.png'),
75
99
  recordCount: 2,
76
100
  },
77
101
  {
78
102
  name: "Université de l'Ingénierie",
79
103
  description: 'another org for testing',
104
+ email: 'test@gmail.com',
105
+ website: new URL('https://my-geonetwork.org/'),
80
106
  logoUrl: new URL('https://my-geonetwork.org/logo12.png'),
81
107
  recordCount: 2,
82
108
  },
83
109
  {
84
110
  name: 'ARS / Agence régionale de santé',
85
111
  description: 'another org for testing',
112
+ email: 'test@gmail.com',
113
+ website: new URL('https://my-geonetwork.org/'),
86
114
  logoUrl: new URL('https://my-geonetwork.org/logo12.png'),
87
115
  recordCount: 2,
88
116
  },
@@ -38,4 +38,8 @@ export interface DatasetMetadataApiModel {
38
38
  * textual description of dataset lineage
39
39
  */
40
40
  creationProcessDescription?: string
41
+ /**
42
+ * Optional, additional options for the dataset
43
+ */
44
+ options: any
41
45
  }
@@ -34,4 +34,6 @@ export interface DatasetUploadStatusApiModel {
34
34
  * detected charset
35
35
  */
36
36
  encoding?: string
37
+ format?: 'CSV' | 'SHAPEFILE'
38
+ options?: any
37
39
  }
@@ -21,7 +21,7 @@ export interface UserApiModel {
21
21
  emailAddresses?: Set<string>
22
22
  addresses?: Set<AddressApiModel>
23
23
  primaryAddress?: AddressApiModel
24
- organisation?: string
24
+ organization?: string
25
25
  kind?: string
26
26
  lastLoginDate?: string
27
27
  authorities?: Array<GrantedAuthorityApiModel>
@@ -1,4 +1,5 @@
1
1
  export * from './lib/feature-catalog.module'
2
+ export * from './lib/organization-url.token'
2
3
  export * from './lib/sources/sources.service'
3
4
  export * from './lib/sources/sources.model'
4
5
  export * from './lib/records/records.service'
@@ -4,7 +4,6 @@ import { UiCatalogModule } from '../../../../../libs/ui/catalog/src'
4
4
  import {
5
5
  GroupsApiService,
6
6
  SearchApiService,
7
- SiteApiService,
8
7
  } from '../../../../../libs/data-access/gn4/src'
9
8
  import { CommonModule } from '@angular/common'
10
9
  import { SourceLabelComponent } from './source-label/source-label.component'
@@ -19,7 +19,7 @@
19
19
  [showContent]="!!organisation.name"
20
20
  >
21
21
  <gn-ui-organisation-preview
22
- [organisation]="organisation"
22
+ [organization]="organisation"
23
23
  [organisationUrl]="getOrganisationUrl(organisation)"
24
24
  (clickedOrganisation)="orgSelect.emit($event)"
25
25
  ></gn-ui-organisation-preview>
@@ -10,10 +10,10 @@ import {
10
10
  import { Organization } from '../../../../../../libs/common/domain/src/lib/model/record'
11
11
  import { BehaviorSubject, combineLatest, Observable } from 'rxjs'
12
12
  import { map, startWith, tap } from 'rxjs/operators'
13
- import { ORGANIZATION_URL_TOKEN } from '../feature-catalog.module'
14
13
  import { OrganizationsServiceInterface } from '../../../../../../libs/common/domain/src/lib/organizations.service.interface'
15
14
  import { SortByField } from '../../../../../../libs/common/domain/src/lib/model/search'
16
15
  import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
16
+ import { ORGANIZATION_PAGE_URL_TOKEN } from '../organization-url.token'
17
17
 
18
18
  @Component({
19
19
  selector: 'gn-ui-organisations',
@@ -28,7 +28,7 @@ export class OrganisationsComponent {
28
28
  constructor(
29
29
  private organisationsService: OrganizationsServiceInterface,
30
30
  @Optional()
31
- @Inject(ORGANIZATION_URL_TOKEN)
31
+ @Inject(ORGANIZATION_PAGE_URL_TOKEN)
32
32
  private urlTemplate: string
33
33
  ) {}
34
34
 
@@ -0,0 +1,6 @@
1
+ import { InjectionToken } from '@angular/core'
2
+
3
+ // expects the replacement key ${name}
4
+ export const ORGANIZATION_PAGE_URL_TOKEN = new InjectionToken<string>(
5
+ 'organization-page-url-token'
6
+ )
@@ -1,18 +1,16 @@
1
1
  import { Injectable } from '@angular/core'
2
- import { Observable, of } from 'rxjs'
3
- import { catchError, shareReplay } from 'rxjs/operators'
2
+ import { Observable, of, switchMap } from 'rxjs'
3
+ import { shareReplay } from 'rxjs/operators'
4
4
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
5
5
 
6
6
  @Injectable({
7
7
  providedIn: 'root',
8
8
  })
9
9
  export class RecordsService {
10
- recordsCount$: Observable<number> = this.recordsRepository
11
- .getMatchesCount({})
12
- .pipe(
13
- shareReplay(1),
14
- catchError(() => of(0))
15
- )
10
+ recordsCount$: Observable<number> = of(true).pipe(
11
+ switchMap(() => this.recordsRepository.getMatchesCount({})),
12
+ shareReplay(1)
13
+ )
16
14
 
17
15
  constructor(private recordsRepository: RecordsRepositoryInterface) {}
18
16
  }
@@ -35,13 +35,15 @@ export class FormFieldKeywordsComponent {
35
35
  }
36
36
 
37
37
  autoCompleteAction = (query: string) => {
38
- return this.platformService.searchKeywords(query).pipe(
39
- map((keywords) =>
40
- keywords.map((keyword) => {
41
- return { title: keyword.label, value: keyword }
42
- })
38
+ return this.platformService
39
+ .searchKeywords(query, ['temporal', 'theme', 'other'])
40
+ .pipe(
41
+ map((keywords) =>
42
+ keywords.map((keyword) => {
43
+ return { title: keyword.label, value: keyword }
44
+ })
45
+ )
43
46
  )
44
- )
45
47
  }
46
48
 
47
49
  constructor(private platformService: PlatformServiceInterface) {}
@@ -1,11 +1,11 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { select, Store } from '@ngrx/store'
3
3
  import {
4
+ catchError,
4
5
  defaultIfEmpty,
5
6
  filter,
6
7
  map,
7
8
  mergeMap,
8
- scan,
9
9
  switchMap,
10
10
  toArray,
11
11
  } from 'rxjs/operators'
@@ -119,7 +119,11 @@ export class MdViewFacade {
119
119
  ? link
120
120
  : null
121
121
  }),
122
- defaultIfEmpty(null)
122
+ defaultIfEmpty(null),
123
+ catchError((e) => {
124
+ console.error(e)
125
+ return of(null)
126
+ })
123
127
  )
124
128
  } else {
125
129
  return of(link)
@@ -2,6 +2,7 @@ export const ROUTER_STATE_KEY = 'router'
2
2
 
3
3
  export const ROUTER_ROUTE_SEARCH = 'search'
4
4
  export const ROUTER_ROUTE_DATASET = 'dataset'
5
+ export const ROUTER_ROUTE_ORGANIZATION = 'organization'
5
6
 
6
7
  export enum ROUTE_PARAMS {
7
8
  SORT = '_sort',
@@ -4,6 +4,7 @@ export interface RouterConfigModel {
4
4
  searchStateId: string
5
5
  searchRouteComponent: Type<any>
6
6
  recordRouteComponent: Type<any>
7
+ organizationRouteComponent: Type<any>
7
8
  }
8
9
 
9
10
  export const ROUTER_CONFIG = new InjectionToken<RouterConfigModel>(
@@ -1,5 +1,9 @@
1
1
  import { Inject, Injectable } from '@angular/core'
2
- import { ROUTER_ROUTE_DATASET, ROUTER_ROUTE_SEARCH } from '.'
2
+ import {
3
+ ROUTER_ROUTE_DATASET,
4
+ ROUTER_ROUTE_ORGANIZATION,
5
+ ROUTER_ROUTE_SEARCH,
6
+ } from '.'
3
7
  import { Router, Routes } from '@angular/router'
4
8
  import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
5
9
 
@@ -30,10 +34,18 @@ export class RouterService {
30
34
  path: `${ROUTER_ROUTE_DATASET}/:metadataUuid`,
31
35
  component: this.routerConfig.recordRouteComponent,
32
36
  },
37
+ {
38
+ path: `${ROUTER_ROUTE_ORGANIZATION}/:name`,
39
+ component: this.routerConfig.organizationRouteComponent,
40
+ },
33
41
  ]
34
42
  }
35
43
 
36
44
  getSearchRoute(): string {
37
45
  return ROUTER_ROUTE_SEARCH
38
46
  }
47
+
48
+ getOrganizationPageRoute(): string {
49
+ return ROUTER_ROUTE_ORGANIZATION
50
+ }
39
51
  }
@@ -3,7 +3,7 @@ import { MdViewActions } from '../../../../../../../libs/feature/record/src'
3
3
  import { RouterService } from '../router.service'
4
4
  import { RouterReducerState } from '@ngrx/router-store'
5
5
  import { select, Store } from '@ngrx/store'
6
- import { distinctUntilChanged, filter, map, take } from 'rxjs/operators'
6
+ import { distinctUntilChanged, filter, map, take, tap } from 'rxjs/operators'
7
7
  import {
8
8
  ROUTER_ROUTE_DATASET,
9
9
  ROUTER_ROUTE_SEARCH,
@@ -51,6 +51,14 @@ export class RouterFacade {
51
51
  })
52
52
  }
53
53
 
54
+ goToOrganization(organizationName: string) {
55
+ const path = `${this.routerService.getOrganizationPageRoute()}/${organizationName}`
56
+ this.go({
57
+ path,
58
+ queryParamsHandling: '',
59
+ })
60
+ }
61
+
54
62
  updateSearch(query?: SearchRouteParams) {
55
63
  this.go({
56
64
  path: this.routerService.getSearchRoute(),
@@ -37,6 +37,7 @@ import {
37
37
  getSearchResultsLoading,
38
38
  getSearchSortBy,
39
39
  getSpatialFilterEnabled,
40
+ isBeginningOfResults,
40
41
  isEndOfResults,
41
42
  totalPages,
42
43
  } from './selectors'
@@ -58,6 +59,7 @@ export class SearchFacade {
58
59
  layout$: Observable<string>
59
60
  sortBy$: Observable<SortByField>
60
61
  isLoading$: Observable<boolean>
62
+ isBeginningOfResults$: Observable<boolean>
61
63
  isEndOfResults$: Observable<boolean>
62
64
  totalPages$: Observable<number>
63
65
  currentPage$: Observable<number>
@@ -98,6 +100,9 @@ export class SearchFacade {
98
100
  this.isLoading$ = this.store.pipe(select(getSearchResultsLoading, searchId))
99
101
  this.searchFilters$ = this.store.pipe(select(getSearchFilters, searchId))
100
102
  this.resultsHits$ = this.store.pipe(select(getSearchResultsHits, searchId))
103
+ this.isBeginningOfResults$ = this.store.pipe(
104
+ select(isBeginningOfResults, searchId)
105
+ )
101
106
  this.isEndOfResults$ = this.store.pipe(select(isEndOfResults, searchId))
102
107
  this.totalPages$ = this.store.pipe(select(totalPages, searchId))
103
108
  this.currentPage$ = this.store.pipe(select(currentPage, searchId))
@@ -50,6 +50,13 @@ export const getSearchResultsHits = createSelector(
50
50
  (state: SearchStateSearch) => state.results.count
51
51
  )
52
52
 
53
+ export const isBeginningOfResults = createSelector(
54
+ getSearchStateSearch,
55
+ (state: SearchStateSearch) => {
56
+ return state.params.currentPage === 0
57
+ }
58
+ )
59
+
53
60
  export const isEndOfResults = createSelector(
54
61
  getSearchStateSearch,
55
62
  (state: SearchStateSearch) => {
@@ -25,19 +25,21 @@ marker('search.filters.keyword')
25
25
  marker('search.filters.isSpatial')
26
26
  marker('search.filters.license')
27
27
  marker('search.filters.publicationYear')
28
- marker('search.filters.publisher')
28
+ marker('search.filters.organization')
29
29
  marker('search.filters.representationType')
30
30
  marker('search.filters.resourceType')
31
31
  marker('search.filters.standard')
32
32
  marker('search.filters.topic')
33
33
  marker('search.filters.contact')
34
+ marker('search.filters.producerOrg')
35
+ marker('search.filters.publisherOrg')
34
36
 
35
37
  @Injectable({
36
38
  providedIn: 'root',
37
39
  })
38
40
  export class FieldsService {
39
41
  protected fields = {
40
- publisher: new OrganizationSearchField(this.injector),
42
+ organization: new OrganizationSearchField(this.injector),
41
43
  format: new SimpleSearchField('format', this.injector, 'asc'),
42
44
  resourceType: new TranslatedSearchField(
43
45
  'resourceType',
@@ -70,6 +72,18 @@ export class FieldsService {
70
72
  q: new FullTextSearchField(),
71
73
  license: new LicenseSearchField(this.injector),
72
74
  owner: new OwnerSearchField(this.injector),
75
+ producerOrg: new MultilingualSearchField(
76
+ 'originatorOrgForResourceObject',
77
+ this.injector,
78
+ 'asc',
79
+ 'key'
80
+ ),
81
+ publisherOrg: new MultilingualSearchField(
82
+ 'distributorOrgForResourceObject',
83
+ this.injector,
84
+ 'asc',
85
+ 'key'
86
+ ),
73
87
  } as Record<string, AbstractSearchField>
74
88
 
75
89
  get supportedFields() {
@@ -1,14 +1,14 @@
1
1
  <a href (click)="clickOrganisation($event)" [attr.href]="organisationUrl">
2
2
  <div
3
3
  class="group cursor-pointer rounded-lg h-full flex flex-col"
4
- [title]="organisation.name"
4
+ [title]="organization.name"
5
5
  >
6
6
  <div
7
7
  class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
8
8
  >
9
9
  <gn-ui-thumbnail
10
10
  class="relative h-full w-full"
11
- [thumbnailUrl]="organisation.logoUrl"
11
+ [thumbnailUrl]="organization.logoUrl"
12
12
  [fit]="'contain'"
13
13
  >
14
14
  </gn-ui-thumbnail>
@@ -18,22 +18,24 @@
18
18
  class="shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
19
19
  data-cy="organizationName"
20
20
  >
21
- {{ organisation.name }}</span
21
+ {{ organization.name }}</span
22
22
  >
23
23
  <p
24
24
  class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 grow shrink-1 overflow-hidden"
25
25
  data-cy="organizationDesc"
26
26
  >
27
- {{ organisation.description }}
27
+ {{ organization.description }}
28
28
  </p>
29
29
  <div class="shrink-0 text-primary opacity-50 flex leading-6">
30
30
  <mat-icon class="material-symbols-outlined text-primary opacity-50 mr-1"
31
31
  >folder_open
32
32
  </mat-icon>
33
33
  <span class="mx-1" data-cy="organizationRecordsCount">{{
34
- organisation.recordCount
34
+ organization.recordCount
35
35
  }}</span>
36
- <span translate>record.metadata.publications</span>
36
+ <span translate [translateParams]="{ count: organization.recordCount }"
37
+ >record.metadata.publications</span
38
+ >
37
39
  </div>
38
40
  </div>
39
41
  </div>
@@ -14,12 +14,12 @@ import { Organization } from '../../../../../../libs/common/domain/src/lib/model
14
14
  changeDetection: ChangeDetectionStrategy.OnPush,
15
15
  })
16
16
  export class OrganisationPreviewComponent {
17
- @Input() organisation: Organization
17
+ @Input() organization: Organization
18
18
  @Input() organisationUrl: string
19
19
  @Output() clickedOrganisation = new EventEmitter<Organization>()
20
20
 
21
21
  clickOrganisation(event: Event) {
22
22
  event.preventDefault()
23
- this.clickedOrganisation.emit(this.organisation)
23
+ this.clickedOrganisation.emit(this.organization)
24
24
  }
25
25
  }
@@ -9,6 +9,7 @@ import { OrganisationsFilterComponent } from './organisations-filter/organisatio
9
9
  import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
10
10
  import { LanguageSwitcherComponent } from './language-switcher/language-switcher.component'
11
11
  import { OrganisationsResultComponent } from './organisations-result/organisations-result.component'
12
+ import { RouterLink } from '@angular/router'
12
13
 
13
14
  @NgModule({
14
15
  declarations: [
@@ -24,6 +25,7 @@ import { OrganisationsResultComponent } from './organisations-result/organisatio
24
25
  UiElementsModule,
25
26
  UiInputsModule,
26
27
  MatIconModule,
28
+ RouterLink,
27
29
  ],
28
30
  exports: [
29
31
  CatalogTitleComponent,
@@ -1,7 +1,13 @@
1
1
  <div
2
- translate
3
2
  class="flex flex-row justify-start items-center overflow-hidden"
4
- [title]="hoverTitle"
3
+ data-test="figureTitle"
4
+ [title]="
5
+ figure.toString() +
6
+ ' ' +
7
+ unit +
8
+ ' ' +
9
+ (title | translate: { count: figure })
10
+ "
5
11
  >
6
12
  <mat-icon
7
13
  class="material-symbols-outlined {{ bgClass }} {{
@@ -13,7 +19,9 @@
13
19
  </mat-icon>
14
20
  <div class="shrink overflow-hidden">
15
21
  <div class="figure-block text-[1.5em] text-black">
16
- <span class="figure font-medium mr-[0.3em]">{{ figure }}</span>
22
+ <span class="figure font-medium mr-[0.3em]" data-test="figure">{{
23
+ figure
24
+ }}</span>
17
25
  <span class="unit text-[0.665em]">{{ unit }}</span>
18
26
  </div>
19
27
  <div translate class="title truncate" [translateParams]="{ count: figure }">
@@ -1,4 +1,4 @@
1
- import { Component, ChangeDetectionStrategy, Input } from '@angular/core'
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
2
 
3
3
  @Component({
4
4
  selector: 'gn-ui-figure',
@@ -10,17 +10,13 @@ export class FigureComponent {
10
10
  @Input() icon!: string
11
11
  @Input() title!: string
12
12
  @Input() figure!: string | number
13
- @Input() unit?: string
13
+ @Input() unit = ''
14
14
  @Input() color: 'primary' | 'secondary' = 'primary'
15
15
 
16
- get hoverTitle() {
17
- return `${this.figure.toString()} ${this.unit || ''}
18
- ${this.title}`
19
- }
20
-
21
16
  get textClass() {
22
17
  return this.color === 'primary' ? 'text-primary' : 'text-secondary'
23
18
  }
19
+
24
20
  get bgClass() {
25
21
  return this.color === 'primary' ? 'bg-primary-white' : 'bg-secondary-white'
26
22
  }