geonetwork-ui 2.4.0-dev.503109c9 → 2.4.0-dev.575f30f2
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 +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +10 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +5 -5
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +7 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +10 -7
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +7 -14
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +6 -6
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +28 -18
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +18 -2
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +41 -7
- 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/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +4 -16
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +4 -2
- package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +93 -0
- package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +71 -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 +11 -29
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.mjs +19 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +23 -10
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +148 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +86 -11
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -8
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +36 -7
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +35 -59
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +12 -5
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +34 -6
- package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +2 -2
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +6 -6
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
- package/esm2022/libs/ui/inputs/src/index.mjs +5 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -4
- package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +5 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +8 -1
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +11 -4
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +9 -3
- package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +87 -0
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -4
- package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +4 -3
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/index.mjs +3 -1
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +5 -3
- package/esm2022/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.mjs +29 -0
- package/esm2022/libs/ui/layout/src/lib/sortable-list/sortable-list.component.mjs +43 -0
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +3 -3
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +1 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +1 -1
- package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -1
- package/esm2022/translations/de.json +20 -0
- package/esm2022/translations/en.json +20 -0
- package/esm2022/translations/es.json +20 -0
- package/esm2022/translations/fr.json +21 -1
- package/esm2022/translations/it.json +20 -0
- package/esm2022/translations/nl.json +20 -0
- package/esm2022/translations/pt.json +20 -0
- package/fesm2022/geonetwork-ui.mjs +3136 -2523
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +1 -0
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +3 -3
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +2 -2
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.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 +4 -5
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +7 -6
- 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 +6 -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 +12 -7
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +21 -2
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -6
- 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 +15 -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 +7 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +6 -6
- 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 +3 -3
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +1 -5
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +2 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +33 -0
- package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts +15 -0
- package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.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 +2 -5
- 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 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts +9 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.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 +5 -2
- 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-online-link-resources/form-field-online-link-resources.component.d.ts +35 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.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 +20 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +1 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.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 +7 -2
- 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 +9 -15
- 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 +5 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts +3 -2
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +9 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +6 -0
- package/libs/feature/editor/src/lib/models/editor-config.model.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 +5 -5
- 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/record/src/lib/data-view/data-view.component.d.ts +3 -3
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -2
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +2 -2
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -1
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -7
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/inputs/src/index.d.ts +4 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts +24 -0
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +1 -1
- 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 +0 -1
- package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +2 -0
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +2 -2
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
- package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts +20 -0
- package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts +14 -0
- package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -0
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- 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 +6 -6
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -1
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +18 -16
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -4
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +12 -4
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +14 -8
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +4 -12
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +13 -15
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +48 -36
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +20 -1
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -3
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +7 -7
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +26 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +216 -175
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +3 -3
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +6 -6
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -4
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +12 -24
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +1 -13
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +43 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +129 -0
- package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.html +35 -0
- package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +79 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +4 -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 +13 -23
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +7 -44
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.ts → form-field-date-updated/form-field-date-updated.component.ts} +4 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +3 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +35 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +8 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +34 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +182 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +11 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +93 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +13 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +0 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +7 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +62 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +23 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +37 -69
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +16 -14
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +27 -20
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +10 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +31 -29
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +2 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +37 -5
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +12 -0
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +7 -7
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -3
- package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +2 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -2
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +5 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
- package/src/libs/ui/elements/src/index.ts +1 -1
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +4 -4
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -7
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -3
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +13 -20
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +5 -0
- package/src/libs/ui/inputs/src/index.ts +4 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +25 -18
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +38 -24
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +4 -1
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +12 -3
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +15 -1
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +13 -6
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +27 -23
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +7 -3
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +30 -22
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +4 -3
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +0 -1
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +1 -2
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +1 -1
- package/src/libs/ui/layout/src/index.ts +2 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +8 -3
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +4 -3
- package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.css +0 -0
- package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.html +15 -0
- package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.ts +44 -0
- package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +37 -0
- package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.ts +13 -16
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +4 -3
- package/src/libs/util/shared/src/lib/links/link-utils.ts +6 -6
- package/src/libs/util/shared/src/lib/services/theme.service.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +4 -1
- package/tailwind.base.config.js +1 -0
- package/tailwind.base.css +35 -4
- package/translations/de.json +20 -0
- package/translations/en.json +20 -0
- package/translations/es.json +20 -0
- package/translations/fr.json +21 -1
- package/translations/it.json +20 -0
- package/translations/nl.json +20 -0
- package/translations/pt.json +20 -0
- package/translations/sk.json +20 -0
- package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +0 -96
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +0 -19
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.mjs +0 -17
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.mjs +0 -17
- package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +0 -39
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +0 -27
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +0 -9
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts +0 -8
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts +0 -8
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts.map +0 -1
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +0 -17
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +0 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -9
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +0 -113
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.html +0 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.ts +0 -16
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.html +0 -13
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.ts +0 -16
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +0 -29
- /package/src/libs/feature/editor/src/lib/components/{overview-upload/overview-upload.component.css → import-record/import-record.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css → online-resource-card/online-resource-card.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.css → form-field-date-updated/form-field-date-updated.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.html → form-field-date-updated/form-field-date-updated.component.html} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.css → form-field-online-link-resources/form-field-online-link-resources.component.css} +0 -0
- /package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.css +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<ng-container [ngSwitch]="sectionDisplayed">
|
|
2
|
+
<ng-container *ngSwitchCase="'mainMenu'">
|
|
3
|
+
<div
|
|
4
|
+
data-test="importMenuMainSection"
|
|
5
|
+
class="mt-2 border border-gray-100 p-2 flex items-center bg-white shadow-2xl rounded-2xl"
|
|
6
|
+
>
|
|
7
|
+
<ul class="flex flex-col gap-2 w-full">
|
|
8
|
+
<li *ngFor="let menuItem of importMenuItems">
|
|
9
|
+
<gn-ui-button
|
|
10
|
+
[attr.data-test]="menuItem.dataTest"
|
|
11
|
+
type="light"
|
|
12
|
+
extraClass="flex flex-row items-center gap-2 w-full justify-start"
|
|
13
|
+
(buttonClick)="menuItem.action()"
|
|
14
|
+
><mat-icon class="material-symbols-outlined">
|
|
15
|
+
{{ menuItem.icon }} </mat-icon
|
|
16
|
+
><span>{{ menuItem.label }}</span></gn-ui-button
|
|
17
|
+
>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</div>
|
|
21
|
+
</ng-container>
|
|
22
|
+
<ng-container *ngSwitchCase="'importExternalFile'">
|
|
23
|
+
<div
|
|
24
|
+
data-test="importMenuImportExternalFileSection"
|
|
25
|
+
class="p-6 flex flex-col gap-2 mt-2 border border-gray-100 bg-white shadow-2xl rounded-2xl"
|
|
26
|
+
>
|
|
27
|
+
<div class="flex flex-row items-center gap-2">
|
|
28
|
+
<gn-ui-button
|
|
29
|
+
data-test="importMenuImportExternalFileSectionBackButton"
|
|
30
|
+
type="light"
|
|
31
|
+
(buttonClick)="displayMainMenu()"
|
|
32
|
+
>
|
|
33
|
+
<mat-icon class="material-symbols-outlined">arrow_back</mat-icon>
|
|
34
|
+
</gn-ui-button>
|
|
35
|
+
<span class="font-bold"> {{ externalImportBackLabel }}</span>
|
|
36
|
+
</div>
|
|
37
|
+
<gn-ui-url-input
|
|
38
|
+
(valueChange)="importRecord($event)"
|
|
39
|
+
[disabled]="isRecordImportInProgress"
|
|
40
|
+
></gn-ui-url-input>
|
|
41
|
+
</div>
|
|
42
|
+
</ng-container>
|
|
43
|
+
</ng-container>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
Output,
|
|
7
|
+
} from '@angular/core'
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
9
|
+
import { CommonModule } from '@angular/common'
|
|
10
|
+
import { ButtonComponent, UrlInputComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
11
|
+
import { ThumbnailComponent } from '../../../../../../../libs/ui/elements/src'
|
|
12
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
13
|
+
import { NotificationsService } from '../../../../../../../libs/feature/notifications/src'
|
|
14
|
+
import { RecordsRepositoryInterface } from '../../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
15
|
+
import { Router } from '@angular/router'
|
|
16
|
+
|
|
17
|
+
interface ImportMenuItems {
|
|
18
|
+
label: string
|
|
19
|
+
icon: string
|
|
20
|
+
action: () => any
|
|
21
|
+
dataTest: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type ImportMenuPage = 'mainMenu' | 'importExternalFile'
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'gn-ui-import-record',
|
|
28
|
+
templateUrl: './import-record.component.html',
|
|
29
|
+
styleUrls: ['./import-record.component.css'],
|
|
30
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
+
standalone: true,
|
|
32
|
+
imports: [
|
|
33
|
+
CommonModule,
|
|
34
|
+
MatIconModule,
|
|
35
|
+
ButtonComponent,
|
|
36
|
+
ThumbnailComponent,
|
|
37
|
+
UrlInputComponent,
|
|
38
|
+
],
|
|
39
|
+
})
|
|
40
|
+
export class ImportRecordComponent {
|
|
41
|
+
@Output() closeImportMenu = new EventEmitter<void>()
|
|
42
|
+
|
|
43
|
+
importMenuItems: ImportMenuItems[] = [
|
|
44
|
+
{
|
|
45
|
+
label: this.translateService.instant('dashboard.importRecord.useModel'),
|
|
46
|
+
icon: 'highlight',
|
|
47
|
+
action: () => null,
|
|
48
|
+
dataTest: 'useAModelButton',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: this.translateService.instant(
|
|
52
|
+
'dashboard.importRecord.importExternal'
|
|
53
|
+
),
|
|
54
|
+
icon: 'cloud_download',
|
|
55
|
+
action: this.displayImportExternal.bind(this),
|
|
56
|
+
dataTest: 'importFromUrlButton',
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
isRecordImportInProgress = false
|
|
61
|
+
|
|
62
|
+
sectionDisplayed: ImportMenuPage = 'mainMenu'
|
|
63
|
+
|
|
64
|
+
externalImportBackLabel = this.translateService.instant(
|
|
65
|
+
'dashboard.importRecord.importExternalLabel'
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
constructor(
|
|
69
|
+
private router: Router,
|
|
70
|
+
private translateService: TranslateService,
|
|
71
|
+
private cdr: ChangeDetectorRef,
|
|
72
|
+
private notificationsService: NotificationsService,
|
|
73
|
+
private recordsRepository: RecordsRepositoryInterface
|
|
74
|
+
) {}
|
|
75
|
+
|
|
76
|
+
displayMainMenu() {
|
|
77
|
+
this.sectionDisplayed = 'mainMenu'
|
|
78
|
+
this.cdr.markForCheck()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
displayImportExternal() {
|
|
82
|
+
this.sectionDisplayed = 'importExternalFile'
|
|
83
|
+
this.cdr.markForCheck()
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
importRecord(url: string) {
|
|
87
|
+
this.isRecordImportInProgress = true
|
|
88
|
+
|
|
89
|
+
this.recordsRepository.duplicateExternalRecord(url).subscribe({
|
|
90
|
+
next: (recordTempId) => {
|
|
91
|
+
if (recordTempId) {
|
|
92
|
+
this.notificationsService.showNotification(
|
|
93
|
+
{
|
|
94
|
+
type: 'success',
|
|
95
|
+
title: this.translateService.instant(
|
|
96
|
+
'editor.record.importFromExternalFile.success.title'
|
|
97
|
+
),
|
|
98
|
+
text: `${this.translateService.instant(
|
|
99
|
+
'editor.record.importFromExternalFile.success.body'
|
|
100
|
+
)}`,
|
|
101
|
+
},
|
|
102
|
+
2500
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
this.router
|
|
106
|
+
.navigate(['/edit', recordTempId])
|
|
107
|
+
.catch((err) => console.error(err))
|
|
108
|
+
}
|
|
109
|
+
this.closeImportMenu.next()
|
|
110
|
+
},
|
|
111
|
+
error: (error) => {
|
|
112
|
+
this.notificationsService.showNotification(
|
|
113
|
+
{
|
|
114
|
+
type: 'error',
|
|
115
|
+
title: this.translateService.instant(
|
|
116
|
+
'editor.record.importFromExternalFile.failure.title'
|
|
117
|
+
),
|
|
118
|
+
text: `${this.translateService.instant(
|
|
119
|
+
'editor.record.importFromExternalFile.failure.body'
|
|
120
|
+
)} ${error.message ?? ''}`,
|
|
121
|
+
},
|
|
122
|
+
2500
|
|
123
|
+
)
|
|
124
|
+
this.isRecordImportInProgress = false
|
|
125
|
+
this.cdr.markForCheck()
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<div class="gn-ui-card">
|
|
2
|
+
<div
|
|
3
|
+
class="bg-gray-100 w-[56px] h-[56px] rounded-[4px] text-primary grid justify-center items-center shrink-0"
|
|
4
|
+
>
|
|
5
|
+
<mat-icon class="material-symbols-outlined">attach_file</mat-icon>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="flex flex-col w-full items-start overflow-hidden leading-snug">
|
|
8
|
+
<div class="text-[16px] font-bold text-main" data-test="card-title">
|
|
9
|
+
{{ title }}
|
|
10
|
+
</div>
|
|
11
|
+
<div
|
|
12
|
+
class="text-[14px] text-gray-900"
|
|
13
|
+
*ngIf="subtitle"
|
|
14
|
+
data-test="card-subtitle"
|
|
15
|
+
>
|
|
16
|
+
<span>{{ subtitle }}</span>
|
|
17
|
+
<span *ngIf="fileSize">
|
|
18
|
+
•
|
|
19
|
+
{{
|
|
20
|
+
'editor.record.form.field.onlineResource.fileSize'
|
|
21
|
+
| translate: { sizeMB: fileSize }
|
|
22
|
+
}}</span
|
|
23
|
+
>
|
|
24
|
+
<span *ngIf="identifierInService"> • {{ identifierInService }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<button
|
|
27
|
+
class="gn-ui-link text-[14px]"
|
|
28
|
+
translate
|
|
29
|
+
(click)="modifyClick.emit(onlineResource)"
|
|
30
|
+
data-test="card-modify"
|
|
31
|
+
>
|
|
32
|
+
editor.record.form.field.onlineResource.modify
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
} from '@angular/core'
|
|
8
|
+
import { CommonModule } from '@angular/common'
|
|
9
|
+
import {
|
|
10
|
+
DatasetDownloadDistribution,
|
|
11
|
+
OnlineLinkResource,
|
|
12
|
+
OnlineResource,
|
|
13
|
+
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
14
|
+
import { ThumbnailComponent } from '../../../../../../../libs/ui/elements/src'
|
|
15
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
16
|
+
import { bytesToMegabytes, getFileFormat } from '../../../../../../../libs/util/shared/src'
|
|
17
|
+
import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
18
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: 'gn-ui-online-resource-card',
|
|
22
|
+
standalone: true,
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
ThumbnailComponent,
|
|
26
|
+
MatIconModule,
|
|
27
|
+
ButtonComponent,
|
|
28
|
+
TranslateModule,
|
|
29
|
+
],
|
|
30
|
+
templateUrl: './online-resource-card.component.html',
|
|
31
|
+
styleUrls: ['./online-resource-card.component.css'],
|
|
32
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
33
|
+
})
|
|
34
|
+
export class OnlineResourceCardComponent {
|
|
35
|
+
@Input() onlineResource: OnlineResource
|
|
36
|
+
@Output() modifyClick = new EventEmitter<OnlineResource>()
|
|
37
|
+
|
|
38
|
+
get title(): string {
|
|
39
|
+
switch (this.onlineResource.type) {
|
|
40
|
+
case 'link':
|
|
41
|
+
case 'service':
|
|
42
|
+
case 'download':
|
|
43
|
+
return (
|
|
44
|
+
this.onlineResource.name ??
|
|
45
|
+
this.onlineResource.description ??
|
|
46
|
+
'(unknown)'
|
|
47
|
+
)
|
|
48
|
+
case 'endpoint':
|
|
49
|
+
return this.onlineResource.description
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get subtitle(): string {
|
|
54
|
+
switch (this.onlineResource.type) {
|
|
55
|
+
case 'service':
|
|
56
|
+
return `${this.onlineResource.accessServiceProtocol}`
|
|
57
|
+
case 'endpoint':
|
|
58
|
+
return `${this.onlineResource.protocol}`
|
|
59
|
+
case 'link':
|
|
60
|
+
case 'download':
|
|
61
|
+
return this.getFormat(this.onlineResource)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
get fileSize(): string {
|
|
66
|
+
if (this.onlineResource.type !== 'download') return ''
|
|
67
|
+
if (!this.onlineResource.sizeBytes) return ''
|
|
68
|
+
return bytesToMegabytes(this.onlineResource.sizeBytes).toLocaleString()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get identifierInService(): string {
|
|
72
|
+
if (this.onlineResource.type !== 'service') return ''
|
|
73
|
+
return this.onlineResource.identifierInService ?? ''
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
getFormat(onlineResource: OnlineLinkResource | DatasetDownloadDistribution) {
|
|
77
|
+
return (getFileFormat(onlineResource) || '').toUpperCase()
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<div class="flex flex-col gap-3">
|
|
2
2
|
<div class="flex flex-row flex-wrap gap-2" data-test="rolesToPick">
|
|
3
3
|
<ng-container *ngFor="let role of rolesToPick">
|
|
4
|
-
<gn-ui-button
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<div class="flex flex-row gap-1 items-center">
|
|
9
|
-
<span class="text-primary text-[20px] leading-[0] font-bold pb-[5px]"
|
|
10
|
-
>₊</span
|
|
11
|
-
>
|
|
12
|
-
<span class="font-bold" translate>{{ roleToLabel(role) }}</span>
|
|
13
|
-
</div>
|
|
4
|
+
<gn-ui-button type="gray" (buttonClick)="addRoleToDisplay(role)">
|
|
5
|
+
<mat-icon class="material-symbols-outlined text-primary">add</mat-icon>
|
|
6
|
+
|
|
7
|
+
<span translate>{{ roleToLabel(role) }}</span>
|
|
14
8
|
</gn-ui-button>
|
|
15
9
|
</ng-container>
|
|
16
10
|
</div>
|
|
@@ -43,23 +37,19 @@
|
|
|
43
37
|
[displayWithFn]="displayWithFn"
|
|
44
38
|
[minCharacterCount]="1"
|
|
45
39
|
[clearOnSelection]="true"
|
|
40
|
+
[allowSubmit]="false"
|
|
46
41
|
>
|
|
47
42
|
</gn-ui-autocomplete>
|
|
48
43
|
|
|
49
44
|
<ng-container *ngIf="contactsForRessourceByRole.get(role) as contacts">
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<gn-ui-contact-card
|
|
59
|
-
[contact]="contact"
|
|
60
|
-
(contactRemoved)="removeContact(index)"
|
|
61
|
-
></gn-ui-contact-card> </ng-container
|
|
62
|
-
></ng-container>
|
|
45
|
+
<gn-ui-sortable-list
|
|
46
|
+
[items]="contacts"
|
|
47
|
+
(itemsOrderChange)="handleContactsChanged($event)"
|
|
48
|
+
[elementTemplate]="contactTemplate"
|
|
49
|
+
></gn-ui-sortable-list>
|
|
50
|
+
<ng-template #contactTemplate let-contact>
|
|
51
|
+
<gn-ui-contact-card [contact]="contact"></gn-ui-contact-card>
|
|
52
|
+
</ng-template>
|
|
63
53
|
</ng-container>
|
|
64
54
|
|
|
65
55
|
<hr class="border-t-[#D6D3D1] mt-4 mb-6" *ngIf="!isLast" />
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import {
|
|
3
3
|
ChangeDetectionStrategy,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
4
|
Component,
|
|
6
5
|
EventEmitter,
|
|
7
6
|
Input,
|
|
@@ -18,10 +17,7 @@ import {
|
|
|
18
17
|
import { UserModel } from '../../../../../../../../../libs/common/domain/src/lib/model/user'
|
|
19
18
|
import { OrganizationsServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/organizations.service.interface'
|
|
20
19
|
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
21
|
-
import {
|
|
22
|
-
DynamicElement,
|
|
23
|
-
SortableListComponent,
|
|
24
|
-
} from '../../../../../../../../../libs/ui/elements/src'
|
|
20
|
+
import { SortableListComponent } from '../../../../../../../../../libs/ui/layout/src'
|
|
25
21
|
import {
|
|
26
22
|
AutocompleteComponent,
|
|
27
23
|
DropdownSelectorComponent,
|
|
@@ -34,11 +30,11 @@ import {
|
|
|
34
30
|
debounceTime,
|
|
35
31
|
distinctUntilChanged,
|
|
36
32
|
firstValueFrom,
|
|
37
|
-
Observable,
|
|
38
33
|
switchMap,
|
|
39
34
|
} from 'rxjs'
|
|
40
35
|
import { map } from 'rxjs/operators'
|
|
41
36
|
import { ContactCardComponent } from '../../../contact-card/contact-card.component'
|
|
37
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
42
38
|
|
|
43
39
|
@Component({
|
|
44
40
|
selector: 'gn-ui-form-field-contacts-for-resource',
|
|
@@ -55,6 +51,7 @@ import { ContactCardComponent } from '../../../contact-card/contact-card.compone
|
|
|
55
51
|
TranslateModule,
|
|
56
52
|
ContactCardComponent,
|
|
57
53
|
SortableListComponent,
|
|
54
|
+
MatIconModule,
|
|
58
55
|
],
|
|
59
56
|
})
|
|
60
57
|
export class FormFieldContactsForResourceComponent
|
|
@@ -65,8 +62,6 @@ export class FormFieldContactsForResourceComponent
|
|
|
65
62
|
|
|
66
63
|
contactsForRessourceByRole: Map<Role, Individual[]> = new Map()
|
|
67
64
|
|
|
68
|
-
contactsAsDynElemByRole: Map<Role, DynamicElement[]> = new Map()
|
|
69
|
-
|
|
70
65
|
rolesToPick: Role[] = [
|
|
71
66
|
'resource_provider',
|
|
72
67
|
'custodian',
|
|
@@ -133,35 +128,6 @@ export class FormFieldContactsForResourceComponent
|
|
|
133
128
|
|
|
134
129
|
return acc
|
|
135
130
|
}, new Map<Role, Individual[]>())
|
|
136
|
-
|
|
137
|
-
this.contactsAsDynElemByRole = this.value.reduce((acc, contact) => {
|
|
138
|
-
const completeOrganization = this.allOrganizations.get(
|
|
139
|
-
contact.organization.name
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
const updatedContact = {
|
|
143
|
-
...contact,
|
|
144
|
-
organization:
|
|
145
|
-
completeOrganization ??
|
|
146
|
-
({ name: contact.organization.name } as Organization),
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const contactAsDynElem = {
|
|
150
|
-
component: ContactCardComponent,
|
|
151
|
-
inputs: {
|
|
152
|
-
contact: updatedContact,
|
|
153
|
-
removable: false,
|
|
154
|
-
},
|
|
155
|
-
} as DynamicElement
|
|
156
|
-
|
|
157
|
-
if (!acc.has(contact.role)) {
|
|
158
|
-
acc.set(contact.role, [])
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
acc.get(contact.role).push(contactAsDynElem)
|
|
162
|
-
|
|
163
|
-
return acc
|
|
164
|
-
}, new Map<Role, DynamicElement[]>())
|
|
165
131
|
}
|
|
166
132
|
|
|
167
133
|
manageRoleSectionsToDisplay(contactsForResource: Individual[]) {
|
|
@@ -181,14 +147,11 @@ export class FormFieldContactsForResourceComponent
|
|
|
181
147
|
this.valueChange.emit(newContactsforRessource)
|
|
182
148
|
}
|
|
183
149
|
|
|
184
|
-
handleContactsChanged(
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
) as Individual[]
|
|
188
|
-
|
|
189
|
-
const role = newContactsOrdered[0].role
|
|
150
|
+
handleContactsChanged(items: unknown[]) {
|
|
151
|
+
const contacts = items as Individual[]
|
|
152
|
+
const role = contacts[0].role
|
|
190
153
|
|
|
191
|
-
this.contactsForRessourceByRole.set(role,
|
|
154
|
+
this.contactsForRessourceByRole.set(role, contacts)
|
|
192
155
|
|
|
193
156
|
const newControlValue = Array.from(
|
|
194
157
|
this.contactsForRessourceByRole.values()
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import { DatePickerComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
9
9
|
|
|
10
10
|
@Component({
|
|
11
|
-
selector: 'gn-ui-form-field-
|
|
12
|
-
templateUrl: './form-field-
|
|
13
|
-
styleUrls: ['./form-field-
|
|
11
|
+
selector: 'gn-ui-form-field-date-updated',
|
|
12
|
+
templateUrl: './form-field-date-updated.component.html',
|
|
13
|
+
styleUrls: ['./form-field-date-updated.component.css'],
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
standalone: true,
|
|
16
16
|
imports: [DatePickerComponent],
|
|
17
17
|
})
|
|
18
|
-
export class
|
|
18
|
+
export class FormFieldDateUpdatedComponent {
|
|
19
19
|
@Input() value: Date
|
|
20
20
|
@Output() valueChange: EventEmitter<Date> = new EventEmitter()
|
|
21
21
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<div class="flex flex-col gap-3">
|
|
2
2
|
<gn-ui-generic-keywords
|
|
3
|
-
[keywords]="
|
|
3
|
+
[keywords]="filteredKeywords"
|
|
4
4
|
[keywordTypes]="keywordTypes"
|
|
5
|
-
[placeholder]="placeholder | translate"
|
|
5
|
+
[placeholder]="'editor.form.keywords.placeholder' | translate"
|
|
6
6
|
(changedKeywords)="handleKeywordsChange($event)"
|
|
7
|
+
[allowSubmit]="false"
|
|
7
8
|
>
|
|
8
9
|
</gn-ui-generic-keywords>
|
|
9
10
|
</div>
|
|
@@ -16,6 +16,10 @@ import { Keyword } from '../../../../../../../../../libs/common/domain/src/lib/m
|
|
|
16
16
|
import { GenericKeywordsComponent } from '../../../generic-keywords/generic-keywords.component'
|
|
17
17
|
import { TranslateModule } from '@ngx-translate/core'
|
|
18
18
|
import { KeywordType } from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus'
|
|
19
|
+
import { EditorFacade } from '../../../../+state/editor.facade'
|
|
20
|
+
import { firstValueFrom, map } from 'rxjs'
|
|
21
|
+
import { SPATIAL_SCOPES } from '../../../../fields.config'
|
|
22
|
+
import { all } from 'ol/loadingstrategy'
|
|
19
23
|
|
|
20
24
|
@Component({
|
|
21
25
|
selector: 'gn-ui-form-field-keywords',
|
|
@@ -38,9 +42,37 @@ export class FormFieldKeywordsComponent {
|
|
|
38
42
|
@Output() valueChange: EventEmitter<Keyword[]> = new EventEmitter()
|
|
39
43
|
|
|
40
44
|
keywordTypes = ['temporal', 'theme', 'other'] as KeywordType[]
|
|
41
|
-
placeholder = 'editor.form.keywords.placeholder'
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
get filteredKeywords(): Keyword[] {
|
|
47
|
+
return (
|
|
48
|
+
this.value?.filter(
|
|
49
|
+
(keyword) =>
|
|
50
|
+
keyword.type !== 'place' && // filter out place keywords
|
|
51
|
+
!SPATIAL_SCOPES.some(
|
|
52
|
+
(spatialScope) => spatialScope.label === keyword.label
|
|
53
|
+
) // filter out keywords matching spatialScope keys
|
|
54
|
+
) || []
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
constructor(private editorFacade: EditorFacade) {}
|
|
59
|
+
|
|
60
|
+
async handleKeywordsChange(keywords: Keyword[]) {
|
|
61
|
+
const filteredKeywords = await firstValueFrom(
|
|
62
|
+
this.editorFacade.record$.pipe(
|
|
63
|
+
map((record) =>
|
|
64
|
+
record.keywords.filter(
|
|
65
|
+
(k) =>
|
|
66
|
+
k.type === 'place' || // get back place keyword
|
|
67
|
+
SPATIAL_SCOPES.some(
|
|
68
|
+
(spatialScope) => spatialScope.label === k.label // get back spatialScope keywords
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const allKeywords = [...filteredKeywords, ...keywords]
|
|
76
|
+
this.valueChange.emit(allKeywords)
|
|
45
77
|
}
|
|
46
78
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<gn-ui-file-input
|
|
2
|
+
[maxSizeMB]="MAX_UPLOAD_SIZE_MB"
|
|
3
|
+
(fileChange)="handleFileChange($event)"
|
|
4
|
+
(uploadCancel)="handleUploadCancel()"
|
|
5
|
+
[uploadProgress]="uploadProgress"
|
|
6
|
+
(urlChange)="handleUrlChange($event)"
|
|
7
|
+
></gn-ui-file-input>
|
|
8
|
+
<div class="h-[8px]"></div>
|
|
9
|
+
<gn-ui-sortable-list
|
|
10
|
+
[items]="linkResources"
|
|
11
|
+
(itemsOrderChange)="handleResourcesChange($event)"
|
|
12
|
+
[elementTemplate]="template"
|
|
13
|
+
>
|
|
14
|
+
</gn-ui-sortable-list>
|
|
15
|
+
<ng-template #template let-onlineResource let-index="index">
|
|
16
|
+
<gn-ui-online-resource-card
|
|
17
|
+
[onlineResource]="onlineResource"
|
|
18
|
+
(modifyClick)="handleResourceModify(onlineResource, index)"
|
|
19
|
+
></gn-ui-online-resource-card>
|
|
20
|
+
</ng-template>
|
|
21
|
+
|
|
22
|
+
<ng-template #dialogTemplate let-onlineResource>
|
|
23
|
+
<h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
|
|
24
|
+
editor.record.form.field.onlineResource.edit.title
|
|
25
|
+
</h3>
|
|
26
|
+
<gn-ui-text-input
|
|
27
|
+
extraClass="mb-[16px]"
|
|
28
|
+
[(value)]="onlineResource.name"
|
|
29
|
+
></gn-ui-text-input>
|
|
30
|
+
<h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
|
|
31
|
+
editor.record.form.field.onlineResource.edit.description
|
|
32
|
+
</h3>
|
|
33
|
+
<gn-ui-text-area [(value)]="onlineResource.description"></gn-ui-text-area>
|
|
34
|
+
</ng-template>
|