geonetwork-ui 2.8.0-dev.398701d7f → 2.8.0-dev.5186798f7
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 +5 -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 +26 -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/auth/auth.service.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +1 -2
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +7 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +10 -10
- package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +3 -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 +3 -1
- package/esm2022/libs/common/domain/src/lib/model/search/sort-by.model.mjs +6 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/model/user.api.model.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/map-view/map-view.component.mjs +2 -1
- 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/router/src/lib/default/router.service.mjs +5 -1
- package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +9 -7
- package/esm2022/libs/feature/search/src/lib/constants.mjs +1 -2
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +8 -12
- 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/error/error.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/external-link-card/external-link-card.component.mjs +11 -4
- 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/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +2 -3
- 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 +5 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +12 -1
- package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +19 -2
- package/esm2022/libs/util/shared/src/lib/services/proxy.service.mjs +9 -11
- package/esm2022/libs/util/shared/src/lib/utils/sort-by.mjs +9 -6
- package/esm2022/translations/de.json +18 -3
- package/esm2022/translations/en.json +19 -5
- package/esm2022/translations/es.json +17 -2
- package/esm2022/translations/fr.json +19 -4
- package/esm2022/translations/it.json +20 -5
- package/esm2022/translations/nl.json +17 -2
- package/esm2022/translations/pt.json +17 -2
- package/esm2022/translations/sk.json +18 -3
- 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 +656 -205
- 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/auth/auth.service.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/platform/gn4-platform.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +7 -7
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.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/model/search/sort-by.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/data-access/gn4/src/openapi/model/user.api.model.d.ts +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/map-view/map-view.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/router/src/lib/default/router.service.d.ts +2 -0
- package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/router.effects.d.ts +3 -1
- package/libs/feature/router/src/lib/default/state/router.effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/constants.d.ts.map +1 -1
- package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts +4 -3
- package/libs/feature/search/src/lib/sort-by/sort-by.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/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +3 -2
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.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/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
- 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/links/link-utils.d.ts +6 -0
- package/libs/util/shared/src/lib/links/link-utils.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/libs/util/shared/src/lib/services/proxy.service.d.ts +5 -4
- package/libs/util/shared/src/lib/services/proxy.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/sort-by.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +2 -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 +28 -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/auth/auth.service.ts +4 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +0 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +12 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +37 -36
- package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +3 -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 +12 -1
- package/src/libs/common/domain/src/lib/model/search/sort-by.model.ts +5 -0
- 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 +19 -0
- package/src/libs/data-access/gn4/src/openapi/model/user.api.model.ts +1 -1
- 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/map-view/map-view.component.ts +1 -0
- 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/router/src/lib/default/router.service.ts +8 -0
- package/src/libs/feature/router/src/lib/default/state/router.effects.ts +6 -7
- package/src/libs/feature/search/src/lib/constants.ts +0 -1
- package/src/libs/feature/search/src/lib/sort-by/sort-by.component.ts +8 -12
- package/src/libs/ui/elements/src/index.ts +2 -0
- package/src/libs/ui/elements/src/lib/error/error.component.html +5 -1
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.html +43 -22
- package/src/libs/ui/elements/src/lib/external-link-card/external-link-card.component.ts +12 -3
- 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 +69 -23
- 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/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +4 -2
- 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 +4 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +11 -0
- package/src/libs/util/shared/src/lib/services/date.service.ts +27 -1
- package/src/libs/util/shared/src/lib/services/proxy.service.ts +6 -2
- package/src/libs/util/shared/src/lib/utils/sort-by.ts +8 -5
- package/translations/de.json +18 -3
- package/translations/en.json +19 -5
- package/translations/es.json +17 -2
- package/translations/fr.json +19 -4
- package/translations/it.json +20 -5
- package/translations/nl.json +17 -2
- package/translations/pt.json +17 -2
- package/translations/sk.json +18 -3
- 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/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
|
}
|
|
@@ -114,6 +114,7 @@ export class MapViewComponent implements AfterViewInit {
|
|
|
114
114
|
_styleFromConfig = null
|
|
115
115
|
|
|
116
116
|
linkMap: Map<string, DatasetOnlineResource> = new Map()
|
|
117
|
+
// FIXME the map view component should not need a selectedView
|
|
117
118
|
@Input() set selectedView(value: string) {
|
|
118
119
|
this.selectedView$.next(value)
|
|
119
120
|
}
|
|
@@ -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) =>
|
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
} from '.'
|
|
9
9
|
import { Router, Routes } from '@angular/router'
|
|
10
10
|
import { ROUTER_CONFIG, RouterConfigModel } from './router.config'
|
|
11
|
+
import {
|
|
12
|
+
SortByEnum,
|
|
13
|
+
SortByField,
|
|
14
|
+
} from '../../../../../../libs/common/domain/src/lib/model/search'
|
|
11
15
|
|
|
12
16
|
@Injectable({
|
|
13
17
|
providedIn: 'root',
|
|
@@ -58,4 +62,8 @@ export class RouterService {
|
|
|
58
62
|
getOrganizationPageRoute(): string {
|
|
59
63
|
return ROUTER_ROUTE_ORGANIZATION
|
|
60
64
|
}
|
|
65
|
+
|
|
66
|
+
getDefaultSort(): SortByField {
|
|
67
|
+
return SortByEnum.RESOURCE_DATES
|
|
68
|
+
}
|
|
61
69
|
}
|
|
@@ -9,10 +9,7 @@ import {
|
|
|
9
9
|
SetFilters,
|
|
10
10
|
SetSortBy,
|
|
11
11
|
} from '../../../../../../../libs/feature/search/src'
|
|
12
|
-
import {
|
|
13
|
-
FieldFilters,
|
|
14
|
-
SortByEnum,
|
|
15
|
-
} from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
12
|
+
import { FieldFilters } from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
16
13
|
import { Actions, createEffect, ofType } from '@ngrx/effects'
|
|
17
14
|
import { navigation } from '@ngrx/router-store/data-persistence'
|
|
18
15
|
import { of, pairwise, startWith } from 'rxjs'
|
|
@@ -22,6 +19,7 @@ import { RouterFacade } from './router.facade'
|
|
|
22
19
|
import { ROUTE_PARAMS } from '../constants'
|
|
23
20
|
import { sortByFromString } from '../../../../../../../libs/util/shared/src'
|
|
24
21
|
import { ROUTER_CONFIG, RouterConfigModel } from '../router.config'
|
|
22
|
+
import { RouterService } from '../router.service'
|
|
25
23
|
|
|
26
24
|
@Injectable()
|
|
27
25
|
export class RouterEffects {
|
|
@@ -31,7 +29,8 @@ export class RouterEffects {
|
|
|
31
29
|
private _location: Location,
|
|
32
30
|
private facade: RouterFacade,
|
|
33
31
|
@Inject(ROUTER_CONFIG) private routerConfig: RouterConfigModel,
|
|
34
|
-
private fieldsService: FieldsService
|
|
32
|
+
private fieldsService: FieldsService,
|
|
33
|
+
private routerService: RouterService
|
|
35
34
|
) {}
|
|
36
35
|
|
|
37
36
|
navigate$ = createEffect(
|
|
@@ -61,7 +60,7 @@ export class RouterEffects {
|
|
|
61
60
|
let sortBy =
|
|
62
61
|
ROUTE_PARAMS.SORT in newParams
|
|
63
62
|
? sortByFromString(newParams[ROUTE_PARAMS.SORT])
|
|
64
|
-
:
|
|
63
|
+
: this.routerService.getDefaultSort()
|
|
65
64
|
let pageNumber =
|
|
66
65
|
ROUTE_PARAMS.PAGE in newParams
|
|
67
66
|
? parseInt(newParams[ROUTE_PARAMS.PAGE])
|
|
@@ -70,7 +69,7 @@ export class RouterEffects {
|
|
|
70
69
|
const oldSort =
|
|
71
70
|
ROUTE_PARAMS.SORT in oldParams
|
|
72
71
|
? sortByFromString(oldParams[ROUTE_PARAMS.SORT])
|
|
73
|
-
:
|
|
72
|
+
: this.routerService.getDefaultSort()
|
|
74
73
|
if (JSON.stringify(sortBy) === JSON.stringify(oldSort)) {
|
|
75
74
|
sortBy = null
|
|
76
75
|
}
|
|
@@ -13,7 +13,7 @@ import { TranslatePipe } from '@ngx-translate/core'
|
|
|
13
13
|
|
|
14
14
|
interface SortChoice {
|
|
15
15
|
label: string
|
|
16
|
-
value:
|
|
16
|
+
value: SortByField
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@Component({
|
|
@@ -27,24 +27,20 @@ export class SortByComponent implements OnInit {
|
|
|
27
27
|
choices: SortChoice[] = [
|
|
28
28
|
{
|
|
29
29
|
label: marker('results.sortBy.relevancy'),
|
|
30
|
-
value: SortByEnum.RELEVANCY
|
|
30
|
+
value: SortByEnum.RELEVANCY,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
label: marker('results.sortBy.dateStamp'),
|
|
34
|
-
value: SortByEnum.
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: marker('results.sortBy.changeDate'),
|
|
38
|
-
value: SortByEnum.CHANGE_DATE.join(','),
|
|
34
|
+
value: SortByEnum.RESOURCE_DATES,
|
|
39
35
|
},
|
|
40
36
|
{
|
|
41
37
|
label: marker('results.sortBy.popularity'),
|
|
42
|
-
value: SortByEnum.POPULARITY
|
|
38
|
+
value: SortByEnum.POPULARITY,
|
|
43
39
|
},
|
|
44
40
|
]
|
|
45
41
|
currentSortBy$ = this.facade.sortBy$.pipe(
|
|
46
42
|
filter((sortBy) => !!sortBy),
|
|
47
|
-
map((sortBy) => sortBy
|
|
43
|
+
map((sortBy) => sortBy)
|
|
48
44
|
)
|
|
49
45
|
|
|
50
46
|
constructor(
|
|
@@ -56,12 +52,12 @@ export class SortByComponent implements OnInit {
|
|
|
56
52
|
if (this.isQualitySortable) {
|
|
57
53
|
this.choices.push({
|
|
58
54
|
label: marker('results.sortBy.qualityScore'),
|
|
59
|
-
value: SortByEnum.QUALITY_SCORE
|
|
55
|
+
value: SortByEnum.QUALITY_SCORE,
|
|
60
56
|
})
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
changeSortBy(
|
|
65
|
-
this.searchService.setSortBy(
|
|
60
|
+
changeSortBy(criteria: SortByField): void {
|
|
61
|
+
this.searchService.setSortBy(criteria)
|
|
66
62
|
}
|
|
67
63
|
}
|
|
@@ -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'
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="p-[1.7em]
|
|
2
|
+
class="p-[1.7em] text-[1.5em] text-center rounded-lg"
|
|
3
|
+
[ngClass]="{
|
|
4
|
+
'bg-red-50 text-red-800': type !== types.DATASET_HAS_NO_LINK,
|
|
5
|
+
'bg-gray-100 text-black': type === types.DATASET_HAS_NO_LINK,
|
|
6
|
+
}"
|
|
3
7
|
>
|
|
4
8
|
<div
|
|
5
9
|
*ngIf="type === types.COULD_NOT_REACH_API"
|
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
<
|
|
2
|
-
[
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
1
|
+
<ng-container *ngIf="isDatabase; else clickableLink">
|
|
2
|
+
<div [ngClass]="cardClass" [title]="title">
|
|
3
|
+
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
4
|
+
<div
|
|
5
|
+
class="flex min-w-[32px]"
|
|
6
|
+
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="gn-ui-card-icon"
|
|
10
|
+
[title]="'record.metadata.link.postgis.tooltip' | translate"
|
|
11
|
+
>
|
|
12
|
+
<ng-icon
|
|
13
|
+
class="inline-block card-icon align-middle"
|
|
14
|
+
name="iconoirDatabase"
|
|
15
|
+
></ng-icon>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</ng-container>
|
|
20
|
+
|
|
21
|
+
<ng-template #clickableLink>
|
|
22
|
+
<a [href]="link.url" target="_blank" [ngClass]="cardClass" [title]="title">
|
|
23
|
+
<ng-container *ngTemplateOutlet="cardContent"></ng-container>
|
|
24
|
+
<div
|
|
25
|
+
class="flex min-w-[32px]"
|
|
26
|
+
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
27
|
+
>
|
|
28
|
+
<div class="gn-ui-card-icon">
|
|
29
|
+
<ng-icon
|
|
30
|
+
class="inline-block card-icon align-middle"
|
|
31
|
+
name="matOpenInNew"
|
|
32
|
+
></ng-icon>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</a>
|
|
36
|
+
</ng-template>
|
|
37
|
+
<ng-template #cardContent>
|
|
8
38
|
<div class="flex flex-col justify-between flex-1 min-w-0">
|
|
9
39
|
<div class="gn-ui-card-title">
|
|
10
40
|
{{ link.description || link.name }}
|
|
11
41
|
</div>
|
|
12
42
|
<div class="gn-ui-card-detail">
|
|
43
|
+
<ng-container *ngIf="isDatabase">
|
|
44
|
+
{{ 'record.metadata.link.postgis.table' | translate }}
|
|
45
|
+
</ng-container>
|
|
13
46
|
{{ link.name }}
|
|
14
47
|
</div>
|
|
15
48
|
<p *ngIf="!link.name && !link.description" class="gn-ui-card-title">
|
|
@@ -20,21 +53,9 @@
|
|
|
20
53
|
class="inline-flex items-center justify-center px-2 py-1 text-13 font-medium leading-none text-white rounded transition-opacity opacity-70 group-hover:opacity-100"
|
|
21
54
|
[style.background-color]="getLinkColor(link)"
|
|
22
55
|
data-cy="download-format"
|
|
23
|
-
>{{
|
|
24
|
-
getLinkFormat(link) || ('downloads.format.unknown' | translate)
|
|
25
|
-
}}</span
|
|
26
56
|
>
|
|
57
|
+
{{ getLinkFormat(link) || ('downloads.format.unknown' | translate) }}
|
|
58
|
+
</span>
|
|
27
59
|
</div>
|
|
28
60
|
</div>
|
|
29
|
-
|
|
30
|
-
class="flex min-w-[32px]"
|
|
31
|
-
[ngClass]="size === 'S' ? 'items-end' : 'items-center'"
|
|
32
|
-
>
|
|
33
|
-
<div class="gn-ui-card-icon">
|
|
34
|
-
<ng-icon
|
|
35
|
-
class="inline-block card-icon align-middle"
|
|
36
|
-
name="matOpenInNew"
|
|
37
|
-
></ng-icon>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</a>
|
|
61
|
+
</ng-template>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
provideNgIconsConfig,
|
|
8
8
|
} from '@ng-icons/core'
|
|
9
9
|
import { matOpenInNew } from '@ng-icons/material-icons/baseline'
|
|
10
|
+
import { iconoirDatabase } from '@ng-icons/iconoir'
|
|
10
11
|
import { getBadgeColor, getFileFormat } from '../../../../../../libs/util/shared/src'
|
|
11
12
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
12
13
|
|
|
@@ -21,6 +22,7 @@ type CardSize = 'L' | 'M' | 'S' | 'XS'
|
|
|
21
22
|
providers: [
|
|
22
23
|
provideIcons({
|
|
23
24
|
matOpenInNew,
|
|
25
|
+
iconoirDatabase,
|
|
24
26
|
}),
|
|
25
27
|
provideNgIconsConfig({ size: '1.5em' }),
|
|
26
28
|
],
|
|
@@ -37,7 +39,7 @@ export class ExternalLinkCardComponent {
|
|
|
37
39
|
|
|
38
40
|
@Input() set size(value: CardSize) {
|
|
39
41
|
this._size = value
|
|
40
|
-
this.cardClass = this.sizeClassMap[value]
|
|
42
|
+
this.cardClass = `group flex flex-row justify-between card-shadow rounded overflow-hidden ${this.sizeClassMap[value]}`
|
|
41
43
|
}
|
|
42
44
|
get size(): CardSize {
|
|
43
45
|
return this._size
|
|
@@ -51,11 +53,18 @@ export class ExternalLinkCardComponent {
|
|
|
51
53
|
return this.link.name || this.link.description || ''
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
get isDatabase(): boolean {
|
|
57
|
+
return (
|
|
58
|
+
this.link.type === 'service' &&
|
|
59
|
+
this.link.accessServiceProtocol === 'postgis'
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getLinkFormat(link: DatasetOnlineResource): string {
|
|
55
64
|
return getFileFormat(link)
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
getLinkColor(link:
|
|
67
|
+
getLinkColor(link: DatasetOnlineResource): string {
|
|
59
68
|
return getBadgeColor(getFileFormat(link))
|
|
60
69
|
}
|
|
61
70
|
}
|
|
File without changes
|