geonetwork-ui 2.2.0-dev.95b40cd8 → 2.2.0-dev.9d7dfa2e
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.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +27 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +23 -11
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +4 -2
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +12 -9
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +33 -8
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +31 -14
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -2
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -13
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +3 -3
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +5 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +19 -7
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +6 -6
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
- package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +18 -1
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +32 -0
- package/esm2022/translations/de.json +34 -27
- package/esm2022/translations/en.json +26 -19
- package/esm2022/translations/es.json +23 -16
- package/esm2022/translations/fr.json +44 -37
- package/esm2022/translations/it.json +38 -31
- package/esm2022/translations/nl.json +24 -17
- package/esm2022/translations/pt.json +23 -16
- package/fesm2022/geonetwork-ui.mjs +465 -258
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +4 -5
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +3 -3
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +16 -2
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +9 -3
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -13
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +40 -40
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
- package/libs/util/i18n/src/lib/i18n.constants.d.ts +17 -0
- package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +5 -0
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +57 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +52 -6
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +207 -20
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +29 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +30 -11
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +3 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -5
- package/src/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.ts +16 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +11 -9
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +58 -20
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +86 -38
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -1
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +20 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/full-response.ts +1 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +46 -8
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +12 -12
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +3 -4
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +5 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +39 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +58 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +1 -0
- package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.html +5 -1
- package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.ts +1 -0
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +113 -25
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +20 -3
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.html +2 -2
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +3 -1
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +3 -0
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +2 -2
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -0
- package/src/libs/util/i18n/src/lib/i18n.constants.ts +18 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +32 -0
- package/tailwind.base.css +2 -2
- package/translations/de.json +34 -27
- package/translations/en.json +26 -19
- package/translations/es.json +23 -16
- package/translations/fr.json +44 -37
- package/translations/it.json +38 -31
- package/translations/nl.json +24 -17
- package/translations/pt.json +23 -16
- package/translations/sk.json +24 -17
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
writeSecurityConstraints,
|
|
30
30
|
writeSpatialRepresentation,
|
|
31
31
|
writeStatus,
|
|
32
|
-
|
|
32
|
+
writeTopics,
|
|
33
33
|
writeTitle,
|
|
34
34
|
writeUniqueIdentifier,
|
|
35
35
|
writeUpdateFrequency,
|
|
@@ -51,12 +51,12 @@ import {
|
|
|
51
51
|
readOverviews,
|
|
52
52
|
readOwnerOrganization,
|
|
53
53
|
readRecordUpdated,
|
|
54
|
+
readRecordPublished,
|
|
54
55
|
readSecurityConstraints,
|
|
55
56
|
readSpatialExtents,
|
|
56
57
|
readSpatialRepresentation,
|
|
57
58
|
readStatus,
|
|
58
59
|
readTemporalExtents,
|
|
59
|
-
readThemes,
|
|
60
60
|
readTitle,
|
|
61
61
|
readUniqueIdentifier,
|
|
62
62
|
readUpdateFrequency,
|
|
@@ -75,17 +75,15 @@ export function toModel(xml: string): CatalogRecord {
|
|
|
75
75
|
const contacts = readContacts(rootEl)
|
|
76
76
|
const recordUpdated = readRecordUpdated(rootEl)
|
|
77
77
|
const recordCreated = recordUpdated
|
|
78
|
+
const recordPublished = readRecordPublished(rootEl)
|
|
78
79
|
const keywords = readKeywords(rootEl)
|
|
79
|
-
const
|
|
80
|
+
const topics = readIsoTopics(rootEl)
|
|
80
81
|
const legalConstraints = readLegalConstraints(rootEl)
|
|
81
82
|
const otherConstraints = readOtherConstraints(rootEl)
|
|
82
83
|
const securityConstraints = readSecurityConstraints(rootEl)
|
|
83
84
|
const licenses = readLicenses(rootEl)
|
|
84
85
|
const overviews = readOverviews(rootEl)
|
|
85
86
|
|
|
86
|
-
// not used yet
|
|
87
|
-
const isoTopics = readIsoTopics(rootEl)
|
|
88
|
-
|
|
89
87
|
if (kind === 'dataset') {
|
|
90
88
|
const status = readStatus(rootEl)
|
|
91
89
|
const datasetCreated = readDatasetCreated(rootEl)
|
|
@@ -100,8 +98,10 @@ export function toModel(xml: string): CatalogRecord {
|
|
|
100
98
|
return {
|
|
101
99
|
uniqueIdentifier,
|
|
102
100
|
kind,
|
|
101
|
+
languages: [],
|
|
103
102
|
recordCreated,
|
|
104
103
|
recordUpdated,
|
|
104
|
+
recordPublished,
|
|
105
105
|
status,
|
|
106
106
|
title,
|
|
107
107
|
abstract,
|
|
@@ -109,7 +109,7 @@ export function toModel(xml: string): CatalogRecord {
|
|
|
109
109
|
contacts,
|
|
110
110
|
contactsForResource: [], // FIXME: is that really useful??
|
|
111
111
|
keywords,
|
|
112
|
-
|
|
112
|
+
topics,
|
|
113
113
|
licenses,
|
|
114
114
|
legalConstraints,
|
|
115
115
|
securityConstraints,
|
|
@@ -129,14 +129,16 @@ export function toModel(xml: string): CatalogRecord {
|
|
|
129
129
|
return {
|
|
130
130
|
uniqueIdentifier,
|
|
131
131
|
kind,
|
|
132
|
+
languages: [],
|
|
132
133
|
recordCreated,
|
|
133
134
|
recordUpdated,
|
|
135
|
+
recordPublished,
|
|
134
136
|
title,
|
|
135
137
|
abstract,
|
|
136
138
|
ownerOrganization,
|
|
137
139
|
contacts,
|
|
138
140
|
keywords,
|
|
139
|
-
|
|
141
|
+
topics,
|
|
140
142
|
licenses,
|
|
141
143
|
legalConstraints,
|
|
142
144
|
securityConstraints,
|
|
@@ -168,7 +170,7 @@ export function toXml(record: CatalogRecord, originalXml?: string): string {
|
|
|
168
170
|
writeAbstract(record, rootEl)
|
|
169
171
|
fieldChanged('contacts') && writeContacts(record, rootEl)
|
|
170
172
|
fieldChanged('keywords') && writeKeywords(record, rootEl)
|
|
171
|
-
fieldChanged('
|
|
173
|
+
fieldChanged('topics') && writeTopics(record, rootEl)
|
|
172
174
|
fieldChanged('legalConstraints') && writeLegalConstraints(record, rootEl)
|
|
173
175
|
fieldChanged('securityConstraints') &&
|
|
174
176
|
writeSecurityConstraints(record, rootEl)
|
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
DatasetTemporalExtent,
|
|
6
6
|
GraphicOverview,
|
|
7
7
|
Individual,
|
|
8
|
+
Keyword,
|
|
9
|
+
KeywordThesaurus,
|
|
8
10
|
Organization,
|
|
9
11
|
RecordKind,
|
|
10
12
|
RecordStatus,
|
|
@@ -39,6 +41,7 @@ import {
|
|
|
39
41
|
} from '../function-utils'
|
|
40
42
|
import { getRoleFromRoleCode } from './codelists/role.mapper'
|
|
41
43
|
import { matchMimeType, matchProtocol } from '../common/distribution.mapper'
|
|
44
|
+
import { getKeywordTypeFromKeywordTypeCode } from './codelists/keyword.mapper'
|
|
42
45
|
|
|
43
46
|
function extractCharacterString(): ChainableFunction<XmlElement, string> {
|
|
44
47
|
return pipe(
|
|
@@ -447,7 +450,7 @@ function findIdentification() {
|
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
|
|
450
|
-
function extractCitationDate(type: 'creation' | 'revision') {
|
|
453
|
+
function extractCitationDate(type: 'creation' | 'revision' | 'publication') {
|
|
451
454
|
return pipe(
|
|
452
455
|
findIdentification(),
|
|
453
456
|
findNestedElements('gmd:citation', 'gmd:CI_Citation', 'gmd:date'),
|
|
@@ -514,6 +517,10 @@ export function readRecordUpdated(rootEl: XmlElement): Date {
|
|
|
514
517
|
return pipe(findChildElement('gmd:dateStamp'), extractDateTime())(rootEl)
|
|
515
518
|
}
|
|
516
519
|
|
|
520
|
+
export function readRecordPublished(rootEl: XmlElement): Date {
|
|
521
|
+
return pipe(findChildElement('gmd:dateStamp'), extractDateTime())(rootEl)
|
|
522
|
+
}
|
|
523
|
+
|
|
517
524
|
export function readTitle(rootEl: XmlElement): string {
|
|
518
525
|
return pipe(
|
|
519
526
|
findIdentification(),
|
|
@@ -552,29 +559,60 @@ export function readContacts(rootEl: XmlElement): Individual[] {
|
|
|
552
559
|
)(rootEl)
|
|
553
560
|
}
|
|
554
561
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
)
|
|
565
|
-
),
|
|
566
|
-
mapArray(findChildrenElement('gmd:keyword')),
|
|
567
|
-
flattenArray(),
|
|
568
|
-
mapArray(extractCharacterString())
|
|
562
|
+
// from gmd:thesaurusName
|
|
563
|
+
function readThesaurus(rootEl: XmlElement): KeywordThesaurus {
|
|
564
|
+
if (!rootEl) return null
|
|
565
|
+
|
|
566
|
+
const findIdentifier = findNestedElement(
|
|
567
|
+
'gmd:CI_Citation',
|
|
568
|
+
'gmd:identifier',
|
|
569
|
+
'gmd:MD_Identifier',
|
|
570
|
+
'gmd:code'
|
|
569
571
|
)
|
|
572
|
+
const id = pipe(findIdentifier, extractCharacterString())(rootEl)
|
|
573
|
+
const url = pipe(findIdentifier, extractUrl())(rootEl)
|
|
574
|
+
const name = pipe(
|
|
575
|
+
findNestedElement('gmd:CI_Citation', 'gmd:title'),
|
|
576
|
+
extractCharacterString()
|
|
577
|
+
)(rootEl)
|
|
578
|
+
return {
|
|
579
|
+
id,
|
|
580
|
+
...(name && { name }),
|
|
581
|
+
...(url && { url }),
|
|
582
|
+
}
|
|
570
583
|
}
|
|
571
584
|
|
|
572
|
-
|
|
573
|
-
|
|
585
|
+
// from gmd:MD_Keywords
|
|
586
|
+
function readKeywordGroup(rootEl: XmlElement): Keyword[] {
|
|
587
|
+
const type = pipe(
|
|
588
|
+
findChildrenElement('gmd:MD_KeywordTypeCode'),
|
|
589
|
+
mapArray(readAttribute('codeListValue')),
|
|
590
|
+
map((values) => getKeywordTypeFromKeywordTypeCode(values[0]))
|
|
591
|
+
)(rootEl)
|
|
592
|
+
const thesaurus = pipe(
|
|
593
|
+
findNestedElement('gmd:thesaurusName'),
|
|
594
|
+
readThesaurus
|
|
595
|
+
)(rootEl)
|
|
596
|
+
return pipe(
|
|
597
|
+
findChildrenElement('gmd:keyword'),
|
|
598
|
+
mapArray((el) => {
|
|
599
|
+
const label = extractCharacterString()(el)
|
|
600
|
+
return {
|
|
601
|
+
...(thesaurus ? { thesaurus } : {}),
|
|
602
|
+
label,
|
|
603
|
+
type,
|
|
604
|
+
} as Keyword
|
|
605
|
+
})
|
|
606
|
+
)(rootEl)
|
|
574
607
|
}
|
|
575
608
|
|
|
576
|
-
export function
|
|
577
|
-
return
|
|
609
|
+
export function readKeywords(rootEl: XmlElement): Keyword[] {
|
|
610
|
+
return pipe(
|
|
611
|
+
findIdentification(),
|
|
612
|
+
findNestedElements('gmd:descriptiveKeywords', 'gmd:MD_Keywords'),
|
|
613
|
+
mapArray(readKeywordGroup),
|
|
614
|
+
flattenArray()
|
|
615
|
+
)(rootEl)
|
|
578
616
|
}
|
|
579
617
|
|
|
580
618
|
export function readStatus(rootEl: XmlElement): RecordStatus {
|
|
@@ -627,7 +665,7 @@ export function readLicenses(rootEl: XmlElement): Constraint[] {
|
|
|
627
665
|
export function readIsoTopics(rootEl: XmlElement): string[] {
|
|
628
666
|
return pipe(
|
|
629
667
|
findIdentification(),
|
|
630
|
-
findChildrenElement('gmd:MD_TopicCategoryCode',
|
|
668
|
+
findChildrenElement('gmd:MD_TopicCategoryCode', true),
|
|
631
669
|
mapArray(readText())
|
|
632
670
|
)(rootEl)
|
|
633
671
|
}
|
|
@@ -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,
|
|
@@ -288,7 +291,10 @@ function appendResponsibleParty(contact: Individual) {
|
|
|
288
291
|
)
|
|
289
292
|
}
|
|
290
293
|
|
|
291
|
-
function updateCitationDate(
|
|
294
|
+
function updateCitationDate(
|
|
295
|
+
date: Date,
|
|
296
|
+
type: 'revision' | 'creation' | 'publication'
|
|
297
|
+
) {
|
|
292
298
|
return pipe(
|
|
293
299
|
findNestedElements('gmd:date', 'gmd:CI_Date'),
|
|
294
300
|
filterArray(
|
|
@@ -305,7 +311,10 @@ function updateCitationDate(date: Date, type: 'revision' | 'creation') {
|
|
|
305
311
|
)
|
|
306
312
|
}
|
|
307
313
|
|
|
308
|
-
function appendCitationDate(
|
|
314
|
+
function appendCitationDate(
|
|
315
|
+
date,
|
|
316
|
+
type: 'revision' | 'creation' | 'publication'
|
|
317
|
+
) {
|
|
309
318
|
return appendChildren(
|
|
310
319
|
pipe(
|
|
311
320
|
createElement('gmd:date'),
|
|
@@ -326,47 +335,78 @@ function appendCitationDate(date, type: 'revision' | 'creation') {
|
|
|
326
335
|
)
|
|
327
336
|
}
|
|
328
337
|
|
|
329
|
-
function removeKeywords(
|
|
330
|
-
return removeChildren(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
function removeKeywords() {
|
|
339
|
+
return removeChildren(pipe(findNestedElements('gmd:descriptiveKeywords')))
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// returns a <gmd:thesaurusName> element
|
|
343
|
+
function createThesaurus(thesaurus: KeywordThesaurus) {
|
|
344
|
+
return pipe(
|
|
345
|
+
createElement('gmd:thesaurusName'),
|
|
346
|
+
createChild('gmd:CI_Citation'),
|
|
347
|
+
appendChildren(
|
|
348
|
+
pipe(
|
|
349
|
+
createElement('gmd:title'),
|
|
350
|
+
writeCharacterString(thesaurus.name || thesaurus.id)
|
|
351
|
+
),
|
|
352
|
+
pipe(
|
|
353
|
+
createElement('gmd:identifier'),
|
|
354
|
+
createChild('gmd:MD_Identifier'),
|
|
355
|
+
appendChildren(
|
|
356
|
+
pipe(
|
|
357
|
+
createElement('gmd:code'),
|
|
358
|
+
thesaurus.url
|
|
359
|
+
? writeAnchor(thesaurus.url, thesaurus.id)
|
|
360
|
+
: writeCharacterString(thesaurus.id)
|
|
361
|
+
)
|
|
343
362
|
)
|
|
344
363
|
)
|
|
345
364
|
)
|
|
346
365
|
)
|
|
347
366
|
}
|
|
348
367
|
|
|
349
|
-
function appendKeywords(keywords:
|
|
368
|
+
function appendKeywords(keywords: Keyword[]) {
|
|
369
|
+
const keywordsByThesaurus: Keyword[][] = keywords.reduce((acc, keyword) => {
|
|
370
|
+
const thesaurusId = keyword.thesaurus?.id
|
|
371
|
+
const type = keyword.type
|
|
372
|
+
let existingGroup = acc.find((group) =>
|
|
373
|
+
group[0].thesaurus
|
|
374
|
+
? group[0].thesaurus.id === thesaurusId
|
|
375
|
+
: group[0].type === type
|
|
376
|
+
)
|
|
377
|
+
if (!existingGroup) {
|
|
378
|
+
existingGroup = []
|
|
379
|
+
acc.push(existingGroup)
|
|
380
|
+
}
|
|
381
|
+
existingGroup.push(keyword)
|
|
382
|
+
return acc
|
|
383
|
+
}, [])
|
|
350
384
|
return appendChildren(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
385
|
+
...keywordsByThesaurus.map((keywords) =>
|
|
386
|
+
pipe(
|
|
387
|
+
createElement('gmd:descriptiveKeywords'),
|
|
388
|
+
createChild('gmd:MD_Keywords'),
|
|
389
|
+
appendChildren(
|
|
390
|
+
pipe(
|
|
391
|
+
createElement('gmd:type'),
|
|
392
|
+
createChild('gmd:MD_KeywordTypeCode'),
|
|
393
|
+
addAttribute(
|
|
394
|
+
'codeList',
|
|
395
|
+
'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode'
|
|
396
|
+
),
|
|
397
|
+
addAttribute('codeListValue', keywords[0].type)
|
|
398
|
+
)
|
|
399
|
+
),
|
|
400
|
+
keywords[0].thesaurus
|
|
401
|
+
? appendChildren(createThesaurus(keywords[0].thesaurus))
|
|
402
|
+
: noop,
|
|
403
|
+
appendChildren(
|
|
404
|
+
...keywords.map((keyword) =>
|
|
356
405
|
pipe(
|
|
357
|
-
createElement('gmd:
|
|
358
|
-
|
|
359
|
-
addAttribute(
|
|
360
|
-
'codeList',
|
|
361
|
-
'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode'
|
|
362
|
-
),
|
|
363
|
-
addAttribute('codeListValue', type)
|
|
406
|
+
createElement('gmd:keyword'),
|
|
407
|
+
writeCharacterString(keyword.label)
|
|
364
408
|
)
|
|
365
409
|
)
|
|
366
|
-
: noop,
|
|
367
|
-
appendChildren(
|
|
368
|
-
...keywords.map((keyword) =>
|
|
369
|
-
pipe(createElement('gmd:keyword'), writeCharacterString(keyword))
|
|
370
410
|
)
|
|
371
411
|
)
|
|
372
412
|
)
|
|
@@ -740,16 +780,24 @@ export function writeContacts(record: CatalogRecord, rootEl: XmlElement) {
|
|
|
740
780
|
export function writeKeywords(record: CatalogRecord, rootEl: XmlElement) {
|
|
741
781
|
pipe(
|
|
742
782
|
findOrCreateIdentification(),
|
|
743
|
-
removeKeywords(
|
|
744
|
-
appendKeywords(record.keywords
|
|
783
|
+
removeKeywords(),
|
|
784
|
+
appendKeywords(record.keywords)
|
|
745
785
|
)(rootEl)
|
|
746
786
|
}
|
|
747
787
|
|
|
748
|
-
export function
|
|
788
|
+
export function writeTopics(record: CatalogRecord, rootEl: XmlElement) {
|
|
749
789
|
pipe(
|
|
750
790
|
findOrCreateIdentification(),
|
|
751
|
-
|
|
752
|
-
|
|
791
|
+
removeChildrenByName('gmd:topicCategory'),
|
|
792
|
+
appendChildren(
|
|
793
|
+
...record.topics.map((topic) =>
|
|
794
|
+
pipe(
|
|
795
|
+
createElement('gmd:topicCategory'),
|
|
796
|
+
createChild('gmd:MD_TopicCategoryCode'),
|
|
797
|
+
setTextContent(topic)
|
|
798
|
+
)
|
|
799
|
+
)
|
|
800
|
+
)
|
|
753
801
|
)(rootEl)
|
|
754
802
|
}
|
|
755
803
|
|
|
@@ -60,6 +60,22 @@ 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
|
+
// languages should be expressed using two-letters ISO 639-1 codes
|
|
77
|
+
export type LanguageCode = string
|
|
78
|
+
|
|
63
79
|
export interface BaseRecord {
|
|
64
80
|
uniqueIdentifier: Uuid
|
|
65
81
|
ownerOrganization: Organization
|
|
@@ -68,9 +84,11 @@ export interface BaseRecord {
|
|
|
68
84
|
abstract: string
|
|
69
85
|
recordCreated?: Date
|
|
70
86
|
recordUpdated: Date
|
|
87
|
+
recordPublished?: Date
|
|
88
|
+
languages: Array<LanguageCode>
|
|
71
89
|
kind: RecordKind
|
|
72
|
-
|
|
73
|
-
keywords: Array<
|
|
90
|
+
topics: Array<string> // TODO: handle codelists
|
|
91
|
+
keywords: Array<Keyword>
|
|
74
92
|
licenses: Array<Constraint>
|
|
75
93
|
legalConstraints: Array<Constraint>
|
|
76
94
|
securityConstraints: Array<Constraint>
|
|
@@ -80,7 +98,6 @@ export interface BaseRecord {
|
|
|
80
98
|
landingPage?: URL
|
|
81
99
|
updateFrequency?: UpdateFrequency
|
|
82
100
|
|
|
83
|
-
// to add: iso19139.topicCategory
|
|
84
101
|
// to add: canonical url
|
|
85
102
|
// to add: source catalog (??)
|
|
86
103
|
// to add: is open data ?
|
|
@@ -131,7 +131,7 @@ export const ES_FIXTURE_FULL_RESPONSE = deepFreeze({
|
|
|
131
131
|
creationDateForResource: ['2012-01-01T00:00:00.000Z'],
|
|
132
132
|
creationYearForResource: '2012',
|
|
133
133
|
creationMonthForResource: '2012-01',
|
|
134
|
-
publicationDateForResource:
|
|
134
|
+
publicationDateForResource: '2021-04-01T00:00:00.000Z',
|
|
135
135
|
publicationYearForResource: '2021',
|
|
136
136
|
publicationMonthForResource: '2021-04',
|
|
137
137
|
resourceDate: [
|
|
@@ -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: [
|
|
73
|
-
|
|
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
|
{
|
|
@@ -133,6 +149,7 @@ As such, **it is not very interesting at all.**`,
|
|
|
133
149
|
updatedTimes: 3,
|
|
134
150
|
per: 'month',
|
|
135
151
|
},
|
|
152
|
+
languages: ['en'],
|
|
136
153
|
},
|
|
137
154
|
{
|
|
138
155
|
uniqueIdentifier: '7d002c4c-92ef-4b9f-a568-d732f740b99e',
|
|
@@ -170,13 +187,33 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
|
|
|
170
187
|
},
|
|
171
188
|
],
|
|
172
189
|
keywords: [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
190
|
+
{
|
|
191
|
+
thesaurus: { id: 'geonetwork.thesaurus.local' },
|
|
192
|
+
type: 'other',
|
|
193
|
+
label: 'planification',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
thesaurus: { id: 'geonetwork.thesaurus.local' },
|
|
197
|
+
type: 'other',
|
|
198
|
+
label: 'PLU',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
thesaurus: { id: 'geonetwork.thesaurus.local' },
|
|
202
|
+
type: 'other',
|
|
203
|
+
label: "Plan local d'urbanisme",
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
thesaurus: { id: 'geonetwork.thesaurus.local' },
|
|
207
|
+
type: 'other',
|
|
208
|
+
label: 'données ouvertes',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
thesaurus: { id: 'geonetwork.thesaurus.local' },
|
|
212
|
+
type: 'other',
|
|
213
|
+
label: 'Avrigny*60036',
|
|
214
|
+
},
|
|
178
215
|
],
|
|
179
|
-
|
|
216
|
+
topics: ['Usage des sols', "document d'urbanisme"],
|
|
180
217
|
spatialRepresentation: 'vector',
|
|
181
218
|
distributions: [
|
|
182
219
|
{
|
|
@@ -204,5 +241,6 @@ Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur
|
|
|
204
241
|
temporalExtents: [],
|
|
205
242
|
status: 'completed',
|
|
206
243
|
updateFrequency: 'unknown',
|
|
244
|
+
languages: ['fr', 'de'],
|
|
207
245
|
},
|
|
208
246
|
])
|
package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts
CHANGED
|
@@ -29,18 +29,18 @@ export class DataViewPermalinkComponent {
|
|
|
29
29
|
if (config) {
|
|
30
30
|
const { aggregation, xProperty, yProperty, chartType } = config
|
|
31
31
|
const url = new URL(`${this.wcEmbedderBaseUrl}`, window.location.origin)
|
|
32
|
-
url.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
url.searchParams.set('v', `${this.version}`)
|
|
33
|
+
url.searchParams.append('e', `gn-dataset-view-chart`)
|
|
34
|
+
url.searchParams.append('a', `api-url=${this.config.basePath}`)
|
|
35
|
+
url.searchParams.append('a', `dataset-id=${metadata.uniqueIdentifier}`)
|
|
36
|
+
url.searchParams.append('a', `primary-color=#0f4395`)
|
|
37
|
+
url.searchParams.append('a', `secondary-color=#8bc832`)
|
|
38
|
+
url.searchParams.append('a', `main-color=#555`)
|
|
39
|
+
url.searchParams.append('a', `background-color=#fdfbff`)
|
|
40
|
+
url.searchParams.append('a', `aggregation=${aggregation}`)
|
|
41
|
+
url.searchParams.append('a', `x-property=${xProperty}`)
|
|
42
|
+
url.searchParams.append('a', `y-property=${yProperty}`)
|
|
43
|
+
url.searchParams.append('a', `chart-type=${chartType}`)
|
|
44
44
|
return url.toString()
|
|
45
45
|
}
|
|
46
46
|
return ''
|
package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<div class="flex flex-row
|
|
1
|
+
<div class="flex flex-row items-center">
|
|
2
2
|
<span
|
|
3
|
-
class="align-text-top mr-1.5
|
|
3
|
+
class="align-text-top mr-1.5 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
|
|
13
|
+
class="align-text-top ml-1.5 favorite-count"
|
|
15
14
|
*ngIf="!displayCount"
|
|
16
15
|
translate="datahub.record.addToFavorites"
|
|
17
16
|
></span>
|
|
@@ -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>
|