geonetwork-ui 2.2.0-dev.95b40cd8 → 2.2.0-dev.9f0a89f5

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 (94) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +27 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +8 -8
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +2 -2
  4. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +14 -0
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +7 -9
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +30 -8
  8. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +31 -14
  9. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  10. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +3 -3
  11. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
  12. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
  13. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +7 -7
  14. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +2 -2
  15. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +3 -3
  16. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +4 -4
  17. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +3 -3
  18. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
  19. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +3 -3
  20. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +6 -6
  21. package/esm2022/translations/de.json +1 -1
  22. package/esm2022/translations/en.json +1 -1
  23. package/esm2022/translations/es.json +1 -1
  24. package/esm2022/translations/fr.json +1 -1
  25. package/esm2022/translations/it.json +1 -1
  26. package/esm2022/translations/nl.json +1 -1
  27. package/esm2022/translations/pt.json +1 -1
  28. package/fesm2022/geonetwork-ui.mjs +152 -77
  29. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  30. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +2 -0
  31. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
  32. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  33. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +3 -5
  34. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  35. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts +3 -0
  36. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +1 -0
  37. package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +1 -1
  38. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +2 -3
  39. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  40. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +1 -1
  41. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  42. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +13 -2
  43. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  44. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +1 -1
  45. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -1
  46. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +3 -3
  47. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  48. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -13
  49. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  50. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  51. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +1 -1
  52. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  53. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +40 -40
  54. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
  55. package/package.json +1 -1
  56. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +55 -2
  57. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +50 -6
  58. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +203 -20
  59. package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +29 -0
  60. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +11 -8
  61. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +1 -1
  62. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +3 -5
  63. package/src/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.ts +16 -0
  64. package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +5 -9
  65. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +53 -19
  66. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +78 -36
  67. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +16 -3
  68. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +44 -8
  69. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +3 -4
  70. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
  71. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +5 -0
  72. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +39 -0
  73. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +58 -0
  74. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +1 -0
  75. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +6 -6
  76. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +6 -3
  77. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +1 -1
  78. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.html +2 -2
  79. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
  80. package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -0
  81. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +3 -0
  82. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +1 -1
  83. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -0
  84. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +2 -2
  85. package/tailwind.base.config.js +3 -0
  86. package/tailwind.base.css +2 -2
  87. package/translations/de.json +1 -1
  88. package/translations/en.json +1 -1
  89. package/translations/es.json +1 -1
  90. package/translations/fr.json +1 -1
  91. package/translations/it.json +1 -1
  92. package/translations/nl.json +1 -1
  93. package/translations/pt.json +1 -1
  94. package/translations/sk.json +1 -1
