geonetwork-ui 2.8.0-dev.5745b522e → 2.8.0-dev.630bb6618
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/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +24 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +7 -7
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +3 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +4 -3
- package/esm2022/libs/common/domain/src/index.mjs +3 -0
- package/esm2022/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/index.mjs +2 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +3 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +18 -7
- package/esm2022/libs/feature/dataviz/src/lib/stac-view/stac-view.component.mjs +51 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +23 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +2 -2
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -4
- package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +23 -8
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +14 -1
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.mjs +37 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/translations/de.json +9 -1
- package/esm2022/translations/en.json +9 -1
- package/esm2022/translations/es.json +8 -0
- package/esm2022/translations/fr.json +9 -1
- package/esm2022/translations/it.json +10 -2
- package/esm2022/translations/nl.json +8 -0
- package/esm2022/translations/pt.json +8 -0
- package/esm2022/translations/sk.json +9 -1
- package/fesm2022/geonetwork-ui.mjs +267 -38
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +5 -1
- 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.map +1 -1
- package/libs/common/domain/src/index.d.ts +3 -0
- package/libs/common/domain/src/index.d.ts.map +1 -0
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/index.d.ts +1 -0
- package/libs/feature/dataviz/src/index.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/stac-view/stac-view.component.d.ts +16 -0
- package/libs/feature/dataviz/src/lib/stac-view/stac-view.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +2 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +3 -2
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +3 -2
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -24
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.d.ts +8 -0
- package/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.service+eaux-usees.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +5 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/georhena.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.reuse.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.service+napitswallonia.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +26 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +13 -6
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +6 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -2
- package/src/libs/common/domain/src/index.ts +2 -0
- package/src/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +8 -1
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -1
- package/src/libs/feature/dataviz/src/index.ts +1 -0
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +1 -0
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +16 -5
- package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.css +0 -0
- package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.html +40 -0
- package/src/libs/feature/dataviz/src/lib/stac-view/stac-view.component.ts +62 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +3 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +30 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +1 -1
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +7 -1
- package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +23 -4
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +30 -1
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.css +0 -0
- package/src/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.html +31 -0
- package/src/libs/ui/elements/src/lib/metadata-doi/metadata-doi.component.ts +30 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +56 -14
- package/translations/de.json +9 -1
- package/translations/en.json +9 -1
- package/translations/es.json +8 -0
- package/translations/fr.json +9 -1
- package/translations/it.json +10 -2
- package/translations/nl.json +8 -0
- package/translations/pt.json +8 -0
- package/translations/sk.json +9 -1
- package/src/libs/common/domain/src/lib/index.ts +0 -2
|
@@ -451,6 +451,32 @@ export class Gn4FieldMapper {
|
|
|
451
451
|
}),
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
|
+
resourceIdentifier: (output, source) => {
|
|
455
|
+
const identifiers = getAsArray(selectField(source, 'resourceIdentifier'))
|
|
456
|
+
|
|
457
|
+
if (!identifiers.length) return output
|
|
458
|
+
|
|
459
|
+
const mappedIdentifiers = identifiers
|
|
460
|
+
.map((id) => {
|
|
461
|
+
const code = selectField<string>(id, 'code')
|
|
462
|
+
const codeSpace = selectField<string>(id, 'codeSpace')
|
|
463
|
+
const link = selectField<string>(id, 'link')
|
|
464
|
+
|
|
465
|
+
return {
|
|
466
|
+
code,
|
|
467
|
+
...(codeSpace && { codeSpace }),
|
|
468
|
+
...(link && { url: link }),
|
|
469
|
+
}
|
|
470
|
+
})
|
|
471
|
+
.filter((id) => id !== null)
|
|
472
|
+
|
|
473
|
+
if (!mappedIdentifiers.length) return output
|
|
474
|
+
|
|
475
|
+
return {
|
|
476
|
+
...output,
|
|
477
|
+
resourceIdentifiers: mappedIdentifiers,
|
|
478
|
+
}
|
|
479
|
+
},
|
|
454
480
|
}
|
|
455
481
|
|
|
456
482
|
private genericField = (output) => output
|
|
@@ -92,7 +92,7 @@ export class Iso19139Converter extends BaseConverter<string> {
|
|
|
92
92
|
recordUpdated: readRecordUpdated,
|
|
93
93
|
recordCreated: () => undefined, // not supported in ISO19139
|
|
94
94
|
recordPublished: () => undefined, // not supported in ISO19139
|
|
95
|
-
|
|
95
|
+
resourceIdentifiers: readResourceIdentifier,
|
|
96
96
|
resourceUpdated: readResourceUpdated,
|
|
97
97
|
resourceCreated: readResourceCreated,
|
|
98
98
|
resourcePublished: readResourcePublished,
|
|
@@ -133,7 +133,7 @@ export class Iso19139Converter extends BaseConverter<string> {
|
|
|
133
133
|
recordUpdated: writeRecordUpdated,
|
|
134
134
|
recordCreated: () => undefined, // not supported in ISO19139
|
|
135
135
|
recordPublished: () => undefined, // not supported in ISO19139
|
|
136
|
-
|
|
136
|
+
resourceIdentifiers: writeResourceIdentifier,
|
|
137
137
|
resourceUpdated: writeResourceUpdated,
|
|
138
138
|
resourceCreated: writeResourceCreated,
|
|
139
139
|
resourcePublished: writeResourcePublished,
|
|
@@ -240,12 +240,19 @@ export class Iso19139Converter extends BaseConverter<string> {
|
|
|
240
240
|
const onlineResources = this.readers['onlineResources'](rootEl, tr)
|
|
241
241
|
const otherLanguages = this.readers['otherLanguages'](rootEl, tr)
|
|
242
242
|
const defaultLanguage = this.readers['defaultLanguage'](rootEl, tr)
|
|
243
|
-
const
|
|
243
|
+
const resourceIdentifiers = this.readers['resourceIdentifiers'](
|
|
244
|
+
rootEl,
|
|
245
|
+
tr
|
|
246
|
+
) as Array<{
|
|
247
|
+
code: string
|
|
248
|
+
codeSpace?: string
|
|
249
|
+
url?: string
|
|
250
|
+
}>
|
|
244
251
|
const spatialExtents = this.readers['spatialExtents'](rootEl, tr)
|
|
245
252
|
|
|
246
253
|
return {
|
|
247
254
|
uniqueIdentifier,
|
|
248
|
-
...(
|
|
255
|
+
...(resourceIdentifiers?.length > 0 && { resourceIdentifiers }),
|
|
249
256
|
kind,
|
|
250
257
|
otherLanguages,
|
|
251
258
|
defaultLanguage,
|
|
@@ -388,8 +395,8 @@ export class Iso19139Converter extends BaseConverter<string> {
|
|
|
388
395
|
this.writers['otherConstraints'](record, rootEl)
|
|
389
396
|
fieldChanged('onlineResources') &&
|
|
390
397
|
this.writers['onlineResources'](record, rootEl)
|
|
391
|
-
fieldChanged('
|
|
392
|
-
this.writers['
|
|
398
|
+
fieldChanged('resourceIdentifiers') &&
|
|
399
|
+
this.writers['resourceIdentifiers'](record, rootEl)
|
|
393
400
|
|
|
394
401
|
if (record.kind === 'dataset') {
|
|
395
402
|
fieldChanged('status') && this.writers['status'](record, rootEl)
|
|
@@ -1183,8 +1183,10 @@ export function readDefaultLanguage(rootEl: XmlElement): LanguageCode {
|
|
|
1183
1183
|
)(rootEl)
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
|
-
export function readResourceIdentifier(
|
|
1187
|
-
|
|
1186
|
+
export function readResourceIdentifier(
|
|
1187
|
+
rootEl: XmlElement
|
|
1188
|
+
): Array<{ code: string; codeSpace?: string; url?: string }> {
|
|
1189
|
+
const code = pipe(
|
|
1188
1190
|
findIdentification(),
|
|
1189
1191
|
findNestedElement(
|
|
1190
1192
|
'gmd:citation',
|
|
@@ -1195,4 +1197,6 @@ export function readResourceIdentifier(rootEl: XmlElement): string {
|
|
|
1195
1197
|
),
|
|
1196
1198
|
extractCharacterString()
|
|
1197
1199
|
)(rootEl)
|
|
1200
|
+
|
|
1201
|
+
return code ? [{ code }] : []
|
|
1198
1202
|
}
|
|
@@ -1502,14 +1502,16 @@ export function writeResourceIdentifier(
|
|
|
1502
1502
|
record: DatasetRecord,
|
|
1503
1503
|
rootEl: XmlElement
|
|
1504
1504
|
) {
|
|
1505
|
+
const firstIdentifier = record.resourceIdentifiers?.[0]?.code
|
|
1506
|
+
|
|
1505
1507
|
pipe(
|
|
1506
1508
|
findOrCreateIdentification(),
|
|
1507
1509
|
findNestedChildOrCreate('gmd:citation', 'gmd:CI_Citation'),
|
|
1508
1510
|
removeChildrenByName('gmd:identifier'),
|
|
1509
|
-
|
|
1511
|
+
firstIdentifier
|
|
1510
1512
|
? pipe(
|
|
1511
1513
|
createNestedChild('gmd:identifier', 'gmd:MD_Identifier', 'gmd:code'),
|
|
1512
|
-
writeCharacterString(
|
|
1514
|
+
writeCharacterString(firstIdentifier)
|
|
1513
1515
|
)
|
|
1514
1516
|
: noop
|
|
1515
1517
|
)(rootEl)
|
|
@@ -113,6 +113,12 @@ export interface INSPIRE_topic {
|
|
|
113
113
|
label: string
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
export interface ResourceIdentifier {
|
|
117
|
+
code: string
|
|
118
|
+
codeSpace?: string
|
|
119
|
+
url?: string
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
export interface BaseRecord {
|
|
117
123
|
uniqueIdentifier: Uuid
|
|
118
124
|
ownerOrganization: Organization
|
|
@@ -135,7 +141,8 @@ export interface BaseRecord {
|
|
|
135
141
|
updateFrequency?: UpdateFrequency
|
|
136
142
|
|
|
137
143
|
// information related to the resource (dataset, service)
|
|
138
|
-
|
|
144
|
+
|
|
145
|
+
resourceIdentifiers?: Array<ResourceIdentifier>
|
|
139
146
|
contactsForResource: Array<Individual>
|
|
140
147
|
resourceCreated?: Date
|
|
141
148
|
resourcePublished?: Date
|
|
@@ -45,6 +45,7 @@ export abstract class PlatformServiceInterface {
|
|
|
45
45
|
thesaurusId: string
|
|
46
46
|
): Observable<Keyword[]>
|
|
47
47
|
|
|
48
|
+
abstract getFeedbacksAllowed(): Observable<boolean>
|
|
48
49
|
abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
|
|
49
50
|
abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
|
|
50
51
|
|
|
@@ -58,5 +59,4 @@ export abstract class PlatformServiceInterface {
|
|
|
58
59
|
removeDuplicate?: boolean
|
|
59
60
|
): Observable<UploadEvent>
|
|
60
61
|
abstract getFileContent(url: URL): Observable<any>
|
|
61
|
-
abstract getFeedbacksAllowed(): Observable<boolean>
|
|
62
62
|
}
|
|
@@ -3,3 +3,4 @@ export * from './lib/chart-view/chart-view.component'
|
|
|
3
3
|
export * from './lib/figure/figure-container/figure-container.component'
|
|
4
4
|
export * from './lib/geo-table-view/geo-table-view.component'
|
|
5
5
|
export * from './lib/table-view/table-view.component'
|
|
6
|
+
export * from './lib/stac-view/stac-view.component'
|
|
@@ -108,6 +108,7 @@ export class ChartViewComponent {
|
|
|
108
108
|
chartType$ = new BehaviorSubject<InputChartType>('bar')
|
|
109
109
|
|
|
110
110
|
@Input() set userChartConfig(config: DatavizChartConfigModel) {
|
|
111
|
+
if (!config) return
|
|
111
112
|
this.aggregation$.next(config.aggregation)
|
|
112
113
|
this.xProperty$.next(config.xProperty)
|
|
113
114
|
this.yProperty$.next(config.yProperty)
|
|
@@ -97,16 +97,27 @@ export class DataService {
|
|
|
97
97
|
if (!featureType) {
|
|
98
98
|
throw new Error('wfs.featuretype.notfound')
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
const wfsVersion = endpoint.getVersion()
|
|
102
|
+
const addSrsName = wfsVersion === '1.1.0' || wfsVersion === '2.0.0'
|
|
103
|
+
const defaultCrs = featureType.defaultCrs
|
|
104
|
+
|
|
105
|
+
const shouldAddOutputCrs = addSrsName && defaultCrs
|
|
106
|
+
|
|
100
107
|
return {
|
|
101
|
-
all: featureType.outputFormats.reduce(
|
|
102
|
-
|
|
108
|
+
all: featureType.outputFormats.reduce((prev, curr) => {
|
|
109
|
+
const isJsonFormat = curr.toLowerCase().includes('json')
|
|
110
|
+
return {
|
|
103
111
|
...prev,
|
|
104
112
|
[curr]: endpoint.getFeatureUrl(featureType.name, {
|
|
105
113
|
outputFormat: curr,
|
|
114
|
+
...(shouldAddOutputCrs &&
|
|
115
|
+
!isJsonFormat && {
|
|
116
|
+
outputCrs: defaultCrs,
|
|
117
|
+
}),
|
|
106
118
|
}),
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
),
|
|
119
|
+
}
|
|
120
|
+
}, {}),
|
|
110
121
|
geojson: endpoint.supportsJson(featureType.name)
|
|
111
122
|
? endpoint.getFeatureUrl(featureType.name, {
|
|
112
123
|
asJson: true,
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="w-full h-full flex flex-row mt-6 bg-white border border-gray-300 rounded-lg overflow-hidden"
|
|
3
|
+
>
|
|
4
|
+
<div class="flex-1 flex flex-col">
|
|
5
|
+
<div class="m-8">
|
|
6
|
+
<p class="mb-4" translate>stac.filter.period</p>
|
|
7
|
+
<p translate>stac.filter.from</p>
|
|
8
|
+
<gn-ui-date-picker
|
|
9
|
+
id="start-date-picker"
|
|
10
|
+
[date]="currentTemporalExtent?.start"
|
|
11
|
+
(dateChange)="onStartDateChange($event)"
|
|
12
|
+
/>
|
|
13
|
+
<p class="mt-4" translate>stac.filter.to</p>
|
|
14
|
+
<gn-ui-date-picker
|
|
15
|
+
id="end-date-picker"
|
|
16
|
+
[date]="currentTemporalExtent?.end"
|
|
17
|
+
(dateChange)="onEndDateChange($event)"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="mt-auto mb-8 mx-8" *ngIf="isTemporalFilterModified">
|
|
22
|
+
<button
|
|
23
|
+
id="reset-filters-button"
|
|
24
|
+
type="button"
|
|
25
|
+
class="flex items-center"
|
|
26
|
+
(click)="onResetFilters()"
|
|
27
|
+
>
|
|
28
|
+
<span translate>stac.filter.reset</span>
|
|
29
|
+
<ng-icon
|
|
30
|
+
name="matDeleteOutline"
|
|
31
|
+
class="pointer-events-none ml-2"
|
|
32
|
+
></ng-icon>
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="w-[655px] flex-shrink-0 flex items-center justify-center">
|
|
38
|
+
<span>Map...</span>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
Input,
|
|
6
|
+
OnInit,
|
|
7
|
+
} from '@angular/core'
|
|
8
|
+
import {
|
|
9
|
+
DatasetServiceDistribution,
|
|
10
|
+
DatasetTemporalExtent,
|
|
11
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
12
|
+
import { DatePickerComponent } from '../../../../../../libs/ui/inputs/src'
|
|
13
|
+
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
14
|
+
import { matDeleteOutline } from '@ng-icons/material-icons/outline'
|
|
15
|
+
import { TranslateDirective } from '@ngx-translate/core'
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'gn-ui-stac-view',
|
|
19
|
+
templateUrl: './stac-view.component.html',
|
|
20
|
+
styleUrls: ['./stac-view.component.css'],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
standalone: true,
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
DatePickerComponent,
|
|
26
|
+
NgIconComponent,
|
|
27
|
+
TranslateDirective,
|
|
28
|
+
],
|
|
29
|
+
viewProviders: [provideIcons({ matDeleteOutline })],
|
|
30
|
+
})
|
|
31
|
+
export class StacViewComponent implements OnInit {
|
|
32
|
+
@Input() link: DatasetServiceDistribution
|
|
33
|
+
@Input() initialTemporalExtent: DatasetTemporalExtent | null
|
|
34
|
+
|
|
35
|
+
currentTemporalExtent: DatasetTemporalExtent | null = null
|
|
36
|
+
isTemporalFilterModified = false
|
|
37
|
+
|
|
38
|
+
onStartDateChange(date: Date) {
|
|
39
|
+
this.currentTemporalExtent = {
|
|
40
|
+
...this.currentTemporalExtent,
|
|
41
|
+
start: date,
|
|
42
|
+
}
|
|
43
|
+
this.isTemporalFilterModified = true
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onEndDateChange(date: Date) {
|
|
47
|
+
this.currentTemporalExtent = {
|
|
48
|
+
...this.currentTemporalExtent,
|
|
49
|
+
end: date,
|
|
50
|
+
}
|
|
51
|
+
this.isTemporalFilterModified = true
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
onResetFilters() {
|
|
55
|
+
this.currentTemporalExtent = this.initialTemporalExtent
|
|
56
|
+
this.isTemporalFilterModified = false
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
ngOnInit() {
|
|
60
|
+
this.currentTemporalExtent = this.initialTemporalExtent
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
(valueChange)="valueChange.emit($event)"
|
|
70
70
|
></gn-ui-form-field-overviews>
|
|
71
71
|
</ng-container>
|
|
72
|
-
<ng-container *ngSwitchCase="'
|
|
72
|
+
<ng-container *ngSwitchCase="'resourceIdentifiers'">
|
|
73
73
|
<gn-ui-form-field-simple
|
|
74
74
|
[type]="'text'"
|
|
75
|
-
[value]="
|
|
76
|
-
(valueChange)="
|
|
75
|
+
[value]="valueAsResourceIdentifierCode"
|
|
76
|
+
(valueChange)="handleResourceIdentifierChange($event)"
|
|
77
77
|
></gn-ui-form-field-simple>
|
|
78
78
|
</ng-container>
|
|
79
79
|
<ng-container *ngSwitchCase="'resourceCreated'">
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -142,4 +142,34 @@ export class FormFieldComponent {
|
|
|
142
142
|
get valueAsOnlineResources() {
|
|
143
143
|
return this.value as Array<OnlineResource>
|
|
144
144
|
}
|
|
145
|
+
get valueAsResourceIdentifierCode() {
|
|
146
|
+
const identifiers = this.value as Array<{
|
|
147
|
+
code: string
|
|
148
|
+
codeSpace?: string
|
|
149
|
+
url?: string
|
|
150
|
+
}>
|
|
151
|
+
return identifiers?.[0]?.code || ''
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
handleResourceIdentifierChange(code: string) {
|
|
155
|
+
const identifiers = this.value as Array<{
|
|
156
|
+
code: string
|
|
157
|
+
codeSpace?: string
|
|
158
|
+
url?: string
|
|
159
|
+
}>
|
|
160
|
+
|
|
161
|
+
if (!code) {
|
|
162
|
+
this.valueChange.emit(identifiers?.slice(1) || [])
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (identifiers?.[0]) {
|
|
167
|
+
this.valueChange.emit([
|
|
168
|
+
{ ...identifiers[0], code },
|
|
169
|
+
...identifiers.slice(1),
|
|
170
|
+
])
|
|
171
|
+
} else {
|
|
172
|
+
this.valueChange.emit([{ code }])
|
|
173
|
+
}
|
|
174
|
+
}
|
|
145
175
|
}
|
|
@@ -81,7 +81,7 @@ export const RECORD_RESOURCE_CREATED_FIELD: EditorField = {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export const RESOURCE_IDENTIFIER_FIELD: EditorField = {
|
|
84
|
-
model: '
|
|
84
|
+
model: 'resourceIdentifiers',
|
|
85
85
|
formFieldConfig: {
|
|
86
86
|
labelKey: marker('editor.record.form.field.resourceIdentifier'),
|
|
87
87
|
},
|
package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { MdViewFacade } from '../state'
|
|
|
12
12
|
import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
13
13
|
import { CommonModule } from '@angular/common'
|
|
14
14
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
15
|
-
import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
|
|
15
|
+
import { GEONETWORK_UI_TAG_NAME, PROXY_PATH } from '../../../../../../libs/util/shared/src'
|
|
16
16
|
|
|
17
17
|
export const WEB_COMPONENT_EMBEDDER_URL = new InjectionToken<string>(
|
|
18
18
|
'webComponentEmbedderUrl'
|
|
@@ -60,6 +60,9 @@ export class DataViewPermalinkComponent {
|
|
|
60
60
|
url.searchParams.append('e', `gn-dataset-view-map`)
|
|
61
61
|
}
|
|
62
62
|
url.searchParams.append('a', `api-url=${this.config.basePath}`)
|
|
63
|
+
if (this.proxyPath) {
|
|
64
|
+
url.searchParams.append('a', `proxy-path=${this.proxyPath}`)
|
|
65
|
+
}
|
|
63
66
|
url.searchParams.append('a', `dataset-id=${metadata.uniqueIdentifier}`)
|
|
64
67
|
url.searchParams.append('a', `primary-color=#0f4395`)
|
|
65
68
|
url.searchParams.append('a', `secondary-color=#8bc832`)
|
|
@@ -72,6 +75,9 @@ export class DataViewPermalinkComponent {
|
|
|
72
75
|
constructor(
|
|
73
76
|
@Inject(Configuration) private config: Configuration,
|
|
74
77
|
@Optional()
|
|
78
|
+
@Inject(PROXY_PATH)
|
|
79
|
+
private proxyPath: string,
|
|
80
|
+
@Optional()
|
|
75
81
|
@Inject(WEB_COMPONENT_EMBEDDER_URL)
|
|
76
82
|
protected wcEmbedderBaseUrl: string,
|
|
77
83
|
private facade: MdViewFacade
|
package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Component,
|
|
4
4
|
Inject,
|
|
5
5
|
Input,
|
|
6
|
+
Optional,
|
|
6
7
|
} from '@angular/core'
|
|
7
8
|
import { Configuration } from '../../../../../../libs/data-access/gn4/src'
|
|
8
9
|
import { MdViewFacade } from '../state'
|
|
@@ -10,7 +11,7 @@ import { BehaviorSubject, combineLatest, map } from 'rxjs'
|
|
|
10
11
|
import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
11
12
|
import { CommonModule } from '@angular/common'
|
|
12
13
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
13
|
-
import { GEONETWORK_UI_TAG_NAME } from '../../../../../../libs/util/shared/src'
|
|
14
|
+
import { GEONETWORK_UI_TAG_NAME, PROXY_PATH } from '../../../../../../libs/util/shared/src'
|
|
14
15
|
|
|
15
16
|
@Component({
|
|
16
17
|
selector: 'gn-ui-data-view-web-component',
|
|
@@ -42,7 +43,12 @@ export class DataViewWebComponentComponent {
|
|
|
42
43
|
api-url="${new URL(
|
|
43
44
|
this.config.basePath,
|
|
44
45
|
window.location.origin
|
|
45
|
-
).toString()}"
|
|
46
|
+
).toString()}"${
|
|
47
|
+
this.proxyPath
|
|
48
|
+
? `
|
|
49
|
+
proxy-path="${this.proxyPath}"`
|
|
50
|
+
: ''
|
|
51
|
+
}
|
|
46
52
|
dataset-id="${metadata.uniqueIdentifier}"
|
|
47
53
|
aggregation="${aggregation}"
|
|
48
54
|
x-property="${xProperty}"
|
|
@@ -65,7 +71,12 @@ export class DataViewWebComponentComponent {
|
|
|
65
71
|
api-url="${new URL(
|
|
66
72
|
this.config.basePath,
|
|
67
73
|
window.location.origin
|
|
68
|
-
).toString()}"
|
|
74
|
+
).toString()}"${
|
|
75
|
+
this.proxyPath
|
|
76
|
+
? `
|
|
77
|
+
proxy-path="${this.proxyPath}"`
|
|
78
|
+
: ''
|
|
79
|
+
}
|
|
69
80
|
dataset-id="${metadata.uniqueIdentifier}"
|
|
70
81
|
primary-color="#0f4395"
|
|
71
82
|
secondary-color="#8bc832"
|
|
@@ -82,7 +93,12 @@ export class DataViewWebComponentComponent {
|
|
|
82
93
|
api-url="${new URL(
|
|
83
94
|
this.config.basePath,
|
|
84
95
|
window.location.origin
|
|
85
|
-
).toString()}"
|
|
96
|
+
).toString()}"${
|
|
97
|
+
this.proxyPath
|
|
98
|
+
? `
|
|
99
|
+
proxy-path="${this.proxyPath}"`
|
|
100
|
+
: ''
|
|
101
|
+
}
|
|
86
102
|
dataset-id="${metadata.uniqueIdentifier}"
|
|
87
103
|
primary-color="#0f4395"
|
|
88
104
|
secondary-color="#8bc832"
|
|
@@ -97,6 +113,9 @@ export class DataViewWebComponentComponent {
|
|
|
97
113
|
|
|
98
114
|
constructor(
|
|
99
115
|
@Inject(Configuration) private config: Configuration,
|
|
116
|
+
@Optional()
|
|
117
|
+
@Inject(PROXY_PATH)
|
|
118
|
+
private proxyPath: string,
|
|
100
119
|
private facade: MdViewFacade
|
|
101
120
|
) {}
|
|
102
121
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
21
21
|
import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
|
|
22
22
|
import { OgcApiRecord } from '@camptocamp/ogc-client'
|
|
23
|
-
import { from, of
|
|
23
|
+
import { from, of } from 'rxjs'
|
|
24
24
|
import { DataService } from '../../../../../../libs/feature/dataviz/src'
|
|
25
25
|
|
|
26
26
|
@Injectable()
|
|
@@ -89,6 +89,25 @@ export class MdViewFacade {
|
|
|
89
89
|
shareReplay(1)
|
|
90
90
|
)
|
|
91
91
|
|
|
92
|
+
resourceDoi$ = this.metadata$.pipe(
|
|
93
|
+
map((record) => {
|
|
94
|
+
if (!record?.resourceIdentifiers?.length) return null
|
|
95
|
+
const doiIdentifier = record.resourceIdentifiers.find(
|
|
96
|
+
(id) =>
|
|
97
|
+
id.codeSpace?.toLowerCase().includes('doi.org') ||
|
|
98
|
+
id.code.startsWith('10.')
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
if (!doiIdentifier) return null
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
code: doiIdentifier.code,
|
|
105
|
+
url: doiIdentifier.url ? doiIdentifier.url : null,
|
|
106
|
+
}
|
|
107
|
+
}),
|
|
108
|
+
shareReplay(1)
|
|
109
|
+
)
|
|
110
|
+
|
|
92
111
|
apiLinks$ = this.allLinks$.pipe(
|
|
93
112
|
map((links) =>
|
|
94
113
|
links.filter((link) => this.linkClassifier.hasUsage(link, LinkUsage.API))
|
|
@@ -105,6 +124,16 @@ export class MdViewFacade {
|
|
|
105
124
|
shareReplay(1)
|
|
106
125
|
)
|
|
107
126
|
|
|
127
|
+
stacLinks$ = this.allLinks$.pipe(
|
|
128
|
+
map((links) =>
|
|
129
|
+
links.filter(
|
|
130
|
+
(link) =>
|
|
131
|
+
link.type === 'service' && link.accessServiceProtocol === 'stac'
|
|
132
|
+
)
|
|
133
|
+
),
|
|
134
|
+
shareReplay(1)
|
|
135
|
+
)
|
|
136
|
+
|
|
108
137
|
downloadLinks$ = this.allLinks$.pipe(
|
|
109
138
|
map((links) =>
|
|
110
139
|
links.filter((link) =>
|
|
@@ -14,6 +14,7 @@ export * from './lib/markdown-editor/markdown-editor.component'
|
|
|
14
14
|
export * from './lib/markdown-parser/markdown-parser.component'
|
|
15
15
|
export * from './lib/metadata-catalog/metadata-catalog.component'
|
|
16
16
|
export * from './lib/metadata-contact/metadata-contact.component'
|
|
17
|
+
export * from './lib/metadata-doi/metadata-doi.component'
|
|
17
18
|
export * from './lib/metadata-info/metadata-info.component'
|
|
18
19
|
export * from './lib/metadata-quality-item/metadata-quality-item.component'
|
|
19
20
|
export * from './lib/metadata-quality/metadata-quality.component'
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="border border-gray-300 rounded-lg py-4 px-5 text-black flex justify-between items-center gap-4"
|
|
3
|
+
>
|
|
4
|
+
<div class="overflow-hidden flex-1">
|
|
5
|
+
<p class="text-base font-medium mb-3">DOI</p>
|
|
6
|
+
<p
|
|
7
|
+
class="text-base font-medium overflow-hidden text-ellipsis whitespace-nowrap"
|
|
8
|
+
[title]="code"
|
|
9
|
+
>
|
|
10
|
+
{{ code }}
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="flex gap-2 items-start">
|
|
14
|
+
<gn-ui-copy-text-button
|
|
15
|
+
[text]="code"
|
|
16
|
+
[displayText]="false"
|
|
17
|
+
[tooltipText]="'record.metadata.doi.copy' | translate"
|
|
18
|
+
class="[&>div]:flex [&>div]:items-center [&>div]:justify-center [&_button]:w-[40px] [&_button]:h-[32px] [&_button]:flex [&_button]:items-center [&_button]:justify-center [&_button]:hover:bg-gray-100 [&_button]:rounded-lg [&_button]:transition-colors [&_button]:border [&_button]:border-gray-300 [&_button]:px-2 [&_button]:py-1 [&_ng-icon]:w-5 [&_ng-icon]:h-5"
|
|
19
|
+
></gn-ui-copy-text-button>
|
|
20
|
+
<a
|
|
21
|
+
*ngIf="link"
|
|
22
|
+
[href]="link"
|
|
23
|
+
target="_blank"
|
|
24
|
+
rel="noopener noreferrer"
|
|
25
|
+
class="w-[40px] h-[32px] flex items-center justify-center hover:bg-gray-100 rounded-lg transition-colors border border-gray-300 px-2 py-1"
|
|
26
|
+
[matTooltip]="'record.metadata.doi.open' | translate"
|
|
27
|
+
>
|
|
28
|
+
<ng-icon name="matOpenInNew" size="20"></ng-icon>
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
4
|
+
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
5
|
+
import { matOpenInNew } from '@ng-icons/material-icons/baseline'
|
|
6
|
+
import { TranslatePipe } from '@ngx-translate/core'
|
|
7
|
+
import { CopyTextButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'gn-ui-metadata-doi',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
MatTooltipModule,
|
|
15
|
+
NgIcon,
|
|
16
|
+
TranslatePipe,
|
|
17
|
+
CopyTextButtonComponent,
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './metadata-doi.component.html',
|
|
20
|
+
styleUrl: './metadata-doi.component.css',
|
|
21
|
+
viewProviders: [
|
|
22
|
+
provideIcons({
|
|
23
|
+
matOpenInNew,
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
})
|
|
27
|
+
export class MetadataDoiComponent {
|
|
28
|
+
@Input() code!: string
|
|
29
|
+
@Input() link?: string
|
|
30
|
+
}
|