geonetwork-ui 2.8.0-dev.6ea037ab6 → 2.8.0-dev.6f988469c
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/common/distribution.mapper.mjs +3 -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 +25 -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/api/repository/src/lib/gn4/elasticsearch/constant.mjs +1 -2
- 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 +2 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -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 +26 -8
- 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/index.mjs +2 -1
- 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/stac-view/stac-view.component.mjs +138 -0
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +14 -1
- package/esm2022/libs/feature/search/src/lib/constants.mjs +1 -2
- package/esm2022/libs/ui/elements/src/index.mjs +3 -1
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +1 -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 +5 -9
- package/esm2022/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.mjs +18 -0
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +5 -5
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +21 -7
- package/esm2022/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.mjs +35 -0
- package/esm2022/libs/ui/layout/src/lib/paginable.interface.mjs +1 -1
- package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +13 -5
- package/esm2022/libs/util/i18n/src/lib/date-locales.mjs +33 -0
- package/esm2022/libs/util/shared/src/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/humanize-date.directive.mjs +33 -0
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +3 -1
- package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +19 -2
- package/esm2022/translations/de.json +15 -4
- package/esm2022/translations/en.json +15 -4
- package/esm2022/translations/es.json +11 -0
- package/esm2022/translations/fr.json +15 -4
- package/esm2022/translations/it.json +16 -5
- package/esm2022/translations/nl.json +11 -0
- package/esm2022/translations/pt.json +11 -0
- package/esm2022/translations/sk.json +12 -1
- package/fesm2022/geonetwork-ui-date-locales-MYnkDJ5h.mjs +35 -0
- package/fesm2022/geonetwork-ui-date-locales-MYnkDJ5h.mjs.map +1 -0
- package/fesm2022/geonetwork-ui.mjs +538 -151
- 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/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/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/api/repository/src/lib/gn4/elasticsearch/constant.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 +7 -2
- 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/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- 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/index.d.ts +1 -0
- package/libs/feature/record/src/index.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/stac-view/stac-view.component.d.ts +35 -0
- package/libs/feature/record/src/lib/stac-view/stac-view.component.d.ts.map +1 -0
- 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/feature/search/src/lib/constants.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/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/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +0 -2
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.d.ts +8 -0
- package/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.d.ts.map +1 -0
- 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/date-picker/date-picker.component.d.ts +5 -0
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.d.ts +12 -0
- package/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/paginable.interface.d.ts +3 -3
- package/libs/ui/layout/src/lib/paginable.interface.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts +2 -1
- package/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts.map +1 -1
- package/libs/util/i18n/src/lib/date-locales.d.ts +5 -0
- package/libs/util/i18n/src/lib/date-locales.d.ts.map +1 -0
- package/libs/util/shared/src/index.d.ts +1 -0
- package/libs/util/shared/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/humanize-date.directive.d.ts +15 -0
- package/libs/util/shared/src/lib/humanize-date.directive.d.ts.map +1 -0
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/date.service.d.ts +4 -0
- package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
- 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 +27 -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/api/repository/src/lib/gn4/elasticsearch/constant.ts +0 -1
- 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 +10 -1
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -1
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +5 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +10 -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 +30 -5
- 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/index.ts +1 -0
- 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/stac-view/stac-view.component.css +3 -0
- package/src/libs/feature/record/src/lib/stac-view/stac-view.component.html +68 -0
- package/src/libs/feature/record/src/lib/stac-view/stac-view.component.ts +190 -0
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +30 -1
- package/src/libs/feature/search/src/lib/constants.ts +0 -1
- package/src/libs/ui/elements/src/index.ts +2 -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 +67 -21
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +2 -9
- package/src/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.css +0 -0
- package/src/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.html +13 -0
- package/src/libs/ui/elements/src/lib/stac-items-result-grid/stac-items-result-grid.component.ts +15 -0
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +1 -1
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +2 -2
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +17 -1
- package/src/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.html +15 -0
- package/src/libs/ui/inputs/src/lib/date-range-inputs/date-range-inputs.component.ts +41 -0
- package/src/libs/ui/layout/src/lib/paginable.interface.ts +3 -3
- package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +12 -6
- package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +4 -1
- package/src/libs/util/i18n/src/lib/date-locales.ts +63 -0
- package/src/libs/util/shared/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/humanize-date.directive.ts +35 -0
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +2 -0
- package/src/libs/util/shared/src/lib/services/date.service.ts +27 -1
- package/translations/de.json +15 -4
- package/translations/en.json +15 -4
- package/translations/es.json +11 -0
- package/translations/fr.json +15 -4
- package/translations/it.json +16 -5
- package/translations/nl.json +11 -0
- package/translations/pt.json +11 -0
- package/translations/sk.json +12 -1
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +0 -59
- package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +0 -11
- package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +0 -1
- package/src/libs/common/domain/src/lib/index.ts +0 -2
- package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +0 -54
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
|
},
|
|
@@ -8,3 +8,4 @@ export * from './lib/external-viewer-button/external-viewer-button.component'
|
|
|
8
8
|
export * from './lib/gpf-api-dl/gpf-api-dl.component'
|
|
9
9
|
export * from './lib/map-view/map-view.component'
|
|
10
10
|
export * from './lib/record-meta/record-meta.component'
|
|
11
|
+
export * from './lib/stac-view/stac-view.component'
|
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
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<div class="mt-6 bg-white border border-gray-300 overflow-hidden rounded-lg">
|
|
2
|
+
<div
|
|
3
|
+
class="w-full min-h-[366px] flex md:flex-row flex-col border-b border-gray-300"
|
|
4
|
+
>
|
|
5
|
+
<div class="md:w-1/2 w-full flex-1 flex flex-col">
|
|
6
|
+
<gn-ui-date-range-inputs
|
|
7
|
+
[temporalExtent]="currentTemporalExtent$ | async"
|
|
8
|
+
(temporalExtentChange)="onTemporalExtentChange($event)"
|
|
9
|
+
></gn-ui-date-range-inputs>
|
|
10
|
+
|
|
11
|
+
<div class="mt-auto mb-8 mx-8" *ngIf="isFilterModified">
|
|
12
|
+
<gn-ui-button
|
|
13
|
+
id="reset-filters-button"
|
|
14
|
+
type="light"
|
|
15
|
+
(buttonClick)="onResetFilters()"
|
|
16
|
+
>
|
|
17
|
+
<span translate>stac.filter.reset</span>
|
|
18
|
+
<ng-icon name="matDeleteOutline" class="ml-2"></ng-icon>
|
|
19
|
+
</gn-ui-button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="md:w-1/2 w-full min-h-[280px] flex items-center justify-center">
|
|
24
|
+
<span>Map...</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
class="relative mx-5 my-[30px] min-h-[274px] flex items-center justify-center flex-col"
|
|
29
|
+
>
|
|
30
|
+
<!-- Keep grid outside ngIf to keep items$ observable alive -->
|
|
31
|
+
<gn-ui-stac-items-result-grid
|
|
32
|
+
[items]="items$ | async"
|
|
33
|
+
></gn-ui-stac-items-result-grid>
|
|
34
|
+
<div
|
|
35
|
+
*ngIf="(items$ | async)?.length > 0; else noResultsOrError"
|
|
36
|
+
class="mt-[20px] mx-auto flex justify-center"
|
|
37
|
+
>
|
|
38
|
+
<gn-ui-previous-next-buttons
|
|
39
|
+
[listComponent]="this"
|
|
40
|
+
[displayLabels]="true"
|
|
41
|
+
></gn-ui-previous-next-buttons>
|
|
42
|
+
</div>
|
|
43
|
+
<ng-template #noResultsOrError>
|
|
44
|
+
<gn-ui-popup-alert
|
|
45
|
+
*ngIf="error"
|
|
46
|
+
type="warning"
|
|
47
|
+
icon="matErrorOutlineOutline"
|
|
48
|
+
class="absolute left-0 top-0 w-full block"
|
|
49
|
+
>
|
|
50
|
+
<span translate>{{ error }}</span>
|
|
51
|
+
</gn-ui-popup-alert>
|
|
52
|
+
<div
|
|
53
|
+
*ngIf="!error"
|
|
54
|
+
class="flex items-center justify-center flex-col h-full gap-[10px]"
|
|
55
|
+
>
|
|
56
|
+
<h2 class="text-center text-xl" translate>stac.results.noResults</h2>
|
|
57
|
+
<gn-ui-button
|
|
58
|
+
id="no-results-button"
|
|
59
|
+
type="secondary"
|
|
60
|
+
(buttonClick)="onResetFilters()"
|
|
61
|
+
>
|
|
62
|
+
<span translate>stac.filter.reset</span>
|
|
63
|
+
<ng-icon name="matDeleteOutline" class="ml-2"></ng-icon>
|
|
64
|
+
</gn-ui-button>
|
|
65
|
+
</div>
|
|
66
|
+
</ng-template>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'
|
|
3
|
+
import {
|
|
4
|
+
DatasetRecord,
|
|
5
|
+
DatasetTemporalExtent,
|
|
6
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
7
|
+
import { StacItemsResultGridComponent } from '../../../../../../libs/ui/elements/src'
|
|
8
|
+
import {
|
|
9
|
+
ButtonComponent,
|
|
10
|
+
DateRangeInputsComponent,
|
|
11
|
+
} from '../../../../../../libs/ui/inputs/src'
|
|
12
|
+
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
13
|
+
import { matDeleteOutline } from '@ng-icons/material-icons/outline'
|
|
14
|
+
import { TranslateDirective, TranslateService } from '@ngx-translate/core'
|
|
15
|
+
import { DataService } from '../../../../../../libs/feature/dataviz/src'
|
|
16
|
+
import {
|
|
17
|
+
BehaviorSubject,
|
|
18
|
+
catchError,
|
|
19
|
+
combineLatest,
|
|
20
|
+
debounceTime,
|
|
21
|
+
from,
|
|
22
|
+
map,
|
|
23
|
+
Observable,
|
|
24
|
+
of,
|
|
25
|
+
switchMap,
|
|
26
|
+
take,
|
|
27
|
+
tap,
|
|
28
|
+
} from 'rxjs'
|
|
29
|
+
import { GetCollectionItemsOptions, StacItem } from '@camptocamp/ogc-client'
|
|
30
|
+
import { MdViewFacade } from '../state'
|
|
31
|
+
import { PreviousNextButtonsComponent } from '../../../../../../libs/ui/layout/src'
|
|
32
|
+
import { FetchError } from '../../../../../../libs/util/data-fetcher/src'
|
|
33
|
+
import { PopupAlertComponent } from '../../../../../../libs/ui/widgets/src'
|
|
34
|
+
|
|
35
|
+
const STAC_ITEMS_PER_PAGE = 12
|
|
36
|
+
const DEBOUNCE_TIME_MS = 500
|
|
37
|
+
|
|
38
|
+
@Component({
|
|
39
|
+
selector: 'gn-ui-stac-view',
|
|
40
|
+
templateUrl: './stac-view.component.html',
|
|
41
|
+
styleUrls: ['./stac-view.component.css'],
|
|
42
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
+
standalone: true,
|
|
44
|
+
imports: [
|
|
45
|
+
CommonModule,
|
|
46
|
+
NgIconComponent,
|
|
47
|
+
TranslateDirective,
|
|
48
|
+
StacItemsResultGridComponent,
|
|
49
|
+
DateRangeInputsComponent,
|
|
50
|
+
PreviousNextButtonsComponent,
|
|
51
|
+
PopupAlertComponent,
|
|
52
|
+
ButtonComponent,
|
|
53
|
+
],
|
|
54
|
+
viewProviders: [provideIcons({ matDeleteOutline })],
|
|
55
|
+
})
|
|
56
|
+
export class StacViewComponent implements OnInit {
|
|
57
|
+
isFilterModified = false
|
|
58
|
+
error = null
|
|
59
|
+
|
|
60
|
+
initialTemporalExtent: DatasetTemporalExtent | null = null
|
|
61
|
+
currentTemporalExtent$ = new BehaviorSubject<DatasetTemporalExtent | null>(
|
|
62
|
+
null
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
initialPageUrl: string
|
|
66
|
+
previousPageUrl: string
|
|
67
|
+
nextPageUrl: string
|
|
68
|
+
currentPageUrl$ = new BehaviorSubject<string | null>(null)
|
|
69
|
+
|
|
70
|
+
items$: Observable<StacItem[]> = combineLatest([
|
|
71
|
+
this.currentPageUrl$,
|
|
72
|
+
this.currentTemporalExtent$,
|
|
73
|
+
]).pipe(
|
|
74
|
+
debounceTime(DEBOUNCE_TIME_MS),
|
|
75
|
+
switchMap(([currentPageUrl, temporalExtent]) => {
|
|
76
|
+
this.error = null
|
|
77
|
+
const options: GetCollectionItemsOptions = {
|
|
78
|
+
limit: STAC_ITEMS_PER_PAGE,
|
|
79
|
+
}
|
|
80
|
+
if (temporalExtent && (temporalExtent.start || temporalExtent.end)) {
|
|
81
|
+
options.datetime = {
|
|
82
|
+
...(temporalExtent.start && { start: temporalExtent.start }),
|
|
83
|
+
...(temporalExtent.end && { end: temporalExtent.end }),
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return from(
|
|
87
|
+
this.dataService.getItemsFromStacApi(currentPageUrl, options)
|
|
88
|
+
).pipe(
|
|
89
|
+
tap((stacDocument) => {
|
|
90
|
+
this.previousPageUrl =
|
|
91
|
+
stacDocument.links.find((link) => link.rel === 'previous')?.href ||
|
|
92
|
+
null
|
|
93
|
+
this.nextPageUrl =
|
|
94
|
+
stacDocument.links.find((link) => link.rel === 'next')?.href || null
|
|
95
|
+
}),
|
|
96
|
+
map((stacDocument) => stacDocument.features),
|
|
97
|
+
catchError((err) => {
|
|
98
|
+
this.handleError(err)
|
|
99
|
+
return of([])
|
|
100
|
+
})
|
|
101
|
+
)
|
|
102
|
+
})
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
constructor(
|
|
106
|
+
private dataService: DataService,
|
|
107
|
+
private metadataViewFacade: MdViewFacade,
|
|
108
|
+
private translateService: TranslateService
|
|
109
|
+
) {}
|
|
110
|
+
|
|
111
|
+
ngOnInit() {
|
|
112
|
+
this.metadataViewFacade.metadata$
|
|
113
|
+
.pipe(
|
|
114
|
+
take(1),
|
|
115
|
+
map((metadata) => {
|
|
116
|
+
const temporalExtents =
|
|
117
|
+
metadata?.kind === 'dataset'
|
|
118
|
+
? (metadata as DatasetRecord).temporalExtents
|
|
119
|
+
: []
|
|
120
|
+
|
|
121
|
+
return temporalExtents.length > 0
|
|
122
|
+
? temporalExtents[0]
|
|
123
|
+
: ({
|
|
124
|
+
start: null,
|
|
125
|
+
end: null,
|
|
126
|
+
} as DatasetTemporalExtent)
|
|
127
|
+
})
|
|
128
|
+
)
|
|
129
|
+
.subscribe((extent) => {
|
|
130
|
+
this.initialTemporalExtent = extent
|
|
131
|
+
this.currentTemporalExtent$.next(extent)
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
this.metadataViewFacade.stacLinks$
|
|
135
|
+
.pipe(
|
|
136
|
+
take(1),
|
|
137
|
+
map((links) => (links && links.length > 0 ? links[0] : null))
|
|
138
|
+
)
|
|
139
|
+
.subscribe((link) => {
|
|
140
|
+
if (link) {
|
|
141
|
+
this.initialPageUrl = link.url.href
|
|
142
|
+
this.currentPageUrl$.next(link.url.href)
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
onTemporalExtentChange(extent: DatasetTemporalExtent | null) {
|
|
148
|
+
this.currentTemporalExtent$.next(extent)
|
|
149
|
+
// make sure to use url without pagination token when temporal filter changes
|
|
150
|
+
this.currentPageUrl$.next(this.initialPageUrl)
|
|
151
|
+
this.isFilterModified = true
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
onResetFilters() {
|
|
155
|
+
this.currentTemporalExtent$.next(this.initialTemporalExtent)
|
|
156
|
+
this.isFilterModified = false
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
handleError(error: FetchError | Error | string) {
|
|
160
|
+
if (error instanceof FetchError) {
|
|
161
|
+
this.error = this.translateService.instant(
|
|
162
|
+
`dataset.error.${error.type}`,
|
|
163
|
+
{
|
|
164
|
+
info: error.info,
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
console.warn(error.message)
|
|
168
|
+
} else if (error instanceof Error) {
|
|
169
|
+
this.error = this.translateService.instant(error.message)
|
|
170
|
+
console.warn(error.stack || error)
|
|
171
|
+
} else {
|
|
172
|
+
this.error = this.translateService.instant(error)
|
|
173
|
+
console.warn(error)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Paginable API
|
|
178
|
+
get isFirstPage() {
|
|
179
|
+
return this.previousPageUrl == null
|
|
180
|
+
}
|
|
181
|
+
get isLastPage() {
|
|
182
|
+
return this.nextPageUrl == null
|
|
183
|
+
}
|
|
184
|
+
goToNextPage() {
|
|
185
|
+
this.currentPageUrl$.next(this.nextPageUrl)
|
|
186
|
+
}
|
|
187
|
+
goToPrevPage() {
|
|
188
|
+
this.currentPageUrl$.next(this.previousPageUrl)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -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'
|
|
@@ -26,3 +27,4 @@ export * from './lib/application-banner/application-banner.component'
|
|
|
26
27
|
export * from './lib/internal-link-card/internal-link-card.component'
|
|
27
28
|
export * from './lib/service-capabilities/service-capabilities.component'
|
|
28
29
|
export * from './lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component'
|
|
30
|
+
export * from './lib/stac-items-result-grid/stac-items-result-grid.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
|
+
}
|