geonetwork-ui 2.6.0-dev.01d2b5fc0 → 2.6.0-dev.025a2f85d
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/base.converter.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +8 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +4 -4
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -10
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +18 -11
- package/esm2022/libs/api/repository/src/lib/gn4/gn4.provider.mjs +7 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -3
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -1
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +7 -3
- package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +2 -3
- package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +5 -5
- package/esm2022/libs/feature/map/src/lib/map-state-container/map-state-container.component.mjs +2 -2
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +2 -4
- package/esm2022/libs/feature/record/src/index.mjs +1 -2
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +5 -9
- package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +7 -11
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +45 -14
- package/esm2022/libs/feature/record/src/lib/record-meta/record-meta.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +8 -5
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -6
- package/esm2022/libs/feature/router/src/lib/default/constants.mjs +3 -1
- package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
- package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +10 -2
- package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +9 -3
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +8 -7
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -15
- package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +26 -10
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +3 -1
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +27 -6
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +22 -6
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +163 -0
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +29 -7
- package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +8 -5
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +161 -0
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +4 -3
- package/esm2022/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.mjs +43 -3
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +15 -3
- package/esm2022/libs/ui/map/src/index.mjs +2 -1
- package/esm2022/libs/ui/map/src/lib/components/map-container/map-container.component.mjs +14 -3
- package/esm2022/libs/ui/map/src/lib/components/map-legend/map-legend.component.mjs +5 -1
- package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +79 -0
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +5 -4
- package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
- package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +6 -2
- package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +4 -1
- package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +30 -2
- package/esm2022/libs/util/shared/src/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/gn-ui-version.mjs +6 -0
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +33 -24
- package/esm2022/translations/de.json +34 -3
- package/esm2022/translations/en.json +35 -4
- package/esm2022/translations/es.json +34 -3
- package/esm2022/translations/fr.json +36 -5
- package/esm2022/translations/it.json +34 -4
- package/esm2022/translations/nl.json +34 -3
- package/esm2022/translations/pt.json +34 -3
- package/fesm2022/geonetwork-ui.mjs +1367 -531
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/base.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4.provider.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +23 -4
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts +6 -6
- package/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.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/index.d.ts +0 -1
- package/libs/feature/record/src/index.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +9 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +2 -3
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +1 -2
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +7 -2
- 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 +2 -2
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +3 -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 +7 -7
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/constants.d.ts +2 -0
- package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.config.d.ts +2 -0
- package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/router.facade.d.ts +5 -0
- package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
- 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.map +1 -1
- package/libs/feature/search/src/lib/record-url.token.d.ts +3 -1
- package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts +5 -3
- package/libs/feature/search/src/lib/results-list/results-list.container.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +2 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts +9 -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 +8 -1
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts +43 -0
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +10 -2
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts +30 -0
- package/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +3 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +0 -1
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts +10 -3
- package/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +2 -0
- package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -1
- package/libs/ui/map/src/index.d.ts +1 -0
- package/libs/ui/map/src/index.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts +4 -2
- package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/map-legend/map-legend.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts +15 -0
- package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -0
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/model.d.ts +3 -2
- package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +1 -0
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
- package/libs/util/shared/src/index.d.ts +1 -0
- package/libs/util/shared/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/gn-ui-version.d.ts +3 -0
- package/libs/util/shared/src/lib/gn-ui-version.d.ts.map +1 -0
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +30 -23
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/base.converter.ts +1 -4
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.service+eaux-usees.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.service+napitswallonia.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +8 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +3 -3
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -9
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +20 -12
- package/src/libs/api/repository/src/lib/gn4/gn4.provider.ts +6 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +22 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +26 -26
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +2 -2
- package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +5 -5
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +18 -2
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +1 -0
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -0
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +1 -0
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +10 -8
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -0
- package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +1 -2
- package/src/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.ts +2 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +2 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +2 -2
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +1 -3
- package/src/libs/feature/record/src/index.ts +0 -1
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +2 -3
- package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +4 -5
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +1 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +41 -7
- package/src/libs/feature/record/src/lib/record-meta/record-meta.component.ts +2 -2
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -3
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -7
- package/src/libs/feature/router/src/lib/default/constants.ts +2 -0
- package/src/libs/feature/router/src/lib/default/router.config.ts +2 -0
- package/src/libs/feature/router/src/lib/default/router.service.ts +10 -0
- package/src/libs/feature/router/src/lib/default/state/router.facade.ts +10 -1
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +1 -7
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +16 -8
- package/src/libs/feature/search/src/lib/feature-search.module.ts +0 -8
- package/src/libs/feature/search/src/lib/record-url.token.ts +10 -1
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.css +6 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.html +1 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +24 -5
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
- package/src/libs/ui/elements/src/index.ts +2 -0
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +64 -38
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +26 -2
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +17 -17
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +20 -2
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +7 -6
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +156 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +190 -0
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +27 -29
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +33 -3
- package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +1 -1
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +9 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +13 -4
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -4
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +4 -2
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -1
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.css +0 -0
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +96 -0
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +183 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -0
- package/src/libs/ui/inputs/src/index.ts +0 -1
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +5 -5
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.ts +2 -1
- package/src/libs/ui/layout/src/lib/anchor-link/anchor-link.directive.ts +46 -2
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -4
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +3 -7
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +13 -0
- package/src/libs/ui/map/src/index.ts +1 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +14 -0
- package/src/libs/ui/map/src/lib/components/map-legend/map-legend.component.ts +3 -0
- package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.css +0 -0
- package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.html +4 -0
- package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts → ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts} +7 -8
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +7 -4
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +2 -1
- package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -2
- package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +3 -1
- package/src/libs/util/data-fetcher/src/lib/model.ts +11 -1
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +29 -3
- package/src/libs/util/shared/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/gn-ui-version.ts +8 -0
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +12 -3
- package/src/libs/util/shared/src/lib/links/link-utils.ts +50 -30
- package/tailwind.base.css +51 -13
- package/translations/de.json +34 -3
- package/translations/en.json +35 -4
- package/translations/es.json +34 -3
- package/translations/fr.json +36 -5
- package/translations/it.json +34 -4
- package/translations/nl.json +34 -3
- package/translations/pt.json +34 -3
- package/translations/sk.json +34 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +0 -79
- package/esm2022/libs/feature/record/src/lib/gn-ui-version.token.mjs +0 -3
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +0 -16
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +0 -15
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +0 -1
- package/libs/feature/record/src/lib/gn-ui-version.token.d.ts +0 -3
- package/libs/feature/record/src/lib/gn-ui-version.token.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts +0 -8
- package/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.d.ts.map +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +0 -1
- package/src/libs/feature/record/src/lib/gn-ui-version.token.ts +0 -3
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +0 -3
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +0 -9
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.ts +0 -15
- /package/src/libs/{feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.css → ui/elements/src/lib/internal-link-card/internal-link-card.component.css} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
4
|
+
import { getLayers } from '../../../../../../libs/util/shared/src'
|
|
5
|
+
import { ButtonComponent, TextInputComponent } from '../../../../../../libs/ui/inputs/src'
|
|
6
|
+
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
7
|
+
import { iconoirSearch } from '@ng-icons/iconoir'
|
|
8
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
9
|
+
import { matInfoOutline } from '@ng-icons/material-icons/outline'
|
|
10
|
+
import {
|
|
11
|
+
PopoverComponent,
|
|
12
|
+
SpinningLoaderComponent,
|
|
13
|
+
} from '../../../../../../libs/ui/widgets/src'
|
|
14
|
+
import {
|
|
15
|
+
WfsFeatureTypeFull,
|
|
16
|
+
WmsLayerFull,
|
|
17
|
+
WmtsLayer,
|
|
18
|
+
} from '@camptocamp/ogc-client'
|
|
19
|
+
|
|
20
|
+
marker(`service.metadata.search`)
|
|
21
|
+
marker(`service.metadata.capabilities.title`)
|
|
22
|
+
marker(`service.metadata.capabilities.abstract`)
|
|
23
|
+
marker(`service.metadata.capabilities.name`)
|
|
24
|
+
marker(`service.metadata.capabilities.defaultCrs`)
|
|
25
|
+
marker(`service.metadata.capabilities.availableCrs`)
|
|
26
|
+
marker(`service.metadata.capabilities.otherCrs`)
|
|
27
|
+
marker(`service.metadata.capabilities.objectCount`)
|
|
28
|
+
marker(`service.metadata.capabilities.geometryName`)
|
|
29
|
+
marker(`service.metadata.capabilities.geometryType`)
|
|
30
|
+
marker(`service.metadata.capabilities.keywords`)
|
|
31
|
+
marker(`service.metadata.capabilities.outputFormats`)
|
|
32
|
+
marker(`service.metadata.capabilities.resourceLinks`)
|
|
33
|
+
marker(`service.metadata.capabilities.attribution`)
|
|
34
|
+
|
|
35
|
+
@Component({
|
|
36
|
+
selector: 'gn-ui-service-capabilities',
|
|
37
|
+
standalone: true,
|
|
38
|
+
imports: [
|
|
39
|
+
CommonModule,
|
|
40
|
+
TranslateModule,
|
|
41
|
+
ButtonComponent,
|
|
42
|
+
TextInputComponent,
|
|
43
|
+
NgIcon,
|
|
44
|
+
PopoverComponent,
|
|
45
|
+
SpinningLoaderComponent,
|
|
46
|
+
],
|
|
47
|
+
viewProviders: [
|
|
48
|
+
provideIcons({
|
|
49
|
+
iconoirSearch,
|
|
50
|
+
matInfoOutline,
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
templateUrl: './service-capabilities.component.html',
|
|
54
|
+
styleUrl: './service-capabilities.component.css',
|
|
55
|
+
})
|
|
56
|
+
export class ServiceCapabilitiesComponent implements OnInit {
|
|
57
|
+
@Input() apiLinks = []
|
|
58
|
+
availableLayers = []
|
|
59
|
+
filteredLayers = []
|
|
60
|
+
selectedLayer = null
|
|
61
|
+
layerInformation = []
|
|
62
|
+
searchQuery = ''
|
|
63
|
+
loading = false
|
|
64
|
+
searchActive
|
|
65
|
+
|
|
66
|
+
capabilitiesKeys = [
|
|
67
|
+
'title',
|
|
68
|
+
'abstract',
|
|
69
|
+
'name',
|
|
70
|
+
'defaultCrs',
|
|
71
|
+
'availableCrs',
|
|
72
|
+
'otherCrs',
|
|
73
|
+
'objectCount',
|
|
74
|
+
'geometryName',
|
|
75
|
+
'geometryType',
|
|
76
|
+
'keywords',
|
|
77
|
+
'outputFormats',
|
|
78
|
+
'resourceLinks',
|
|
79
|
+
'attribution',
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
constructor(
|
|
83
|
+
private cdr: ChangeDetectorRef,
|
|
84
|
+
private translateService: TranslateService
|
|
85
|
+
) {}
|
|
86
|
+
|
|
87
|
+
ngOnInit() {
|
|
88
|
+
this.loadLayers()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
onSearchChange(event: Event) {
|
|
92
|
+
const input = event.target as HTMLInputElement
|
|
93
|
+
this.searchQuery = input.value
|
|
94
|
+
if (!input.value) {
|
|
95
|
+
this.searchActive = false
|
|
96
|
+
this.filteredLayers = this.availableLayers
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onSearchEnter(event: KeyboardEvent) {
|
|
101
|
+
if (event.key === 'Enter') {
|
|
102
|
+
this.searchActive = true
|
|
103
|
+
this.searchLayers()
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async loadLayers() {
|
|
108
|
+
if (
|
|
109
|
+
this.apiLinks.length > 0 &&
|
|
110
|
+
this.apiLinks[0].accessServiceProtocol !== 'ogcFeatures'
|
|
111
|
+
) {
|
|
112
|
+
this.loading = true
|
|
113
|
+
this.availableLayers = await getLayers(
|
|
114
|
+
this.apiLinks[0].url.href,
|
|
115
|
+
this.apiLinks[0].accessServiceProtocol
|
|
116
|
+
)
|
|
117
|
+
this.loading = false
|
|
118
|
+
this.cdr.detectChanges()
|
|
119
|
+
this.filteredLayers = this.availableLayers
|
|
120
|
+
} else {
|
|
121
|
+
this.availableLayers = []
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
selectLayer(layer: WfsFeatureTypeFull | WmsLayerFull | WmtsLayer) {
|
|
126
|
+
if (layer === this.selectedLayer) {
|
|
127
|
+
this.selectedLayer = null
|
|
128
|
+
this.layerInformation = []
|
|
129
|
+
return
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
this.selectedLayer = layer
|
|
133
|
+
const filteredInfo = []
|
|
134
|
+
Object.keys(layer).map((key) => {
|
|
135
|
+
if (this.capabilitiesKeys.includes(key)) {
|
|
136
|
+
const displayName = this.translateService.instant(
|
|
137
|
+
`service.metadata.capabilities.${key}`
|
|
138
|
+
)
|
|
139
|
+
if (key in layer && layer[key]?.length) {
|
|
140
|
+
filteredInfo.push({ displayName, value: layer[key] })
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
this.layerInformation = filteredInfo
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
isList(value: string | string[]) {
|
|
149
|
+
return Array.isArray(value)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
getExtraInputClass() {
|
|
153
|
+
if (this.searchActive) {
|
|
154
|
+
return 'h-14 border rounded-lg border-primary text-primary focus:border-primary hover:border-primary'
|
|
155
|
+
}
|
|
156
|
+
return 'h-14 border rounded-lg'
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
searchLayers() {
|
|
160
|
+
this.searchActive = true
|
|
161
|
+
this.filteredLayers = this.availableLayers.filter((layer) => {
|
|
162
|
+
const query = this.searchQuery.toLowerCase()
|
|
163
|
+
if (layer.title) {
|
|
164
|
+
return (
|
|
165
|
+
layer.title.toLowerCase().includes(query) ||
|
|
166
|
+
layer.abstract?.toLowerCase().includes(query)
|
|
167
|
+
)
|
|
168
|
+
} else {
|
|
169
|
+
return layer.name.toLowerCase().includes(query)
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
if (!this.filteredLayers.includes(this.selectedLayer)) {
|
|
173
|
+
this.selectedLayer = null
|
|
174
|
+
this.layerInformation = []
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
getExtraClass(layerItem) {
|
|
179
|
+
return layerItem.title === this.selectedLayer?.title
|
|
180
|
+
? `h-8 rounded-lg bg-primary-darker text-white hover:text-primary-darker hover:bg-white`
|
|
181
|
+
: `h-8 rounded-lg`
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -20,6 +20,8 @@ import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
|
20
20
|
import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
|
|
21
21
|
import { UserPreviewComponent } from './user-preview/user-preview.component'
|
|
22
22
|
import { ApplicationBannerComponent } from './application-banner/application-banner.component'
|
|
23
|
+
import { InternalLinkCardComponent } from './internal-link-card/internal-link-card.component'
|
|
24
|
+
import { ServiceCapabilitiesComponent } from './service-capabilities/service-capabilities.component'
|
|
23
25
|
|
|
24
26
|
@NgModule({
|
|
25
27
|
imports: [
|
|
@@ -42,6 +44,8 @@ import { ApplicationBannerComponent } from './application-banner/application-ban
|
|
|
42
44
|
TextInputComponent,
|
|
43
45
|
ImageInputComponent,
|
|
44
46
|
ApplicationBannerComponent,
|
|
47
|
+
InternalLinkCardComponent,
|
|
48
|
+
ServiceCapabilitiesComponent,
|
|
45
49
|
],
|
|
46
50
|
providers: [
|
|
47
51
|
provideNgIconsConfig({
|
|
@@ -56,6 +60,8 @@ import { ApplicationBannerComponent } from './application-banner/application-ban
|
|
|
56
60
|
MarkdownParserComponent,
|
|
57
61
|
ImageInputComponent,
|
|
58
62
|
ApplicationBannerComponent,
|
|
63
|
+
InternalLinkCardComponent,
|
|
64
|
+
ServiceCapabilitiesComponent,
|
|
59
65
|
],
|
|
60
66
|
})
|
|
61
67
|
export class UiElementsModule {}
|
|
@@ -15,7 +15,6 @@ export * from './lib/dropdown-selector/dropdown-selector.model'
|
|
|
15
15
|
export * from './lib/editable-label/editable-label.directive'
|
|
16
16
|
export * from './lib/file-input/file-input.component'
|
|
17
17
|
export * from './lib/files-drop/files-drop.directive'
|
|
18
|
-
export * from './lib/navigation-button/navigation-button.component'
|
|
19
18
|
export * from './lib/search-input/search-input.component'
|
|
20
19
|
export * from './lib/star-toggle/star-toggle.component'
|
|
21
20
|
export * from './lib/switch-toggle/switch-toggle.component'
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<div class="inline-block relative align-middle" style="line-height: 0.7em">
|
|
2
|
-
<button
|
|
3
|
-
type="
|
|
2
|
+
<gn-ui-button
|
|
3
|
+
[type]="'outline'"
|
|
4
4
|
class="-m-[8px] p-[8px]"
|
|
5
|
-
(
|
|
5
|
+
(buttonClick)="toggle($event)"
|
|
6
6
|
[ngClass]="{
|
|
7
7
|
enabled: toggled,
|
|
8
|
-
|
|
8
|
+
disabled: !toggled,
|
|
9
9
|
'transition hover:scale-125 will-change-transform': !disabled,
|
|
10
10
|
'cursor-default': disabled,
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
13
|
<ng-icon [name]="toggled ? 'matStar' : 'matStarBorder'"></ng-icon>
|
|
14
|
-
</button>
|
|
14
|
+
</gn-ui-button>
|
|
15
15
|
<svg
|
|
16
16
|
#starOverlay
|
|
17
17
|
class="star-toggle-overlay"
|
|
@@ -11,6 +11,7 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
|
|
|
11
11
|
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
12
12
|
import { CommonModule } from '@angular/common'
|
|
13
13
|
import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
|
|
14
|
+
import { ButtonComponent } from '../button/button.component'
|
|
14
15
|
|
|
15
16
|
@Component({
|
|
16
17
|
selector: 'gn-ui-star-toggle',
|
|
@@ -18,7 +19,7 @@ import { matStar, matStarBorder } from '@ng-icons/material-icons/baseline'
|
|
|
18
19
|
styleUrls: ['./star-toggle.component.css'],
|
|
19
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
21
|
standalone: true,
|
|
21
|
-
imports: [CommonModule, NgIcon],
|
|
22
|
+
imports: [CommonModule, NgIcon, ButtonComponent],
|
|
22
23
|
viewProviders: [provideIcons({ matStar, matStarBorder })],
|
|
23
24
|
})
|
|
24
25
|
export class StarToggleComponent {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AfterViewChecked,
|
|
2
3
|
ChangeDetectorRef,
|
|
3
4
|
Directive,
|
|
4
5
|
HostBinding,
|
|
@@ -11,20 +12,34 @@ import {
|
|
|
11
12
|
@Directive({
|
|
12
13
|
selector: '[gnUiAnchorLink]',
|
|
13
14
|
})
|
|
14
|
-
export class AnchorLinkDirective
|
|
15
|
+
export class AnchorLinkDirective
|
|
16
|
+
implements OnInit, AfterViewChecked, OnDestroy
|
|
17
|
+
{
|
|
15
18
|
@Input('gnUiAnchorLink') targetId: string
|
|
16
19
|
@Input('gnUiAnchorLinkDisabledClass') disabledClass: string
|
|
17
20
|
@Input('gnUiAnchorLinkEnabledClass') enabledClass: string
|
|
21
|
+
@Input('gnUiAnchorLinkInViewClass') inViewClass: string
|
|
22
|
+
@Input('gnUiAnchorLinkOutOfViewClass') outOfViewClass: string
|
|
18
23
|
|
|
19
24
|
@HostBinding('class')
|
|
20
25
|
get elementClass(): string {
|
|
21
|
-
|
|
26
|
+
if (this.disabled) {
|
|
27
|
+
return this.disabledClass
|
|
28
|
+
}
|
|
29
|
+
if (this.inView) {
|
|
30
|
+
return `${this.inViewClass} ${this.enabledClass}`
|
|
31
|
+
} else {
|
|
32
|
+
return `${this.outOfViewClass} ${this.enabledClass}`
|
|
33
|
+
}
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
disabled = false
|
|
25
37
|
observer = new MutationObserver(() => {
|
|
26
38
|
this.refreshDisabledState()
|
|
27
39
|
})
|
|
40
|
+
inView = false
|
|
41
|
+
intersectionObserver: IntersectionObserver
|
|
42
|
+
initialized = false
|
|
28
43
|
|
|
29
44
|
constructor(private changeDetector: ChangeDetectorRef) {}
|
|
30
45
|
|
|
@@ -36,8 +51,37 @@ export class AnchorLinkDirective implements OnInit, OnDestroy {
|
|
|
36
51
|
this.refreshDisabledState()
|
|
37
52
|
}
|
|
38
53
|
|
|
54
|
+
ngAfterViewChecked() {
|
|
55
|
+
if (!this.initialized && !this.disabled) {
|
|
56
|
+
const target = document.getElementById(this.targetId)
|
|
57
|
+
if (target) {
|
|
58
|
+
this.initializeIntersectionObserver(target)
|
|
59
|
+
this.initialized = true
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
initializeIntersectionObserver(target: HTMLElement) {
|
|
65
|
+
this.intersectionObserver = new IntersectionObserver(
|
|
66
|
+
(entries) => {
|
|
67
|
+
entries.forEach((entry) => {
|
|
68
|
+
this.inView = entry.isIntersecting
|
|
69
|
+
this.changeDetector.detectChanges()
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
root: null,
|
|
74
|
+
rootMargin: '-30% 0% -60% 0%',
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
this.intersectionObserver.observe(target)
|
|
78
|
+
}
|
|
79
|
+
|
|
39
80
|
ngOnDestroy() {
|
|
40
81
|
this.observer.disconnect()
|
|
82
|
+
if (this.intersectionObserver) {
|
|
83
|
+
this.intersectionObserver.disconnect()
|
|
84
|
+
}
|
|
41
85
|
}
|
|
42
86
|
|
|
43
87
|
refreshDisabledState() {
|
|
@@ -31,11 +31,7 @@
|
|
|
31
31
|
*ngFor="let item of items"
|
|
32
32
|
(click)="handleRowClick(item)"
|
|
33
33
|
data-cy="table-row"
|
|
34
|
-
[title]="
|
|
35
|
-
!item.extras?.edit && !isDraftPage
|
|
36
|
-
? ('editor.record.lock.reason' | translate)
|
|
37
|
-
: ''
|
|
38
|
-
"
|
|
34
|
+
[title]="getItemTitle(item) | translate"
|
|
39
35
|
>
|
|
40
36
|
<div
|
|
41
37
|
class="relative h-0"
|
|
@@ -52,9 +48,9 @@
|
|
|
52
48
|
class="table-row-cell px-3 py-1.5 flex items-center bg-white transition-colors duration-75 truncate border-b border-gray-200"
|
|
53
49
|
[ngClass]="{
|
|
54
50
|
'text-purple-light cursor-default':
|
|
55
|
-
!item.extras?.edit && !isDraftPage,
|
|
51
|
+
(!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset',
|
|
56
52
|
'group-hover:text-main group-hover:bg-gray-50':
|
|
57
|
-
item.extras?.edit || isDraftPage,
|
|
53
|
+
(item.extras?.edit || isDraftPage) && item.kind === 'dataset',
|
|
58
54
|
}"
|
|
59
55
|
>
|
|
60
56
|
<ng-container
|
|
@@ -12,7 +12,11 @@ import { CommonModule } from '@angular/common'
|
|
|
12
12
|
import { NgIconComponent, provideIcons } from '@ng-icons/core'
|
|
13
13
|
import { iconoirNavArrowDown, iconoirNavArrowUp } from '@ng-icons/iconoir'
|
|
14
14
|
import { TranslateModule } from '@ngx-translate/core'
|
|
15
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
16
|
+
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
15
17
|
|
|
18
|
+
marker('editor.record.lock.reason')
|
|
19
|
+
marker('editor.record.lock.format')
|
|
16
20
|
@Component({
|
|
17
21
|
selector: 'gn-ui-interactive-table',
|
|
18
22
|
templateUrl: './interactive-table.component.html',
|
|
@@ -44,6 +48,15 @@ export class InteractiveTableComponent {
|
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
getItemTitle(item: CatalogRecord) {
|
|
52
|
+
if (!item.extras?.edit && !this.isDraftPage && item.kind === 'dataset') {
|
|
53
|
+
return 'editor.record.lock.reason'
|
|
54
|
+
} else if (item.kind !== 'dataset') {
|
|
55
|
+
return 'editor.record.lock.format'
|
|
56
|
+
}
|
|
57
|
+
return ''
|
|
58
|
+
}
|
|
59
|
+
|
|
47
60
|
handleRowClick(item: unknown) {
|
|
48
61
|
this.itemClick.emit(item)
|
|
49
62
|
}
|
|
@@ -3,3 +3,4 @@ export * from './lib/components/map-container/map-settings.token'
|
|
|
3
3
|
export * from './lib/components/feature-detail/feature-detail.component'
|
|
4
4
|
export * from './lib/components/map-legend/map-legend.component'
|
|
5
5
|
export * from './lib/map-utils'
|
|
6
|
+
export * from './lib/components/spatial-extent/spatial-extent.component'
|
|
@@ -28,6 +28,8 @@ import {
|
|
|
28
28
|
MapContextLayer,
|
|
29
29
|
MapContextLayerXyz,
|
|
30
30
|
MapContextView,
|
|
31
|
+
SourceLoadErrorEvent,
|
|
32
|
+
SourceLoadErrorType,
|
|
31
33
|
} from '@geospatial-sdk/core'
|
|
32
34
|
import {
|
|
33
35
|
applyContextDiffToMap,
|
|
@@ -119,6 +121,18 @@ export class MapContainerComponent implements AfterViewInit, OnChanges {
|
|
|
119
121
|
}
|
|
120
122
|
return this._mapClick
|
|
121
123
|
}
|
|
124
|
+
_sourceLoadError: EventEmitter<SourceLoadErrorEvent>
|
|
125
|
+
@Output() get sourceLoadError() {
|
|
126
|
+
if (!this._sourceLoadError) {
|
|
127
|
+
this.openlayersMap.then((olMap) => {
|
|
128
|
+
listen(olMap, SourceLoadErrorType, (error: SourceLoadErrorEvent) =>
|
|
129
|
+
this._sourceLoadError.emit(error)
|
|
130
|
+
)
|
|
131
|
+
})
|
|
132
|
+
this._sourceLoadError = new EventEmitter<SourceLoadErrorEvent>()
|
|
133
|
+
}
|
|
134
|
+
return this._sourceLoadError
|
|
135
|
+
}
|
|
122
136
|
|
|
123
137
|
@ViewChild('map') container: ElementRef
|
|
124
138
|
displayMessage$: Observable<boolean>
|
|
File without changes
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, Input } from '@angular/core'
|
|
2
2
|
import { CommonModule } from '@angular/common'
|
|
3
3
|
import { Geometry } from 'geojson'
|
|
4
4
|
import GeoJSON, { GeoJSONFeatureCollection } from 'ol/format/GeoJSON'
|
|
5
|
-
import { DatasetSpatialExtent } from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
5
|
import { Polygon } from 'ol/geom'
|
|
7
6
|
import {
|
|
8
7
|
createViewFromLayer,
|
|
9
8
|
MapContext,
|
|
10
9
|
MapContextLayer,
|
|
11
10
|
} from '@geospatial-sdk/core'
|
|
12
|
-
import { MapContainerComponent } from '
|
|
11
|
+
import { MapContainerComponent } from '../map-container/map-container.component'
|
|
13
12
|
import { BehaviorSubject, Observable } from 'rxjs'
|
|
14
13
|
import { switchMap } from 'rxjs/operators'
|
|
14
|
+
import { DatasetSpatialExtent } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
15
15
|
|
|
16
16
|
@Component({
|
|
17
|
-
selector: 'gn-ui-
|
|
17
|
+
selector: 'gn-ui-spatial-extent',
|
|
18
18
|
standalone: true,
|
|
19
19
|
imports: [CommonModule, MapContainerComponent],
|
|
20
|
-
templateUrl: './
|
|
21
|
-
|
|
22
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
templateUrl: './spatial-extent.component.html',
|
|
21
|
+
styleUrl: './spatial-extent.component.css',
|
|
23
22
|
})
|
|
24
|
-
export class
|
|
23
|
+
export class SpatialExtentComponent {
|
|
25
24
|
@Input() set spatialExtents(value: DatasetSpatialExtent[]) {
|
|
26
25
|
this.spatialExtents$.next(value)
|
|
27
26
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<ng-icon
|
|
10
10
|
name="iconoirLock"
|
|
11
11
|
class="text-purple"
|
|
12
|
-
*ngIf="!item.extras?.edit && !isDraftPage"
|
|
12
|
+
*ngIf="(!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset'"
|
|
13
13
|
></ng-icon>
|
|
14
14
|
<gn-ui-checkbox
|
|
15
|
-
*ngIf="item.extras?.edit || isDraftPage"
|
|
15
|
+
*ngIf="(item.extras?.edit || isDraftPage) && item.kind === 'dataset'"
|
|
16
16
|
[checked]="isChecked(item)"
|
|
17
17
|
(changed)="handleRecordSelectedChange($event, item)"
|
|
18
18
|
class="-m-2"
|
|
@@ -149,11 +149,14 @@
|
|
|
149
149
|
(buttonClick)="openActionMenu(item, template)"
|
|
150
150
|
type="light"
|
|
151
151
|
data-test="record-menu-button"
|
|
152
|
-
[disabled]="
|
|
152
|
+
[disabled]="
|
|
153
|
+
(!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset'
|
|
154
|
+
"
|
|
153
155
|
>
|
|
154
156
|
<ng-icon
|
|
155
157
|
[ngClass]="{
|
|
156
|
-
'text-purple-light':
|
|
158
|
+
'text-purple-light':
|
|
159
|
+
(!item.extras?.edit && !isDraftPage) || item.kind !== 'dataset',
|
|
157
160
|
}"
|
|
158
161
|
name="matMoreVert"
|
|
159
162
|
></ng-icon>
|
|
@@ -174,8 +174,9 @@ export class ResultsTableComponent {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
handleRecordClick(item: CatalogRecord) {
|
|
177
|
-
if (item?.extras?.edit || this.isDraftPage)
|
|
177
|
+
if ((item?.extras?.edit || this.isDraftPage) && item.kind === 'dataset') {
|
|
178
178
|
this.recordClick.emit(item as CatalogRecord)
|
|
179
|
+
}
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
handleDuplicate(item: unknown) {
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{ progress }}%
|
|
10
10
|
</div>
|
|
11
|
-
<div class="flex-grow h-[
|
|
11
|
+
<div class="flex-grow h-[4px] w-[52px] {{ color.outerBar }} rounded-full">
|
|
12
12
|
<div
|
|
13
13
|
[style.width.%]="progress"
|
|
14
14
|
class="{{ color.innerBar }} transition-width duration-500
|
|
15
|
-
ease-in-out rounded-full shadow-sm h-
|
|
15
|
+
ease-in-out rounded-full shadow-sm w-[52px] h-[4px]"
|
|
16
16
|
></div>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
@@ -53,7 +53,9 @@ export async function openDataset(
|
|
|
53
53
|
reader.load()
|
|
54
54
|
return reader
|
|
55
55
|
} catch (e: any) {
|
|
56
|
-
|
|
56
|
+
//WfsReader may already raise a FetchError
|
|
57
|
+
if (e instanceof FetchError) throw e
|
|
58
|
+
else throw FetchError.parsingFailed(e.message)
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -7,7 +7,14 @@ export class FetchError {
|
|
|
7
7
|
stack = null
|
|
8
8
|
|
|
9
9
|
constructor(
|
|
10
|
-
public type:
|
|
10
|
+
public type:
|
|
11
|
+
| 'http'
|
|
12
|
+
| 'forbidden'
|
|
13
|
+
| 'network'
|
|
14
|
+
| 'parse'
|
|
15
|
+
| 'unsupportedType'
|
|
16
|
+
| 'unknown',
|
|
17
|
+
|
|
11
18
|
public info: string,
|
|
12
19
|
public httpStatus = 0
|
|
13
20
|
) {
|
|
@@ -20,6 +27,9 @@ ${body}`
|
|
|
20
27
|
: `${code}`
|
|
21
28
|
return new FetchError('http', info, code)
|
|
22
29
|
}
|
|
30
|
+
static forbidden(code: number) {
|
|
31
|
+
return new FetchError('forbidden', '', code)
|
|
32
|
+
}
|
|
23
33
|
static corsOrNetwork(message: string) {
|
|
24
34
|
return new FetchError('network', message, 0)
|
|
25
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WfsEndpoint, WfsVersion } from '@camptocamp/ogc-client'
|
|
2
|
-
import { DataItem, DatasetInfo, PropertyInfo } from '../model'
|
|
1
|
+
import { EndpointError, WfsEndpoint, WfsVersion } from '@camptocamp/ogc-client'
|
|
2
|
+
import { DataItem, DatasetInfo, FetchError, PropertyInfo } from '../model'
|
|
3
3
|
import { fetchDataAsText } from '../utils'
|
|
4
4
|
import { GmlReader, parseGml } from './gml'
|
|
5
5
|
import { GeojsonReader, parseGeojson } from './geojson'
|
|
@@ -7,6 +7,32 @@ import { BaseCacheReader } from './base-cache'
|
|
|
7
7
|
import { getJsonDataItemsProxy, jsonToGeojsonFeature } from '../utils'
|
|
8
8
|
import { generateSqlQuery } from '../sql-utils'
|
|
9
9
|
|
|
10
|
+
export async function getWfsEndpoint(wfsUrl: string): Promise<WfsEndpoint> {
|
|
11
|
+
try {
|
|
12
|
+
return await new WfsEndpoint(wfsUrl).isReady()
|
|
13
|
+
} catch (e) {
|
|
14
|
+
if (
|
|
15
|
+
e instanceof Error &&
|
|
16
|
+
'isCrossOriginRelated' in e &&
|
|
17
|
+
'httpStatus' in e
|
|
18
|
+
) {
|
|
19
|
+
const error = e as EndpointError
|
|
20
|
+
if (error.isCrossOriginRelated === true) {
|
|
21
|
+
throw new Error(`wfs.unreachable.cors`)
|
|
22
|
+
}
|
|
23
|
+
if (error.httpStatus === 401 || error.httpStatus === 403) {
|
|
24
|
+
throw FetchError.forbidden(error.httpStatus)
|
|
25
|
+
} else if (error.httpStatus === 400 || error.httpStatus > 403) {
|
|
26
|
+
throw FetchError.http(error.httpStatus)
|
|
27
|
+
} else {
|
|
28
|
+
throw FetchError.unknownType()
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
throw FetchError.unknownType()
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
10
36
|
export class WfsReader extends BaseCacheReader {
|
|
11
37
|
endpoint: WfsEndpoint
|
|
12
38
|
featureTypeName: string
|
|
@@ -53,7 +79,7 @@ export class WfsReader extends BaseCacheReader {
|
|
|
53
79
|
}
|
|
54
80
|
|
|
55
81
|
static async createReader(wfsUrlEndpoint: string, featureTypeName?: string) {
|
|
56
|
-
const wfsEndpoint = await
|
|
82
|
+
const wfsEndpoint = await getWfsEndpoint(wfsUrlEndpoint)
|
|
57
83
|
const featureTypes = wfsEndpoint.getFeatureTypes()
|
|
58
84
|
const featureType = wfsEndpoint.getFeatureTypeSummary(
|
|
59
85
|
featureTypes.length === 1 && !featureTypeName
|