@@ -5,6 +5,8 @@ import {
5
5
  DatasetRecord,
6
6
  DatasetServiceDistribution,
7
7
  Individual,
8
+ Keyword,
9
+ KeywordThesaurus,
8
10
  RecordStatus,
9
11
  Role,
10
12
  ServiceEndpoint,
@@ -25,6 +27,7 @@ import {
25
27
  findNestedElement,
26
28
  findNestedElements,
27
29
  readAttribute,
30
+ readText,
28
31
  removeAllChildren,
29
32
  removeChildren,
30
33
  removeChildrenByName,
@@ -326,47 +329,78 @@ function appendCitationDate(date, type: 'revision' | 'creation') {
326
329
  )
327
330
  }
328
331
 
329
- function removeKeywords(type: string | null) {
330
- return removeChildren(
331
- pipe(
332
- findNestedElements('gmd:descriptiveKeywords'),
333
- filterArray(
334
- pipe(
335
- findNestedElement(
336
- 'gmd:MD_Keywords',
337
- 'gmd:type',
338
- 'gmd:MD_KeywordTypeCode'
339
- ),
340
- readAttribute('codeListValue'),
341
- // if a specific type is targeted, compare with it; otherwise remove keywords if they have no type defined
342
- map((typeValue) => (type !== null ? type === typeValue : true))
332
+ function removeKeywords() {
333
+ return removeChildren(pipe(findNestedElements('gmd:descriptiveKeywords')))
334
+ }
335
+
336
+ // returns a <gmd:thesaurusName> element
337
+ function createThesaurus(thesaurus: KeywordThesaurus) {
338
+ return pipe(
339
+ createElement('gmd:thesaurusName'),
340
+ createChild('gmd:CI_Citation'),
341
+ appendChildren(
342
+ pipe(
343
+ createElement('gmd:title'),
344
+ writeCharacterString(thesaurus.name || thesaurus.id)
345
+ ),
346
+ pipe(
347
+ createElement('gmd:identifier'),
348
+ createChild('gmd:MD_Identifier'),
349
+ appendChildren(
350
+ pipe(
351
+ createElement('gmd:code'),
352
+ thesaurus.url
353
+ ? writeAnchor(thesaurus.url, thesaurus.id)
354
+ : writeCharacterString(thesaurus.id)
355
+ )
343
356
  )
344
357
  )
345
358
  )
346
359
  )
347
360
  }
348
361
 
349
- function appendKeywords(keywords: string[], type: string | null) {
362
+ function appendKeywords(keywords: Keyword[]) {
363
+ const keywordsByThesaurus: Keyword[][] = keywords.reduce((acc, keyword) => {
364
+ const thesaurusId = keyword.thesaurus?.id
365
+ const type = keyword.type
366
+ let existingGroup = acc.find((group) =>
367
+ group[0].thesaurus
368
+ ? group[0].thesaurus.id === thesaurusId
369
+ : group[0].type === type
370
+ )
371
+ if (!existingGroup) {
372
+ existingGroup = []
373
+ acc.push(existingGroup)
374
+ }
375
+ existingGroup.push(keyword)
376
+ return acc
377
+ }, [])
350
378
  return appendChildren(
351
- pipe(
352
- createElement('gmd:descriptiveKeywords'),
353
- createChild('gmd:MD_Keywords'),
354
- type !== null
355
- ? appendChildren(
379
+ ...keywordsByThesaurus.map((keywords) =>
380
+ pipe(
381
+ createElement('gmd:descriptiveKeywords'),
382
+ createChild('gmd:MD_Keywords'),
383
+ appendChildren(
384
+ pipe(
385
+ createElement('gmd:type'),
386
+ createChild('gmd:MD_KeywordTypeCode'),
387
+ addAttribute(
388
+ 'codeList',
389
+ 'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode'
390
+ ),
391
+ addAttribute('codeListValue', keywords[0].type)
392
+ )
393
+ ),
394
+ keywords[0].thesaurus
395
+ ? appendChildren(createThesaurus(keywords[0].thesaurus))
396
+ : noop,
397
+ appendChildren(
398
+ ...keywords.map((keyword) =>
356
399
  pipe(
357
- createElement('gmd:type'),
358
- createChild('gmd:MD_KeywordTypeCode'),
359
- addAttribute(
360
- 'codeList',
361
- 'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode'
362
- ),
363
- addAttribute('codeListValue', type)
400
+ createElement('gmd:keyword'),
401
+ writeCharacterString(keyword.label)
364
402
  )
365
403
  )
366
- : noop,
367
- appendChildren(
368
- ...keywords.map((keyword) =>
369
- pipe(createElement('gmd:keyword'), writeCharacterString(keyword))
370
404
  )
371
405
  )
372
406
  )
@@ -740,16 +774,24 @@ export function writeContacts(record: CatalogRecord, rootEl: XmlElement) {
740
774
  export function writeKeywords(record: CatalogRecord, rootEl: XmlElement) {
741
775
  pipe(
742
776
  findOrCreateIdentification(),
743
- removeKeywords(null),
744
- appendKeywords(record.keywords, null)
777
+ removeKeywords(),
778
+ appendKeywords(record.keywords)
745
779
  )(rootEl)
746
780
  }
747
781
 
748
- export function writeThemes(record: CatalogRecord, rootEl: XmlElement) {
782
+ export function writeTopics(record: CatalogRecord, rootEl: XmlElement) {
749
783
  pipe(
750
784
  findOrCreateIdentification(),
751
- removeKeywords('theme'),
752
- appendKeywords(record.themes, 'theme')
785
+ removeChildrenByName('gmd:topicCategory'),
786
+ appendChildren(
787
+ ...record.topics.map((topic) =>
788
+ pipe(
789
+ createElement('gmd:topicCategory'),
790
+ createChild('gmd:MD_TopicCategoryCode'),
791
+ setTextContent(topic)
792
+ )
793
+ )
794
+ )
753
795
  )(rootEl)
754
796
  }
755
797
 
@@ -60,6 +60,20 @@ export type SpatialRepresentationType =
60
60
  | 'table'
61
61
  | 'point'
62
62
 
63
+ export type KeywordType = 'place' | 'temporal' | 'theme' | 'other'
64
+
65
+ export type KeywordThesaurus = {
66
+ id: string
67
+ name?: string
68
+ url?: URL
69
+ }
70
+
71
+ export interface Keyword {
72
+ label: string
73
+ type: KeywordType
74
+ thesaurus?: KeywordThesaurus
75
+ }
76
+
63
77
  export interface BaseRecord {
64
78
  uniqueIdentifier: Uuid
65
79
  ownerOrganization: Organization
@@ -69,8 +83,8 @@ export interface BaseRecord {
69
83
  recordCreated?: Date
70
84
  recordUpdated: Date
71
85
  kind: RecordKind
72
- themes: Array<string> // TODO: handle codelists
73
- keywords: Array<string> // TODO: handle thesaurus and id
86
+ topics: Array<string> // TODO: handle codelists
87
+ keywords: Array<Keyword>
74
88
  licenses: Array<Constraint>
75
89
  legalConstraints: Array<Constraint>
76
90
  securityConstraints: Array<Constraint>
@@ -80,7 +94,6 @@ export interface BaseRecord {
80
94
  landingPage?: URL
81
95
  updateFrequency?: UpdateFrequency
82
96
 
83
- // to add: iso19139.topicCategory
84
97
  // to add: canonical url
85
98
  // to add: source catalog (??)
86
99
  // to add: is open data ?
@@ -69,8 +69,24 @@ Cette section contient des *caractères internationaux* (ainsi que des "caractè
69
69
  url: new URL('http://my-org.net/two.png'),
70
70
  },
71
71
  ],
72
- keywords: ['international', 'test', '_another_keyword_'],
73
- themes: ['testData', 'exampleData'],
72
+ keywords: [
73
+ {
74
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
75
+ type: 'other',
76
+ label: 'international',
77
+ },
78
+ {
79
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
80
+ type: 'other',
81
+ label: 'test',
82
+ },
83
+ {
84
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
85
+ type: 'other',
86
+ label: '_another_keyword_',
87
+ },
88
+ ],
89
+ topics: ['testData', 'exampleData'],
74
90
  spatialRepresentation: 'grid',
75
91
  distributions: [
76
92
  {
@@ -170,13 +186,33 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
170
186
  },
171
187
  ],
172
188
  keywords: [
173
- 'planification',
174
- 'PLU',
175
- "Plan local d'urbanisme",
176
- 'données ouvertes',
177
- 'Avrigny*60036',
189
+ {
190
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
191
+ type: 'other',
192
+ label: 'planification',
193
+ },
194
+ {
195
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
196
+ type: 'other',
197
+ label: 'PLU',
198
+ },
199
+ {
200
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
201
+ type: 'other',
202
+ label: "Plan local d'urbanisme",
203
+ },
204
+ {
205
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
206
+ type: 'other',
207
+ label: 'données ouvertes',
208
+ },
209
+ {
210
+ thesaurus: { id: 'geonetwork.thesaurus.local' },
211
+ type: 'other',
212
+ label: 'Avrigny*60036',
213
+ },
178
214
  ],
179
- themes: ['Usage des sols', "document d'urbanisme"],
215
+ topics: ['Usage des sols', "document d'urbanisme"],
180
216
  spatialRepresentation: 'vector',
181
217
  distributions: [
182
218
  {
@@ -1,6 +1,6 @@
1
- <div class="flex flex-row content-center">
1
+ <div class="flex flex-row items-center">
2
2
  <span
3
- class="align-text-top mr-1.5 mt-1.5 favorite-count"
3
+ class="align-text-top mr-1.5 favorite-count"
4
4
  *ngIf="hasFavoriteCount && displayCount"
5
5
  >{{ favoriteCount }}</span
6
6
  >
@@ -8,10 +8,9 @@
8
8
  [toggled]="isFavorite$ | async"
9
9
  (newValue)="toggleFavorite($event)"
10
10
  [disabled]="loading || (isAnonymous$ | async)"
11
- class="mt-1"
12
11
  ></gn-ui-star-toggle>
13
12
  <span
14
- class="align-text-top ml-1.5 favorite-count mt-1.5"
13
+ class="align-text-top ml-1.5 favorite-count"
15
14
  *ngIf="!displayCount"
16
15
  translate="datahub.record.addToFavorites"
17
16
  ></span>
@@ -5,6 +5,6 @@
5
5
  [selected]="currentLang"
6
6
  ariaName="languages"
7
7
  [showTitle]="false"
8
- [extraBtnClass]="'flex justify-items-center text-white !pl-2 !py-1'"
8
+ [extraBtnClass]="'flex justify-items-center !pl-2 !py-1'"
9
9
  >
10
10
  </gn-ui-dropdown-selector>
@@ -0,0 +1,5 @@
1
+ .icon-small {
2
+ font-size: 16px;
3
+ height: 16px;
4
+ width: 16px;
5
+ }
@@ -0,0 +1,39 @@
1
+ <div class="h-full flex flex-col">
2
+ <div class="flex-none w-full flex flex-row items-center">
3
+ <p class="flex-none font-bold">{{ label }}</p>
4
+ <div class="flex-1 flex justify-end items-center">
5
+ <gn-ui-button
6
+ [extraClass]="getButtonExtraClass()"
7
+ (buttonClick)="togglePreview()"
8
+ >
9
+ <span class="material-symbols-outlined mr-1 icon-small">{{
10
+ preview ? 'visibility' : 'visibility_off'
11
+ }}</span>
12
+ {{ preview ? 'WYSIWYG' : 'Markdown' }}
13
+ </gn-ui-button>
14
+ <span
15
+ class="material-symbols-outlined m-2 icon-small"
16
+ [matTooltip]="tooltip"
17
+ matTooltipPosition="above"
18
+ >
19
+ help
20
+ </span>
21
+ </div>
22
+ </div>
23
+ <p class="flex-none mb-2 font-medium text-sm text-gray-900">
24
+ {{ helperText }}
25
+ </p>
26
+ <div class="flex-1" [hidden]="preview">
27
+ <gn-ui-text-area
28
+ [placeholder]="placeholder"
29
+ [value]="textContent"
30
+ (valueChange)="textContentChangedHandler($event)"
31
+ ></gn-ui-text-area>
32
+ </div>
33
+ <div
34
+ class="flex-1 border border-gray-800 rounded overflow-y-scroll"
35
+ [hidden]="!preview"
36
+ >
37
+ <gn-ui-markdown-parser [textContent]="textContent"></gn-ui-markdown-parser>
38
+ </div>
39
+ </div>
@@ -0,0 +1,58 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ EventEmitter,
6
+ Input,
7
+ Output,
8
+ } from '@angular/core'
9
+ import { FormsModule } from '@angular/forms'
10
+ import { MarkdownParserComponent } from '../markdown-parser/markdown-parser.component'
11
+ import { TranslateModule } from '@ngx-translate/core'
12
+ import { ButtonComponent, TextAreaComponent } from '../../../../../../libs/ui/inputs/src'
13
+ import { MatIconModule } from '@angular/material/icon'
14
+ import { MatTooltipModule } from '@angular/material/tooltip'
15
+
16
+ @Component({
17
+ selector: 'gn-ui-markdown-editor',
18
+ templateUrl: './markdown-editor.component.html',
19
+ styleUrls: ['./markdown-editor.component.css'],
20
+ changeDetection: ChangeDetectionStrategy.OnPush,
21
+ standalone: true,
22
+ imports: [
23
+ CommonModule,
24
+ FormsModule,
25
+ MatIconModule,
26
+ MatTooltipModule,
27
+ ButtonComponent,
28
+ TextAreaComponent,
29
+ MarkdownParserComponent,
30
+ TranslateModule,
31
+ ],
32
+ })
33
+ export class MarkdownEditorComponent {
34
+ @Input() label: string
35
+ @Input() tooltip?: string
36
+ @Input() helperText?: string
37
+ @Input() placeholder: string
38
+ @Input() textContent: string
39
+ @Output() textContentChanged: EventEmitter<string> =
40
+ new EventEmitter<string>()
41
+
42
+ preview = false
43
+
44
+ getButtonExtraClass() {
45
+ return `${
46
+ this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
47
+ } rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
48
+ }
49
+
50
+ togglePreview() {
51
+ this.preview = !this.preview
52
+ }
53
+
54
+ textContentChangedHandler(textContent: string) {
55
+ this.textContent = textContent
56
+ this.textContentChanged.emit(this.textContent)
57
+ }
58
+ }
@@ -6,6 +6,7 @@ import { marked } from 'marked'
6
6
  templateUrl: './markdown-parser.component.html',
7
7
  styleUrls: ['./markdown-parser.component.css'],
8
8
  changeDetection: ChangeDetectionStrategy.OnPush,
9
+ standalone: true,
9
10
  })
10
11
  export class MarkdownParserComponent {
11
12
  @Input() textContent: string
@@ -136,13 +136,13 @@
136
136
  </p>
137
137
  </div>
138
138
  </div>
139
- <div *ngIf="metadata.themes?.length">
140
- <p class="text-sm mb-1" translate>record.metadata.themes</p>
139
+ <div *ngIf="metadata.topics?.length">
140
+ <p class="text-sm mb-1" translate>record.metadata.topics</p>
141
141
  <div class="sm:pb-4 sm:pr-16">
142
142
  <gn-ui-badge
143
- class="inline-block mr-2 lowercase"
144
- *ngFor="let theme of metadata.themes"
145
- >{{ theme }}</gn-ui-badge
143
+ class="inline-block mr-2 mb-2 lowercase"
144
+ *ngFor="let topic of metadata.topics"
145
+ >{{ topic }}</gn-ui-badge
146
146
  >
147
147
  </div>
148
148
  </div>
@@ -154,7 +154,7 @@
154
154
  (click)="onKeywordClick(keyword)"
155
155
  [clickable]="true"
156
156
  *ngFor="let keyword of metadata.keywords"
157
- >{{ keyword }}</gn-ui-badge
157
+ >{{ keyword.label }}</gn-ui-badge
158
158
  >
159
159
  </div>
160
160
  </div>
@@ -5,7 +5,10 @@ import {
5
5
  Input,
6
6
  Output,
7
7
  } from '@angular/core'
8
- import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
8
+ import {
9
+ DatasetRecord,
10
+ Keyword,
11
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
9
12
 
10
13
  @Component({
11
14
  selector: 'gn-ui-metadata-info',
@@ -16,7 +19,7 @@ import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/mode
16
19
  export class MetadataInfoComponent {
17
20
  @Input() metadata: Partial<DatasetRecord>
18
21
  @Input() incomplete: boolean
19
- @Output() keyword = new EventEmitter<string>()
22
+ @Output() keyword = new EventEmitter<Keyword>()
20
23
  updatedTimes: number
21
24
 
22
25
  get hasUsage() {
@@ -77,7 +80,7 @@ export class MetadataInfoComponent {
77
80
  return !this.incomplete || propName in this.metadata
78
81
  }
79
82
 
80
- onKeywordClick(keyword: string) {
83
+ onKeywordClick(keyword: Keyword) {
81
84
  this.keyword.emit(keyword)
82
85
  }
83
86
  }
@@ -55,7 +55,7 @@ export class MetadataQualityComponent implements OnChanges {
55
55
  this.items = []
56
56
  this.add('title', !!this.metadata?.title)
57
57
  this.add('description', !!this.metadata?.abstract)
58
- this.add('topic', this.metadata?.themes?.length > 0)
58
+ this.add('topic', this.metadata?.topics?.length > 0)
59
59
  this.add('keywords', this.metadata?.keywords?.length > 0)
60
60
  this.add('legalConstraints', this.metadata?.legalConstraints?.length > 0)
61
61
  this.add('organisation', !!contact?.organization)
@@ -1,13 +1,13 @@
1
1
  <div
2
2
  #containerElement
3
- class="h-full w-full relative shrink-0 overflow-hidden flex items-center"
3
+ class="h-full w-full relative shrink-0 overflow-hidden flex items-center justify-center"
4
4
  [ngClass]="isPlaceholder ? 'bg-gray-100' : 'bg-white'"
5
5
  [attr.data-cy-is-placeholder]="isPlaceholder.toString()"
6
6
  >
7
7
  <img
8
8
  #imageElement
9
9
  class="relative w-full object-center"
10
- [ngClass]="imgFit === 'contain' ? 'h-4/5' : 'h-full'"
10
+ [ngClass]="imgFit === 'contain' ? 'h-4/5 w-4/5' : 'h-full'"
11
11
  [ngStyle]="{ objectFit: imgFit }"
12
12
  alt="thumbnail"
13
13
  loading="lazy"
@@ -45,6 +45,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
45
45
  UiInputsModule,
46
46
  FormsModule,
47
47
  NgOptimizedImage,
48
+ MarkdownParserComponent,
48
49
  ],
49
50
  declarations: [
50
51
  MetadataInfoComponent,
@@ -67,7 +68,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
67
68
  PaginationButtonsComponent,
68
69
  MaxLinesComponent,
69
70
  RecordApiFormComponent,
70
- MarkdownParserComponent,
71
71
  ImageOverlayPreviewComponent,
72
72
  ],
73
73
  exports: [
@@ -12,6 +12,7 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
12
12
  templateUrl: './button.component.html',
13
13
  styleUrls: ['./button.component.css'],
14
14
  changeDetection: ChangeDetectionStrategy.OnPush,
15
+ standalone: true,
15
16
  })
16
17
  export class ButtonComponent {
17
18
  private btnClass: string
@@ -0,0 +1,3 @@
1
+ button {
2
+ color: var(--navigation-button-color, --color-background);
3
+ }
@@ -1,5 +1,5 @@
1
1
  <button
2
- class="group flex items-center justify-center gap-1 backdrop-blur p-1 bg-primary-opacity-30 text-white rounded content-center"
2
+ class="group flex items-center justify-center gap-1 backdrop-blur p-1 bg-primary-opacity-30 rounded content-center"
3
3
  >
4
4
  <mat-icon class="material-symbols-outlined align-middle w-[18px]">{{
5
5
  icon
@@ -12,6 +12,7 @@ import { distinctUntilChanged } from 'rxjs/operators'
12
12
  selector: 'gn-ui-text-area',
13
13
  templateUrl: './text-area.component.html',
14
14
  styleUrls: ['./text-area.component.css'],
15
+ standalone: true,
15
16
  })
16
17
  export class TextAreaComponent implements AfterViewInit {
17
18
  @Input() value = ''
@@ -47,10 +47,8 @@ import { EditableLabelDirective } from './editable-label/editable-label.directiv
47
47
  declarations: [
48
48
  DropdownSelectorComponent,
49
49
  AutocompleteComponent,
50
- ButtonComponent,
51
50
  TextInputComponent,
52
51
  DragAndDropFileInputComponent,
53
- TextAreaComponent,
54
52
  ChipsInputComponent,
55
53
  NavigationButtonComponent,
56
54
  StarToggleComponent,
@@ -89,6 +87,8 @@ import { EditableLabelDirective } from './editable-label/editable-label.directiv
89
87
  MatDatepickerModule,
90
88
  MatNativeDateModule,
91
89
  EditableLabelDirective,
90
+ TextAreaComponent,
91
+ ButtonComponent,
92
92
  ],
93
93
  exports: [
94
94
  DropdownSelectorComponent,
@@ -52,6 +52,9 @@ module.exports = {
52
52
  'var(--font-family-title, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif)', // alias for serif
53
53
  mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
54
54
  },
55
+ fontWeight: {
56
+ title: '600',
57
+ },
55
58
  fontSize: {
56
59
  13: '13px',
57
60
  21: [
package/tailwind.base.css CHANGED
@@ -31,8 +31,8 @@
31
31
 
32
32
  .btn-outline {
33
33
  @apply btn text-main
34
- bg-white hover:text-primary-darker focus:text-primary-darker active:text-primary-black
35
- border border-gray-300 hover:border-primary-lighter focus:border-primary-lighter focus:ring-4 focus:ring-primary-lightest active:border-primary-darker;
34
+ bg-transparent hover:text-primary-darker focus:text-primary-darker active:text-primary-black
35
+ border border-gray-300 hover:border-primary-lighter focus:border-primary-lighter focus:ring-4 focus:ring-primary-lightest active:border-primary-darker;
36
36
  }
37
37
 
38
38
  .btn-light {
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "Ähnliche Datensätze",
256
256
  "record.metadata.sheet": "Weitere Informationen verfügbar unter:",
257
257
  "record.metadata.status": "",
258
- "record.metadata.themes": "Kategorien",
259
258
  "record.metadata.title": "Titel",
259
+ "record.metadata.topics": "Kategorien",
260
260
  "record.metadata.type": "Geographischer Datensatz",
261
261
  "record.metadata.uniqueId": "Eindeutige Kennung",
262
262
  "record.metadata.updateFrequency": "Aktualisierungsfrequenz der Daten",
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "Related records",
256
256
  "record.metadata.sheet": "Original metadata",
257
257
  "record.metadata.status": "Status",
258
- "record.metadata.themes": "Categories",
259
258
  "record.metadata.title": "Title",
259
+ "record.metadata.topics": "Categories",
260
260
  "record.metadata.type": "Geographical dataset",
261
261
  "record.metadata.uniqueId": "Unique Identifier",
262
262
  "record.metadata.updateFrequency": "Data Update Frequency",
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "",
256
256
  "record.metadata.sheet": "",
257
257
  "record.metadata.status": "",
258
- "record.metadata.themes": "",
259
258
  "record.metadata.title": "",
259
+ "record.metadata.topics": "",
260
260
  "record.metadata.type": "",
261
261
  "record.metadata.uniqueId": "",
262
262
  "record.metadata.updateFrequency": "",
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "Voir aussi",
256
256
  "record.metadata.sheet": "Fiche de métadonnées d'origine",
257
257
  "record.metadata.status": "",
258
- "record.metadata.themes": "Catégories",
259
258
  "record.metadata.title": "Titre",
259
+ "record.metadata.topics": "Catégories",
260
260
  "record.metadata.type": "Donnée géographique",
261
261
  "record.metadata.uniqueId": "Identificateur de ressource unique",
262
262
  "record.metadata.updateFrequency": "Fréquence de mise à jour des données",
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "Vedi anche",
256
256
  "record.metadata.sheet": "Origine del metadata",
257
257
  "record.metadata.status": "",
258
- "record.metadata.themes": "Categorie",
259
258
  "record.metadata.title": "Titolo",
259
+ "record.metadata.topics": "Categorie",
260
260
  "record.metadata.type": "Dati geografici",
261
261
  "record.metadata.uniqueId": "Identificatore unico di risorsa",
262
262
  "record.metadata.updateFrequency": "Frequenza di aggiornamento dei dati",
@@ -255,8 +255,8 @@
255
255
  "record.metadata.related": "",
256
256
  "record.metadata.sheet": "",
257
257
  "record.metadata.status": "",
258
- "record.metadata.themes": "",
259
258
  "record.metadata.title": "",
259
+ "record.metadata.topics": "",
260
260
  "record.metadata.type": "",
261
261
  "record.metadata.uniqueId": "",
262
262
  "record.metadata.updateFrequency": "",