geonetwork-ui 2.4.0-dev.a1bcfe22 → 2.4.0-dev.a6f221e3
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/index.mjs +1 -2
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +7 -5
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +30 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.mjs +31 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +23 -1
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +10 -3
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +21 -4
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +11 -1
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +11 -1
- package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +28 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +29 -0
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +78 -0
- package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +131 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +170 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +15 -39
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +101 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.mjs +47 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +21 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +111 -5
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +7 -6
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +33 -9
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +8 -8
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +6 -4
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +37 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +6 -6
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +6 -5
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +8 -5
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +6 -7
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +8 -7
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +7 -6
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +7 -26
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +29 -13
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +10 -5
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +40 -7
- package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +6 -2
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.mjs +27 -0
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +5 -5
- package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +7 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +7 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +19 -5
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +17 -14
- package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +32 -0
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +6 -21
- package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +6 -17
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +3 -7
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +43 -0
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
- package/esm2022/libs/ui/map/src/lib/ui-map.module.mjs +3 -3
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +49 -11
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +18 -6
- package/esm2022/translations/de.json +50 -17
- package/esm2022/translations/en.json +43 -10
- package/esm2022/translations/es.json +42 -9
- package/esm2022/translations/fr.json +54 -21
- package/esm2022/translations/it.json +43 -10
- package/esm2022/translations/nl.json +42 -9
- package/esm2022/translations/pt.json +42 -9
- package/fesm2022/geonetwork-ui.mjs +4607 -3394
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +0 -1
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts +2 -6
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +8 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts +5 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +3 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +6 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +3 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +8 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +12 -0
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +32 -0
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +27 -0
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +47 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +4 -16
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +22 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.d.ts +17 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +11 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +23 -0
- 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/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +3 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +9 -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/feature-editor.module.d.ts +2 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +8 -0
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/feature-map.module.d.ts +16 -21
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts +1 -1
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +11 -3
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -0
- package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.d.ts +18 -0
- package/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +4 -4
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +9 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +3 -4
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts +17 -0
- package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +0 -4
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +2 -4
- package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +34 -35
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts +18 -0
- package/libs/ui/inputs/src/lib/url-input/url-input.component.d.ts.map +1 -0
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +10 -1
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +6 -2
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/index.ts +0 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +6 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +5 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +37 -12
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +5 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.ts +2 -6
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +6 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +72 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.ts +39 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +70 -1
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +13 -5
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +24 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +12 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +43 -12
- package/src/libs/common/domain/src/lib/model/record/contact.model.ts +28 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +3 -1
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +4 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +25 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +30 -0
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.html +26 -0
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +89 -0
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +2 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +110 -19
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +76 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +271 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +7 -17
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +9 -48
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.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 +128 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.html +6 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.ts +59 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +22 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +15 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +156 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +8 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +20 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +30 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.html +1 -1
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +2 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +40 -3
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.ts +3 -0
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +5 -1
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +5 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +10 -7
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +5 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +6 -1
- package/src/libs/feature/map/src/lib/feature-map.module.ts +2 -15
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.ts +24 -1
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +8 -4
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +2 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +52 -3
- package/src/libs/feature/search/src/lib/state/search.facade.ts +6 -0
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.css +0 -0
- package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.html +12 -0
- package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.ts +37 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +4 -1
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +2 -1
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +12 -8
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +2 -2
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +3 -1
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts +8 -4
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -1
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +15 -3
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +85 -0
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +91 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +49 -49
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +15 -13
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +2 -1
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +2 -27
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +4 -3
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +4 -16
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.css +9 -0
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +37 -0
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.ts +33 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +1 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -0
- package/src/libs/ui/map/src/lib/ui-map.module.ts +1 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +10 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +55 -3
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +7 -2
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +9 -9
- package/tailwind.base.css +16 -4
- package/translations/de.json +50 -17
- package/translations/en.json +43 -10
- package/translations/es.json +42 -9
- package/translations/fr.json +54 -21
- package/translations/it.json +43 -10
- package/translations/nl.json +42 -9
- package/translations/pt.json +42 -9
- package/translations/sk.json +43 -10
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
3
3
|
import { FormControl } from '@angular/forms'
|
|
4
|
-
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
5
4
|
import {
|
|
6
5
|
AutocompleteComponent,
|
|
7
6
|
DropdownSelectorComponent,
|
|
8
7
|
UiInputsModule,
|
|
9
8
|
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
10
9
|
import { UiWidgetsModule } from '../../../../../../../../../libs/ui/widgets/src'
|
|
11
|
-
import { map } from 'rxjs'
|
|
12
10
|
import { Keyword } from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
import { GenericKeywordsComponent } from '../../../generic-keywords/generic-keywords.component'
|
|
12
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
13
|
+
import { KeywordType } from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus'
|
|
15
14
|
|
|
16
15
|
@Component({
|
|
17
16
|
selector: 'gn-ui-form-field-keywords',
|
|
@@ -25,55 +24,17 @@ type AutocompleteItem = { title: string; value: Keyword }
|
|
|
25
24
|
CommonModule,
|
|
26
25
|
UiWidgetsModule,
|
|
27
26
|
AutocompleteComponent,
|
|
27
|
+
GenericKeywordsComponent,
|
|
28
|
+
TranslateModule,
|
|
28
29
|
],
|
|
29
30
|
})
|
|
30
31
|
export class FormFieldKeywordsComponent {
|
|
31
32
|
@Input() control: FormControl<Keyword[]>
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
autoCompleteAction = (query: string) => {
|
|
38
|
-
return this.platformService
|
|
39
|
-
.searchKeywords(query, ['temporal', 'theme', 'other'])
|
|
40
|
-
.pipe(
|
|
41
|
-
map((keywords) =>
|
|
42
|
-
keywords.map((keyword) => {
|
|
43
|
-
return { title: keyword.label, value: keyword }
|
|
44
|
-
})
|
|
45
|
-
)
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
constructor(private platformService: PlatformServiceInterface) {}
|
|
50
|
-
|
|
51
|
-
handleItemSelection(item: AutocompleteItem) {
|
|
52
|
-
this.addKeyword(item.value)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
addKeyword(keyword: Keyword) {
|
|
56
|
-
const addedKeywords = [...this.control.value, keyword]
|
|
57
|
-
|
|
58
|
-
// remove duplicates from keyword
|
|
59
|
-
const filteredKeywords = addedKeywords.filter((value, index, self) => {
|
|
60
|
-
return (
|
|
61
|
-
index ===
|
|
62
|
-
self.findIndex(
|
|
63
|
-
(t) =>
|
|
64
|
-
t?.label === value?.label &&
|
|
65
|
-
t?.thesaurus?.id === value?.thesaurus?.id &&
|
|
66
|
-
t?.type === value?.type
|
|
67
|
-
)
|
|
68
|
-
)
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
this.control.setValue(filteredKeywords)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
removeKeyword(index: number) {
|
|
75
|
-
const removeKeywords = this.control.value.filter((_, i) => i !== index)
|
|
34
|
+
keywordTypes = ['temporal', 'theme', 'other'] as KeywordType[]
|
|
35
|
+
placeholder = 'editor.form.keywords.placeholder'
|
|
76
36
|
|
|
77
|
-
|
|
37
|
+
handleKeywordsChange(keywords: Keyword[]) {
|
|
38
|
+
this.control.setValue(keywords)
|
|
78
39
|
}
|
|
79
40
|
}
|
|
File without changes
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
Input,
|
|
5
|
+
OnChanges,
|
|
6
|
+
} from '@angular/core'
|
|
7
|
+
import { CommonModule } from '@angular/common'
|
|
8
|
+
import { catchError, from, map, Observable, of, switchMap } from 'rxjs'
|
|
9
|
+
import {
|
|
10
|
+
DEFAULT_BASELAYER_CONTEXT,
|
|
11
|
+
FeatureMapModule,
|
|
12
|
+
MapContextLayerTypeEnum,
|
|
13
|
+
MapContextModel,
|
|
14
|
+
MapFacade,
|
|
15
|
+
MapStyleService,
|
|
16
|
+
MapUtilsService,
|
|
17
|
+
} from '../../../../../../../../../libs/feature/map/src'
|
|
18
|
+
import { Fill, Stroke, Style } from 'ol/style'
|
|
19
|
+
import { getOptionalMapConfig, MapConfig } from '../../../../../../../../../libs/util/app-config/src'
|
|
20
|
+
import { Geometry } from 'geojson'
|
|
21
|
+
import { GeoJSONFeatureCollection } from 'ol/format/GeoJSON'
|
|
22
|
+
import { DatasetSpatialExtent } from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
23
|
+
import { Polygon } from 'ol/geom'
|
|
24
|
+
import GeoJSON from 'ol/format/GeoJSON'
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'gn-ui-form-field-map-container',
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [CommonModule, FeatureMapModule],
|
|
30
|
+
templateUrl: './form-field-map-container.component.html',
|
|
31
|
+
styleUrls: ['./form-field-map-container.component.css'],
|
|
32
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
33
|
+
})
|
|
34
|
+
export class FormFieldMapContainerComponent implements OnChanges {
|
|
35
|
+
@Input() spatialExtents: DatasetSpatialExtent[]
|
|
36
|
+
|
|
37
|
+
error = ''
|
|
38
|
+
mapContext$: Observable<MapContextModel> = this.mapFacade.layers$.pipe(
|
|
39
|
+
switchMap((layers) =>
|
|
40
|
+
from(this.mapUtils.getLayerExtent(layers[0])).pipe(
|
|
41
|
+
catchError(() => {
|
|
42
|
+
this.error = 'The layer has no extent'
|
|
43
|
+
return of(undefined)
|
|
44
|
+
}),
|
|
45
|
+
map((extent) => {
|
|
46
|
+
return {
|
|
47
|
+
layers: [DEFAULT_BASELAYER_CONTEXT, ...layers],
|
|
48
|
+
view: {
|
|
49
|
+
extent: extent,
|
|
50
|
+
},
|
|
51
|
+
} as MapContextModel
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
mapConfig: MapConfig = getOptionalMapConfig()
|
|
58
|
+
|
|
59
|
+
constructor(
|
|
60
|
+
private mapFacade: MapFacade,
|
|
61
|
+
private mapUtils: MapUtilsService,
|
|
62
|
+
private styleService: MapStyleService
|
|
63
|
+
) {
|
|
64
|
+
const fill = new Fill({
|
|
65
|
+
color: 'transparent',
|
|
66
|
+
})
|
|
67
|
+
const stroke = new Stroke({
|
|
68
|
+
color: 'black',
|
|
69
|
+
width: 2,
|
|
70
|
+
})
|
|
71
|
+
const styles = [
|
|
72
|
+
new Style({
|
|
73
|
+
fill: fill,
|
|
74
|
+
stroke: stroke,
|
|
75
|
+
}),
|
|
76
|
+
]
|
|
77
|
+
this.styleService.styles.default = this.styleService.createStyleFunction({
|
|
78
|
+
...this.styleService.createGeometryStyles({ color: 'black' }),
|
|
79
|
+
polygon: styles,
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
ngOnChanges(): void {
|
|
84
|
+
this.mapFacade.removeLayer(0)
|
|
85
|
+
|
|
86
|
+
if (this.spatialExtents) {
|
|
87
|
+
const featureCollection: GeoJSONFeatureCollection = {
|
|
88
|
+
type: 'FeatureCollection',
|
|
89
|
+
features: [],
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.spatialExtents.forEach((extent) => {
|
|
93
|
+
if (extent.geometry) {
|
|
94
|
+
featureCollection.features.push({
|
|
95
|
+
type: 'Feature',
|
|
96
|
+
properties: {},
|
|
97
|
+
geometry: extent.geometry,
|
|
98
|
+
})
|
|
99
|
+
} else if (extent.bbox?.length >= 0) {
|
|
100
|
+
featureCollection.features.push({
|
|
101
|
+
type: 'Feature',
|
|
102
|
+
properties: {},
|
|
103
|
+
geometry: this.bboxCoordsToGeometry(extent.bbox),
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
this.mapFacade.addLayer({
|
|
108
|
+
type: MapContextLayerTypeEnum.GEOJSON,
|
|
109
|
+
data: featureCollection,
|
|
110
|
+
title: 'Spatial extents',
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
bboxCoordsToGeometry(bbox: [number, number, number, number]): Geometry {
|
|
115
|
+
const geometry = new Polygon([
|
|
116
|
+
[
|
|
117
|
+
[bbox[0], bbox[1]],
|
|
118
|
+
[bbox[0], bbox[3]],
|
|
119
|
+
[bbox[2], bbox[3]],
|
|
120
|
+
[bbox[2], bbox[1]],
|
|
121
|
+
[bbox[0], bbox[1]],
|
|
122
|
+
],
|
|
123
|
+
])
|
|
124
|
+
|
|
125
|
+
const geoJSONGeom = new GeoJSON().writeGeometryObject(geometry)
|
|
126
|
+
return geoJSONGeom
|
|
127
|
+
}
|
|
128
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
OnChanges,
|
|
7
|
+
OnInit,
|
|
8
|
+
Output,
|
|
9
|
+
SimpleChanges,
|
|
10
|
+
} from '@angular/core'
|
|
11
|
+
import { FormControl } from '@angular/forms'
|
|
12
|
+
import { CheckToggleComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
13
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
14
|
+
import { OPEN_DATA_LICENSES } from './../../../../fields.config'
|
|
15
|
+
import { Subscription } from 'rxjs'
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'gn-ui-form-field-open-data',
|
|
19
|
+
templateUrl: './form-field-open-data.component.html',
|
|
20
|
+
styleUrls: ['./form-field-open-data.component.css'],
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [CheckToggleComponent, TranslateModule],
|
|
23
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
+
})
|
|
25
|
+
export class FormFieldOpenDataComponent implements OnInit {
|
|
26
|
+
@Input() control: FormControl
|
|
27
|
+
value = false
|
|
28
|
+
@Output() visibilityChange = new EventEmitter<boolean>()
|
|
29
|
+
subscription: Subscription
|
|
30
|
+
|
|
31
|
+
get config() {
|
|
32
|
+
return OPEN_DATA_LICENSES
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngOnInit() {
|
|
36
|
+
this.initToggle()
|
|
37
|
+
this.subscription = new Subscription()
|
|
38
|
+
|
|
39
|
+
this.subscription.add(
|
|
40
|
+
this.control.valueChanges.subscribe((value) => {
|
|
41
|
+
this.value = this.config.includes(value[0].text)
|
|
42
|
+
this.visibilityChange.emit(this.value)
|
|
43
|
+
})
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
initToggle() {
|
|
48
|
+
this.value = this.config.includes(this.control.value[0].text)
|
|
49
|
+
this.visibilityChange.emit(this.value)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onOpenDataToggled(boolean) {
|
|
53
|
+
if (boolean) {
|
|
54
|
+
this.control.setValue([{ text: this.config[0] }])
|
|
55
|
+
}
|
|
56
|
+
this.value = !this.value
|
|
57
|
+
this.visibilityChange.emit(boolean)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
3
|
+
import { OverviewUploadComponent } from '../../../overview-upload/overview-upload.component'
|
|
4
|
+
import { FormControl } from '@angular/forms'
|
|
5
|
+
import { GraphicOverview } from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'gn-ui-form-field-overviews',
|
|
9
|
+
templateUrl: './form-field-overviews.component.html',
|
|
10
|
+
styleUrls: ['./form-field-overviews.component.css'],
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
standalone: true,
|
|
13
|
+
imports: [CommonModule, OverviewUploadComponent],
|
|
14
|
+
})
|
|
15
|
+
export class FormFieldOverviewsComponent {
|
|
16
|
+
@Input() metadataUuid: string
|
|
17
|
+
@Input() control!: FormControl
|
|
18
|
+
|
|
19
|
+
handleOverviewChange(overView: GraphicOverview | null) {
|
|
20
|
+
this.control.setValue(overView ? [overView] : [])
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
<
|
|
1
|
+
<div class="flex flex-col gap-3">
|
|
2
|
+
<gn-ui-generic-keywords
|
|
3
|
+
[placeholder]="'Search for place keywords'"
|
|
4
|
+
[keywords]="shownKeywords$ | async"
|
|
5
|
+
[keywordTypes]="['place']"
|
|
6
|
+
(deletedKeyword)="handleKeywordDelete($event)"
|
|
7
|
+
(addedKeyword)="handleKeywordAdd($event)"
|
|
8
|
+
>
|
|
9
|
+
</gn-ui-generic-keywords>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="w-full h-96">
|
|
12
|
+
<gn-ui-form-field-map-container
|
|
13
|
+
[spatialExtents]="spatialExtents$ | async"
|
|
14
|
+
></gn-ui-form-field-map-container>
|
|
15
|
+
</div>
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
1
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
3
|
+
import {
|
|
4
|
+
DatasetSpatialExtent,
|
|
5
|
+
Keyword,
|
|
6
|
+
} from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
7
|
+
import { GenericKeywordsComponent } from '../../../generic-keywords/generic-keywords.component'
|
|
8
|
+
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
9
|
+
import { firstValueFrom, map, shareReplay } from 'rxjs'
|
|
10
|
+
import { EditorFacade } from '../../../../+state/editor.facade'
|
|
11
|
+
import { switchMap } from 'rxjs/operators'
|
|
12
|
+
import { FormFieldMapContainerComponent } from '../form-field-map-container/form-field-map-container.component'
|
|
13
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
14
|
+
|
|
15
|
+
// This intermediary type will let us keep track of which keyword is bound to
|
|
16
|
+
// which extent; these properties will not be persisted
|
|
17
|
+
type KeywordWithExtent = Keyword & {
|
|
18
|
+
_linkedExtent: DatasetSpatialExtent
|
|
19
|
+
_doNotSave: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This form field is not like the others, as it will read directly from the state to handle both spatial extents
|
|
24
|
+
* and place keywords.
|
|
25
|
+
* Other types of keywords will not be touched by this field.
|
|
26
|
+
*/
|
|
2
27
|
|
|
3
28
|
@Component({
|
|
4
29
|
selector: 'gn-ui-form-field-spatial-extent',
|
|
@@ -6,5 +31,135 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
|
6
31
|
styleUrls: ['./form-field-spatial-extent.component.css'],
|
|
7
32
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
33
|
standalone: true,
|
|
34
|
+
imports: [
|
|
35
|
+
CommonModule,
|
|
36
|
+
GenericKeywordsComponent,
|
|
37
|
+
FormFieldMapContainerComponent,
|
|
38
|
+
],
|
|
9
39
|
})
|
|
10
|
-
export class FormFieldSpatialExtentComponent {
|
|
40
|
+
export class FormFieldSpatialExtentComponent {
|
|
41
|
+
spatialExtents$ = this.editorFacade.record$.pipe(
|
|
42
|
+
map((record) => ('spatialExtents' in record ? record?.spatialExtents : []))
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
shownKeywords$ = this.editorFacade.record$.pipe(
|
|
46
|
+
map((record) => record?.keywords.filter((k) => k.type === 'place')),
|
|
47
|
+
// look for full keywords in the thesauri
|
|
48
|
+
switchMap((keywords) =>
|
|
49
|
+
Promise.all(
|
|
50
|
+
keywords.map(async (keyword) => {
|
|
51
|
+
if (!keyword.thesaurus) return keyword
|
|
52
|
+
const allKeywords = await firstValueFrom(
|
|
53
|
+
this.platformService.searchKeywordsInThesaurus(
|
|
54
|
+
keyword.label,
|
|
55
|
+
keyword.thesaurus.id
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
const found = allKeywords.find((k) => k.label === keyword.label)
|
|
59
|
+
return found ?? keyword
|
|
60
|
+
})
|
|
61
|
+
)
|
|
62
|
+
),
|
|
63
|
+
// add additional "unnamed" keywords for extents without a matching keyword
|
|
64
|
+
switchMap(async (keywords) => {
|
|
65
|
+
const spatialExtents = await firstValueFrom(this.spatialExtents$)
|
|
66
|
+
const keywordsFromExtents = await Promise.all(
|
|
67
|
+
spatialExtents.map(async (extent) => {
|
|
68
|
+
const existingKeyword =
|
|
69
|
+
extent.description &&
|
|
70
|
+
(keywords.find(
|
|
71
|
+
(k) => k.key === extent.description
|
|
72
|
+
) as KeywordWithExtent)
|
|
73
|
+
if (existingKeyword) {
|
|
74
|
+
existingKeyword._linkedExtent = extent
|
|
75
|
+
return null
|
|
76
|
+
}
|
|
77
|
+
let bbox = null
|
|
78
|
+
if ('geometry' in extent) {
|
|
79
|
+
bbox = extent.geometry // FIXME: this should be a bbox too but for now it works...
|
|
80
|
+
} else if ('bbox' in extent) {
|
|
81
|
+
bbox = extent.bbox
|
|
82
|
+
}
|
|
83
|
+
const label = await firstValueFrom(
|
|
84
|
+
this.translateService.get('editor.record.placeKeywordWithoutLabel')
|
|
85
|
+
)
|
|
86
|
+
return {
|
|
87
|
+
label,
|
|
88
|
+
type: 'place',
|
|
89
|
+
...(bbox && { bbox }),
|
|
90
|
+
_linkedExtent: extent,
|
|
91
|
+
_doNotSave: true,
|
|
92
|
+
} as KeywordWithExtent
|
|
93
|
+
})
|
|
94
|
+
).then((keywords) => keywords.filter((k) => !!k))
|
|
95
|
+
|
|
96
|
+
return [...keywords, ...keywordsFromExtents]
|
|
97
|
+
}),
|
|
98
|
+
shareReplay(1)
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
constructor(
|
|
102
|
+
private platformService: PlatformServiceInterface,
|
|
103
|
+
private editorFacade: EditorFacade,
|
|
104
|
+
private translateService: TranslateService
|
|
105
|
+
) {}
|
|
106
|
+
|
|
107
|
+
async handleKeywordDelete(keyword: Keyword) {
|
|
108
|
+
const spatialExtents = await firstValueFrom(this.spatialExtents$)
|
|
109
|
+
const shownKeywords = (await firstValueFrom(
|
|
110
|
+
this.shownKeywords$
|
|
111
|
+
)) as KeywordWithExtent[]
|
|
112
|
+
const newKeywords = shownKeywords.filter((k) => k !== keyword)
|
|
113
|
+
const linkedExtent =
|
|
114
|
+
'_linkedExtent' in keyword ? keyword._linkedExtent : null
|
|
115
|
+
const newExtents = linkedExtent
|
|
116
|
+
? spatialExtents.filter((extent) => linkedExtent !== extent)
|
|
117
|
+
: spatialExtents
|
|
118
|
+
return this.emitChanges(newKeywords, newExtents)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async handleKeywordAdd(keyword: Keyword) {
|
|
122
|
+
const spatialExtents = await firstValueFrom(this.spatialExtents$)
|
|
123
|
+
const shownKeywords = await firstValueFrom(this.shownKeywords$)
|
|
124
|
+
const newKeywords = [...shownKeywords, keyword] as KeywordWithExtent[]
|
|
125
|
+
let newExtents = spatialExtents
|
|
126
|
+
if (keyword.bbox) {
|
|
127
|
+
newExtents = [
|
|
128
|
+
...spatialExtents,
|
|
129
|
+
{
|
|
130
|
+
bbox: keyword.bbox,
|
|
131
|
+
description: keyword.key ?? undefined,
|
|
132
|
+
},
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
return this.emitChanges(newKeywords, newExtents)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async emitChanges(
|
|
139
|
+
placeKeywords: KeywordWithExtent[],
|
|
140
|
+
spatialExtents: DatasetSpatialExtent[]
|
|
141
|
+
) {
|
|
142
|
+
// some keywords are only present to allow control over extents; they **should not** be saved!
|
|
143
|
+
const filteredPlaceKeywords = placeKeywords
|
|
144
|
+
.filter((keyword) => !keyword._doNotSave)
|
|
145
|
+
.map(
|
|
146
|
+
({ label, thesaurus, type }) =>
|
|
147
|
+
({
|
|
148
|
+
label,
|
|
149
|
+
type,
|
|
150
|
+
...(thesaurus && { thesaurus }),
|
|
151
|
+
} as Keyword)
|
|
152
|
+
)
|
|
153
|
+
const notPlaceKeywords = await firstValueFrom(
|
|
154
|
+
this.editorFacade.record$.pipe(
|
|
155
|
+
map((record) => record.keywords.filter((k) => k.type !== 'place'))
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
this.editorFacade.updateRecordField('keywords', [
|
|
160
|
+
...notPlaceKeywords,
|
|
161
|
+
...filteredPlaceKeywords,
|
|
162
|
+
])
|
|
163
|
+
this.editorFacade.updateRecordField('spatialExtents', spatialExtents)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -62,9 +62,9 @@ export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
onElementsChange(elements:
|
|
65
|
+
onElementsChange(elements: { inputs: Record<string, unknown> }[]) {
|
|
66
66
|
this.array.clear({ emitEvent: false })
|
|
67
|
-
elements.forEach((e
|
|
67
|
+
elements.forEach((e, i) =>
|
|
68
68
|
this.array.push(e.inputs.control, {
|
|
69
69
|
emitEvent: i === elements.length - 1,
|
|
70
70
|
})
|
|
@@ -95,7 +95,7 @@ export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
|
95
95
|
|
|
96
96
|
private resetValueFromInput(value) {
|
|
97
97
|
this.array.clear({ emitEvent: false })
|
|
98
|
-
|
|
98
|
+
let newElements = []
|
|
99
99
|
value.forEach((v: any) => {
|
|
100
100
|
if ('start' in v && 'end' in v) {
|
|
101
101
|
const rangeControl = new FormControl({
|
|
@@ -103,8 +103,8 @@ export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
|
103
103
|
end: v.end,
|
|
104
104
|
})
|
|
105
105
|
this.array.push(rangeControl, { emitEvent: false })
|
|
106
|
-
|
|
107
|
-
...
|
|
106
|
+
newElements = [
|
|
107
|
+
...newElements,
|
|
108
108
|
{
|
|
109
109
|
component: FormFieldTemporalExtentsRangeComponent,
|
|
110
110
|
inputs: {
|
|
@@ -115,8 +115,8 @@ export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
|
115
115
|
} else {
|
|
116
116
|
const dateControl = new FormControl({ start: v.start })
|
|
117
117
|
this.array.push(dateControl, { emitEvent: false })
|
|
118
|
-
|
|
119
|
-
...
|
|
118
|
+
newElements = [
|
|
119
|
+
...newElements,
|
|
120
120
|
{
|
|
121
121
|
component: FormFieldTemporalExtentsDateComponent,
|
|
122
122
|
inputs: {
|
|
@@ -126,5 +126,6 @@ export class FormFieldTemporalExtentsComponent implements OnInit, OnDestroy {
|
|
|
126
126
|
]
|
|
127
127
|
}
|
|
128
128
|
})
|
|
129
|
+
this.elements = newElements
|
|
129
130
|
}
|
|
130
131
|
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
<
|
|
1
|
+
<ng-container *ngIf="isOpenData">
|
|
2
|
+
<gn-ui-form-field-open-data
|
|
3
|
+
[control]="formControl"
|
|
4
|
+
(visibilityChange)="onVisibilityChange($event)"
|
|
5
|
+
></gn-ui-form-field-open-data>
|
|
6
|
+
</ng-container>
|
|
7
|
+
<div class="flex flex-col h-full" *ngIf="!isHidden">
|
|
2
8
|
<ng-container *ngIf="withoutWrapper; else withGenericWrapper">
|
|
3
9
|
<ng-container *ngTemplateOutlet="fieldContent"></ng-container>
|
|
4
10
|
</ng-container>
|
|
@@ -73,12 +79,23 @@
|
|
|
73
79
|
[readonly]="isReadOnly"
|
|
74
80
|
></gn-ui-form-field-simple>
|
|
75
81
|
</ng-container>
|
|
76
|
-
<ng-container *ngIf="
|
|
77
|
-
<gn-ui-form-field-
|
|
82
|
+
<ng-container *ngIf="isGraphicOverview">
|
|
83
|
+
<gn-ui-form-field-overviews
|
|
84
|
+
[control]="formControl"
|
|
85
|
+
[metadataUuid]="metadataUuid$ | async"
|
|
86
|
+
></gn-ui-form-field-overviews>
|
|
78
87
|
</ng-container>
|
|
79
88
|
<ng-container *ngIf="isKeywords">
|
|
80
89
|
<gn-ui-form-field-keywords
|
|
81
90
|
[control]="formControl"
|
|
82
91
|
></gn-ui-form-field-keywords>
|
|
83
92
|
</ng-container>
|
|
93
|
+
<ng-container *ngIf="isContactsForResource">
|
|
94
|
+
<gn-ui-form-field-contacts-for-resource
|
|
95
|
+
[control]="formControl"
|
|
96
|
+
></gn-ui-form-field-contacts-for-resource>
|
|
97
|
+
</ng-container>
|
|
98
|
+
<ng-container *ngIf="isSpatialExtentField">
|
|
99
|
+
<gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
|
|
100
|
+
</ng-container>
|
|
84
101
|
</ng-template>
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ChangeDetectionStrategy,
|
|
4
4
|
Component,
|
|
5
5
|
ElementRef,
|
|
6
|
+
EventEmitter,
|
|
6
7
|
Input,
|
|
7
8
|
Output,
|
|
8
9
|
ViewChild,
|
|
@@ -28,7 +29,12 @@ import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/for
|
|
|
28
29
|
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
29
30
|
import { CatalogRecordKeys } from '../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
30
31
|
import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-keywords.component'
|
|
32
|
+
import { FormFieldOverviewsComponent } from './form-field-overviews/form-field-overviews.component'
|
|
33
|
+
import { map, take } from 'rxjs/operators'
|
|
34
|
+
import { EditorFacade } from '../../../+state/editor.facade'
|
|
31
35
|
import { FormFieldConfig } from '../../../models'
|
|
36
|
+
import { FormFieldContactsForResourceComponent } from './form-field-contacts-for-resource/form-field-contacts-for-resource.component'
|
|
37
|
+
import { FormFieldOpenDataComponent } from './form-field-open-data/form-field-open-data.component'
|
|
32
38
|
|
|
33
39
|
@Component({
|
|
34
40
|
selector: 'gn-ui-form-field',
|
|
@@ -55,6 +61,9 @@ import { FormFieldConfig } from '../../../models'
|
|
|
55
61
|
FormFieldArrayComponent,
|
|
56
62
|
FormFieldKeywordsComponent,
|
|
57
63
|
TranslateModule,
|
|
64
|
+
FormFieldOverviewsComponent,
|
|
65
|
+
FormFieldContactsForResourceComponent,
|
|
66
|
+
FormFieldOpenDataComponent,
|
|
58
67
|
],
|
|
59
68
|
})
|
|
60
69
|
export class FormFieldComponent {
|
|
@@ -67,12 +76,18 @@ export class FormFieldComponent {
|
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
@Output() valueChange: Observable<unknown>
|
|
79
|
+
isHidden = false
|
|
70
80
|
|
|
71
81
|
@ViewChild('titleInput') titleInput: ElementRef
|
|
72
82
|
|
|
83
|
+
metadataUuid$ = this.facade.record$.pipe(
|
|
84
|
+
take(1),
|
|
85
|
+
map((record) => record.uniqueIdentifier)
|
|
86
|
+
)
|
|
87
|
+
|
|
73
88
|
formControl = new FormControl()
|
|
74
89
|
|
|
75
|
-
constructor() {
|
|
90
|
+
constructor(private facade: EditorFacade) {
|
|
76
91
|
this.valueChange = this.formControl.valueChanges
|
|
77
92
|
}
|
|
78
93
|
|
|
@@ -80,6 +95,10 @@ export class FormFieldComponent {
|
|
|
80
95
|
this.titleInput.nativeElement.children[0].focus()
|
|
81
96
|
}
|
|
82
97
|
|
|
98
|
+
onVisibilityChange(visibility: boolean) {
|
|
99
|
+
this.isHidden = visibility
|
|
100
|
+
}
|
|
101
|
+
|
|
83
102
|
get isTitle() {
|
|
84
103
|
return this.model === 'title'
|
|
85
104
|
}
|
|
@@ -101,6 +120,9 @@ export class FormFieldComponent {
|
|
|
101
120
|
get isSpatialExtentField() {
|
|
102
121
|
return this.model === 'spatialExtents'
|
|
103
122
|
}
|
|
123
|
+
get isGraphicOverview() {
|
|
124
|
+
return this.model === 'overviews'
|
|
125
|
+
}
|
|
104
126
|
get isSimpleField() {
|
|
105
127
|
return this.model === 'uniqueIdentifier' || this.model === 'recordUpdated'
|
|
106
128
|
}
|
|
@@ -110,8 +132,15 @@ export class FormFieldComponent {
|
|
|
110
132
|
get isKeywords() {
|
|
111
133
|
return this.model === 'keywords'
|
|
112
134
|
}
|
|
135
|
+
get isContactsForResource() {
|
|
136
|
+
return this.model === 'contactsForResource'
|
|
137
|
+
}
|
|
113
138
|
|
|
114
139
|
get withoutWrapper() {
|
|
115
140
|
return this.model === 'title' || this.model === 'abstract'
|
|
116
141
|
}
|
|
142
|
+
|
|
143
|
+
get isOpenData() {
|
|
144
|
+
return this.model === 'licenses'
|
|
145
|
+
}
|
|
117
146
|
}
|