geonetwork-ui 2.6.0-dev.c4b99cdef → 2.6.0-dev.ceb4be4c1
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/common/distribution.mapper.mjs +3 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +37 -4
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +2 -1
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +3 -3
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +29 -5
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
- package/esm2022/libs/feature/record/src/index.mjs +2 -3
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
- package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +3 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +13 -13
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +7 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +3 -1
- package/esm2022/libs/feature/search/src/lib/constants.mjs +2 -1
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -2
- package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
- package/esm2022/libs/ui/elements/src/index.mjs +3 -1
- package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +55 -0
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +27 -53
- package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +22 -5
- 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 +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +17 -7
- package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +12 -4
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +65 -14
- package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -8
- package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +2 -2
- package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +27 -14
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
- package/esm2022/translations/de.json +7 -2
- package/esm2022/translations/en.json +8 -5
- package/esm2022/translations/es.json +7 -2
- package/esm2022/translations/fr.json +7 -4
- package/esm2022/translations/it.json +39 -34
- package/esm2022/translations/nl.json +7 -2
- package/esm2022/translations/pt.json +7 -2
- package/fesm2022/geonetwork-ui.mjs +1106 -600
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/common/distribution.mapper.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/types/metadata.model.d.ts +0 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +3 -0
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +2 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
- 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 +1 -0
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/index.d.ts +1 -2
- package/libs/feature/record/src/index.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts +10 -0
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +6 -0
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +28 -21
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
- package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +1 -1
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +2 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +15 -0
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +3 -7
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +3 -1
- package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
- package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +8 -1
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
- package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +15 -6
- package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-list/results-list.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +5 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +55 -4
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +0 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +1 -0
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +50 -5
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +2 -0
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
- package/src/libs/feature/record/src/index.ts +1 -2
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -1
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +10 -0
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +22 -0
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +22 -15
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +12 -0
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +9 -0
- package/src/libs/feature/search/src/lib/constants.ts +1 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +2 -0
- package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
- package/src/libs/ui/elements/src/index.ts +2 -0
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.css +4 -0
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +13 -0
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +54 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +133 -138
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +19 -47
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +7 -5
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +21 -2
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +6 -3
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +4 -0
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -1
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +8 -29
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +14 -1
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +15 -1
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +9 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -1
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +1 -2
- package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
- package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -0
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +8 -10
- package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +75 -7
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
- package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.html +9 -81
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -0
- package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +2 -2
- package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
- package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +0 -1
- package/src/libs/ui/search/src/lib/results-table/results-table.component.css +4 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +26 -16
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +20 -10
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
- package/translations/de.json +7 -2
- package/translations/en.json +8 -5
- package/translations/es.json +7 -2
- package/translations/fr.json +7 -4
- package/translations/it.json +39 -34
- package/translations/nl.json +7 -2
- package/translations/pt.json +7 -2
- package/translations/sk.json +7 -2
|
@@ -65,7 +65,8 @@ export function extractCharacterString(): ChainableFunction<
|
|
|
65
65
|
return pipe(
|
|
66
66
|
fallback(
|
|
67
67
|
findChildElement('gco:CharacterString', false),
|
|
68
|
-
findChildElement('gmx:Anchor', false)
|
|
68
|
+
findChildElement('gmx:Anchor', false),
|
|
69
|
+
findChildElement('gmx:MimeFileType', false)
|
|
69
70
|
),
|
|
70
71
|
readText()
|
|
71
72
|
)
|
|
@@ -124,11 +124,11 @@ export class ElasticsearchService {
|
|
|
124
124
|
this.runtimeFields[fieldName] = expression
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
getMetadataByIdsPayload(uuids: string[]): EsSearchParams {
|
|
128
128
|
return {
|
|
129
129
|
query: {
|
|
130
130
|
ids: {
|
|
131
|
-
values:
|
|
131
|
+
values: uuids,
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
}
|
|
@@ -129,9 +129,9 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
129
129
|
return this.gn4SearchApi
|
|
130
130
|
.search(
|
|
131
131
|
'bucket',
|
|
132
|
-
['fcats'],
|
|
132
|
+
['fcats', 'hassources'],
|
|
133
133
|
JSON.stringify(
|
|
134
|
-
this.gn4SearchHelper.
|
|
134
|
+
this.gn4SearchHelper.getMetadataByIdsPayload([uniqueIdentifier])
|
|
135
135
|
)
|
|
136
136
|
)
|
|
137
137
|
.pipe(
|
|
@@ -142,6 +142,27 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
142
142
|
)
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
getMultipleRecords(
|
|
146
|
+
uniqueIdentifiers: string[]
|
|
147
|
+
): Observable<CatalogRecord[] | null> {
|
|
148
|
+
return this.gn4SearchApi
|
|
149
|
+
.search(
|
|
150
|
+
'bucket',
|
|
151
|
+
undefined,
|
|
152
|
+
JSON.stringify(
|
|
153
|
+
this.gn4SearchHelper.getMetadataByIdsPayload(uniqueIdentifiers)
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
.pipe(
|
|
157
|
+
map((results: Gn4SearchResults) => results.hits.hits),
|
|
158
|
+
switchMap((records) =>
|
|
159
|
+
records && records.length > 0
|
|
160
|
+
? this.gn4Mapper.readRecords(records)
|
|
161
|
+
: of(null)
|
|
162
|
+
)
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
145
166
|
private mapEmbeddedFeatureCatalog(
|
|
146
167
|
featureTypes: Array<DatasetFeatureType>
|
|
147
168
|
): DatasetFeatureCatalog {
|
|
@@ -152,7 +173,9 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
152
173
|
attributes: Array.isArray(featureType.attributeTable)
|
|
153
174
|
? featureType.attributeTable.map((attr) => ({
|
|
154
175
|
name: attr.name,
|
|
176
|
+
code: attr.code,
|
|
155
177
|
title: attr.definition,
|
|
178
|
+
type: attr.type,
|
|
156
179
|
}))
|
|
157
180
|
: [],
|
|
158
181
|
})),
|
|
@@ -164,7 +187,8 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
164
187
|
): Observable<DatasetFeatureCatalog | null> {
|
|
165
188
|
if (
|
|
166
189
|
record.extras?.['featureTypes'] &&
|
|
167
|
-
Array.isArray(record.extras['featureTypes'])
|
|
190
|
+
Array.isArray(record.extras['featureTypes']) &&
|
|
191
|
+
record.extras['featureTypes'].length > 0
|
|
168
192
|
) {
|
|
169
193
|
return of(this.mapEmbeddedFeatureCatalog(record.extras['featureTypes']))
|
|
170
194
|
}
|
|
@@ -200,6 +224,24 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
200
224
|
)
|
|
201
225
|
}
|
|
202
226
|
|
|
227
|
+
getSources(record: CatalogRecord): Observable<CatalogRecord[]> {
|
|
228
|
+
const sourcesIdentifiers = record.extras?.['sourcesIdentifiers'] as string[]
|
|
229
|
+
if (sourcesIdentifiers && sourcesIdentifiers.length > 0) {
|
|
230
|
+
return this.getMultipleRecords(sourcesIdentifiers)
|
|
231
|
+
}
|
|
232
|
+
return of(null)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
getSourceOf(record: CatalogRecord): Observable<CatalogRecord[]> {
|
|
236
|
+
const sourceOfIdentifiers = record.extras?.[
|
|
237
|
+
'sourceOfIdentifiers'
|
|
238
|
+
] as string[]
|
|
239
|
+
if (sourceOfIdentifiers && sourceOfIdentifiers.length > 0) {
|
|
240
|
+
return this.getMultipleRecords(sourceOfIdentifiers)
|
|
241
|
+
}
|
|
242
|
+
return of(null)
|
|
243
|
+
}
|
|
244
|
+
|
|
203
245
|
aggregate(params: AggregationsParams): Observable<Aggregations> {
|
|
204
246
|
// if aggregations are empty, return an empty object right away
|
|
205
247
|
if (Object.keys(params).length === 0) return of({})
|
|
@@ -362,9 +404,12 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
362
404
|
const record = await converter.readRecord(fetchedRecordAsXml)
|
|
363
405
|
|
|
364
406
|
record.title = `${record.title} (Copy)`
|
|
365
|
-
await converter.writeRecord(
|
|
407
|
+
const recordAsXml = await converter.writeRecord(
|
|
408
|
+
record,
|
|
409
|
+
fetchedRecordAsXml
|
|
410
|
+
)
|
|
366
411
|
|
|
367
|
-
return this.saveRecord(record,
|
|
412
|
+
return this.saveRecord(record, recordAsXml, false)
|
|
368
413
|
}),
|
|
369
414
|
exhaustMap((uuidObservable: Observable<string>) => uuidObservable),
|
|
370
415
|
catchError((error: HttpErrorResponse) => {
|
|
@@ -152,6 +152,8 @@ export type ServiceProtocol =
|
|
|
152
152
|
| 'esriRest'
|
|
153
153
|
| 'ogcFeatures'
|
|
154
154
|
| 'GPFDL'
|
|
155
|
+
| 'tms'
|
|
156
|
+
| 'maplibre-style'
|
|
155
157
|
| 'other'
|
|
156
158
|
|
|
157
159
|
export type OnlineResourceType = 'service' | 'download' | 'link' | 'endpoint'
|
|
@@ -235,7 +237,7 @@ export type DatasetFeatureCatalog = {
|
|
|
235
237
|
featureTypes: Array<{
|
|
236
238
|
name: string
|
|
237
239
|
definition: string
|
|
238
|
-
attributes: Array<{ name: string; title: string }>
|
|
240
|
+
attributes: Array<{ name: string; title: string; code: string }>
|
|
239
241
|
}>
|
|
240
242
|
}
|
|
241
243
|
|
|
@@ -272,7 +274,12 @@ export interface DatasetFeatureType {
|
|
|
272
274
|
isAbstract: string
|
|
273
275
|
typeName: string
|
|
274
276
|
definition: string
|
|
275
|
-
attributeTable: Array<{
|
|
277
|
+
attributeTable: Array<{
|
|
278
|
+
name: string
|
|
279
|
+
definition: string
|
|
280
|
+
type: string
|
|
281
|
+
code: string
|
|
282
|
+
}>
|
|
276
283
|
}
|
|
277
284
|
|
|
278
285
|
export type ReuseType = 'application' | 'map' | 'other'
|
|
@@ -19,6 +19,8 @@ export abstract class RecordsRepositoryInterface {
|
|
|
19
19
|
abstract getSimilarRecords(
|
|
20
20
|
similarTo: CatalogRecord
|
|
21
21
|
): Observable<CatalogRecord[]>
|
|
22
|
+
abstract getSources(record: CatalogRecord): Observable<CatalogRecord[]>
|
|
23
|
+
abstract getSourceOf(record: CatalogRecord): Observable<CatalogRecord[]>
|
|
22
24
|
abstract fuzzySearch(query: string): Observable<SearchResults>
|
|
23
25
|
abstract canEditRecord(uniqueIdentifier: string): Observable<boolean>
|
|
24
26
|
/**
|
|
@@ -144,4 +144,14 @@ export const elasticLinkFixture = (): Record<string, unknown> => ({
|
|
|
144
144
|
name: 'ogcapi features layer',
|
|
145
145
|
url: 'https://mel.integration.apps.gs-fr-prod.camptocamp.com/data/ogcapi/collections/comptages_velo/items?',
|
|
146
146
|
},
|
|
147
|
+
maplayerTms: {
|
|
148
|
+
accessServiceProtocol: 'TMS',
|
|
149
|
+
name: 'mytmslayer',
|
|
150
|
+
url: 'https://my.tms.server/MapServer',
|
|
151
|
+
},
|
|
152
|
+
maplayerTms2: {
|
|
153
|
+
accessServiceProtocol: 'OSGeo:TMS',
|
|
154
|
+
name: 'myothertmslayer',
|
|
155
|
+
url: 'https://my.tms.server/MapServer',
|
|
156
|
+
},
|
|
147
157
|
})
|
|
@@ -185,6 +185,20 @@ export const aSetOfLinksFixture = () => ({
|
|
|
185
185
|
url: new URL('https://my.ogc.server/wms'),
|
|
186
186
|
accessServiceProtocol: 'wms',
|
|
187
187
|
}) as DatasetServiceDistribution,
|
|
188
|
+
geodataTms: () =>
|
|
189
|
+
({
|
|
190
|
+
name: 'mytmslayer',
|
|
191
|
+
type: 'service',
|
|
192
|
+
url: new URL('https://my.ogc.server/tms'),
|
|
193
|
+
accessServiceProtocol: 'tms',
|
|
194
|
+
}) as DatasetServiceDistribution,
|
|
195
|
+
geodataAsMaplibreStyle: () =>
|
|
196
|
+
({
|
|
197
|
+
name: 'mytmslayerAsMaplibreJson',
|
|
198
|
+
type: 'service',
|
|
199
|
+
url: new URL('https://my.ogc.server/tms/layer/style.json'),
|
|
200
|
+
accessServiceProtocol: 'maplibre-style',
|
|
201
|
+
}) as DatasetServiceDistribution,
|
|
188
202
|
geodataWfs2: () =>
|
|
189
203
|
({
|
|
190
204
|
name: 'myotherlayer',
|
|
@@ -231,7 +231,7 @@ As such, **it is not very interesting at all.**`,
|
|
|
231
231
|
recordUpdated: new Date('2022-04-15T14:18:19'),
|
|
232
232
|
resourceUpdated: new Date('2022-03-29'),
|
|
233
233
|
title:
|
|
234
|
-
"Plan local d'urbanisme (PLU) dématérialisé - commune d'Avrigny - approbation du 29/03/2022",
|
|
234
|
+
"Plan local d'urbanisme (PLU) dématérialisé - commune d'Avrigny - approbation du 29/03/2022 (Ce lot informe du droit à bâtir sur la commune d'Avrigny)",
|
|
235
235
|
abstract: `Plan local d'urbanisme (PLU) dématérialisé - commune d'Avrigny - approbation du 29/03/2022.
|
|
236
236
|
|
|
237
237
|
Ce lot informe du droit à bâtir sur la commune d'Avrigny.
|
|
@@ -18,15 +18,17 @@
|
|
|
18
18
|
[selected]="xProperty$.value"
|
|
19
19
|
[title]="'chart.dropdown.xProperty' | translate"
|
|
20
20
|
></gn-ui-dropdown-selector>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
<ng-container *ngIf="yChoices$ | async as yChoices">
|
|
22
|
+
<gn-ui-dropdown-selector
|
|
23
|
+
class="basis-1/4"
|
|
24
|
+
*ngIf="!isCountAggregation"
|
|
25
|
+
[choices]="yChoices"
|
|
26
|
+
(selectValue)="yProperty$.next($event)"
|
|
27
|
+
[selected]="yProperty$.value"
|
|
28
|
+
[title]="'chart.dropdown.yProperty' | translate"
|
|
29
|
+
class="select-y-prop"
|
|
30
|
+
></gn-ui-dropdown-selector>
|
|
31
|
+
</ng-container>
|
|
30
32
|
<gn-ui-dropdown-selector
|
|
31
33
|
class="basis-1/4"
|
|
32
34
|
[choices]="aggregationChoices"
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
*ngIf="!error"
|
|
44
46
|
[data]="chartData$ | async"
|
|
45
47
|
[type]="chartType$.value"
|
|
48
|
+
[prettyLabel]="prettyLabel$ | async"
|
|
46
49
|
[labelProperty]="labelProperty"
|
|
47
50
|
[valueProperty]="valueProperty"
|
|
48
51
|
></gn-ui-chart>
|
|
@@ -2,9 +2,7 @@ import {
|
|
|
2
2
|
ChangeDetectionStrategy,
|
|
3
3
|
ChangeDetectorRef,
|
|
4
4
|
Component,
|
|
5
|
-
Inject,
|
|
6
5
|
Input,
|
|
7
|
-
Optional,
|
|
8
6
|
Output,
|
|
9
7
|
} from '@angular/core'
|
|
10
8
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
@@ -13,6 +11,7 @@ import {
|
|
|
13
11
|
FetchError,
|
|
14
12
|
FieldAggregation,
|
|
15
13
|
getJsonDataItemsProxy,
|
|
14
|
+
PropertyInfo,
|
|
16
15
|
} from '../../../../../../libs/util/data-fetcher/src'
|
|
17
16
|
import {
|
|
18
17
|
DropdownChoice,
|
|
@@ -30,7 +29,10 @@ import {
|
|
|
30
29
|
} from 'rxjs/operators'
|
|
31
30
|
import { DataService } from '../service/data.service'
|
|
32
31
|
import { InputChartType } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
|
|
33
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
DatasetFeatureCatalog,
|
|
34
|
+
DatasetOnlineResource,
|
|
35
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
34
36
|
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
35
37
|
import { CommonModule } from '@angular/common'
|
|
36
38
|
import { ChartComponent } from '../../../../../../libs/ui/dataviz/src'
|
|
@@ -67,9 +69,18 @@ marker('chart.aggregation.count')
|
|
|
67
69
|
standalone: true,
|
|
68
70
|
})
|
|
69
71
|
export class ChartViewComponent {
|
|
72
|
+
public featureCatalog$ = new BehaviorSubject<DatasetFeatureCatalog | null>(
|
|
73
|
+
null
|
|
74
|
+
)
|
|
75
|
+
@Input() set featureCatalog(value: DatasetFeatureCatalog) {
|
|
76
|
+
this.featureCatalog$.next(value)
|
|
77
|
+
}
|
|
70
78
|
@Input() cacheActive = true
|
|
71
79
|
@Input() set link(value: DatasetOnlineResource) {
|
|
72
80
|
this.currentLink$.next(value)
|
|
81
|
+
if (value) {
|
|
82
|
+
this.aggregation$.next('sum')
|
|
83
|
+
}
|
|
73
84
|
}
|
|
74
85
|
private currentLink$ = new BehaviorSubject<DatasetOnlineResource>(null)
|
|
75
86
|
|
|
@@ -150,13 +161,8 @@ export class ChartViewComponent {
|
|
|
150
161
|
}),
|
|
151
162
|
shareReplay(1)
|
|
152
163
|
)
|
|
153
|
-
properties$ = this.dataset
|
|
154
|
-
switchMap((dataset) =>
|
|
155
|
-
dataset.properties.catch((error) => {
|
|
156
|
-
this.handleError(error)
|
|
157
|
-
return []
|
|
158
|
-
})
|
|
159
|
-
),
|
|
164
|
+
properties$ = combineLatest([this.dataset$, this.featureCatalog$]).pipe(
|
|
165
|
+
switchMap(([dataset, catalog]) => this.setProperties(dataset, catalog)),
|
|
160
166
|
shareReplay(1)
|
|
161
167
|
)
|
|
162
168
|
yChoices$ = this.properties$.pipe(
|
|
@@ -197,6 +203,7 @@ export class ChartViewComponent {
|
|
|
197
203
|
this.yProperty$.pipe(filter((value) => value !== undefined)),
|
|
198
204
|
this.aggregation$,
|
|
199
205
|
]).pipe(
|
|
206
|
+
filter(([_, x, y]) => !!x || !!y),
|
|
200
207
|
switchMap(([dataset, xProp, yProp, aggregation]) => {
|
|
201
208
|
const fieldAgg: FieldAggregation =
|
|
202
209
|
aggregation === 'count' ? ['count'] : [aggregation, yProp]
|
|
@@ -217,6 +224,18 @@ export class ChartViewComponent {
|
|
|
217
224
|
shareReplay(1)
|
|
218
225
|
)
|
|
219
226
|
|
|
227
|
+
prettyLabel$ = combineLatest([
|
|
228
|
+
this.aggregation$,
|
|
229
|
+
this.properties$,
|
|
230
|
+
this.yProperty$,
|
|
231
|
+
]).pipe(
|
|
232
|
+
map(([aggregation, properties, yProperty]) => {
|
|
233
|
+
if (aggregation === 'count') return 'count()'
|
|
234
|
+
const prop = properties.find((p) => p.name === yProperty)
|
|
235
|
+
return prop ? `${aggregation}(${prop.label})` : ''
|
|
236
|
+
})
|
|
237
|
+
)
|
|
238
|
+
|
|
220
239
|
get labelProperty() {
|
|
221
240
|
if (!this.xProperty$.value) return ''
|
|
222
241
|
return `distinct(${this.xProperty$.value})`
|
|
@@ -235,6 +254,31 @@ export class ChartViewComponent {
|
|
|
235
254
|
private translateService: TranslateService
|
|
236
255
|
) {}
|
|
237
256
|
|
|
257
|
+
setProperties(
|
|
258
|
+
dataset: BaseReader,
|
|
259
|
+
catalog: DatasetFeatureCatalog
|
|
260
|
+
): Promise<PropertyInfo[]> {
|
|
261
|
+
return dataset.properties
|
|
262
|
+
.then((properties) => {
|
|
263
|
+
return properties.map((p) => {
|
|
264
|
+
if (catalog) {
|
|
265
|
+
const featureAttributes = catalog?.featureTypes[0]?.attributes ?? []
|
|
266
|
+
const matchingAttribute = featureAttributes.find(
|
|
267
|
+
(attr) => attr.name === p.label
|
|
268
|
+
)
|
|
269
|
+
if (matchingAttribute?.code) {
|
|
270
|
+
return { ...p, label: matchingAttribute.code }
|
|
271
|
+
}
|
|
272
|
+
return p
|
|
273
|
+
}
|
|
274
|
+
return p
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
.catch((error) => {
|
|
278
|
+
this.handleError(error)
|
|
279
|
+
return []
|
|
280
|
+
})
|
|
281
|
+
}
|
|
238
282
|
handleError(error: FetchError | Error | string) {
|
|
239
283
|
if (error instanceof FetchError) {
|
|
240
284
|
this.error = this.translateService.instant(
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
OgcApiRecord,
|
|
7
7
|
WfsEndpoint,
|
|
8
8
|
WfsVersion,
|
|
9
|
+
TmsEndpoint,
|
|
9
10
|
} from '@camptocamp/ogc-client'
|
|
10
11
|
import {
|
|
11
12
|
BaseReader,
|
|
@@ -231,6 +232,42 @@ export class DataService {
|
|
|
231
232
|
})
|
|
232
233
|
}
|
|
233
234
|
|
|
235
|
+
async getGeodataLinksFromTms(
|
|
236
|
+
tmsLink: DatasetServiceDistribution,
|
|
237
|
+
keepOriginalLink = false
|
|
238
|
+
): Promise<DatasetServiceDistribution[]> {
|
|
239
|
+
const endpoint = new TmsEndpoint(tmsLink.url.toString())
|
|
240
|
+
const tileMaps = await endpoint.allTileMaps
|
|
241
|
+
if (!tileMaps?.length) return null
|
|
242
|
+
|
|
243
|
+
// TODO: at some point use the identifierInService field if more that one layers in the TMS service
|
|
244
|
+
const tileMapInfo = await endpoint.getTileMapInfo(tileMaps[0].href)
|
|
245
|
+
|
|
246
|
+
// case 1: no styles; return a plain TMS link
|
|
247
|
+
if (!tileMapInfo?.metadata?.length) return [tmsLink]
|
|
248
|
+
|
|
249
|
+
// case 2: styles present; return each as a separate link
|
|
250
|
+
const styleLinks = tileMapInfo.metadata
|
|
251
|
+
.filter((meta) => meta.href)
|
|
252
|
+
.map((meta) => {
|
|
253
|
+
const fileName = meta.href.split('/').pop() || ''
|
|
254
|
+
const linkName =
|
|
255
|
+
tmsLink.description || ('name' in tmsLink ? tmsLink.name : '')
|
|
256
|
+
const styleName = fileName.split('.')[0]
|
|
257
|
+
const name = `${linkName} - ${styleName}`
|
|
258
|
+
return {
|
|
259
|
+
type: 'service',
|
|
260
|
+
url: new URL(meta.href),
|
|
261
|
+
name,
|
|
262
|
+
accessServiceProtocol: 'maplibre-style',
|
|
263
|
+
} as DatasetServiceDistribution
|
|
264
|
+
})
|
|
265
|
+
if (keepOriginalLink) {
|
|
266
|
+
styleLinks.unshift(tmsLink)
|
|
267
|
+
}
|
|
268
|
+
return styleLinks
|
|
269
|
+
}
|
|
270
|
+
|
|
234
271
|
getDownloadLinksFromEsriRest(
|
|
235
272
|
esriRestLink: DatasetServiceDistribution
|
|
236
273
|
): DatasetOnlineResource[] {
|
|
@@ -6,11 +6,15 @@ import {
|
|
|
6
6
|
shareReplay,
|
|
7
7
|
startWith,
|
|
8
8
|
switchMap,
|
|
9
|
+
tap,
|
|
9
10
|
} from 'rxjs/operators'
|
|
10
11
|
import { BaseReader, FetchError } from '../../../../../../libs/util/data-fetcher/src'
|
|
11
12
|
import { DataService } from '../service/data.service'
|
|
12
13
|
import { DataTableComponent } from '../../../../../../libs/ui/dataviz/src'
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
DatasetFeatureCatalog,
|
|
16
|
+
DatasetOnlineResource,
|
|
17
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
14
18
|
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
15
19
|
import {
|
|
16
20
|
LoadingMaskComponent,
|
|
@@ -33,6 +37,8 @@ import { CommonModule } from '@angular/common'
|
|
|
33
37
|
standalone: true,
|
|
34
38
|
})
|
|
35
39
|
export class TableViewComponent {
|
|
40
|
+
featureAttributes = []
|
|
41
|
+
@Input() featureCatalog: DatasetFeatureCatalog
|
|
36
42
|
@Input() cacheActive = true
|
|
37
43
|
@Input() set link(value: DatasetOnlineResource) {
|
|
38
44
|
this.currentLink$.next(value)
|
|
@@ -52,6 +58,7 @@ export class TableViewComponent {
|
|
|
52
58
|
}
|
|
53
59
|
this.loading = true
|
|
54
60
|
return this.getDatasetReader(link).pipe(
|
|
61
|
+
tap((dataset: BaseReader) => this.setProperties(dataset)),
|
|
55
62
|
catchError((error) => {
|
|
56
63
|
this.handleError(error)
|
|
57
64
|
return of(undefined)
|
|
@@ -96,4 +103,23 @@ export class TableViewComponent {
|
|
|
96
103
|
}
|
|
97
104
|
this.loading = false
|
|
98
105
|
}
|
|
106
|
+
|
|
107
|
+
setProperties(dataset: BaseReader) {
|
|
108
|
+
dataset.properties.then((properties) => {
|
|
109
|
+
const updatedProperties = properties.map((p) => {
|
|
110
|
+
let label = p.name
|
|
111
|
+
if (this.featureCatalog) {
|
|
112
|
+
const attributes = this.featureCatalog.featureTypes[0].attributes
|
|
113
|
+
const matchingAttribute = attributes.find(
|
|
114
|
+
(attr) => attr.name === p.name
|
|
115
|
+
)
|
|
116
|
+
if (matchingAttribute && matchingAttribute.code) {
|
|
117
|
+
label = matchingAttribute.code
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return { value: p.name, label }
|
|
121
|
+
})
|
|
122
|
+
this.featureAttributes = updatedProperties
|
|
123
|
+
})
|
|
124
|
+
}
|
|
99
125
|
}
|
|
@@ -5,7 +5,6 @@ export * from './lib/data-view/data-view.component'
|
|
|
5
5
|
export * from './lib/data-view-share/data-view-share.component'
|
|
6
6
|
export * from './lib/data-view-web-component/data-view-web-component.component'
|
|
7
7
|
export * from './lib/external-viewer-button/external-viewer-button.component'
|
|
8
|
-
export * from './lib/map-view/map-view.component'
|
|
9
8
|
export * from './lib/gpf-api-dl/gpf-api-dl.component'
|
|
9
|
+
export * from './lib/map-view/map-view.component'
|
|
10
10
|
export * from './lib/record-meta/record-meta.component'
|
|
11
|
-
export * from './lib/external-viewer-button/external-viewer-button.component'
|
|
@@ -27,12 +27,14 @@
|
|
|
27
27
|
*ngIf="mode === 'table'"
|
|
28
28
|
[cacheActive]="cacheActive$ | async"
|
|
29
29
|
[link]="selectedLink$ | async"
|
|
30
|
+
[featureCatalog]="mdViewFacade.featureCatalog$ | async"
|
|
30
31
|
></gn-ui-table-view>
|
|
31
32
|
<gn-ui-chart-view
|
|
32
33
|
*ngIf="mode === 'chart'"
|
|
33
34
|
(chartConfig$)="setChartConfig($event)"
|
|
34
35
|
[cacheActive]="cacheActive$ | async"
|
|
35
36
|
[link]="selectedLink$ | async"
|
|
37
|
+
[featureCatalog]="mdViewFacade.featureCatalog$ | async"
|
|
36
38
|
></gn-ui-chart-view>
|
|
37
39
|
</div>
|
|
38
40
|
</ng-template>
|
|
@@ -55,7 +55,10 @@
|
|
|
55
55
|
>
|
|
56
56
|
<ng-icon name="matClose" class="align-middle text-sm"></ng-icon>
|
|
57
57
|
</gn-ui-button>
|
|
58
|
-
<gn-ui-feature-detail
|
|
58
|
+
<gn-ui-feature-detail
|
|
59
|
+
[featureCatalog]="mdViewFacade.featureCatalog$ | async"
|
|
60
|
+
[feature]="selection"
|
|
61
|
+
></gn-ui-feature-detail>
|
|
59
62
|
</div>
|
|
60
63
|
|
|
61
64
|
<div
|
|
@@ -39,8 +39,8 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
FeatureDetailComponent,
|
|
41
41
|
MapContainerComponent,
|
|
42
|
-
prioritizePageScroll,
|
|
43
42
|
MapLegendComponent,
|
|
43
|
+
prioritizePageScroll,
|
|
44
44
|
} from '../../../../../../libs/ui/map/src'
|
|
45
45
|
import { Feature } from 'geojson'
|
|
46
46
|
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
@@ -109,9 +109,20 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
109
109
|
this.mdViewFacade.mapApiLinks$,
|
|
110
110
|
this.mdViewFacade.geoDataLinksWithGeometry$,
|
|
111
111
|
]).pipe(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
switchMap(async ([mapApiLinks, geoDataLinksWithGeometry]) => {
|
|
113
|
+
// looking for TMS links to process
|
|
114
|
+
let processedMapApiLinks = await Promise.all(
|
|
115
|
+
mapApiLinks.map((link) => {
|
|
116
|
+
if (link.type === 'service' && link.accessServiceProtocol === 'tms') {
|
|
117
|
+
return this.dataService.getGeodataLinksFromTms(link)
|
|
118
|
+
}
|
|
119
|
+
return link
|
|
120
|
+
})
|
|
121
|
+
)
|
|
122
|
+
processedMapApiLinks = processedMapApiLinks.flat()
|
|
123
|
+
return [...processedMapApiLinks, ...geoDataLinksWithGeometry]
|
|
124
|
+
}),
|
|
125
|
+
shareReplay(1)
|
|
115
126
|
)
|
|
116
127
|
|
|
117
128
|
dropdownChoices$ = this.compatibleMapLinks$.pipe(
|
|
@@ -239,6 +250,26 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
239
250
|
type: 'wms',
|
|
240
251
|
name: link.name,
|
|
241
252
|
})
|
|
253
|
+
} else if (
|
|
254
|
+
link.type === 'service' &&
|
|
255
|
+
link.accessServiceProtocol === 'tms'
|
|
256
|
+
) {
|
|
257
|
+
// FIXME: here we're assuming that the TMS serves vector tiles only; should be checked with ogc-client first
|
|
258
|
+
return of({
|
|
259
|
+
url: link.url.toString().replace(/\/?$/, '/{z}/{x}/{y}.pbf'),
|
|
260
|
+
type: 'xyz',
|
|
261
|
+
tileFormat: 'application/vnd.mapbox-vector-tile',
|
|
262
|
+
name: link.name,
|
|
263
|
+
})
|
|
264
|
+
} else if (
|
|
265
|
+
link.type === 'service' &&
|
|
266
|
+
link.accessServiceProtocol === 'maplibre-style'
|
|
267
|
+
) {
|
|
268
|
+
return of({
|
|
269
|
+
type: 'maplibre-style',
|
|
270
|
+
name: link.name,
|
|
271
|
+
styleUrl: link.url.toString(),
|
|
272
|
+
})
|
|
242
273
|
} else if (
|
|
243
274
|
link.type === 'service' &&
|
|
244
275
|
link.accessServiceProtocol === 'wmts'
|
|
@@ -54,6 +54,16 @@ export const setRelated = createAction(
|
|
|
54
54
|
props<{ related: CatalogRecord[] }>()
|
|
55
55
|
)
|
|
56
56
|
|
|
57
|
+
export const setSources = createAction(
|
|
58
|
+
'[Metadata view] Set sources',
|
|
59
|
+
props<{ sources: CatalogRecord[] }>()
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
export const setSourceOf = createAction(
|
|
63
|
+
'[Metadata view] Set has sources',
|
|
64
|
+
props<{ sourceOf: CatalogRecord[] }>()
|
|
65
|
+
)
|
|
66
|
+
|
|
57
67
|
/*
|
|
58
68
|
ChartConfig actions
|
|
59
69
|
*/
|
|
@@ -68,6 +68,28 @@ export class MdViewEffects {
|
|
|
68
68
|
)
|
|
69
69
|
)
|
|
70
70
|
|
|
71
|
+
loadSources$ = createEffect(() =>
|
|
72
|
+
this.actions$.pipe(
|
|
73
|
+
ofType(MdViewActions.loadFullMetadataSuccess),
|
|
74
|
+
switchMap(({ full }) => this.recordsRepository.getSources(full)),
|
|
75
|
+
map((sources) => {
|
|
76
|
+
return MdViewActions.setSources({ sources })
|
|
77
|
+
}),
|
|
78
|
+
catchError(() => of(MdViewActions.setSources({ sources: null })))
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
loadSourceOf$ = createEffect(() =>
|
|
83
|
+
this.actions$.pipe(
|
|
84
|
+
ofType(MdViewActions.loadFullMetadataSuccess),
|
|
85
|
+
switchMap(({ full }) => this.recordsRepository.getSourceOf(full)),
|
|
86
|
+
map((sourceOf) => {
|
|
87
|
+
return MdViewActions.setSourceOf({ sourceOf })
|
|
88
|
+
}),
|
|
89
|
+
catchError(() => of(MdViewActions.setSourceOf({ sourceOf: null })))
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
|
|
71
93
|
/*
|
|
72
94
|
UserFeedback effects
|
|
73
95
|
*/
|