geonetwork-ui 2.3.0-dev.6e2b8bea → 2.3.0-dev.82249397
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +6 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +2 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.mjs +1 -1
- package/esm2022/libs/api/repository/src/lib/gn4/auth/gravatar.service.mjs +12 -1
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +36 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +19 -7
- package/esm2022/libs/common/domain/src/lib/model/record/index.mjs +2 -1
- package/esm2022/libs/common/domain/src/lib/model/record/user-feedbacks.model.mjs +2 -0
- package/esm2022/libs/common/domain/src/lib/model/user/index.mjs +2 -0
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +35 -7
- package/esm2022/libs/data-access/gn4/src/openapi/model/models.mjs +1 -2
- 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 +36 -3
- package/esm2022/libs/feature/editor/src/index.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +64 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +15 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +104 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +126 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +29 -0
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +23 -1
- package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +73 -20
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +29 -8
- package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
- package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
- package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
- package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
- package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +4 -3
- package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +22 -4
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +37 -10
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +22 -7
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +52 -17
- package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +18 -3
- package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +2 -2
- package/esm2022/libs/feature/search/src/index.mjs +2 -1
- package/esm2022/libs/feature/search/src/lib/results-layout/results-layout.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +1 -1
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +1 -1
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
- package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/index.mjs +15 -15
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +16 -3
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +77 -15
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +14 -10
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +59 -0
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +62 -0
- package/esm2022/libs/ui/inputs/src/index.mjs +16 -16
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.mjs +4 -3
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +22 -0
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +7 -5
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +19 -8
- package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +59 -0
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +183 -0
- package/esm2022/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +29 -0
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +27 -4
- package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +21 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +21 -31
- package/esm2022/libs/ui/layout/src/index.mjs +7 -5
- package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +76 -0
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +42 -18
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +3 -8
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +22 -1
- package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -0
- package/esm2022/libs/util/shared/src/lib/utils/image-resize.mjs +60 -0
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +8 -6
- package/esm2022/translations/de.json +41 -0
- package/esm2022/translations/en.json +41 -0
- package/esm2022/translations/es.json +41 -0
- package/esm2022/translations/fr.json +41 -0
- package/esm2022/translations/it.json +41 -0
- package/esm2022/translations/nl.json +41 -0
- package/esm2022/translations/pt.json +41 -0
- package/fesm2022/geonetwork-ui.mjs +3434 -1787
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +6 -2
- 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 +9 -6
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/index.d.ts +1 -0
- package/libs/common/domain/src/lib/model/record/index.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts +15 -0
- package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts.map +1 -0
- package/libs/common/domain/src/lib/model/user/index.d.ts +2 -0
- package/libs/common/domain/src/lib/model/user/index.d.ts.map +1 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +9 -5
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/model/models.d.ts +0 -1
- package/libs/data-access/gn4/src/openapi/model/models.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +3 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -1
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +8 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.d.ts +2 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts +21 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +13 -4
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -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.map +1 -1
- package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +10 -5
- 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/map-context/map-context.model.d.ts +1 -0
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/notifications/src/index.d.ts +4 -0
- package/libs/feature/notifications/src/index.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
- package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
- package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
- package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts +40 -6
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +24 -4
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +14 -4
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +8 -5
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +12 -9
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +1 -0
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts +3 -3
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +14 -14
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +3 -1
- 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 +13 -0
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +12 -3
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +29 -28
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +11 -0
- package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +22 -0
- package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/index.d.ts +15 -15
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts +9 -0
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +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/dropdown-selector/dropdown-selector.component.d.ts +2 -1
- package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts +14 -0
- package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +44 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts +12 -0
- package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +7 -1
- 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 +5 -1
- 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 +35 -42
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +6 -4
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +25 -0
- package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts +13 -6
- package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts +4 -5
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +18 -0
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/image-resize.d.ts +3 -0
- package/libs/util/shared/src/lib/utils/image-resize.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts +7 -5
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +7 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +1 -4
- package/src/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.ts +1 -0
- package/src/libs/api/repository/src/lib/gn4/auth/gravatar.service.ts +12 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +51 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +34 -7
- package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/user-feedbacks.model.ts +15 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -0
- package/src/libs/common/fixtures/src/index.ts +8 -6
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +8 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
- package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
- package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +43 -12
- package/src/libs/data-access/gn4/src/openapi/model/models.ts +0 -1
- package/src/libs/data-access/gn4/src/spec.yaml +1 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +52 -2
- package/src/libs/feature/editor/src/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +8 -0
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +70 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.ts +1 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.ts +4 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.html +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.ts +15 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.ts +4 -1
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css +0 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +14 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +143 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +97 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +142 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -0
- package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
- package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +4 -4
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
- package/src/libs/feature/editor/src/lib/fields.config.ts +22 -0
- package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +7 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +32 -18
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +72 -17
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +1 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +26 -8
- package/src/libs/feature/notifications/src/index.ts +3 -0
- package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
- package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
- package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
- package/src/libs/feature/record/src/lib/feature-record.module.ts +5 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +51 -6
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +82 -7
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +48 -8
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +81 -24
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +40 -10
- package/src/libs/feature/router/src/lib/default/state/router.effects.ts +2 -2
- package/src/libs/feature/search/src/index.ts +1 -0
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -2
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
- package/src/libs/ui/elements/src/index.ts +14 -14
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +2 -1
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +38 -20
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +12 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
- package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
- package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
- package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +27 -11
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +87 -8
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -3
- package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +54 -0
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.css +0 -0
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +75 -0
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +63 -0
- package/src/libs/ui/inputs/src/index.ts +15 -15
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.ts +3 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +3 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +11 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +16 -0
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +8 -1
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -0
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +14 -0
- package/src/libs/ui/inputs/src/lib/files-drop/files-drop.directive.ts +45 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +146 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +193 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.css +6 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.html +26 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.ts +32 -0
- 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 +29 -0
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +2 -1
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +17 -1
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +6 -22
- package/src/libs/ui/layout/src/index.ts +6 -4
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +23 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +20 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +84 -0
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +8 -4
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +4 -4
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.ts +45 -15
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
- package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -2
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +21 -0
- package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +3 -0
- package/src/libs/util/shared/src/lib/utils/image-resize.ts +72 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +7 -5
- package/tailwind.base.css +36 -0
- package/translations/de.json +41 -0
- package/translations/en.json +41 -0
- package/translations/es.json +41 -0
- package/translations/fr.json +41 -0
- package/translations/it.json +41 -0
- package/translations/nl.json +41 -0
- package/translations/pt.json +41 -0
- package/translations/sk.json +41 -0
- package/esm2022/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.mjs +0 -13
- package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
- package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
- package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts +0 -18
- package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
- package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
- package/src/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.ts +0 -18
- package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
- package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
- package/src/libs/ui/inputs/src/lib/form-field/form-field.component.html +0 -68
- package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +0 -80
- /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
- /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
- /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/overview-upload/overview-upload.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MeResponseApiModel,
|
|
3
3
|
UserApiModel,
|
|
4
|
+
UserFeedbackDTOApiModel,
|
|
4
5
|
} from '../../../../../../../libs/data-access/gn4/src'
|
|
5
6
|
import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
|
|
6
7
|
import { Injectable } from '@angular/core'
|
|
7
|
-
import { AvatarServiceInterface } from '../auth
|
|
8
|
+
import { AvatarServiceInterface } from '../auth'
|
|
8
9
|
import { map } from 'rxjs/operators'
|
|
9
10
|
import { Observable, of } from 'rxjs'
|
|
10
11
|
import { ThesaurusModel } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus/thesaurus.model'
|
|
12
|
+
import {
|
|
13
|
+
UserFeedback,
|
|
14
|
+
UserFeedbackViewModel,
|
|
15
|
+
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
11
16
|
|
|
12
17
|
@Injectable()
|
|
13
18
|
export class Gn4PlatformMapper {
|
|
14
19
|
constructor(private avatarService: AvatarServiceInterface) {}
|
|
20
|
+
|
|
15
21
|
userFromMeApi(apiUser: MeResponseApiModel): Observable<UserModel | null> {
|
|
16
22
|
if (!apiUser) return of(null)
|
|
17
23
|
const {
|
|
@@ -28,6 +34,7 @@ export class Gn4PlatformMapper {
|
|
|
28
34
|
.getProfileIcon(hash)
|
|
29
35
|
.pipe(map((profileIcon) => ({ ...user, profileIcon } as UserModel)))
|
|
30
36
|
}
|
|
37
|
+
|
|
31
38
|
userFromApi(apiUser: UserApiModel): UserModel {
|
|
32
39
|
if (!apiUser) return null
|
|
33
40
|
const {
|
|
@@ -65,4 +72,47 @@ export class Gn4PlatformMapper {
|
|
|
65
72
|
}
|
|
66
73
|
})
|
|
67
74
|
}
|
|
75
|
+
|
|
76
|
+
userFeedbacksFromApi(userFeedback: any): UserFeedback {
|
|
77
|
+
return {
|
|
78
|
+
uuid: userFeedback.uuid,
|
|
79
|
+
metadataUUID: userFeedback.metadataUUID,
|
|
80
|
+
comment: userFeedback.comment,
|
|
81
|
+
authorUserId: userFeedback.authorUserId.toString(),
|
|
82
|
+
authorName: userFeedback.authorName,
|
|
83
|
+
authorEmail: userFeedback.authorEmail,
|
|
84
|
+
published: userFeedback.published,
|
|
85
|
+
parentUuid: userFeedback.parentUuid ?? undefined,
|
|
86
|
+
date: new Date(userFeedback.date),
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
userFeedbacksToApi(
|
|
91
|
+
userFeedback: UserFeedback
|
|
92
|
+
): Partial<UserFeedbackDTOApiModel> {
|
|
93
|
+
return {
|
|
94
|
+
uuid: userFeedback.uuid,
|
|
95
|
+
metadataUUID: userFeedback.metadataUUID,
|
|
96
|
+
comment: userFeedback.comment,
|
|
97
|
+
authorUserId: Number.parseInt(userFeedback.authorUserId),
|
|
98
|
+
authorName: userFeedback.authorName,
|
|
99
|
+
authorEmail: userFeedback.authorEmail,
|
|
100
|
+
published: userFeedback.published,
|
|
101
|
+
parentUuid: userFeedback.parentUuid,
|
|
102
|
+
date: userFeedback.date.getTime().toString(),
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async createUserFeedbackViewModel(
|
|
107
|
+
baseUserFeedback: UserFeedback
|
|
108
|
+
): Promise<UserFeedbackViewModel> {
|
|
109
|
+
const userAvatarUrl = await this.avatarService.getProfileIconUrl(
|
|
110
|
+
baseUserFeedback.authorUserId?.toString()
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
...baseUserFeedback,
|
|
115
|
+
avatarUrl: userAvatarUrl,
|
|
116
|
+
}
|
|
117
|
+
}
|
|
68
118
|
}
|
|
@@ -6,11 +6,15 @@ import {
|
|
|
6
6
|
RegistriesApiService,
|
|
7
7
|
SiteApiService,
|
|
8
8
|
ToolsApiService,
|
|
9
|
+
UserfeedbackApiService,
|
|
9
10
|
UsersApiService,
|
|
10
11
|
} from '../../../../../../../libs/data-access/gn4/src'
|
|
11
12
|
import { PlatformServiceInterface } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
12
13
|
import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
Organization,
|
|
16
|
+
UserFeedback,
|
|
17
|
+
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
14
18
|
import { Gn4PlatformMapper } from './gn4-platform.mapper'
|
|
15
19
|
import { ltr } from 'semver'
|
|
16
20
|
import { ThesaurusModel } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus/thesaurus.model'
|
|
@@ -21,9 +25,9 @@ const minApiVersion = '4.2.2'
|
|
|
21
25
|
@Injectable()
|
|
22
26
|
export class Gn4PlatformService implements PlatformServiceInterface {
|
|
23
27
|
private readonly type = 'GeoNetwork'
|
|
24
|
-
private me$: Observable<UserModel>
|
|
25
|
-
private users$: Observable<UserModel[]>
|
|
26
|
-
private
|
|
28
|
+
private readonly me$: Observable<UserModel>
|
|
29
|
+
private readonly users$: Observable<UserModel[]>
|
|
30
|
+
private readonly isUserAnonymous$: Observable<boolean>
|
|
27
31
|
|
|
28
32
|
private keyTranslations$ = this.toolsApiService
|
|
29
33
|
.getTranslationsPackage1('gnui')
|
|
@@ -65,13 +69,18 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
65
69
|
private mapper: Gn4PlatformMapper,
|
|
66
70
|
private toolsApiService: ToolsApiService,
|
|
67
71
|
private registriesApiService: RegistriesApiService,
|
|
68
|
-
private langService: LangService
|
|
72
|
+
private langService: LangService,
|
|
73
|
+
private userfeedbackApiService: UserfeedbackApiService
|
|
69
74
|
) {
|
|
70
75
|
this.me$ = this.meApi.getMe().pipe(
|
|
71
76
|
switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)),
|
|
72
77
|
shareReplay({ bufferSize: 1, refCount: true })
|
|
73
78
|
)
|
|
74
|
-
|
|
79
|
+
|
|
80
|
+
this.isUserAnonymous$ = this.me$.pipe(
|
|
81
|
+
map((user) => !user || !('id' in user))
|
|
82
|
+
)
|
|
83
|
+
|
|
75
84
|
this.users$ = this.usersApi.getUsers().pipe(
|
|
76
85
|
map((users) => users.map((user) => this.mapper.userFromApi(user))),
|
|
77
86
|
shareReplay()
|
|
@@ -91,7 +100,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
isAnonymous(): Observable<boolean> {
|
|
94
|
-
return this.
|
|
103
|
+
return this.isUserAnonymous$
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
getOrganizations(): Observable<Organization[]> {
|
|
@@ -148,6 +157,24 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
148
157
|
),
|
|
149
158
|
shareReplay(1)
|
|
150
159
|
)
|
|
160
|
+
|
|
151
161
|
return this.thesauri[uri]
|
|
152
162
|
}
|
|
163
|
+
|
|
164
|
+
getUserFeedbacks(uuid: string): Observable<UserFeedback[]> {
|
|
165
|
+
return this.userfeedbackApiService
|
|
166
|
+
.getUserComments(uuid)
|
|
167
|
+
.pipe(
|
|
168
|
+
map((userFeedbacks) =>
|
|
169
|
+
userFeedbacks.map(this.mapper.userFeedbacksFromApi)
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
postUserFeedbacks(userFeedback: UserFeedback): Observable<void> {
|
|
175
|
+
const mappedUserFeedBack = this.mapper.userFeedbacksToApi(userFeedback)
|
|
176
|
+
return this.userfeedbackApiService
|
|
177
|
+
.newUserFeedback(mappedUserFeedBack)
|
|
178
|
+
.pipe(map(() => undefined))
|
|
179
|
+
}
|
|
153
180
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UserFeedback {
|
|
2
|
+
uuid: string
|
|
3
|
+
comment: string
|
|
4
|
+
metadataUUID: string
|
|
5
|
+
authorUserId: string
|
|
6
|
+
authorName: string
|
|
7
|
+
authorEmail: string
|
|
8
|
+
published: boolean
|
|
9
|
+
parentUuid?: string
|
|
10
|
+
date: Date
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UserFeedbackViewModel extends UserFeedback {
|
|
14
|
+
avatarUrl: string
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { Observable } from 'rxjs'
|
|
|
2
2
|
import type { UserModel } from './model/user/user.model'
|
|
3
3
|
import type { Organization } from './model/record/organization.model'
|
|
4
4
|
import type { ThesaurusModel } from './model/thesaurus/'
|
|
5
|
+
import { UserFeedback } from './model/record'
|
|
5
6
|
|
|
6
7
|
export abstract class PlatformServiceInterface {
|
|
7
8
|
abstract getType(): string
|
|
@@ -16,4 +17,6 @@ export abstract class PlatformServiceInterface {
|
|
|
16
17
|
abstract getOrganizations(): Observable<Organization[]>
|
|
17
18
|
abstract translateKey(key: string): Observable<string>
|
|
18
19
|
abstract getThesaurusByUri(uri: string): Observable<ThesaurusModel>
|
|
20
|
+
abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
|
|
21
|
+
abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
|
|
19
22
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
export * from './lib/elasticsearch'
|
|
2
|
+
export * from './lib/gn4'
|
|
3
|
+
export * from './lib/search'
|
|
4
|
+
|
|
1
5
|
export * from './lib/geojson.fixtures'
|
|
6
|
+
export * from './lib/link.fixtures'
|
|
2
7
|
export * from './lib/ol-feature.fixture'
|
|
8
|
+
export * from './lib/organisations.fixture'
|
|
3
9
|
export * from './lib/record-link.fixtures'
|
|
4
|
-
export * from './lib/link.fixtures'
|
|
5
10
|
export * from './lib/records.fixtures'
|
|
6
|
-
export * from './lib/organisations.fixture'
|
|
7
|
-
export * from './lib/elasticsearch'
|
|
8
|
-
export * from './lib/search'
|
|
9
|
-
export * from './lib/user.fixtures'
|
|
10
11
|
export * from './lib/repository.fixtures'
|
|
11
|
-
export * from './lib/
|
|
12
|
+
export * from './lib/user.fixtures'
|
|
13
|
+
export * from './lib/user-feedbacks.fixtures'
|
|
@@ -110,6 +110,14 @@ export const LINK_FIXTURES: Record<string, DatasetDistribution> = deepFreeze({
|
|
|
110
110
|
url: new URL('https://my.ogc.server/wfs'),
|
|
111
111
|
accessServiceProtocol: 'wfs',
|
|
112
112
|
},
|
|
113
|
+
geodataWfsDownload: {
|
|
114
|
+
name: 'mylayer',
|
|
115
|
+
type: 'download',
|
|
116
|
+
url: new URL(
|
|
117
|
+
'https://my.ogc.server/wfs?GetFeature&FeatureType=surval_parametre_ligne&format=csv'
|
|
118
|
+
),
|
|
119
|
+
accessServiceProtocol: 'wfs',
|
|
120
|
+
},
|
|
113
121
|
geodataWms2: {
|
|
114
122
|
name: 'myotherlayer',
|
|
115
123
|
type: 'service',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DatasetRecord } from '../../../../../libs/common/domain/src/lib/model/record'
|
|
2
|
-
import { deepFreeze } from './utils
|
|
2
|
+
import { deepFreeze } from './utils'
|
|
3
3
|
|
|
4
4
|
export const DATASET_RECORDS: DatasetRecord[] = deepFreeze([
|
|
5
5
|
{
|
|
@@ -49,8 +49,8 @@ export const DATASET_RECORDS: DatasetRecord[] = deepFreeze([
|
|
|
49
49
|
status: 'ongoing',
|
|
50
50
|
recordCreated: new Date('2022-02-01T15:12:00'),
|
|
51
51
|
recordUpdated: new Date('2022-02-01T15:12:00'),
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
resourceCreated: new Date('2022-09-01T14:18:19'),
|
|
53
|
+
resourceUpdated: new Date('2022-12-04T15:12:00'),
|
|
54
54
|
title: 'A very interesting dataset (un jeu de données très intéressant)',
|
|
55
55
|
abstract: `# Introduction
|
|
56
56
|
This dataset has been established for testing purposes.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { UserFeedback } from '../../../../../libs/common/domain/src/lib/model/record'
|
|
2
|
+
import { deepFreeze } from './utils'
|
|
3
|
+
|
|
4
|
+
export const SOME_USER_FEEDBACKS: UserFeedback[] = deepFreeze([
|
|
5
|
+
{
|
|
6
|
+
uuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
|
|
7
|
+
comment: 'A nice comment.',
|
|
8
|
+
metadataUUID: 'my-dataset-001',
|
|
9
|
+
authorUserId: '46798',
|
|
10
|
+
authorName: 'Arnaud De Maison',
|
|
11
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
12
|
+
published: true,
|
|
13
|
+
parentUuid: undefined,
|
|
14
|
+
date: new Date('2023-01-01T08:00:00Z'),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
uuid: '52cbd0f1-9cb9-4409-8e85-bc608f049af4',
|
|
18
|
+
comment: 'A very nice comment that is a reply.',
|
|
19
|
+
metadataUUID: 'my-dataset-001',
|
|
20
|
+
authorUserId: '46798',
|
|
21
|
+
authorName: 'Arnaud De Maison',
|
|
22
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
23
|
+
published: true,
|
|
24
|
+
parentUuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
|
|
25
|
+
date: new Date('2023-01-01T09:00:00Z'),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
uuid: 'b48f62ec-b5e6-4d27-a396-2c2b44f6dcb5',
|
|
29
|
+
comment: 'Another nice comment.',
|
|
30
|
+
metadataUUID: 'my-dataset-001',
|
|
31
|
+
authorUserId: '46798',
|
|
32
|
+
authorName: 'Arnaud De Maison',
|
|
33
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
34
|
+
published: true,
|
|
35
|
+
parentUuid: undefined,
|
|
36
|
+
date: new Date('2023-01-01T10:00:00Z'),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
uuid: '1f12a3be-fc8a-4e83-968f-9b88ffbcab02',
|
|
40
|
+
comment: 'Another very nice reply.',
|
|
41
|
+
metadataUUID: 'my-dataset-001',
|
|
42
|
+
authorUserId: '46798',
|
|
43
|
+
authorName: 'Arnaud De Maison',
|
|
44
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
45
|
+
published: true,
|
|
46
|
+
parentUuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
|
|
47
|
+
date: new Date('2023-01-01T11:00:00Z'),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
uuid: 'f8dd778d-e93c-4b3c-ba9b-9574be070f46',
|
|
51
|
+
comment: 'Another nice comment.',
|
|
52
|
+
metadataUUID: 'my-dataset-001',
|
|
53
|
+
authorUserId: '46798',
|
|
54
|
+
authorName: 'Arnaud De Maison',
|
|
55
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
56
|
+
published: true,
|
|
57
|
+
parentUuid: undefined,
|
|
58
|
+
date: new Date('2023-01-01T10:00:00Z'),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
uuid: 'df3b8872-61d1-4ae9-8822-bb070b94d7d1',
|
|
62
|
+
comment: 'Another nice comment.',
|
|
63
|
+
metadataUUID: 'my-dataset-001',
|
|
64
|
+
authorUserId: '46798',
|
|
65
|
+
authorName: 'Arnaud De Maison',
|
|
66
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
67
|
+
published: true,
|
|
68
|
+
parentUuid: undefined,
|
|
69
|
+
date: new Date('2023-01-01T11:00:00Z'),
|
|
70
|
+
},
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
export const A_USER_FEEDBACK: UserFeedback = deepFreeze({
|
|
74
|
+
uuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
|
|
75
|
+
comment: 'A nice comment.',
|
|
76
|
+
metadataUUID: 'my-dataset-001',
|
|
77
|
+
authorUserId: '46798',
|
|
78
|
+
authorName: 'Arnaud De Maison',
|
|
79
|
+
authorEmail: 'a.demaison@geo2france.fr',
|
|
80
|
+
published: true,
|
|
81
|
+
parentUuid: undefined,
|
|
82
|
+
date: new Date('2023-01-01T08:00:00Z'),
|
|
83
|
+
})
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
import { ExtentDtoApiModel } from '../model/models'
|
|
31
31
|
import { FeatureResponseApiModel } from '../model/models'
|
|
32
32
|
import { IProcessingReportApiModel } from '../model/models'
|
|
33
|
-
import { InlineObject3ApiModel } from '../model/models'
|
|
34
33
|
import { MetadataBatchApproveParameterApiModel } from '../model/models'
|
|
35
34
|
import { MetadataBatchSubmitParameterApiModel } from '../model/models'
|
|
36
35
|
import { MetadataCategoryApiModel } from '../model/models'
|
|
@@ -75,6 +74,20 @@ export class RecordsApiService {
|
|
|
75
74
|
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec()
|
|
76
75
|
}
|
|
77
76
|
|
|
77
|
+
/**
|
|
78
|
+
* @param consumes string[] mime-types
|
|
79
|
+
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
|
80
|
+
*/
|
|
81
|
+
private canConsumeForm(consumes: string[]): boolean {
|
|
82
|
+
const form = 'multipart/form-data'
|
|
83
|
+
for (const consume of consumes) {
|
|
84
|
+
if (form === consume) {
|
|
85
|
+
return true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
|
|
78
91
|
private addToHttpParams(
|
|
79
92
|
httpParams: HttpParams,
|
|
80
93
|
value: any,
|
|
@@ -8290,44 +8303,44 @@ export class RecordsApiService {
|
|
|
8290
8303
|
/**
|
|
8291
8304
|
* Create a new resource for a given metadata
|
|
8292
8305
|
* @param metadataUuid The metadata UUID
|
|
8306
|
+
* @param file The file to upload
|
|
8293
8307
|
* @param visibility The sharing policy
|
|
8294
8308
|
* @param approved Use approved version or not
|
|
8295
|
-
* @param inlineObject3ApiModel
|
|
8296
8309
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
8297
8310
|
* @param reportProgress flag to report request and response progress.
|
|
8298
8311
|
*/
|
|
8299
8312
|
public putResource(
|
|
8300
8313
|
metadataUuid: string,
|
|
8314
|
+
file: Blob,
|
|
8301
8315
|
visibility?: 'public' | 'private',
|
|
8302
8316
|
approved?: boolean,
|
|
8303
|
-
inlineObject3ApiModel?: InlineObject3ApiModel,
|
|
8304
8317
|
observe?: 'body',
|
|
8305
8318
|
reportProgress?: boolean,
|
|
8306
8319
|
options?: { httpHeaderAccept?: 'application/json' }
|
|
8307
8320
|
): Observable<MetadataResourceApiModel>
|
|
8308
8321
|
public putResource(
|
|
8309
8322
|
metadataUuid: string,
|
|
8323
|
+
file: Blob,
|
|
8310
8324
|
visibility?: 'public' | 'private',
|
|
8311
8325
|
approved?: boolean,
|
|
8312
|
-
inlineObject3ApiModel?: InlineObject3ApiModel,
|
|
8313
8326
|
observe?: 'response',
|
|
8314
8327
|
reportProgress?: boolean,
|
|
8315
8328
|
options?: { httpHeaderAccept?: 'application/json' }
|
|
8316
8329
|
): Observable<HttpResponse<MetadataResourceApiModel>>
|
|
8317
8330
|
public putResource(
|
|
8318
8331
|
metadataUuid: string,
|
|
8332
|
+
file: Blob,
|
|
8319
8333
|
visibility?: 'public' | 'private',
|
|
8320
8334
|
approved?: boolean,
|
|
8321
|
-
inlineObject3ApiModel?: InlineObject3ApiModel,
|
|
8322
8335
|
observe?: 'events',
|
|
8323
8336
|
reportProgress?: boolean,
|
|
8324
8337
|
options?: { httpHeaderAccept?: 'application/json' }
|
|
8325
8338
|
): Observable<HttpEvent<MetadataResourceApiModel>>
|
|
8326
8339
|
public putResource(
|
|
8327
8340
|
metadataUuid: string,
|
|
8341
|
+
file: Blob,
|
|
8328
8342
|
visibility?: 'public' | 'private',
|
|
8329
8343
|
approved?: boolean,
|
|
8330
|
-
inlineObject3ApiModel?: InlineObject3ApiModel,
|
|
8331
8344
|
observe: any = 'body',
|
|
8332
8345
|
reportProgress: boolean = false,
|
|
8333
8346
|
options?: { httpHeaderAccept?: 'application/json' }
|
|
@@ -8337,6 +8350,11 @@ export class RecordsApiService {
|
|
|
8337
8350
|
'Required parameter metadataUuid was null or undefined when calling putResource.'
|
|
8338
8351
|
)
|
|
8339
8352
|
}
|
|
8353
|
+
if (file === null || file === undefined) {
|
|
8354
|
+
throw new Error(
|
|
8355
|
+
'Required parameter file was null or undefined when calling putResource.'
|
|
8356
|
+
)
|
|
8357
|
+
}
|
|
8340
8358
|
|
|
8341
8359
|
let queryParameters = new HttpParams({ encoder: this.encoder })
|
|
8342
8360
|
if (visibility !== undefined && visibility !== null) {
|
|
@@ -8369,11 +8387,24 @@ export class RecordsApiService {
|
|
|
8369
8387
|
}
|
|
8370
8388
|
|
|
8371
8389
|
// to determine the Content-Type header
|
|
8372
|
-
const consumes: string[] = ['
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8390
|
+
const consumes: string[] = ['multipart/form-data']
|
|
8391
|
+
|
|
8392
|
+
const canConsumeForm = this.canConsumeForm(consumes)
|
|
8393
|
+
|
|
8394
|
+
let formParams: { append(param: string, value: any): any }
|
|
8395
|
+
let useForm = false
|
|
8396
|
+
let convertFormParamsToString = false
|
|
8397
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
8398
|
+
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
8399
|
+
useForm = canConsumeForm
|
|
8400
|
+
if (useForm) {
|
|
8401
|
+
formParams = new FormData()
|
|
8402
|
+
} else {
|
|
8403
|
+
formParams = new HttpParams({ encoder: this.encoder })
|
|
8404
|
+
}
|
|
8405
|
+
|
|
8406
|
+
if (file !== undefined) {
|
|
8407
|
+
formParams = (formParams.append('file', <any>file) as any) || formParams
|
|
8377
8408
|
}
|
|
8378
8409
|
|
|
8379
8410
|
let responseType_: 'text' | 'json' = 'json'
|
|
@@ -8388,7 +8419,7 @@ export class RecordsApiService {
|
|
|
8388
8419
|
`${this.configuration.basePath}/records/${encodeURIComponent(
|
|
8389
8420
|
String(metadataUuid)
|
|
8390
8421
|
)}/attachments`,
|
|
8391
|
-
|
|
8422
|
+
convertFormParamsToString ? formParams.toString() : formParams,
|
|
8392
8423
|
{
|
|
8393
8424
|
params: queryParameters,
|
|
8394
8425
|
responseType: <any>responseType_,
|
|
@@ -33,7 +33,6 @@ export * from './iProcessingReport.api.model'
|
|
|
33
33
|
export * from './iSODate.api.model'
|
|
34
34
|
export * from './infoReport.api.model'
|
|
35
35
|
export * from './inlineObject1.api.model'
|
|
36
|
-
export * from './inlineObject3.api.model'
|
|
37
36
|
export * from './inlineObject4.api.model'
|
|
38
37
|
export * from './isoLanguage.api.model'
|
|
39
38
|
export * from './jSONObject.api.model'
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core'
|
|
2
2
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
OgcApiCollectionInfo,
|
|
5
|
+
OgcApiEndpoint,
|
|
6
|
+
WfsEndpoint,
|
|
7
|
+
WfsVersion,
|
|
8
|
+
} from '@camptocamp/ogc-client'
|
|
4
9
|
import {
|
|
5
10
|
BaseReader,
|
|
6
11
|
FetchError,
|
|
@@ -27,6 +32,7 @@ marker('wfs.unreachable.http')
|
|
|
27
32
|
marker('wfs.unreachable.unknown')
|
|
28
33
|
marker('wfs.featuretype.notfound')
|
|
29
34
|
marker('wfs.geojsongml.notsupported')
|
|
35
|
+
marker('ogc.unreachable.unknown')
|
|
30
36
|
marker('dataset.error.network')
|
|
31
37
|
marker('dataset.error.http')
|
|
32
38
|
marker('dataset.error.parse')
|
|
@@ -94,7 +100,7 @@ export class DataService {
|
|
|
94
100
|
),
|
|
95
101
|
geojson: endpoint.supportsJson(featureType.name)
|
|
96
102
|
? endpoint.getFeatureUrl(featureType.name, {
|
|
97
|
-
|
|
103
|
+
asJson: true,
|
|
98
104
|
outputCrs: 'EPSG:4326',
|
|
99
105
|
})
|
|
100
106
|
: null,
|
|
@@ -148,6 +154,35 @@ export class DataService {
|
|
|
148
154
|
)
|
|
149
155
|
}
|
|
150
156
|
|
|
157
|
+
async getDownloadLinksFromOgcApiFeatures(
|
|
158
|
+
ogcApiLink: DatasetServiceDistribution
|
|
159
|
+
): Promise<DatasetDistribution[]> {
|
|
160
|
+
const collectionInfo = await this.getDownloadUrlsFromOgcApi(
|
|
161
|
+
ogcApiLink.url.href
|
|
162
|
+
)
|
|
163
|
+
return Object.keys(collectionInfo.bulkDownloadLinks).map((downloadLink) => {
|
|
164
|
+
return {
|
|
165
|
+
...ogcApiLink,
|
|
166
|
+
type: 'download',
|
|
167
|
+
url: new URL(collectionInfo.bulkDownloadLinks[downloadLink]),
|
|
168
|
+
mimeType: getMimeTypeForFormat(
|
|
169
|
+
getFileFormatFromServiceOutput(downloadLink)
|
|
170
|
+
),
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
async getDownloadUrlsFromOgcApi(url: string): Promise<OgcApiCollectionInfo> {
|
|
176
|
+
const endpoint = new OgcApiEndpoint(this.proxy.getProxiedUrl(url))
|
|
177
|
+
return await endpoint.featureCollections
|
|
178
|
+
.then((collections) => {
|
|
179
|
+
return endpoint.getCollectionInfo(collections[0])
|
|
180
|
+
})
|
|
181
|
+
.catch((error) => {
|
|
182
|
+
throw new Error(`ogc.unreachable.unknown`)
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
|
|
151
186
|
getDownloadLinksFromEsriRest(
|
|
152
187
|
esriRestLink: DatasetServiceDistribution
|
|
153
188
|
): DatasetDistribution[] {
|
|
@@ -205,6 +240,21 @@ export class DataService {
|
|
|
205
240
|
'geojson'
|
|
206
241
|
)
|
|
207
242
|
return from(openDataset(url, 'geojson')).pipe()
|
|
243
|
+
} else if (
|
|
244
|
+
link.type === 'service' &&
|
|
245
|
+
link.accessServiceProtocol === 'ogcFeatures'
|
|
246
|
+
) {
|
|
247
|
+
return from(this.getDownloadUrlsFromOgcApi(link.url.href)).pipe(
|
|
248
|
+
switchMap((collectionInfo) => {
|
|
249
|
+
const geojsonUrl = collectionInfo.jsonDownloadLink
|
|
250
|
+
return openDataset(geojsonUrl, 'geojson')
|
|
251
|
+
}),
|
|
252
|
+
tap((url) => {
|
|
253
|
+
if (url === null) {
|
|
254
|
+
throw new Error('wfs.geojsongml.notsupported')
|
|
255
|
+
}
|
|
256
|
+
})
|
|
257
|
+
)
|
|
208
258
|
}
|
|
209
259
|
return throwError(() => 'protocol not supported')
|
|
210
260
|
}
|
|
@@ -5,7 +5,7 @@ export * from './lib/+state/editor.reducer'
|
|
|
5
5
|
export * from './lib/+state/editor.actions'
|
|
6
6
|
export * from './lib/feature-editor.module'
|
|
7
7
|
export * from './lib/services/editor.service'
|
|
8
|
-
export * from './lib/record-form/record-form.component'
|
|
8
|
+
export * from './lib/components/record-form/record-form.component'
|
|
9
9
|
export * from './lib/components/wizard/wizard.component'
|
|
10
10
|
export * from './lib/components/wizard-field/wizard-field.component'
|
|
11
11
|
export * from './lib/components/wizard-summarize/wizard-summarize.component'
|
|
@@ -3,14 +3,21 @@ import { select, Store } from '@ngrx/store'
|
|
|
3
3
|
import * as EditorActions from './editor.actions'
|
|
4
4
|
import * as EditorSelectors from './editor.selectors'
|
|
5
5
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
6
|
+
import { filter, Observable } from 'rxjs'
|
|
7
|
+
import { Actions, ofType } from '@ngrx/effects'
|
|
6
8
|
|
|
7
9
|
@Injectable()
|
|
8
10
|
export class EditorFacade {
|
|
9
11
|
private readonly store = inject(Store)
|
|
12
|
+
private actions$ = inject(Actions)
|
|
10
13
|
|
|
11
14
|
record$ = this.store.pipe(select(EditorSelectors.selectRecord))
|
|
12
15
|
saving$ = this.store.pipe(select(EditorSelectors.selectRecordSaving))
|
|
13
|
-
saveError$ = this.store.pipe(
|
|
16
|
+
saveError$ = this.store.pipe(
|
|
17
|
+
select(EditorSelectors.selectRecordSaveError),
|
|
18
|
+
filter((error) => !!error)
|
|
19
|
+
)
|
|
20
|
+
saveSuccess$ = this.actions$.pipe(ofType(EditorActions.saveRecordSuccess))
|
|
14
21
|
changedSinceSave$ = this.store.pipe(
|
|
15
22
|
select(EditorSelectors.selectRecordChangedSinceSave)
|
|
16
23
|
)
|