geonetwork-ui 2.3.0-dev.ff2a9db7 → 2.4.0-dev.573bccd7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.converter.mjs +4 -4
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +4 -4
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/metadata-url.service.mjs +4 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +2 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +9 -7
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +22 -7
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +14 -3
- package/esm2022/libs/api/repository/src/lib/gn4/auth/auth.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/auth/gravatar.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/favorites/favorites.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +59 -11
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/selection/selection.service.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/settings/gn4-settings.service.mjs +4 -4
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/api/atom.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/customstyle.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/formatters.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/groups.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/harvesters.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/identifiers.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/languages.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/links.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/logos.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/mapservers.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/mapservices.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/me.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/operations.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/pages.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/processes.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +5 -5
- package/esm2022/libs/data-access/gn4/src/openapi/api/regions.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/registries.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/related.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/search.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/selections.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/site.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/sources.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/standards.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/status.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/tags.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/tools.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/ui.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/userfeedback.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/users.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/usersearches.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api/userselections.api.service.mjs +4 -4
- package/esm2022/libs/data-access/gn4/src/openapi/api.module.mjs +5 -5
- package/esm2022/libs/feature/auth/src/lib/feature-auth.module.mjs +5 -5
- package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +5 -5
- package/esm2022/libs/feature/catalog/src/lib/my-org/my-org.service.mjs +4 -4
- package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +4 -4
- package/esm2022/libs/feature/catalog/src/lib/records/records.service.mjs +4 -4
- package/esm2022/libs/feature/catalog/src/lib/site-title/site-title.component.mjs +4 -4
- package/esm2022/libs/feature/catalog/src/lib/source-label/source-label.component.mjs +4 -4
- package/esm2022/libs/feature/catalog/src/lib/sources/sources.service.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/feature-dataviz.module.mjs +5 -5
- package/esm2022/libs/feature/dataviz/src/lib/figure/figure-container/figure-container.component.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/figure/figure.service.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +17 -5
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +14 -6
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +8 -6
- package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +6 -2
- package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +3 -1
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.mjs +17 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.mjs +17 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +105 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +10 -12
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +4 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/wizard/wizard.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +5 -5
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +8 -1
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +22 -42
- package/esm2022/libs/feature/editor/src/lib/services/wizard.service.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/+state/map.effects.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/+state/map.facade.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/feature-info/feature-info.service.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +5 -5
- package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/geocoding.service.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/manager/map-instance.directive.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/manager/map-manager.service.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/map-container/map-container.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/map-context/component/map-context.component.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +33 -13
- package/esm2022/libs/feature/map/src/lib/style/map-style.service.mjs +4 -4
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +10 -6
- package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +5 -5
- package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +4 -4
- package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +5 -5
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +17 -10
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +5 -5
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +36 -7
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +1 -3
- package/esm2022/libs/feature/router/src/lib/default/container/search-router.container.directive.mjs +4 -4
- package/esm2022/libs/feature/router/src/lib/default/router.module.mjs +5 -5
- package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +4 -4
- package/esm2022/libs/feature/router/src/lib/default/services/router-search.service.mjs +4 -4
- package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +4 -4
- package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/facets/facets-container/facets-container.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/facets/facets.module.mjs +5 -5
- package/esm2022/libs/feature/search/src/lib/facets/facets.service.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +5 -5
- package/esm2022/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/records-metrics/records-metrics.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/results-layout/results-layout.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +6 -6
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +19 -11
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/state/container/search-state.container.directive.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/state/effects.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -4
- package/esm2022/libs/feature/search/src/lib/utils/service/search.service.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/catalog-title/catalog-title.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/organisations-result/organisations-result.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +5 -5
- package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +4 -4
- package/esm2022/libs/ui/dataviz/src/lib/figure/figure.component.mjs +4 -4
- package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +4 -4
- package/esm2022/libs/ui/dataviz/src/lib/ui-dataviz.module.mjs +5 -5
- package/esm2022/libs/ui/elements/src/index.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/avatar/avatar.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/content-ghost/content-ghost.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/error/error.component.mjs +30 -0
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-info/linkify.directive.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +10 -10
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/pagination/pagination.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/pagination-buttons/pagination-buttons.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +9 -10
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +43 -0
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -13
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/user-preview/user-preview.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/checkbox/checkbox.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/chips-input/chips-input.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/copy-text-button/copy-text-button.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +6 -6
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +19 -13
- package/esm2022/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/editable-label/editable-label.directive.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/search-input/search-input.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +5 -5
- package/esm2022/libs/ui/inputs/src/lib/viewport-intersector/viewport-intersector.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/expandable-panel-button/expandable-panel-button.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/sticky-header/sticky-header.component.mjs +4 -4
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +5 -5
- package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +4 -4
- package/esm2022/libs/ui/map/src/lib/components/map/map.component.mjs +4 -4
- package/esm2022/libs/ui/map/src/lib/ui-map.module.mjs +5 -5
- package/esm2022/libs/ui/search/src/lib/facets/facet-block/facet-block.component.mjs +7 -7
- package/esm2022/libs/ui/search/src/lib/facets/facet-item/facet-item.component.mjs +7 -7
- package/esm2022/libs/ui/search/src/lib/facets/facet-list/facet-list.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/facets/facets.module.mjs +5 -5
- package/esm2022/libs/ui/search/src/lib/record-metric/record-metric.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview/record-preview.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-text/record-preview-text.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/results-list-item/results-list-item.component.mjs +4 -4
- package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +5 -5
- package/esm2022/libs/ui/widgets/src/lib/badge/badge.component.mjs +6 -5
- package/esm2022/libs/ui/widgets/src/lib/color-scale/color-scale.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/loading-mask/loading-mask.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/spinning-loader/spinning-loader.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/step-bar/step-bar.component.mjs +4 -4
- package/esm2022/libs/ui/widgets/src/lib/ui-widgets.module.mjs +5 -10
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +3 -1
- package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +2 -1
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/i18n/src/lib/i18n.interceptor.mjs +4 -4
- package/esm2022/libs/util/i18n/src/lib/lang.service.mjs +4 -4
- package/esm2022/libs/util/i18n/src/lib/util-i18n.module.mjs +5 -5
- package/esm2022/libs/util/shared/src/lib/image-fallback.directive.mjs +4 -4
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -4
- package/esm2022/libs/util/shared/src/lib/services/log.service.mjs +4 -4
- package/esm2022/libs/util/shared/src/lib/services/proxy.service.mjs +4 -4
- package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +4 -4
- package/esm2022/libs/util/shared/src/lib/util-shared.module.mjs +5 -5
- package/esm2022/translations/de.json +10 -0
- package/esm2022/translations/en.json +10 -0
- package/esm2022/translations/es.json +10 -0
- package/esm2022/translations/fr.json +10 -0
- package/esm2022/translations/it.json +10 -0
- package/esm2022/translations/nl.json +10 -0
- package/esm2022/translations/pt.json +10 -0
- package/fesm2022/geonetwork-ui.mjs +1588 -1212
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts +2 -2
- package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts +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 +4 -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 +2 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +15 -3
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +3 -3
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +24 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +6 -6
- package/libs/data-access/gn4/src/openapi/api/records.api.service.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/+state/editor.actions.d.ts +4 -0
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +5 -0
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +9 -8
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +10 -0
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +2 -0
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts +8 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts +8 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +31 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +1 -1
- 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 +3 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +6 -9
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +6 -0
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +2 -2
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +5 -2
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +4 -1
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +3 -2
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/error/error.component.d.ts +16 -0
- package/libs/ui/elements/src/lib/error/error.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +22 -0
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -2
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +4 -4
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts +2 -2
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts +10 -11
- package/libs/ui/widgets/src/lib/ui-widgets.module.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/fixtures.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/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +9 -1
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +3 -3
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +35 -31
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +67 -15
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +71 -13
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +145 -7
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +3 -3
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +36 -3
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +211 -0
- package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +9 -9
- package/src/libs/data-access/gn4/src/spec.yaml +4 -5
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +15 -1
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +5 -1
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +31 -3
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +13 -3
- package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +22 -5
- package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +10 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.html +7 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.ts +16 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.html +13 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.ts +16 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +6 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +130 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +5 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +9 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +4 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +7 -0
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +17 -52
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +6 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +31 -9
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +6 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +15 -8
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +1 -3
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +40 -3
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +0 -2
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.html +4 -4
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +12 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +9 -1
- package/src/libs/ui/elements/src/index.ts +3 -2
- package/src/libs/ui/elements/src/lib/{search-results-error/search-results-error.component.html → error/error.component.html} +18 -3
- package/src/libs/ui/elements/src/lib/{search-results-error/search-results-error.component.ts → error/error.component.ts} +5 -4
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +7 -8
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.css +18 -0
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +36 -0
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts +56 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -5
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +2 -1
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +8 -1
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +7 -7
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +13 -15
- package/src/libs/ui/widgets/src/lib/badge/badge.component.html +1 -1
- package/src/libs/ui/widgets/src/lib/badge/badge.component.ts +4 -1
- package/src/libs/ui/widgets/src/lib/ui-widgets.module.ts +0 -3
- package/src/libs/util/app-config/src/lib/app-config.ts +2 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +1 -0
- package/src/libs/util/app-config/src/lib/model.ts +1 -0
- package/tailwind.base.css +26 -1
- package/translations/de.json +10 -0
- package/translations/en.json +10 -0
- package/translations/es.json +10 -0
- package/translations/fr.json +10 -0
- package/translations/it.json +10 -0
- package/translations/nl.json +10 -0
- package/translations/pt.json +10 -0
- package/translations/sk.json +10 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
- package/esm2022/libs/ui/elements/src/lib/search-results-error/search-results-error.component.mjs +0 -29
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts +0 -6
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
- package/libs/ui/elements/src/lib/search-results-error/search-results-error.component.d.ts +0 -15
- package/libs/ui/elements/src/lib/search-results-error/search-results-error.component.d.ts.map +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.html +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.ts +0 -10
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extent/form-field-temporal-extent.component.css → form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.css} +0 -0
- /package/src/libs/ui/elements/src/lib/{search-results-error/search-results-error.component.css → error/error.component.css} +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
Input,
|
|
5
|
+
OnDestroy,
|
|
6
|
+
OnInit,
|
|
7
|
+
Type,
|
|
8
|
+
} from '@angular/core'
|
|
9
|
+
import { FormArray, FormControl } from '@angular/forms'
|
|
10
|
+
import { SortableListComponent } from '../../../../../../../../../libs/ui/elements/src'
|
|
11
|
+
import { Subscription, combineLatest, map } from 'rxjs'
|
|
12
|
+
import { FormFieldTemporalExtentsDateComponent } from './form-field-temporal-extents-date/form-field-temporal-extents-date.component'
|
|
13
|
+
import { FormFieldTemporalExtentsRangeComponent } from './form-field-temporal-extents-range/form-field-temporal-extents-range.component'
|
|
14
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
15
|
+
import { CommonModule } from '@angular/common'
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'gn-ui-form-field-temporal-extents',
|
|
19
|
+
templateUrl: './form-field-temporal-extents.component.html',
|
|
20
|
+
styleUrls: ['./form-field-temporal-extents.component.css'],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
standalone: true,
|
|
23
|
+
imports: [CommonModule, SortableListComponent],
|
|
24
|
+
})
|
|
25
|
+
export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
26
|
+
@Input() control!: FormControl
|
|
27
|
+
|
|
28
|
+
subscription: Subscription
|
|
29
|
+
|
|
30
|
+
array: FormArray = new FormArray([])
|
|
31
|
+
elements: Array<{
|
|
32
|
+
component: Type<any>
|
|
33
|
+
inputs: Record<string, any>
|
|
34
|
+
}>
|
|
35
|
+
|
|
36
|
+
addOptions$ = combineLatest([
|
|
37
|
+
this.translateService
|
|
38
|
+
.get('editor.record.form.temporalExtents.addDate')
|
|
39
|
+
.pipe(map((buttonLabel) => ({ buttonLabel, eventName: 'date' }))),
|
|
40
|
+
this.translateService
|
|
41
|
+
.get('editor.record.form.temporalExtents.addRange')
|
|
42
|
+
.pipe(map((buttonLabel) => ({ buttonLabel, eventName: 'range' }))),
|
|
43
|
+
])
|
|
44
|
+
|
|
45
|
+
constructor(private translateService: TranslateService) {}
|
|
46
|
+
|
|
47
|
+
ngOnInit() {
|
|
48
|
+
this.resetValueFromInput(this.control.value)
|
|
49
|
+
|
|
50
|
+
this.subscription = new Subscription()
|
|
51
|
+
|
|
52
|
+
this.subscription.add(
|
|
53
|
+
this.control.valueChanges.subscribe((value) => {
|
|
54
|
+
this.resetValueFromInput(value)
|
|
55
|
+
})
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
this.subscription.add(
|
|
59
|
+
this.array.valueChanges.subscribe((value) => {
|
|
60
|
+
this.control.setValue(value)
|
|
61
|
+
})
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onElementsChange(elements: any) {
|
|
66
|
+
this.array.clear({ emitEvent: false })
|
|
67
|
+
elements.forEach((e: any, i: number) =>
|
|
68
|
+
this.array.push(e.inputs.control, {
|
|
69
|
+
emitEvent: i === elements.length - 1,
|
|
70
|
+
})
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
onAdd(eventName: string) {
|
|
75
|
+
switch (eventName) {
|
|
76
|
+
case 'date': {
|
|
77
|
+
const dateControl = new FormControl({ start: new Date() })
|
|
78
|
+
this.array.push(dateControl)
|
|
79
|
+
break
|
|
80
|
+
}
|
|
81
|
+
case 'range': {
|
|
82
|
+
const rangeControl = new FormControl({
|
|
83
|
+
start: new Date(),
|
|
84
|
+
end: new Date(),
|
|
85
|
+
})
|
|
86
|
+
this.array.push(rangeControl)
|
|
87
|
+
break
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
ngOnDestroy(): void {
|
|
93
|
+
this.subscription.unsubscribe()
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private resetValueFromInput(value) {
|
|
97
|
+
this.array.clear({ emitEvent: false })
|
|
98
|
+
this.elements = []
|
|
99
|
+
value.forEach((v: any) => {
|
|
100
|
+
if ('start' in v && 'end' in v) {
|
|
101
|
+
const rangeControl = new FormControl({
|
|
102
|
+
start: v.start,
|
|
103
|
+
end: v.end,
|
|
104
|
+
})
|
|
105
|
+
this.array.push(rangeControl, { emitEvent: false })
|
|
106
|
+
this.elements = [
|
|
107
|
+
...this.elements,
|
|
108
|
+
{
|
|
109
|
+
component: FormFieldTemporalExtentsRangeComponent,
|
|
110
|
+
inputs: {
|
|
111
|
+
control: rangeControl,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
]
|
|
115
|
+
} else {
|
|
116
|
+
const dateControl = new FormControl({ start: v.start })
|
|
117
|
+
this.array.push(dateControl, { emitEvent: false })
|
|
118
|
+
this.elements = [
|
|
119
|
+
...this.elements,
|
|
120
|
+
{
|
|
121
|
+
component: FormFieldTemporalExtentsDateComponent,
|
|
122
|
+
inputs: {
|
|
123
|
+
control: dateControl,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
[control]="formControl"
|
|
62
62
|
></gn-ui-form-field-update-frequency>
|
|
63
63
|
</ng-container>
|
|
64
|
+
<ng-container *ngIf="isTemporalExtents">
|
|
65
|
+
<gn-ui-form-field-temporal-extents
|
|
66
|
+
[control]="formControl"
|
|
67
|
+
></gn-ui-form-field-temporal-extents>
|
|
68
|
+
</ng-container>
|
|
64
69
|
<ng-container *ngIf="isSimpleField">
|
|
65
70
|
<gn-ui-form-field-simple
|
|
66
71
|
[type]="simpleType"
|
|
@@ -85,9 +90,6 @@
|
|
|
85
90
|
<ng-container *ngIf="isSpatialExtentField">
|
|
86
91
|
<gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
|
|
87
92
|
</ng-container>
|
|
88
|
-
<ng-container *ngIf="isTemporalExtentField">
|
|
89
|
-
<gn-ui-form-field-temporal-extent></gn-ui-form-field-temporal-extent>
|
|
90
|
-
</ng-container>
|
|
91
93
|
<div
|
|
92
94
|
*ngIf="isFieldInvalid && config.invalidHintKey"
|
|
93
95
|
class="mt-2 text-pink-500 text-sm field-invalid-hint"
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -14,15 +14,17 @@ import { EditableLabelDirective } from '../../../../../../../../libs/ui/inputs/s
|
|
|
14
14
|
import { FormFieldWrapperComponent } from '../../../../../../../../libs/ui/layout/src'
|
|
15
15
|
import { TranslateModule } from '@ngx-translate/core'
|
|
16
16
|
import { Observable } from 'rxjs'
|
|
17
|
+
import {
|
|
18
|
+
FormFieldLicenseComponent,
|
|
19
|
+
FormFieldResourceUpdatedComponent,
|
|
20
|
+
FormFieldTemporalExtentsComponent,
|
|
21
|
+
} from '.'
|
|
17
22
|
import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
|
|
18
23
|
import { FormFieldFileComponent } from './form-field-file/form-field-file.component'
|
|
19
|
-
import { FormFieldLicenseComponent } from './form-field-license/form-field-license.component'
|
|
20
24
|
import { FormFieldObjectComponent } from './form-field-object/form-field-object.component'
|
|
21
|
-
import { FormFieldResourceUpdatedComponent } from './form-field-resource-updated/form-field-resource-updated.component'
|
|
22
25
|
import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
|
|
23
26
|
import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
|
|
24
27
|
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
25
|
-
import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
|
|
26
28
|
import { FormFieldConfig } from './form-field.model'
|
|
27
29
|
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
28
30
|
|
|
@@ -42,11 +44,11 @@ import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency
|
|
|
42
44
|
FormFieldLicenseComponent,
|
|
43
45
|
FormFieldResourceUpdatedComponent,
|
|
44
46
|
FormFieldUpdateFrequencyComponent,
|
|
47
|
+
FormFieldTemporalExtentsComponent,
|
|
45
48
|
FormFieldSimpleComponent,
|
|
46
49
|
FormFieldRichComponent,
|
|
47
50
|
FormFieldObjectComponent,
|
|
48
51
|
FormFieldSpatialExtentComponent,
|
|
49
|
-
FormFieldTemporalExtentComponent,
|
|
50
52
|
FormFieldFileComponent,
|
|
51
53
|
FormFieldArrayComponent,
|
|
52
54
|
TranslateModule,
|
|
@@ -100,9 +102,6 @@ export class FormFieldComponent {
|
|
|
100
102
|
get isSpatialExtentField() {
|
|
101
103
|
return this.config.type === 'spatial_extent'
|
|
102
104
|
}
|
|
103
|
-
get isTemporalExtentField() {
|
|
104
|
-
return this.config.type === 'temporal_extent'
|
|
105
|
-
}
|
|
106
105
|
get isArrayField() {
|
|
107
106
|
return this.config.type === 'array'
|
|
108
107
|
}
|
|
@@ -135,6 +134,9 @@ export class FormFieldComponent {
|
|
|
135
134
|
get isUpdateFrequency() {
|
|
136
135
|
return this.model === 'updateFrequency'
|
|
137
136
|
}
|
|
137
|
+
get isTemporalExtents() {
|
|
138
|
+
return this.model === 'temporalExtents'
|
|
139
|
+
}
|
|
138
140
|
|
|
139
141
|
get withoutWrapper() {
|
|
140
142
|
return this.model === 'title' || this.model === 'abstract'
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
export * from './form-field-license/form-field-license.component'
|
|
2
|
+
export * from './form-field-resource-updated/form-field-resource-updated.component'
|
|
3
|
+
export * from './form-field-temporal-extents/form-field-temporal-extents.component'
|
|
4
|
+
|
|
1
5
|
export * from './form-field-simple/form-field-simple.component'
|
|
2
6
|
export * from './form-field-file/form-field-file.component'
|
|
3
7
|
export * from './form-field-rich/form-field-rich.component'
|
|
4
8
|
export * from './form-field-object/form-field-object.component'
|
|
5
9
|
export * from './form-field-array/form-field-array.component'
|
|
6
10
|
export * from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
7
|
-
export * from './form-field-temporal-extent/form-field-temporal-extent.component'
|
|
8
11
|
export * from './form-field.component'
|
|
9
12
|
export * from './form-field.model'
|
|
@@ -1,50 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Iso19139Converter,
|
|
5
|
-
} from '../../../../../../libs/api/metadata-converter/src'
|
|
6
|
-
import { Configuration } from '../../../../../../libs/data-access/gn4/src'
|
|
7
|
-
import { from, Observable } from 'rxjs'
|
|
8
|
-
import { map, switchMap } from 'rxjs/operators'
|
|
9
|
-
import { HttpClient } from '@angular/common/http'
|
|
1
|
+
import { Injectable } from '@angular/core'
|
|
2
|
+
import { Observable } from 'rxjs'
|
|
3
|
+
import { map } from 'rxjs/operators'
|
|
10
4
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
11
5
|
import { EditorFieldsConfig } from '../models/fields.model'
|
|
12
6
|
import { evaluate } from '../expressions'
|
|
7
|
+
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
13
8
|
|
|
14
9
|
@Injectable({
|
|
15
10
|
providedIn: 'root',
|
|
16
11
|
})
|
|
17
12
|
export class EditorService {
|
|
18
|
-
private
|
|
13
|
+
constructor(private recordsRepository: RecordsRepositoryInterface) {}
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
private http: HttpClient,
|
|
22
|
-
@Optional()
|
|
23
|
-
@Inject(Configuration)
|
|
24
|
-
private apiConfiguration: Configuration
|
|
25
|
-
) {}
|
|
26
|
-
|
|
27
|
-
// TODO: use the catalog repository instead
|
|
28
|
-
loadRecordByUuid(uuid: string): Observable<CatalogRecord> {
|
|
29
|
-
return this.http
|
|
30
|
-
.get(`${this.apiUrl}/records/${uuid}/formatters/xml`, {
|
|
31
|
-
responseType: 'text',
|
|
32
|
-
headers: {
|
|
33
|
-
Accept: 'application/xml',
|
|
34
|
-
},
|
|
35
|
-
})
|
|
36
|
-
.pipe(
|
|
37
|
-
switchMap((response) =>
|
|
38
|
-
findConverterForDocument(response).readRecord(response.toString())
|
|
39
|
-
)
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// returns the record as it was when saved
|
|
15
|
+
// returns the record as it was when saved, alongside its source
|
|
44
16
|
saveRecord(
|
|
45
17
|
record: CatalogRecord,
|
|
46
18
|
fieldsConfig: EditorFieldsConfig
|
|
47
|
-
): Observable<CatalogRecord> {
|
|
19
|
+
): Observable<[CatalogRecord, string]> {
|
|
48
20
|
const savedRecord = { ...record }
|
|
49
21
|
|
|
50
22
|
// run onSave processes
|
|
@@ -57,23 +29,16 @@ export class EditorService {
|
|
|
57
29
|
})
|
|
58
30
|
}
|
|
59
31
|
}
|
|
32
|
+
return this.recordsRepository
|
|
33
|
+
.saveRecord(savedRecord)
|
|
34
|
+
.pipe(map((recordSource) => [savedRecord, recordSource]))
|
|
35
|
+
}
|
|
60
36
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
recordXml,
|
|
68
|
-
{
|
|
69
|
-
headers: {
|
|
70
|
-
'Content-Type': 'application/xml',
|
|
71
|
-
},
|
|
72
|
-
withCredentials: true,
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
),
|
|
76
|
-
map(() => savedRecord)
|
|
77
|
-
)
|
|
37
|
+
// emits and completes once saving is done
|
|
38
|
+
// note: onSave processes are not run for drafts
|
|
39
|
+
saveRecordAsDraft(record: CatalogRecord): Observable<void> {
|
|
40
|
+
return this.recordsRepository
|
|
41
|
+
.saveRecordAsDraft(record)
|
|
42
|
+
.pipe(map(() => undefined))
|
|
78
43
|
}
|
|
79
44
|
}
|
|
@@ -20,18 +20,21 @@ export interface MapContextLayerWmsModel {
|
|
|
20
20
|
type: 'wms'
|
|
21
21
|
url: string
|
|
22
22
|
name: string
|
|
23
|
+
attributions?: string
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface MapContextLayerWmtsModel {
|
|
26
27
|
type: 'wmts'
|
|
27
28
|
url: string
|
|
28
29
|
name: string
|
|
30
|
+
attributions?: string
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
interface MapContextLayerWfsModel {
|
|
32
34
|
type: 'wfs'
|
|
33
35
|
url: string
|
|
34
36
|
name: string
|
|
37
|
+
attributions?: string
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export interface MapContextLayerOgcapiModel {
|
|
@@ -39,11 +42,13 @@ export interface MapContextLayerOgcapiModel {
|
|
|
39
42
|
url: string
|
|
40
43
|
name: string
|
|
41
44
|
layerType: 'feature' | 'vectorTiles' | 'mapTiles' | 'record'
|
|
45
|
+
attributions?: string
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
interface LayerXyzModel {
|
|
45
49
|
type: 'xyz'
|
|
46
50
|
name?: string
|
|
51
|
+
attributions?: string
|
|
47
52
|
}
|
|
48
53
|
interface LayerXyzModelWithUrl extends LayerXyzModel {
|
|
49
54
|
url: string
|
|
@@ -59,6 +64,7 @@ export type MapContextLayerXyzModel =
|
|
|
59
64
|
|
|
60
65
|
interface LayerGeojson {
|
|
61
66
|
type: 'geojson'
|
|
67
|
+
attributions?: string
|
|
62
68
|
}
|
|
63
69
|
interface LayerGeojsonWithUrl extends LayerGeojson {
|
|
64
70
|
url: string
|
|
@@ -29,6 +29,8 @@ import OGCVectorTile from 'ol/source/OGCVectorTile.js'
|
|
|
29
29
|
import { MVT } from 'ol/format'
|
|
30
30
|
import VectorTileLayer from 'ol/layer/VectorTile'
|
|
31
31
|
import OGCMapTile from 'ol/source/OGCMapTile.js'
|
|
32
|
+
import ImageLayer from 'ol/layer/Image'
|
|
33
|
+
import ImageWMS from 'ol/source/ImageWMS'
|
|
32
34
|
|
|
33
35
|
export const DEFAULT_BASELAYER_CONTEXT: MapContextLayerXyzModel = {
|
|
34
36
|
type: MapContextLayerTypeEnum.XYZ,
|
|
@@ -37,6 +39,7 @@ export const DEFAULT_BASELAYER_CONTEXT: MapContextLayerXyzModel = {
|
|
|
37
39
|
`https://b.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png`,
|
|
38
40
|
`https://c.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png`,
|
|
39
41
|
],
|
|
42
|
+
attributions: `<span>© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/">Carto</a></span>`,
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export const DEFAULT_VIEW: MapContextViewModel = {
|
|
@@ -73,11 +76,13 @@ export class MapContextService {
|
|
|
73
76
|
}
|
|
74
77
|
map.setView(this.createView(mapContext.view, map))
|
|
75
78
|
map.getLayers().clear()
|
|
76
|
-
mapContext.layers.forEach((layer) =>
|
|
79
|
+
mapContext.layers.forEach((layer) =>
|
|
80
|
+
map.addLayer(this.createLayer(layer, mapConfig))
|
|
81
|
+
)
|
|
77
82
|
return map
|
|
78
83
|
}
|
|
79
84
|
|
|
80
|
-
createLayer(layerModel: MapContextLayerModel): Layer {
|
|
85
|
+
createLayer(layerModel: MapContextLayerModel, mapConfig?: MapConfig): Layer {
|
|
81
86
|
const { type } = layerModel
|
|
82
87
|
const style = this.styleService.styles.default
|
|
83
88
|
switch (type) {
|
|
@@ -87,12 +92,14 @@ export class MapContextService {
|
|
|
87
92
|
source: new OGCVectorTile({
|
|
88
93
|
url: layerModel.url,
|
|
89
94
|
format: new MVT(),
|
|
95
|
+
attributions: layerModel.attributions,
|
|
90
96
|
}),
|
|
91
97
|
})
|
|
92
98
|
} else if (layerModel.layerType === 'mapTiles') {
|
|
93
99
|
return new TileLayer({
|
|
94
100
|
source: new OGCMapTile({
|
|
95
101
|
url: layerModel.url,
|
|
102
|
+
attributions: layerModel.attributions,
|
|
96
103
|
}),
|
|
97
104
|
})
|
|
98
105
|
} else {
|
|
@@ -100,6 +107,7 @@ export class MapContextService {
|
|
|
100
107
|
source: new VectorSource({
|
|
101
108
|
format: new GeoJSON(),
|
|
102
109
|
url: layerModel.url,
|
|
110
|
+
attributions: layerModel.attributions,
|
|
103
111
|
}),
|
|
104
112
|
style,
|
|
105
113
|
})
|
|
@@ -109,16 +117,28 @@ export class MapContextService {
|
|
|
109
117
|
source: new XYZ({
|
|
110
118
|
url: 'url' in layerModel ? layerModel.url : undefined,
|
|
111
119
|
urls: 'urls' in layerModel ? layerModel.urls : undefined,
|
|
120
|
+
attributions: layerModel.attributions,
|
|
112
121
|
}),
|
|
113
122
|
})
|
|
114
123
|
case MapContextLayerTypeEnum.WMS:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
if (mapConfig?.DO_NOT_TILE_WMS) {
|
|
125
|
+
return new ImageLayer({
|
|
126
|
+
source: new ImageWMS({
|
|
127
|
+
url: layerModel.url,
|
|
128
|
+
params: { LAYERS: layerModel.name },
|
|
129
|
+
attributions: layerModel.attributions,
|
|
130
|
+
}),
|
|
131
|
+
})
|
|
132
|
+
} else {
|
|
133
|
+
return new TileLayer({
|
|
134
|
+
source: new TileWMS({
|
|
135
|
+
url: layerModel.url,
|
|
136
|
+
params: { LAYERS: layerModel.name, TILED: true },
|
|
137
|
+
attributions: layerModel.attributions,
|
|
138
|
+
}),
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
|
|
122
142
|
case MapContextLayerTypeEnum.WMTS: {
|
|
123
143
|
// TODO: isolate this in utils service
|
|
124
144
|
const olLayer = new TileLayer({})
|
|
@@ -141,6 +161,7 @@ export class MapContextService {
|
|
|
141
161
|
tileGrid,
|
|
142
162
|
projection: matrixSet.crs,
|
|
143
163
|
dimensions,
|
|
164
|
+
attributions: layerModel.attributions,
|
|
144
165
|
})
|
|
145
166
|
)
|
|
146
167
|
})
|
|
@@ -166,6 +187,7 @@ export class MapContextService {
|
|
|
166
187
|
})
|
|
167
188
|
},
|
|
168
189
|
strategy: bboxStrategy,
|
|
190
|
+
attributions: layerModel.attributions,
|
|
169
191
|
})
|
|
170
192
|
)
|
|
171
193
|
})
|
|
@@ -33,6 +33,7 @@ import { WmsEndpoint, WmtsEndpoint } from '@camptocamp/ogc-client'
|
|
|
33
33
|
import { LONLAT_CRS_CODES } from '../constant/projections'
|
|
34
34
|
import { fromEPSGCode, register } from 'ol/proj/proj4'
|
|
35
35
|
import proj4 from 'proj4/dist/proj4'
|
|
36
|
+
import { defaults as defaultControls } from 'ol/control/defaults'
|
|
36
37
|
|
|
37
38
|
const FEATURE_PROJECTION = 'EPSG:3857'
|
|
38
39
|
const DATA_PROJECTION = 'EPSG:4326'
|
|
@@ -47,7 +48,10 @@ export class MapUtilsService {
|
|
|
47
48
|
|
|
48
49
|
createEmptyMap(): Map {
|
|
49
50
|
return new Map({
|
|
50
|
-
controls:
|
|
51
|
+
controls: defaultControls({
|
|
52
|
+
attribution: true,
|
|
53
|
+
attributionOptions: { collapsible: false },
|
|
54
|
+
}),
|
|
51
55
|
pixelRatio: 1,
|
|
52
56
|
})
|
|
53
57
|
}
|
|
@@ -213,7 +217,7 @@ export class MapUtilsService {
|
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
getRecordExtent(record: Partial<CatalogRecord>): Extent {
|
|
216
|
-
if (!('spatialExtents' in record)) {
|
|
220
|
+
if (!('spatialExtents' in record) || record.spatialExtents.length === 0) {
|
|
217
221
|
return null
|
|
218
222
|
}
|
|
219
223
|
// transform an array of geojson geometries into a bbox
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
MapUtilsService,
|
|
16
16
|
} from '../../../../../../libs/feature/map/src'
|
|
17
17
|
import { getOptionalMapConfig, MapConfig } from '../../../../../../libs/util/app-config/src'
|
|
18
|
-
import { getLinkLabel
|
|
18
|
+
import { getLinkLabel } from '../../../../../../libs/util/shared/src'
|
|
19
19
|
import Feature from 'ol/Feature'
|
|
20
20
|
import { Geometry } from 'ol/geom'
|
|
21
21
|
import { StyleLike } from 'ol/style/Style'
|
|
@@ -23,10 +23,8 @@ import {
|
|
|
23
23
|
BehaviorSubject,
|
|
24
24
|
combineLatest,
|
|
25
25
|
from,
|
|
26
|
-
lastValueFrom,
|
|
27
26
|
Observable,
|
|
28
27
|
of,
|
|
29
|
-
startWith,
|
|
30
28
|
Subscription,
|
|
31
29
|
throwError,
|
|
32
30
|
withLatestFrom,
|
|
@@ -36,6 +34,7 @@ import {
|
|
|
36
34
|
distinctUntilChanged,
|
|
37
35
|
finalize,
|
|
38
36
|
map,
|
|
37
|
+
startWith,
|
|
39
38
|
switchMap,
|
|
40
39
|
tap,
|
|
41
40
|
} from 'rxjs/operators'
|
|
@@ -57,9 +56,11 @@ export class MapViewComponent implements OnInit, OnDestroy {
|
|
|
57
56
|
|
|
58
57
|
compatibleMapLinks$ = combineLatest([
|
|
59
58
|
this.mdViewFacade.mapApiLinks$,
|
|
60
|
-
this.mdViewFacade.
|
|
59
|
+
this.mdViewFacade.geoDataLinksWithGeometry$,
|
|
61
60
|
]).pipe(
|
|
62
|
-
map(([mapApiLinks,
|
|
61
|
+
map(([mapApiLinks, geoDataLinksWithGeometry]) => {
|
|
62
|
+
return [...mapApiLinks, ...geoDataLinksWithGeometry]
|
|
63
|
+
})
|
|
63
64
|
)
|
|
64
65
|
|
|
65
66
|
dropdownChoices$ = this.compatibleMapLinks$.pipe(
|
|
@@ -104,8 +105,8 @@ export class MapViewComponent implements OnInit, OnDestroy {
|
|
|
104
105
|
mapContext$ = this.currentLayers$.pipe(
|
|
105
106
|
switchMap((layers) =>
|
|
106
107
|
from(this.mapUtils.getLayerExtent(layers[0])).pipe(
|
|
107
|
-
catchError((
|
|
108
|
-
|
|
108
|
+
catchError(() => {
|
|
109
|
+
this.error = 'The layer has no extent'
|
|
109
110
|
return of(undefined)
|
|
110
111
|
}),
|
|
111
112
|
map(
|
|
@@ -117,9 +118,15 @@ export class MapViewComponent implements OnInit, OnDestroy {
|
|
|
117
118
|
},
|
|
118
119
|
} as MapContextModel)
|
|
119
120
|
),
|
|
120
|
-
tap(() =>
|
|
121
|
+
tap((res) => {
|
|
122
|
+
this.resetSelection()
|
|
123
|
+
})
|
|
121
124
|
)
|
|
122
125
|
),
|
|
126
|
+
startWith({
|
|
127
|
+
layers: [],
|
|
128
|
+
view: {},
|
|
129
|
+
} as MapContextModel),
|
|
123
130
|
withLatestFrom(this.mdViewFacade.metadata$),
|
|
124
131
|
map(([context, metadata]) => {
|
|
125
132
|
if (context.view.extent) return context
|
|
@@ -20,9 +20,7 @@ export class MdViewEffects {
|
|
|
20
20
|
loadFullMetadata$ = createEffect(() =>
|
|
21
21
|
this.actions$.pipe(
|
|
22
22
|
ofType(MdViewActions.loadFullMetadata),
|
|
23
|
-
switchMap(({ uuid }) =>
|
|
24
|
-
this.recordsRepository.getByUniqueIdentifier(uuid)
|
|
25
|
-
),
|
|
23
|
+
switchMap(({ uuid }) => this.recordsRepository.getRecord(uuid)),
|
|
26
24
|
map((record) => {
|
|
27
25
|
if (record === null) {
|
|
28
26
|
return MdViewActions.loadFullMetadataFailure({ notFound: true })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core'
|
|
2
2
|
import { select, Store } from '@ngrx/store'
|
|
3
|
-
import { filter, map } from 'rxjs/operators'
|
|
3
|
+
import { defaultIfEmpty, filter, map, mergeMap, scan } from 'rxjs/operators'
|
|
4
4
|
import * as MdViewActions from './mdview.actions'
|
|
5
5
|
import * as MdViewSelectors from './mdview.selectors'
|
|
6
6
|
import { LinkClassifierService, LinkUsage } from '../../../../../../libs/util/shared/src'
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
UserFeedback,
|
|
11
11
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
12
12
|
import { AvatarServiceInterface } from '../../../../../../libs/api/repository/src'
|
|
13
|
+
import { OgcApiRecord } from '@camptocamp/ogc-client'
|
|
14
|
+
import { from, of } from 'rxjs'
|
|
15
|
+
import { DataService } from '../../../../../../libs/feature/dataviz/src'
|
|
13
16
|
|
|
14
17
|
@Injectable()
|
|
15
18
|
/**
|
|
@@ -21,8 +24,9 @@ import { AvatarServiceInterface } from '../../../../../../libs/api/repository/sr
|
|
|
21
24
|
export class MdViewFacade {
|
|
22
25
|
constructor(
|
|
23
26
|
private store: Store,
|
|
24
|
-
|
|
25
|
-
private avatarService: AvatarServiceInterface
|
|
27
|
+
public linkClassifier: LinkClassifierService,
|
|
28
|
+
private avatarService: AvatarServiceInterface,
|
|
29
|
+
public dataService: DataService
|
|
26
30
|
) {}
|
|
27
31
|
|
|
28
32
|
isPresent$ = this.store.pipe(
|
|
@@ -90,6 +94,39 @@ export class MdViewFacade {
|
|
|
90
94
|
)
|
|
91
95
|
)
|
|
92
96
|
|
|
97
|
+
geoDataLinksWithGeometry$ = this.allLinks$.pipe(
|
|
98
|
+
mergeMap((links) => {
|
|
99
|
+
return from(links)
|
|
100
|
+
}),
|
|
101
|
+
mergeMap((link) => {
|
|
102
|
+
if (this.linkClassifier.hasUsage(link, LinkUsage.GEODATA)) {
|
|
103
|
+
if (
|
|
104
|
+
link.type === 'service' &&
|
|
105
|
+
link.accessServiceProtocol === 'ogcFeatures'
|
|
106
|
+
) {
|
|
107
|
+
return from(this.dataService.getItemsFromOgcApi(link.url.href)).pipe(
|
|
108
|
+
map((collectionRecords: OgcApiRecord) => {
|
|
109
|
+
return collectionRecords && collectionRecords.geometry
|
|
110
|
+
? link
|
|
111
|
+
: null
|
|
112
|
+
}),
|
|
113
|
+
defaultIfEmpty(null)
|
|
114
|
+
)
|
|
115
|
+
} else {
|
|
116
|
+
return of(link)
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
return of(null)
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
scan((acc, val) => {
|
|
123
|
+
if (val !== null && !acc.includes(val)) {
|
|
124
|
+
acc.push(val)
|
|
125
|
+
}
|
|
126
|
+
return acc
|
|
127
|
+
}, [])
|
|
128
|
+
)
|
|
129
|
+
|
|
93
130
|
landingPageLinks$ = this.metadata$.pipe(
|
|
94
131
|
map((record) => ('landingPage' in record ? [record.landingPage] : []))
|
|
95
132
|
)
|
|
@@ -82,7 +82,6 @@ const metadataViewReducer = createReducer(
|
|
|
82
82
|
*/
|
|
83
83
|
on(MetadataViewActions.loadUserFeedbacks, (state) => ({
|
|
84
84
|
...state,
|
|
85
|
-
error: null,
|
|
86
85
|
allUserFeedbacksLoading: true,
|
|
87
86
|
})),
|
|
88
87
|
on(MetadataViewActions.addUserFeedback, (state) => ({
|
|
@@ -93,7 +92,6 @@ const metadataViewReducer = createReducer(
|
|
|
93
92
|
MetadataViewActions.loadUserFeedbacksSuccess,
|
|
94
93
|
(state, { userFeedbacks }) => ({
|
|
95
94
|
...state,
|
|
96
|
-
error: null,
|
|
97
95
|
userFeedbacks: userFeedbacks,
|
|
98
96
|
addUserFeedbackLoading: false,
|
|
99
97
|
allUserFeedbacksLoading: false,
|