geonetwork-ui 2.7.0-dev.fa54bd3a5 → 2.7.0-dev.fb5b118d5
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 +1 -2
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.mjs +4 -7
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +20 -20
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/metadata-url.service.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +4 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.mjs +4 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +9 -5
- package/esm2022/libs/api/repository/src/index.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/auth/auth.service.mjs +5 -5
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +4 -6
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +55 -12
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +3 -3
- package/esm2022/libs/api/repository/src/lib/gn4/gn4.provider.mjs +26 -3
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/index.mjs +3 -5
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organization-strategy.token.mjs +5 -0
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.mjs +3 -3
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +3 -3
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-service.factory.mjs +6 -0
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +68 -26
- package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +3 -1
- package/esm2022/libs/api/repository/src/lib/metadata-language.token.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 +15 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/catalog/src/index.mjs +1 -2
- package/esm2022/libs/feature/catalog/src/lib/organization-url.token.mjs +3 -1
- package/esm2022/libs/feature/catalog/src/lib/site-title/site-title.component.mjs +5 -4
- package/esm2022/libs/feature/catalog/src/lib/source-label/source-label.component.mjs +4 -3
- package/esm2022/libs/feature/catalog/src/lib/sources/sources.service.mjs +3 -3
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +10 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +5 -5
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +8 -2
- package/esm2022/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.mjs +80 -0
- package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.mjs +55 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +8 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +6 -36
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +77 -3
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +10 -5
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +3 -5
- package/esm2022/libs/feature/notifications/src/index.mjs +1 -2
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +33 -12
- package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +14 -4
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +5 -43
- package/esm2022/libs/feature/record/src/lib/gpf-api-dl-list-item/gpf-api-dl-list-item.component.mjs +10 -5
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +87 -28
- package/esm2022/libs/feature/record/src/lib/record-meta/record-meta.component.mjs +4 -2
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
- package/esm2022/libs/feature/router/src/lib/default/container/search-router.container.directive.mjs +3 -2
- package/esm2022/libs/feature/router/src/lib/default/router.module.mjs +2 -5
- package/esm2022/libs/feature/router/src/lib/default/state/query-params.utils.mjs +4 -3
- package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +3 -2
- package/esm2022/libs/feature/search/src/index.mjs +1 -2
- package/esm2022/libs/feature/search/src/lib/facets/facets-container/facets-container.component.mjs +12 -5
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +24 -17
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +4 -100
- package/esm2022/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.mjs +9 -5
- package/esm2022/libs/feature/search/src/lib/records-metrics/records-metrics.component.mjs +6 -5
- package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +9 -5
- package/esm2022/libs/feature/search/src/lib/results-layout/results-layout.component.mjs +7 -6
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +19 -12
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +2 -1
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +7 -6
- package/esm2022/libs/feature/search/src/lib/state/container/search-state.container.directive.mjs +3 -2
- package/esm2022/libs/feature/search/src/lib/state/reducer.mjs +5 -2
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +8 -2
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +10 -4
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +8 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +5 -4
- package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +12 -5
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +14 -4
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +8 -2
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +21 -46
- package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +7 -7
- package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +8 -2
- package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +1 -6
- package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +5 -4
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +15 -5
- package/esm2022/libs/ui/search/src/index.mjs +1 -3
- package/esm2022/libs/ui/search/src/lib/facets/facet-block/facet-block.component.mjs +14 -30
- package/esm2022/libs/ui/search/src/lib/facets/facet-item/facet-item.component.mjs +6 -27
- package/esm2022/libs/ui/search/src/lib/facets/facet-list/facet-list.component.mjs +7 -4
- package/esm2022/libs/ui/search/src/lib/record-metric/record-metric.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/record-preview/record-preview.component.mjs +5 -2
- package/esm2022/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.mjs +36 -7
- package/esm2022/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.mjs +11 -5
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +17 -7
- package/esm2022/libs/ui/search/src/lib/results-list/results-layout.config.mjs +4 -2
- package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +5 -4
- package/esm2022/libs/ui/search/src/lib/results-list-item/results-list-item.component.mjs +5 -3
- package/esm2022/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.mjs +14 -4
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +3 -1
- package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +2 -2
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/app-config/src/lib/parse-utils.mjs +5 -4
- package/esm2022/libs/util/i18n/src/lib/language-codes.mjs +50 -9
- package/esm2022/libs/util/shared/src/index.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +44 -9
- package/esm2022/libs/util/shared/src/lib/record/index.mjs +3 -0
- package/esm2022/libs/util/shared/src/lib/record/quality-score.util.mjs +46 -0
- package/esm2022/libs/util/shared/src/lib/record/record.util.mjs +56 -0
- package/esm2022/libs/util/shared/src/lib/utils/geojson.mjs +58 -1
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +3 -1
- package/esm2022/libs/util/shared/src/lib/utils/mobile-screen.mjs +9 -0
- package/esm2022/libs/util/shared/src/lib/utils/scroll.mjs +40 -0
- package/esm2022/translations/de.json +62 -21
- package/esm2022/translations/en.json +63 -22
- package/esm2022/translations/es.json +49 -8
- package/esm2022/translations/fr.json +69 -28
- package/esm2022/translations/it.json +62 -21
- package/esm2022/translations/nl.json +49 -8
- package/esm2022/translations/pt.json +49 -8
- package/esm2022/translations/sk.json +53 -12
- package/fesm2022/geonetwork-ui.mjs +8416 -8166
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.ts +0 -1
- package/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +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/utils/status.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +2 -2
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/index.d.ts +1 -1
- package/libs/api/repository/src/index.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 -2
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts +5 -1
- package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/organizations/index.d.ts +2 -3
- package/libs/api/repository/src/lib/gn4/organizations/index.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/organizations/organization-strategy.token.d.ts +4 -0
- package/libs/api/repository/src/lib/gn4/organizations/organization-strategy.token.d.ts.map +1 -0
- package/libs/api/repository/src/lib/gn4/organizations/organizations-service.factory.d.ts +9 -0
- package/libs/api/repository/src/lib/gn4/organizations/organizations-service.factory.d.ts.map +1 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +14 -8
- 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 +2 -0
- package/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/metadata-language.token.d.ts +5 -0
- package/libs/api/repository/src/lib/metadata-language.token.d.ts.map +1 -0
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts +1 -0
- 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 +5 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/catalog/src/index.d.ts +0 -1
- package/libs/feature/catalog/src/index.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/organization-url.token.d.ts +1 -0
- package/libs/feature/catalog/src/lib/organization-url.token.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/site-title/site-title.component.d.ts +1 -1
- package/libs/feature/catalog/src/lib/site-title/site-title.component.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/source-label/source-label.component.d.ts +1 -1
- package/libs/feature/catalog/src/lib/source-label/source-label.component.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/sources/sources.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +3 -2
- 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 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts +19 -0
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.d.ts +20 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts +3 -10
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +8 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +2 -2
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/notifications/src/index.d.ts +0 -1
- package/libs/feature/notifications/src/index.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +8 -4
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/feature-record.module.d.ts +4 -11
- package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
- package/libs/feature/record/src/lib/gpf-api-dl-list-item/gpf-api-dl-list-item.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +12 -5
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/record-meta/record-meta.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/container/search-router.container.directive.d.ts +1 -1
- package/libs/feature/router/src/lib/default/container/search-router.container.directive.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.module.d.ts +4 -5
- package/libs/feature/router/src/lib/default/router.module.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/query-params.utils.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +0 -1
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/facets/facets-container/facets-container.component.d.ts +1 -1
- package/libs/feature/search/src/lib/facets/facets-container/facets-container.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts +1 -0
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts +3 -26
- package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
- package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts +1 -1
- package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/records-metrics/records-metrics.component.d.ts +1 -1
- package/libs/feature/search/src/lib/records-metrics/records-metrics.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +1 -1
- package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-layout/results-layout.component.d.ts +1 -1
- package/libs/feature/search/src/lib/results-layout/results-layout.component.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/feature/search/src/lib/results-table/results-table-container.component.d.ts +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts +1 -1
- package/libs/feature/search/src/lib/sort-by/sort-by.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/container/search-state.container.directive.d.ts +1 -1
- package/libs/feature/search/src/lib/state/container/search-state.container.directive.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/reducer.d.ts.map +1 -1
- package/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +2 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts.map +1 -1
- 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.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +7 -7
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +1 -0
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.d.ts.map +1 -1
- package/libs/ui/search/src/index.d.ts +0 -2
- package/libs/ui/search/src/index.d.ts.map +1 -1
- package/libs/ui/search/src/lib/facets/facet-block/facet-block.component.d.ts +1 -11
- package/libs/ui/search/src/lib/facets/facet-block/facet-block.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/facets/facet-item/facet-item.component.d.ts +1 -11
- package/libs/ui/search/src/lib/facets/facet-item/facet-item.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/facets/facet-list/facet-list.component.d.ts +1 -1
- package/libs/ui/search/src/lib/facets/facet-list/facet-list.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-metric/record-metric.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-metric/record-metric.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview/record-preview.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview/record-preview.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.d.ts +1 -1
- package/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-list/results-layout.config.d.ts +1 -1
- package/libs/ui/search/src/lib/results-list/results-layout.config.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-list/results-list.component.d.ts +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-list-item/results-list-item.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-list-item/results-list-item.component.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/app-config.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/model.d.ts +1 -0
- package/libs/util/app-config/src/lib/model.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/parse-utils.d.ts.map +1 -1
- package/libs/util/i18n/src/lib/language-codes.d.ts +91 -31
- package/libs/util/i18n/src/lib/language-codes.d.ts.map +1 -1
- package/libs/util/shared/src/index.d.ts +1 -1
- package/libs/util/shared/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +28 -8
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/record/index.d.ts +3 -0
- package/libs/util/shared/src/lib/record/index.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts +13 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts +3 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/geojson.d.ts +7 -2
- package/libs/util/shared/src/lib/utils/geojson.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/index.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/scroll.d.ts +12 -0
- package/libs/util/shared/src/lib/utils/scroll.d.ts.map +1 -0
- package/package.json +11 -10
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.ts +3 -6
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +47 -22
- package/src/libs/api/metadata-converter/src/lib/gn4/metadata-url.service.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +3 -3
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +10 -6
- package/src/libs/api/repository/src/index.ts +1 -1
- package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -4
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +3 -5
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +65 -14
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +38 -2
- package/src/libs/api/repository/src/lib/gn4/organizations/index.ts +2 -11
- package/src/libs/api/repository/src/lib/gn4/organizations/organization-strategy.token.ts +10 -0
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-service.factory.ts +33 -0
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +76 -44
- package/src/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.ts +8 -0
- package/src/libs/api/repository/src/lib/metadata-language.token.ts +8 -0
- package/src/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +21 -1
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +4 -0
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +0 -3
- package/src/libs/feature/catalog/src/index.ts +0 -1
- package/src/libs/feature/catalog/src/lib/organization-url.token.ts +5 -0
- package/src/libs/feature/catalog/src/lib/site-title/site-title.component.ts +4 -0
- package/src/libs/feature/catalog/src/lib/source-label/source-label.component.ts +3 -0
- package/src/libs/feature/catalog/src/lib/sources/sources.service.ts +2 -5
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +10 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +7 -5
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +3 -3
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +8 -1
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.html +37 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.ts +90 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +2 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.html +22 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-inspire-field/form-field-inspire-theme.component.ts +57 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +6 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +2 -18
- package/src/libs/feature/editor/src/lib/fields.config.ts +85 -3
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.ts +8 -1
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +8 -8
- package/src/libs/feature/notifications/src/index.ts +0 -1
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +36 -15
- package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +7 -2
- package/src/libs/feature/record/src/lib/feature-record.module.ts +1 -21
- package/src/libs/feature/record/src/lib/gpf-api-dl-list-item/gpf-api-dl-list-item.component.ts +5 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +81 -25
- package/src/libs/feature/record/src/lib/record-meta/record-meta.component.ts +2 -0
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -2
- package/src/libs/feature/router/src/lib/default/container/search-router.container.directive.ts +1 -0
- package/src/libs/feature/router/src/lib/default/router.module.ts +0 -3
- package/src/libs/feature/router/src/lib/default/state/query-params.utils.ts +5 -2
- package/src/libs/feature/router/src/lib/default/state/router.facade.ts +2 -1
- package/src/libs/feature/search/src/index.ts +0 -1
- package/src/libs/feature/search/src/lib/facets/facets-container/facets-container.component.ts +14 -1
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +23 -16
- package/src/libs/feature/search/src/lib/feature-search.module.ts +0 -61
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +12 -1
- package/src/libs/feature/search/src/lib/records-metrics/records-metrics.component.ts +5 -0
- package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +11 -0
- package/src/libs/feature/search/src/lib/results-layout/results-layout.component.ts +5 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +21 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +1 -1
- package/src/libs/feature/search/src/lib/sort-by/sort-by.component.ts +5 -0
- package/src/libs/feature/search/src/lib/state/container/search-state.container.directive.ts +1 -0
- package/src/libs/feature/search/src/lib/state/reducer.ts +4 -1
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.ts +4 -1
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +6 -1
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -1
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +4 -1
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +4 -1
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +12 -11
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +4 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +11 -2
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +7 -2
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +1 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +5 -1
- package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +8 -1
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -0
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +21 -58
- package/src/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.ts +6 -6
- package/src/libs/ui/elements/src/lib/notification/notification.component.ts +8 -1
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +0 -6
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +7 -1
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +3 -1
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +4 -3
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +9 -4
- package/src/libs/ui/search/src/index.ts +0 -2
- package/src/libs/ui/search/src/lib/facets/facet-block/facet-block.component.ts +12 -11
- package/src/libs/ui/search/src/lib/facets/facet-item/facet-item.component.ts +5 -11
- package/src/libs/ui/search/src/lib/facets/facet-list/facet-list.component.ts +6 -0
- package/src/libs/ui/search/src/lib/record-metric/record-metric.component.ts +4 -0
- package/src/libs/ui/search/src/lib/record-preview/record-preview.component.ts +3 -0
- package/src/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.ts +4 -0
- package/src/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.ts +33 -1
- package/src/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.ts +10 -0
- package/src/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.ts +4 -0
- package/src/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.ts +4 -0
- package/src/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.ts +4 -0
- package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.ts +4 -0
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +1 -4
- package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +16 -2
- package/src/libs/ui/search/src/lib/results-list/results-layout.config.ts +5 -3
- package/src/libs/ui/search/src/lib/results-list/results-list.component.ts +4 -0
- package/src/libs/ui/search/src/lib/results-list-item/results-list-item.component.ts +3 -0
- package/src/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.ts +6 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +2 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +1 -1
- package/src/libs/util/app-config/src/lib/model.ts +1 -0
- package/src/libs/util/app-config/src/lib/parse-utils.ts +4 -7
- package/src/libs/util/i18n/src/lib/language-codes.ts +62 -11
- package/src/libs/util/shared/src/index.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +43 -8
- package/src/libs/util/shared/src/lib/record/index.ts +2 -0
- package/src/libs/util/shared/src/lib/record/quality-score.util.ts +72 -0
- package/src/libs/util/shared/src/lib/{record.util.ts → record/record.util.ts} +1 -1
- package/src/libs/util/shared/src/lib/utils/geojson.ts +72 -2
- package/src/libs/util/shared/src/lib/utils/index.ts +2 -0
- package/src/libs/util/shared/src/lib/utils/mobile-screen.ts +14 -0
- package/src/libs/util/shared/src/lib/utils/scroll.ts +48 -0
- package/translations/de.json +62 -21
- package/translations/en.json +63 -22
- package/translations/es.json +49 -8
- package/translations/fr.json +69 -28
- package/translations/it.json +62 -21
- package/translations/nl.json +49 -8
- package/translations/pt.json +49 -8
- package/translations/sk.json +53 -12
- package/esm2022/libs/api/repository/src/lib/metadata-language.mjs +0 -3
- package/esm2022/libs/feature/auth/src/index.mjs +0 -2
- package/esm2022/libs/feature/auth/src/lib/feature-auth.module.mjs +0 -17
- package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +0 -57
- package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +0 -18
- package/esm2022/libs/feature/search/src/lib/facets/facets.module.mjs +0 -21
- package/esm2022/libs/ui/search/src/lib/facets/facets.module.mjs +0 -23
- package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +0 -168
- package/esm2022/libs/util/app-config/src/lib/constants.mjs +0 -439
- package/esm2022/libs/util/shared/src/lib/record.util.mjs +0 -56
- package/libs/api/repository/src/lib/metadata-language.d.ts +0 -3
- package/libs/api/repository/src/lib/metadata-language.d.ts.map +0 -1
- package/libs/feature/auth/src/index.d.ts +0 -2
- package/libs/feature/auth/src/index.d.ts.map +0 -1
- package/libs/feature/auth/src/lib/feature-auth.module.d.ts +0 -8
- package/libs/feature/auth/src/lib/feature-auth.module.d.ts.map +0 -1
- package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts +0 -14
- package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +0 -1
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +0 -7
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +0 -1
- package/libs/feature/search/src/lib/facets/facets.module.d.ts +0 -11
- package/libs/feature/search/src/lib/facets/facets.module.d.ts.map +0 -1
- package/libs/ui/search/src/lib/facets/facets.module.d.ts +0 -13
- package/libs/ui/search/src/lib/facets/facets.module.d.ts.map +0 -1
- package/libs/ui/search/src/lib/ui-search.module.d.ts +0 -36
- package/libs/ui/search/src/lib/ui-search.module.d.ts.map +0 -1
- package/libs/util/app-config/src/lib/constants.d.ts +0 -2
- package/libs/util/app-config/src/lib/constants.d.ts.map +0 -1
- package/libs/util/shared/src/lib/record.util.d.ts +0 -3
- package/libs/util/shared/src/lib/record.util.d.ts.map +0 -1
- package/src/libs/api/repository/src/lib/metadata-language.ts +0 -3
- package/src/libs/feature/auth/src/index.ts +0 -1
- package/src/libs/feature/auth/src/lib/feature-auth.module.ts +0 -12
- package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +0 -71
- package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +0 -10
- package/src/libs/feature/search/src/lib/facets/facets.module.ts +0 -12
- package/src/libs/ui/search/src/lib/facets/facets.module.ts +0 -14
- package/src/libs/ui/search/src/lib/ui-search.module.ts +0 -108
|
@@ -28,10 +28,7 @@ import { matchProtocol } from '../common/distribution.mapper'
|
|
|
28
28
|
import { Thesaurus } from './types'
|
|
29
29
|
import { getResourceType, getReuseType } from '../common/resource-types'
|
|
30
30
|
import { TranslateService } from '@ngx-translate/core'
|
|
31
|
-
import {
|
|
32
|
-
getLang2FromLang3,
|
|
33
|
-
getLocalizedIndexKey,
|
|
34
|
-
} from '../../../../../../libs/util/i18n/src'
|
|
31
|
+
import { toLang2, toLang3 } from '../../../../../../libs/util/i18n/src'
|
|
35
32
|
|
|
36
33
|
type ESResponseSource = SourceWithUnknownProps
|
|
37
34
|
|
|
@@ -49,8 +46,8 @@ export class Gn4FieldMapper {
|
|
|
49
46
|
private translateService: TranslateService
|
|
50
47
|
) {}
|
|
51
48
|
|
|
52
|
-
private get
|
|
53
|
-
return
|
|
49
|
+
private get getLocalizedIndexKey() {
|
|
50
|
+
return `lang${toLang3(this.translateService.currentLang)}`
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
protected fields: Record<string, EsFieldMapperFn> = {
|
|
@@ -69,14 +66,22 @@ export class Gn4FieldMapper {
|
|
|
69
66
|
resourceTitleObject: (output, source) => ({
|
|
70
67
|
...output,
|
|
71
68
|
title: selectFallback(
|
|
72
|
-
selectTranslatedField(
|
|
69
|
+
selectTranslatedField(
|
|
70
|
+
source,
|
|
71
|
+
'resourceTitleObject',
|
|
72
|
+
this.getLocalizedIndexKey
|
|
73
|
+
),
|
|
73
74
|
'no title'
|
|
74
75
|
),
|
|
75
76
|
}),
|
|
76
77
|
resourceAbstractObject: (output, source) => ({
|
|
77
78
|
...output,
|
|
78
79
|
abstract: selectFallback(
|
|
79
|
-
selectTranslatedField(
|
|
80
|
+
selectTranslatedField(
|
|
81
|
+
source,
|
|
82
|
+
'resourceAbstractObject',
|
|
83
|
+
this.getLocalizedIndexKey
|
|
84
|
+
),
|
|
80
85
|
'no title'
|
|
81
86
|
),
|
|
82
87
|
}),
|
|
@@ -84,7 +89,7 @@ export class Gn4FieldMapper {
|
|
|
84
89
|
const firstOverview = getFirstValue(selectField(source, 'overview'))
|
|
85
90
|
const description = selectTranslatedValue<string>(
|
|
86
91
|
selectField(firstOverview, 'text'),
|
|
87
|
-
this.
|
|
92
|
+
this.getLocalizedIndexKey
|
|
88
93
|
)
|
|
89
94
|
return {
|
|
90
95
|
...output,
|
|
@@ -102,7 +107,9 @@ export class Gn4FieldMapper {
|
|
|
102
107
|
...(output.topics || []),
|
|
103
108
|
...getAsArray(
|
|
104
109
|
selectField<SourceWithUnknownProps[]>(source, 'cl_topic')
|
|
105
|
-
).map((topic) =>
|
|
110
|
+
).map((topic) =>
|
|
111
|
+
selectTranslatedValue<string>(topic, this.getLocalizedIndexKey)
|
|
112
|
+
),
|
|
106
113
|
],
|
|
107
114
|
}),
|
|
108
115
|
cl_status: (output, source) => ({
|
|
@@ -156,7 +163,7 @@ export class Gn4FieldMapper {
|
|
|
156
163
|
const langList = getAsArray(
|
|
157
164
|
selectField<string>(source, 'resourceLanguage')
|
|
158
165
|
)
|
|
159
|
-
const languages = langList.map(
|
|
166
|
+
const languages = langList.map(toLang2)
|
|
160
167
|
const defaultLanguage = output.defaultLanguage ?? languages[0] ?? null // set the first language as main one as fallback
|
|
161
168
|
|
|
162
169
|
return {
|
|
@@ -166,7 +173,7 @@ export class Gn4FieldMapper {
|
|
|
166
173
|
},
|
|
167
174
|
otherLanguage: (output, source) => {
|
|
168
175
|
const langList = getAsArray(selectField<string>(source, 'otherLanguage'))
|
|
169
|
-
const languages = langList.map(
|
|
176
|
+
const languages = langList.map(toLang2)
|
|
170
177
|
const defaultLanguage = output.defaultLanguage ?? languages[0] ?? null
|
|
171
178
|
const otherLanguages = languages.filter(
|
|
172
179
|
(lang) => lang !== defaultLanguage
|
|
@@ -181,7 +188,7 @@ export class Gn4FieldMapper {
|
|
|
181
188
|
const language = selectField<string>(source, 'mainLanguage')
|
|
182
189
|
return {
|
|
183
190
|
...output,
|
|
184
|
-
defaultLanguage: language ?
|
|
191
|
+
defaultLanguage: language ? toLang2(language) : null,
|
|
185
192
|
}
|
|
186
193
|
},
|
|
187
194
|
link: (output, source) => {
|
|
@@ -199,7 +206,10 @@ export class Gn4FieldMapper {
|
|
|
199
206
|
contact: (output, source) => ({
|
|
200
207
|
...output,
|
|
201
208
|
contacts: [
|
|
202
|
-
mapContact(
|
|
209
|
+
mapContact(
|
|
210
|
+
getFirstValue(selectField(source, 'contact')),
|
|
211
|
+
this.getLocalizedIndexKey
|
|
212
|
+
),
|
|
203
213
|
],
|
|
204
214
|
}),
|
|
205
215
|
contactForResource: (output, source) => ({
|
|
@@ -210,7 +220,7 @@ export class Gn4FieldMapper {
|
|
|
210
220
|
? output.contactsForResource
|
|
211
221
|
: []),
|
|
212
222
|
...getAsArray(selectField(source, 'contactForResource')).map(
|
|
213
|
-
(contact) => mapContact(contact, this.
|
|
223
|
+
(contact) => mapContact(contact, this.getLocalizedIndexKey)
|
|
214
224
|
),
|
|
215
225
|
],
|
|
216
226
|
}),
|
|
@@ -229,7 +239,7 @@ export class Gn4FieldMapper {
|
|
|
229
239
|
...output,
|
|
230
240
|
keywords: mapKeywords(
|
|
231
241
|
selectField<Thesaurus[]>(source, 'allKeywords'),
|
|
232
|
-
this.
|
|
242
|
+
this.getLocalizedIndexKey
|
|
233
243
|
),
|
|
234
244
|
}),
|
|
235
245
|
inspireTheme: (output, source) => ({
|
|
@@ -277,7 +287,11 @@ export class Gn4FieldMapper {
|
|
|
277
287
|
),
|
|
278
288
|
lineageObject: (output, source) => ({
|
|
279
289
|
...output,
|
|
280
|
-
lineage: selectTranslatedField(
|
|
290
|
+
lineage: selectTranslatedField(
|
|
291
|
+
source,
|
|
292
|
+
'lineageObject',
|
|
293
|
+
this.getLocalizedIndexKey
|
|
294
|
+
),
|
|
281
295
|
}),
|
|
282
296
|
userSavedCount: (output, source) =>
|
|
283
297
|
this.addExtra(
|
|
@@ -410,7 +424,7 @@ export class Gn4FieldMapper {
|
|
|
410
424
|
...geoms.map((geom, index) => {
|
|
411
425
|
const description = selectTranslatedValue(
|
|
412
426
|
getArrayItem(extentDescriptions, index),
|
|
413
|
-
this.
|
|
427
|
+
this.getLocalizedIndexKey
|
|
414
428
|
)
|
|
415
429
|
const geometry = shapes[index] ?? geom
|
|
416
430
|
return {
|
|
@@ -465,7 +479,10 @@ export class Gn4FieldMapper {
|
|
|
465
479
|
outputField in output ? output[outputField] : []
|
|
466
480
|
outputArray.push(
|
|
467
481
|
...constraintArray.map((item) => {
|
|
468
|
-
const text = selectTranslatedValue(
|
|
482
|
+
const text = selectTranslatedValue(
|
|
483
|
+
item,
|
|
484
|
+
this.getLocalizedIndexKey
|
|
485
|
+
) as string
|
|
469
486
|
const url = getAsUrl(selectField(item, 'link'))
|
|
470
487
|
return {
|
|
471
488
|
text,
|
|
@@ -508,19 +525,27 @@ export class Gn4FieldMapper {
|
|
|
508
525
|
mapLink = (sourceLink: SourceWithUnknownProps): OnlineResource | null => {
|
|
509
526
|
const url = getAsUrl(
|
|
510
527
|
selectFallback(
|
|
511
|
-
selectTranslatedField<string>(
|
|
528
|
+
selectTranslatedField<string>(
|
|
529
|
+
sourceLink,
|
|
530
|
+
'urlObject',
|
|
531
|
+
this.getLocalizedIndexKey
|
|
532
|
+
),
|
|
512
533
|
selectField<string>(sourceLink, 'url')
|
|
513
534
|
)
|
|
514
535
|
)
|
|
515
536
|
const name = selectFallback(
|
|
516
|
-
selectTranslatedField<string>(
|
|
537
|
+
selectTranslatedField<string>(
|
|
538
|
+
sourceLink,
|
|
539
|
+
'nameObject',
|
|
540
|
+
this.getLocalizedIndexKey
|
|
541
|
+
),
|
|
517
542
|
selectField<string>(sourceLink, 'name')
|
|
518
543
|
)
|
|
519
544
|
const description = selectFallback(
|
|
520
545
|
selectTranslatedField<string>(
|
|
521
546
|
sourceLink,
|
|
522
547
|
'descriptionObject',
|
|
523
|
-
this.
|
|
548
|
+
this.getLocalizedIndexKey
|
|
524
549
|
),
|
|
525
550
|
selectField<string>(sourceLink, 'description')
|
|
526
551
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inject, Injectable } from '@angular/core'
|
|
2
2
|
import { Configuration } from '../../../../../../libs/data-access/gn4/src'
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core'
|
|
4
|
-
import {
|
|
4
|
+
import { toLang3 } from '../../../../../../libs/util/i18n/src'
|
|
5
5
|
|
|
6
6
|
@Injectable({
|
|
7
7
|
providedIn: 'root',
|
|
@@ -14,7 +14,7 @@ export class MetadataUrlService {
|
|
|
14
14
|
|
|
15
15
|
getUrl(uuid: string, apiPath: string = this.apiConfiguration.basePath) {
|
|
16
16
|
const prefix = `${apiPath}/../`
|
|
17
|
-
return `${prefix}${
|
|
17
|
+
return `${prefix}${toLang3(
|
|
18
18
|
this.translate.currentLang
|
|
19
19
|
)}/catalog.search#/metadata/${uuid}`
|
|
20
20
|
}
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
42
42
|
import { matchMimeType } from '../common/distribution.mapper'
|
|
43
43
|
import { fullNameToParts } from '../iso19139/utils/individual-name'
|
|
44
|
-
import {
|
|
44
|
+
import { toLang2 } from '../../../../../../libs/util/i18n/src/lib/language-codes'
|
|
45
45
|
import { getResourceType, getReuseType } from '../common/resource-types'
|
|
46
46
|
|
|
47
47
|
export function readKind(rootEl: XmlElement): RecordKind {
|
|
@@ -370,7 +370,7 @@ export function readLocaleElement(): ChainableFunction<
|
|
|
370
370
|
return pipe(
|
|
371
371
|
findChildElement('lan:LanguageCode'),
|
|
372
372
|
readAttribute('codeListValue'),
|
|
373
|
-
map((lang) =>
|
|
373
|
+
map((lang) => toLang2(lang?.toLowerCase()) ?? lang)
|
|
374
374
|
)
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from '../iso19139/write-parts'
|
|
50
50
|
import { findIdentification } from '../iso19139/read-parts'
|
|
51
51
|
import { namePartsToFull } from '../iso19139/utils/individual-name'
|
|
52
|
-
import {
|
|
52
|
+
import { toLang3 } from '../../../../../../libs/util/i18n/src/lib/language-codes'
|
|
53
53
|
import { kindToCodeListValue } from '../common/resource-types'
|
|
54
54
|
|
|
55
55
|
export function writeUniqueIdentifier(
|
|
@@ -529,7 +529,7 @@ export function writeOnlineResources(
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
function writeLocaleElement(language: LanguageCode) {
|
|
532
|
-
const lang3 =
|
|
532
|
+
const lang3 = toLang3(language.toLowerCase()) ?? language
|
|
533
533
|
return pipe(
|
|
534
534
|
findChildOrCreate('lan:PT_Locale'),
|
|
535
535
|
writeAttribute('id', language.toUpperCase()),
|
|
@@ -55,7 +55,7 @@ import { getKeywordTypeFromKeywordTypeCode } from './utils/keyword.mapper'
|
|
|
55
55
|
import { getRoleFromRoleCode } from './utils/role.mapper'
|
|
56
56
|
import { getStatusFromStatusCode } from './utils/status.mapper'
|
|
57
57
|
import { getUpdateFrequencyFromFrequencyCode } from './utils/update-frequency.mapper'
|
|
58
|
-
import {
|
|
58
|
+
import { toLang2 } from '../../../../../../libs/util/i18n/src/lib/language-codes'
|
|
59
59
|
import { getResourceType, getReuseType } from '../common/resource-types'
|
|
60
60
|
|
|
61
61
|
export function extractCharacterString(): ChainableFunction<
|
|
@@ -1164,7 +1164,7 @@ export function readOtherLanguages(rootEl: XmlElement): LanguageCode[] {
|
|
|
1164
1164
|
pipe(
|
|
1165
1165
|
findChildElement('lan:LanguageCode'),
|
|
1166
1166
|
readAttribute('codeListValue'),
|
|
1167
|
-
map((lang) =>
|
|
1167
|
+
map((lang) => toLang2(lang?.toLowerCase()) ?? lang)
|
|
1168
1168
|
)
|
|
1169
1169
|
),
|
|
1170
1170
|
map((languages) =>
|
|
@@ -1179,7 +1179,7 @@ export function readDefaultLanguage(rootEl: XmlElement): LanguageCode {
|
|
|
1179
1179
|
findChildElement('gmd:language', false),
|
|
1180
1180
|
findChildElement('lan:LanguageCode'),
|
|
1181
1181
|
readAttribute('codeListValue'),
|
|
1182
|
-
map((lang) => (lang ?
|
|
1182
|
+
map((lang) => (lang ? toLang2(lang.toLowerCase()) : null))
|
|
1183
1183
|
)(rootEl)
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
@@ -11,8 +11,11 @@ export function getStatusFromStatusCode(statusCode: string): RecordStatus {
|
|
|
11
11
|
case 'onGoing':
|
|
12
12
|
return 'ongoing'
|
|
13
13
|
case 'planned':
|
|
14
|
+
return 'planned'
|
|
14
15
|
case 'required':
|
|
16
|
+
return 'required'
|
|
15
17
|
case 'underDevelopment':
|
|
18
|
+
return 'under_development'
|
|
16
19
|
default:
|
|
17
20
|
return 'under_development'
|
|
18
21
|
}
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import { readKind } from './read-parts'
|
|
54
54
|
import { writeGeometry } from './utils/geometry'
|
|
55
55
|
import { namePartsToFull } from './utils/individual-name'
|
|
56
|
-
import {
|
|
56
|
+
import { toLang3 } from '../../../../../../libs/util/i18n/src/lib/language-codes'
|
|
57
57
|
import { kindToCodeListValue } from '../common/resource-types'
|
|
58
58
|
|
|
59
59
|
function writeLocalizedElement(
|
|
@@ -183,6 +183,10 @@ export function getProgressCode(status: RecordStatus): string {
|
|
|
183
183
|
return 'removed'
|
|
184
184
|
case 'under_development':
|
|
185
185
|
return 'underDevelopment'
|
|
186
|
+
case 'planned':
|
|
187
|
+
return 'planned'
|
|
188
|
+
case 'required':
|
|
189
|
+
return 'required'
|
|
186
190
|
default:
|
|
187
191
|
throw new Error(
|
|
188
192
|
`Could not determine progress code from status: ${status}`
|
|
@@ -1296,7 +1300,7 @@ export function createOnlineResource(onlineResource: ServiceOnlineResource) {
|
|
|
1296
1300
|
}
|
|
1297
1301
|
|
|
1298
1302
|
export function appendDatasetOnlineResources(
|
|
1299
|
-
record: DatasetRecord,
|
|
1303
|
+
record: DatasetRecord | ReuseRecord,
|
|
1300
1304
|
rootEl: XmlElement
|
|
1301
1305
|
) {
|
|
1302
1306
|
appendChildren(
|
|
@@ -1315,7 +1319,7 @@ export function appendDatasetOnlineResources(
|
|
|
1315
1319
|
}
|
|
1316
1320
|
|
|
1317
1321
|
export function appendServiceOnlineResources(
|
|
1318
|
-
record: ServiceRecord
|
|
1322
|
+
record: ServiceRecord,
|
|
1319
1323
|
rootEl: XmlElement
|
|
1320
1324
|
) {
|
|
1321
1325
|
appendChildren(...record.onlineResources.map(createOnlineResource))(rootEl)
|
|
@@ -1327,7 +1331,7 @@ export function writeOnlineResources(
|
|
|
1327
1331
|
) {
|
|
1328
1332
|
removeOnlineResources()(rootEl)
|
|
1329
1333
|
|
|
1330
|
-
if (record.kind === 'dataset') {
|
|
1334
|
+
if (record.kind === 'dataset' || record.kind === 'reuse') {
|
|
1331
1335
|
appendDatasetOnlineResources(record, rootEl)
|
|
1332
1336
|
return
|
|
1333
1337
|
}
|
|
@@ -1472,7 +1476,7 @@ export function writeLanguages(record: DatasetRecord, rootEl: XmlElement) {
|
|
|
1472
1476
|
writeAttribute('id', lang.toUpperCase()),
|
|
1473
1477
|
createNestedChild('gmd:languageCode', 'gmd:LanguageCode'),
|
|
1474
1478
|
writeAttribute('codeList', 'http://www.loc.gov/standards/iso639-2/'),
|
|
1475
|
-
writeAttribute('codeListValue',
|
|
1479
|
+
writeAttribute('codeListValue', toLang3(lang) ?? lang)
|
|
1476
1480
|
)
|
|
1477
1481
|
|
|
1478
1482
|
// add new languages (only if other than default one)
|
|
@@ -1486,7 +1490,7 @@ export function writeDefaultLanguage(
|
|
|
1486
1490
|
record: DatasetRecord,
|
|
1487
1491
|
rootEl: XmlElement
|
|
1488
1492
|
) {
|
|
1489
|
-
const lang3 =
|
|
1493
|
+
const lang3 = toLang3(record.defaultLanguage.toLowerCase())
|
|
1490
1494
|
return pipe(
|
|
1491
1495
|
findNestedChildOrCreate('gmd:language', 'gmd:LanguageCode'),
|
|
1492
1496
|
writeAttribute('codeList', 'http://www.loc.gov/standards/iso639-2/'),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'
|
|
2
|
-
import {
|
|
2
|
+
import { toLang2, toLang3 } from '../../../../../../../libs/util/i18n/src'
|
|
3
3
|
import { TranslateService } from '@ngx-translate/core'
|
|
4
4
|
import { Location } from '@angular/common'
|
|
5
5
|
|
|
@@ -35,8 +35,8 @@ export class AuthService {
|
|
|
35
35
|
'${current_url}',
|
|
36
36
|
new URL(this.location.path(), window.location.href).toString()
|
|
37
37
|
)
|
|
38
|
-
.replace('${lang2}', this.translateService.currentLang)
|
|
39
|
-
.replace('${lang3}',
|
|
38
|
+
.replace('${lang2}', toLang2(this.translateService.currentLang))
|
|
39
|
+
.replace('${lang3}', toLang3(this.translateService.currentLang))
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
get logoutUrl() {
|
|
@@ -46,7 +46,7 @@ export class AuthService {
|
|
|
46
46
|
get settingsUrl() {
|
|
47
47
|
return this.baseSettingsUrl.replace(
|
|
48
48
|
'${lang3}',
|
|
49
|
-
|
|
49
|
+
toLang3(this.translateService.currentLang)
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -10,14 +10,12 @@ export const ES_SOURCE_SUMMARY = [
|
|
|
10
10
|
'codelist_status_text',
|
|
11
11
|
'link',
|
|
12
12
|
'linkProtocol',
|
|
13
|
-
'contactForResource
|
|
14
|
-
'contact
|
|
15
|
-
'contact
|
|
13
|
+
'contactForResource*.organisation*',
|
|
14
|
+
'contact*.organisation*',
|
|
15
|
+
'contact*.email',
|
|
16
16
|
'userSavedCount',
|
|
17
|
-
'updateFrequency',
|
|
18
17
|
'cl_topic',
|
|
19
18
|
'cl_maintenanceAndUpdateFrequency',
|
|
20
|
-
'tag',
|
|
21
19
|
'MD_LegalConstraints*Object',
|
|
22
20
|
'qualityScore',
|
|
23
21
|
'allKeywords',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injectable, Injector } from '@angular/core'
|
|
2
|
-
import { Geometry } from 'geojson'
|
|
2
|
+
import type { Geometry } from 'geojson'
|
|
3
3
|
import {
|
|
4
4
|
ES_QUERY_FIELDS_PRIORITY,
|
|
5
5
|
ES_SOURCE_SUMMARY,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
FiltersAggregationParams,
|
|
16
16
|
SortByField,
|
|
17
17
|
} from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
18
|
-
import { METADATA_LANGUAGE } from '../../metadata-language'
|
|
18
|
+
import { METADATA_LANGUAGE } from '../../metadata-language.token'
|
|
19
19
|
import {
|
|
20
20
|
AggregationResult,
|
|
21
21
|
EsSearchParams,
|
|
@@ -26,10 +26,16 @@ import {
|
|
|
26
26
|
SortParams,
|
|
27
27
|
TermsAggregationResult,
|
|
28
28
|
} from '../../../../../../../libs/api/metadata-converter/src'
|
|
29
|
-
import {
|
|
29
|
+
import { toLang3 } from '../../../../../../../libs/util/i18n/src'
|
|
30
30
|
import { formatDate, isDateRange } from './date-range.utils'
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
CatalogRecord,
|
|
33
|
+
LanguageCode,
|
|
34
|
+
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
32
35
|
import { TranslateService } from '@ngx-translate/core'
|
|
36
|
+
import { getGeometryBoundingBox } from '../../../../../../../libs/util/shared/src'
|
|
37
|
+
import { getLength as getGeodesicLength } from 'ol/sphere'
|
|
38
|
+
import { LineString } from 'ol/geom'
|
|
33
39
|
|
|
34
40
|
export type DateRange = { start?: Date; end?: Date }
|
|
35
41
|
|
|
@@ -42,11 +48,9 @@ export class ElasticsearchService {
|
|
|
42
48
|
private runtimeFields: Record<string, string> = {}
|
|
43
49
|
|
|
44
50
|
// we're using getters in case the defined languages change over time
|
|
45
|
-
private get
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
private get metadataLang() {
|
|
49
|
-
return this.injector.get(METADATA_LANGUAGE, null)
|
|
51
|
+
private get metadataLang(): LanguageCode {
|
|
52
|
+
const mdLangValue = this.injector.get(METADATA_LANGUAGE, null)
|
|
53
|
+
return typeof mdLangValue === 'function' ? mdLangValue() : mdLangValue
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
constructor(
|
|
@@ -230,9 +234,12 @@ export class ElasticsearchService {
|
|
|
230
234
|
|
|
231
235
|
private getQueryLang(): string {
|
|
232
236
|
if (this.metadataLang) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
const lang3 = toLang3(
|
|
238
|
+
this.isCurrentSearchLang()
|
|
239
|
+
? this.translateService.currentLang
|
|
240
|
+
: this.metadataLang
|
|
241
|
+
)
|
|
242
|
+
return `lang${lang3}`
|
|
236
243
|
} else return '*'
|
|
237
244
|
}
|
|
238
245
|
private isCurrentSearchLang() {
|
|
@@ -351,6 +358,11 @@ export class ElasticsearchService {
|
|
|
351
358
|
})
|
|
352
359
|
}
|
|
353
360
|
if (geometry) {
|
|
361
|
+
// boosts applied using the filter geometry:
|
|
362
|
+
// * records completely within the geometry receive a boost of 5
|
|
363
|
+
// * records intersecting the geometry receive a boost of 2
|
|
364
|
+
// * records close to the geometry center receive a boost of 5 (based on the `location` field)
|
|
365
|
+
// * records on the outskirt of the geometry receive a boost of 2.5
|
|
354
366
|
should.push(
|
|
355
367
|
{
|
|
356
368
|
geo_shape: {
|
|
@@ -358,7 +370,7 @@ export class ElasticsearchService {
|
|
|
358
370
|
shape: geometry,
|
|
359
371
|
relation: 'within',
|
|
360
372
|
},
|
|
361
|
-
boost:
|
|
373
|
+
boost: 5.0,
|
|
362
374
|
},
|
|
363
375
|
},
|
|
364
376
|
{
|
|
@@ -367,10 +379,49 @@ export class ElasticsearchService {
|
|
|
367
379
|
shape: geometry,
|
|
368
380
|
relation: 'intersects',
|
|
369
381
|
},
|
|
370
|
-
boost:
|
|
382
|
+
boost: 2.0,
|
|
371
383
|
},
|
|
372
384
|
}
|
|
373
385
|
)
|
|
386
|
+
|
|
387
|
+
// this will boost the results variably depending on their distance from the given geometry
|
|
388
|
+
// note: this takes into account the `location` field of a record; this is generally the center of all spatial extents
|
|
389
|
+
// combined, and thus the actual size/coverage of the record spatial extent isn't relevant here
|
|
390
|
+
const bbox = getGeometryBoundingBox(geometry)
|
|
391
|
+
const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2]
|
|
392
|
+
const northToCenter = new LineString([
|
|
393
|
+
[center[0], bbox[3]],
|
|
394
|
+
center,
|
|
395
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
396
|
+
const southToCenter = new LineString([
|
|
397
|
+
[center[0], bbox[1]],
|
|
398
|
+
center,
|
|
399
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
400
|
+
const westToCenter = new LineString([
|
|
401
|
+
[bbox[0], center[1]],
|
|
402
|
+
center,
|
|
403
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
404
|
+
const eastToCenter = new LineString([
|
|
405
|
+
[bbox[2], center[1]],
|
|
406
|
+
center,
|
|
407
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
408
|
+
// cutoff distance is the distance from where the boost will only be half of the max value
|
|
409
|
+
// it is an average of the "size" of the bounding box in every direction, in meters
|
|
410
|
+
const cutoffDistance =
|
|
411
|
+
(getGeodesicLength(northToCenter) +
|
|
412
|
+
getGeodesicLength(southToCenter) +
|
|
413
|
+
getGeodesicLength(westToCenter) +
|
|
414
|
+
getGeodesicLength(eastToCenter)) /
|
|
415
|
+
4
|
|
416
|
+
|
|
417
|
+
should.push({
|
|
418
|
+
distance_feature: {
|
|
419
|
+
field: 'location',
|
|
420
|
+
pivot: `${Math.round(cutoffDistance).toFixed(0)}m`,
|
|
421
|
+
origin: center,
|
|
422
|
+
boost: 5.0,
|
|
423
|
+
},
|
|
424
|
+
})
|
|
374
425
|
}
|
|
375
426
|
|
|
376
427
|
return {
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import { catchError, map, tap } from 'rxjs/operators'
|
|
49
49
|
import { lt } from 'semver'
|
|
50
50
|
import { ElasticsearchService } from './elasticsearch'
|
|
51
|
-
import {
|
|
51
|
+
import { toLang2 } from '../../../../../../libs/util/i18n/src'
|
|
52
52
|
import { Gn4SettingsService } from './settings/gn4-settings.service'
|
|
53
53
|
|
|
54
54
|
const minPublicationApiVersion = '4.2.5'
|
|
@@ -562,7 +562,7 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
562
562
|
.pipe(
|
|
563
563
|
map((languages) =>
|
|
564
564
|
languages
|
|
565
|
-
.map((lang) =>
|
|
565
|
+
.map((lang) => toLang2(lang.id))
|
|
566
566
|
.filter((code): code is string => !!code)
|
|
567
567
|
)
|
|
568
568
|
)
|
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
import { Provider } from '@angular/core'
|
|
2
2
|
import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
DISABLE_AUTH,
|
|
5
|
+
Gn4PlatformService,
|
|
6
|
+
} from './platform/gn4-platform.service'
|
|
4
7
|
import { Gn4PlatformMapper } from './platform/gn4-platform.mapper'
|
|
5
8
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
6
9
|
import { Gn4Repository } from './gn4-repository'
|
|
10
|
+
import { AvatarServiceInterface, GravatarService } from './auth'
|
|
11
|
+
import { OrganizationsServiceInterface } from '../../../../../../libs/common/domain/src/lib/organizations.service.interface'
|
|
12
|
+
import {
|
|
13
|
+
ORGANIZATIONS_STRATEGY,
|
|
14
|
+
organizationsServiceFactory,
|
|
15
|
+
} from './organizations'
|
|
16
|
+
import { ElasticsearchService } from './elasticsearch'
|
|
17
|
+
import {
|
|
18
|
+
GroupsApiService,
|
|
19
|
+
SearchApiService,
|
|
20
|
+
} from '../../../../../../libs/data-access/gn4/src'
|
|
21
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
7
22
|
|
|
8
|
-
|
|
23
|
+
interface Gn4ProvideOptions {
|
|
24
|
+
disableAuth?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function provideGn4(provideOptions?: Gn4ProvideOptions): Provider[] {
|
|
9
28
|
return [
|
|
29
|
+
{
|
|
30
|
+
provide: DISABLE_AUTH,
|
|
31
|
+
useValue: provideOptions?.disableAuth,
|
|
32
|
+
},
|
|
10
33
|
{
|
|
11
34
|
provide: PlatformServiceInterface,
|
|
12
35
|
useClass: Gn4PlatformService,
|
|
@@ -16,5 +39,18 @@ export function provideGn4(): Provider[] {
|
|
|
16
39
|
useClass: Gn4Repository,
|
|
17
40
|
},
|
|
18
41
|
Gn4PlatformMapper,
|
|
42
|
+
{ provide: AvatarServiceInterface, useClass: GravatarService },
|
|
43
|
+
{
|
|
44
|
+
provide: OrganizationsServiceInterface,
|
|
45
|
+
useFactory: organizationsServiceFactory,
|
|
46
|
+
deps: [
|
|
47
|
+
ORGANIZATIONS_STRATEGY,
|
|
48
|
+
ElasticsearchService,
|
|
49
|
+
SearchApiService,
|
|
50
|
+
GroupsApiService,
|
|
51
|
+
TranslateService,
|
|
52
|
+
PlatformServiceInterface,
|
|
53
|
+
],
|
|
54
|
+
},
|
|
19
55
|
]
|
|
20
56
|
}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
export * from './organizations-from-metadata.service'
|
|
2
2
|
export * from './organizations-from-groups.service'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type OrganizationsStrategy = 'metadata' | 'groups'
|
|
7
|
-
|
|
8
|
-
export const ORGANIZATIONS_STRATEGY = new InjectionToken<OrganizationsStrategy>(
|
|
9
|
-
'organizations-strategy',
|
|
10
|
-
{
|
|
11
|
-
factory: () => 'metadata',
|
|
12
|
-
}
|
|
13
|
-
)
|
|
3
|
+
export * from './organization-strategy.token'
|
|
4
|
+
export * from './organizations-service.factory'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core'
|
|
2
|
+
|
|
3
|
+
export type OrganizationsStrategy = 'metadata' | 'groups'
|
|
4
|
+
|
|
5
|
+
export const ORGANIZATIONS_STRATEGY = new InjectionToken<OrganizationsStrategy>(
|
|
6
|
+
'organizations-strategy',
|
|
7
|
+
{
|
|
8
|
+
factory: () => 'metadata',
|
|
9
|
+
}
|
|
10
|
+
)
|
package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { forkJoin, Observable, of } from 'rxjs'
|
|
8
8
|
import { map, shareReplay } from 'rxjs/operators'
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core'
|
|
10
|
-
import {
|
|
10
|
+
import { toLang3 } from '../../../../../../../libs/util/i18n/src'
|
|
11
11
|
import { FieldFilters } from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
12
12
|
import {
|
|
13
13
|
CatalogRecord,
|
|
@@ -52,7 +52,7 @@ export class OrganizationsFromGroupsService
|
|
|
52
52
|
organisationsCount$ = this.organisations$.pipe(map((orgs) => orgs.length))
|
|
53
53
|
|
|
54
54
|
private get lang3() {
|
|
55
|
-
return
|
|
55
|
+
return toLang3(this.translateService.currentLang)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
constructor(
|