geonetwork-ui 2.3.0-dev.a288b23a → 2.3.0-dev.aef43725
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +3 -3
- 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 +21 -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/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +47 -2
- 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-resource-updated/form-field-resource-updated.component.mjs +15 -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 +25 -6
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +23 -1
- 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 +58 -17
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +7 -3
- 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 +13 -8
- 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 +52 -8
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +50 -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-list/results-list.container.component.mjs +4 -4
- 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/organisations-filter/organisations-filter.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/index.mjs +2 -2
- 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/error/error.component.mjs +30 -0
- 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 +2 -2
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +98 -36
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +15 -12
- 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 +60 -0
- package/esm2022/libs/ui/inputs/src/index.mjs +16 -15
- 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/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 +14 -11
- package/esm2022/libs/ui/layout/src/index.mjs +2 -1
- 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/ui-layout.module.mjs +3 -8
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +3 -1
- package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +2 -1
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/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/translations/de.json +24 -0
- package/esm2022/translations/en.json +24 -0
- package/esm2022/translations/es.json +24 -0
- package/esm2022/translations/fr.json +24 -0
- package/esm2022/translations/it.json +24 -0
- package/esm2022/translations/nl.json +24 -0
- package/esm2022/translations/pt.json +24 -0
- package/fesm2022/geonetwork-ui.mjs +2025 -928
- package/fesm2022/geonetwork-ui.mjs.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/feature/dataviz/src/lib/service/data.service.d.ts +4 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- 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/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-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/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +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 +7 -0
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/feature-record.module.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.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 +18 -5
- 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 +1 -1
- 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/error/error.component.d.ts +16 -0
- package/libs/ui/elements/src/lib/error/error.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/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/record-api-form/record-api-form.component.d.ts +24 -4
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +16 -15
- 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 +21 -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 -14
- package/libs/ui/inputs/src/index.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/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 -35
- package/libs/ui/layout/src/index.d.ts +1 -0
- 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/ui-layout.module.d.ts +4 -5
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/app-config.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/fixtures.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/model.d.ts +1 -0
- package/libs/util/app-config/src/lib/model.d.ts.map +1 -1
- package/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/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +2 -2
- 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 +40 -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 +11 -3
- package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +65 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +0 -0
- 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/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-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 +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-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.html +38 -33
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +21 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +22 -0
- 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 +7 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +57 -17
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +6 -2
- 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 +12 -9
- 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 +86 -9
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +79 -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-list/results-list.container.component.html +4 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -2
- package/src/libs/ui/elements/src/index.ts +1 -1
- 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/{search-results-error/search-results-error.component.html → error/error.component.html} +18 -3
- package/src/libs/ui/elements/src/lib/{search-results-error/search-results-error.component.ts → error/error.component.ts} +5 -4
- package/src/libs/ui/elements/src/lib/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/record-api-form/record-api-form.component.html +26 -10
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +125 -30
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +8 -6
- 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 +62 -0
- package/src/libs/ui/inputs/src/index.ts +15 -14
- 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/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 +3 -3
- package/src/libs/ui/layout/src/index.ts +1 -0
- 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/ui-layout.module.ts +0 -2
- package/src/libs/util/app-config/src/lib/app-config.ts +2 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +1 -0
- package/src/libs/util/app-config/src/lib/model.ts +1 -0
- package/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/translations/de.json +24 -0
- package/translations/en.json +24 -0
- package/translations/es.json +24 -0
- package/translations/fr.json +24 -0
- package/translations/it.json +24 -0
- package/translations/nl.json +24 -0
- package/translations/pt.json +24 -0
- package/translations/sk.json +24 -0
- package/esm2022/libs/ui/elements/src/lib/search-results-error/search-results-error.component.mjs +0 -29
- package/libs/ui/elements/src/lib/search-results-error/search-results-error.component.d.ts +0 -15
- package/libs/ui/elements/src/lib/search-results-error/search-results-error.component.d.ts.map +0 -1
- /package/src/libs/ui/elements/src/lib/{search-results-error/search-results-error.component.css → error/error.component.css} +0 -0
|
@@ -26,7 +26,8 @@ export class ApiCardComponent implements OnInit, OnChanges {
|
|
|
26
26
|
|
|
27
27
|
ngOnInit() {
|
|
28
28
|
this.displayApiFormButton =
|
|
29
|
-
this.link.accessServiceProtocol === 'ogcFeatures'
|
|
29
|
+
this.link.accessServiceProtocol === 'ogcFeatures' ||
|
|
30
|
+
this.link.accessServiceProtocol === 'wfs'
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
ngOnChanges(changes: SimpleChanges) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<div
|
|
2
2
|
class="p-[1.7em] bg-red-50 text-red-800 text-[1.5em] text-center rounded-lg"
|
|
3
3
|
>
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
*ngIf="type === types.COULD_NOT_REACH_API"
|
|
6
|
+
data-test="could-not-reach-api-error"
|
|
7
|
+
>
|
|
5
8
|
<div class="relative opacity-40">
|
|
6
9
|
<mat-icon class="material-symbols-outlined face">face</mat-icon>
|
|
7
10
|
<mat-icon class="material-symbols-outlined question-mark1"
|
|
@@ -13,14 +16,26 @@
|
|
|
13
16
|
</div>
|
|
14
17
|
<div translate>search.error.couldNotReachApi</div>
|
|
15
18
|
</div>
|
|
16
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
*ngIf="type === types.DATASET_HAS_NO_LINK"
|
|
21
|
+
data-test="dataset-has-no-link-error"
|
|
22
|
+
>
|
|
23
|
+
<div class="relative opacity-40">
|
|
24
|
+
<mat-icon class="material-symbols-outlined face">computer</mat-icon>
|
|
25
|
+
</div>
|
|
26
|
+
<div translate>search.error.recordHasnolink</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div *ngIf="type === types.RECEIVED_ERROR" data-test="received-error-error">
|
|
17
29
|
<div class="relative opacity-40">
|
|
18
30
|
<mat-icon class="material-symbols-outlined face">mood_bad</mat-icon>
|
|
19
31
|
</div>
|
|
20
32
|
<div translate>search.error.receivedError</div>
|
|
21
33
|
<div *ngIf="error">{{ error }}</div>
|
|
22
34
|
</div>
|
|
23
|
-
<div
|
|
35
|
+
<div
|
|
36
|
+
*ngIf="type === types.RECORD_NOT_FOUND"
|
|
37
|
+
data-test="record-not-found-error"
|
|
38
|
+
>
|
|
24
39
|
<div class="relative opacity-40">
|
|
25
40
|
<mat-icon class="material-symbols-outlined computer">computer</mat-icon>
|
|
26
41
|
<mat-icon class="material-symbols-outlined computer-question-mark"
|
|
@@ -4,15 +4,16 @@ export enum ErrorType {
|
|
|
4
4
|
COULD_NOT_REACH_API,
|
|
5
5
|
RECEIVED_ERROR,
|
|
6
6
|
RECORD_NOT_FOUND,
|
|
7
|
+
DATASET_HAS_NO_LINK,
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
@Component({
|
|
10
|
-
selector: 'gn-ui-
|
|
11
|
-
templateUrl: './
|
|
12
|
-
styleUrls: ['./
|
|
11
|
+
selector: 'gn-ui-error',
|
|
12
|
+
templateUrl: './error.component.html',
|
|
13
|
+
styleUrls: ['./error.component.css'],
|
|
13
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
15
|
})
|
|
15
|
-
export class
|
|
16
|
+
export class ErrorComponent {
|
|
16
17
|
@Input() type!: ErrorType
|
|
17
18
|
@Input() error?: string
|
|
18
19
|
@Input() recordId?: string
|
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
<a
|
|
2
2
|
[href]="link.url"
|
|
3
3
|
target="_blank"
|
|
4
|
-
class="flex flex-col justify-between group
|
|
4
|
+
class="flex flex-col justify-between group grow py-5 px-5 bg-white rounded border-gray-300 filter card-shadow overflow-hidden"
|
|
5
|
+
[ngClass]="{ 'h-40': !compact }"
|
|
6
|
+
[title]="title"
|
|
5
7
|
>
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
8
|
+
<ng-container *ngIf="!compact; else compactTpl">
|
|
9
|
+
<div class="max-h-24 overflow-hidden text-ellipsis">
|
|
10
|
+
<p
|
|
11
|
+
class="font-title font-medium text-21 text-black break-words mb-1 line-clamp-2"
|
|
12
|
+
>
|
|
13
|
+
{{ link.name }}
|
|
14
|
+
</p>
|
|
15
|
+
<p class="font-medium text-sm break-words">
|
|
16
|
+
{{ link.description }}
|
|
17
|
+
</p>
|
|
18
|
+
<p
|
|
19
|
+
*ngIf="!link.name && !link.description"
|
|
20
|
+
class="font-medium text-sm break-words truncate"
|
|
21
|
+
>
|
|
22
|
+
{{ link.url }}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<mat-icon class="material-symbols-outlined card-icon"
|
|
27
|
+
>open_in_new</mat-icon
|
|
28
|
+
>
|
|
29
|
+
</div>
|
|
30
|
+
</ng-container>
|
|
31
|
+
<ng-template #compactTpl>
|
|
32
|
+
<div class="flex items-center justify-between gap-4">
|
|
33
|
+
<p
|
|
34
|
+
class="overflow-hidden font-title font-medium text-21 text-black text-ellipsis whitespace-nowrap"
|
|
35
|
+
>
|
|
36
|
+
{{ link.name || link.description }}
|
|
37
|
+
</p>
|
|
38
|
+
<mat-icon class="material-symbols-outlined card-icon flex-shrink-0"
|
|
39
|
+
>open_in_new</mat-icon
|
|
40
|
+
>
|
|
41
|
+
</div>
|
|
42
|
+
</ng-template>
|
|
25
43
|
</a>
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, Input } from '@angular/core'
|
|
2
2
|
import { DatasetDistribution } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
3
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
4
|
+
import { CommonModule } from '@angular/common'
|
|
3
5
|
|
|
4
6
|
@Component({
|
|
5
7
|
selector: 'gn-ui-link-card',
|
|
6
8
|
templateUrl: './link-card.component.html',
|
|
7
9
|
styleUrls: ['./link-card.component.css'],
|
|
8
10
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [CommonModule, MatIconModule],
|
|
9
13
|
})
|
|
10
14
|
export class LinkCardComponent {
|
|
11
15
|
@Input() link: DatasetDistribution
|
|
16
|
+
@Input() compact = false
|
|
17
|
+
|
|
18
|
+
get title() {
|
|
19
|
+
if (this.link.name && this.link.description) {
|
|
20
|
+
return `${this.link.name} | ${this.link.description}`
|
|
21
|
+
}
|
|
22
|
+
return this.link.name || this.link.description || ''
|
|
23
|
+
}
|
|
12
24
|
}
|
|
@@ -37,15 +37,31 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
|
-
<div class="flex flex-col gap-3">
|
|
41
|
-
<p class="text-sm" translate>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
<div class="flex flex-col gap-3 relative">
|
|
41
|
+
<p class="text-sm" [class.text-gray-600]="!supportOffset" translate>
|
|
42
|
+
record.metadata.api.form.offset
|
|
43
|
+
</p>
|
|
44
|
+
<div class="flex items-center">
|
|
45
|
+
<gn-ui-text-input
|
|
46
|
+
class="w-20"
|
|
47
|
+
[value]="offset$ | async"
|
|
48
|
+
[disabled]="!supportOffset"
|
|
49
|
+
(valueChange)="supportOffset ? setOffset($event) : null"
|
|
50
|
+
hint=""
|
|
51
|
+
>
|
|
52
|
+
</gn-ui-text-input>
|
|
53
|
+
<div
|
|
54
|
+
*ngIf="!supportOffset"
|
|
55
|
+
class="flex items-center gap-2 text-orange-500 z-10 ml-3"
|
|
56
|
+
>
|
|
57
|
+
<span
|
|
58
|
+
class="material-symbols-outlined"
|
|
59
|
+
matTooltip="Not supported on this service"
|
|
60
|
+
>
|
|
61
|
+
warning
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
49
65
|
</div>
|
|
50
66
|
<div class="flex flex-col gap-3">
|
|
51
67
|
<p class="text-sm" translate>record.metadata.api.form.type</p>
|
|
@@ -55,7 +71,7 @@
|
|
|
55
71
|
extraBtnClass="secondary min-w-full !w-40 !text-black"
|
|
56
72
|
[showTitle]="false"
|
|
57
73
|
class="text-black"
|
|
58
|
-
[choices]="
|
|
74
|
+
[choices]="outputFormats"
|
|
59
75
|
(selectValue)="setFormat($event)"
|
|
60
76
|
[selected]="format$ | async"
|
|
61
77
|
></gn-ui-dropdown-selector>
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { OgcApiEndpoint, WfsEndpoint } from '@camptocamp/ogc-client'
|
|
3
|
+
import {
|
|
4
|
+
DatasetServiceDistribution,
|
|
5
|
+
ServiceProtocol,
|
|
6
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
7
|
+
import { mimeTypeToFormat } from '../../../../../../libs/util/shared/src'
|
|
8
|
+
import { BehaviorSubject, combineLatest, filter, map, switchMap } from 'rxjs'
|
|
4
9
|
|
|
5
10
|
const DEFAULT_PARAMS = {
|
|
6
11
|
OFFSET: '',
|
|
7
12
|
LIMIT: '-1',
|
|
8
13
|
FORMAT: 'json',
|
|
9
14
|
}
|
|
15
|
+
|
|
16
|
+
interface OutputFormats {
|
|
17
|
+
itemFormats?: any[]
|
|
18
|
+
outputFormats?: any[]
|
|
19
|
+
}
|
|
20
|
+
|
|
10
21
|
@Component({
|
|
11
22
|
selector: 'gn-ui-record-api-form',
|
|
12
23
|
templateUrl: './record-api-form.component.html',
|
|
@@ -15,39 +26,45 @@ const DEFAULT_PARAMS = {
|
|
|
15
26
|
})
|
|
16
27
|
export class RecordApiFormComponent {
|
|
17
28
|
@Input() set apiLink(value: DatasetServiceDistribution) {
|
|
18
|
-
this.
|
|
29
|
+
this.outputFormats = [{ value: 'json', label: 'JSON' }]
|
|
30
|
+
this.accessServiceProtocol = value ? value.accessServiceProtocol : undefined
|
|
31
|
+
this.apiFeatureType = value ? value.name : undefined
|
|
32
|
+
if (value) {
|
|
33
|
+
this.apiBaseUrl = value.url.href
|
|
34
|
+
this.createEndpoint().then(() => this.parseOutputFormats())
|
|
35
|
+
}
|
|
19
36
|
this.resetUrl()
|
|
20
37
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
38
|
+
|
|
39
|
+
offset$ = new BehaviorSubject(DEFAULT_PARAMS.OFFSET)
|
|
40
|
+
limit$ = new BehaviorSubject(DEFAULT_PARAMS.LIMIT)
|
|
41
|
+
format$ = new BehaviorSubject(DEFAULT_PARAMS.FORMAT)
|
|
42
|
+
endpoint$ = new BehaviorSubject<WfsEndpoint | OgcApiEndpoint | undefined>(
|
|
43
|
+
undefined
|
|
44
|
+
)
|
|
24
45
|
apiBaseUrl: string
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
outputUrl = url.toString()
|
|
43
|
-
}
|
|
44
|
-
return outputUrl
|
|
45
|
-
})
|
|
46
|
+
apiFeatureType: string
|
|
47
|
+
supportOffset = true
|
|
48
|
+
accessServiceProtocol: ServiceProtocol | undefined
|
|
49
|
+
outputFormats = [{ value: 'json', label: 'JSON' }]
|
|
50
|
+
endpoint: WfsEndpoint | OgcApiEndpoint | undefined
|
|
51
|
+
firstCollection: string | undefined
|
|
52
|
+
|
|
53
|
+
apiQueryUrl$ = combineLatest([
|
|
54
|
+
this.offset$,
|
|
55
|
+
this.limit$,
|
|
56
|
+
this.format$,
|
|
57
|
+
// only compute the url if the endpoint was created
|
|
58
|
+
this.endpoint$.pipe(filter((endpoint) => !!endpoint)),
|
|
59
|
+
]).pipe(
|
|
60
|
+
switchMap(([offset, limit, format]) =>
|
|
61
|
+
this.generateApiQueryUrl(offset, limit, format)
|
|
62
|
+
)
|
|
46
63
|
)
|
|
64
|
+
|
|
47
65
|
noLimitChecked$ = this.limit$.pipe(
|
|
48
66
|
map((limit) => limit === '-1' || limit === '')
|
|
49
67
|
)
|
|
50
|
-
|
|
51
68
|
displayLimit$ = this.limit$.pipe(
|
|
52
69
|
map((limit) => (limit !== '-1' ? limit : ''))
|
|
53
70
|
)
|
|
@@ -57,8 +74,7 @@ export class RecordApiFormComponent {
|
|
|
57
74
|
}
|
|
58
75
|
|
|
59
76
|
setLimit(value: string) {
|
|
60
|
-
|
|
61
|
-
this.limit$.next(newLimit)
|
|
77
|
+
this.limit$.next(value === '' ? '-1' : value)
|
|
62
78
|
}
|
|
63
79
|
|
|
64
80
|
setFormat(value: string | unknown) {
|
|
@@ -70,4 +86,83 @@ export class RecordApiFormComponent {
|
|
|
70
86
|
this.limit$.next(DEFAULT_PARAMS.LIMIT)
|
|
71
87
|
this.format$.next(DEFAULT_PARAMS.FORMAT)
|
|
72
88
|
}
|
|
89
|
+
|
|
90
|
+
async parseOutputFormats() {
|
|
91
|
+
if (!this.endpoint) return
|
|
92
|
+
const apiUrl = this.apiBaseUrl.endsWith('?')
|
|
93
|
+
? this.apiBaseUrl.slice(0, -1)
|
|
94
|
+
: this.apiBaseUrl
|
|
95
|
+
const outputFormats = await this.getOutputFormats(apiUrl)
|
|
96
|
+
|
|
97
|
+
const formatsList = outputFormats.itemFormats
|
|
98
|
+
? this.mapFormats(outputFormats.itemFormats)
|
|
99
|
+
: this.mapFormats(outputFormats.outputFormats || [])
|
|
100
|
+
|
|
101
|
+
this.outputFormats = this.outputFormats
|
|
102
|
+
.concat(formatsList.filter(Boolean))
|
|
103
|
+
.filter(
|
|
104
|
+
(format, index, self) =>
|
|
105
|
+
index === self.findIndex((t) => t.value === format.value)
|
|
106
|
+
)
|
|
107
|
+
.sort((a, b) => a.label.localeCompare(b.label))
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
mapFormats(formats: any[]) {
|
|
111
|
+
return formats.map((format) => {
|
|
112
|
+
const normalizedFormat = mimeTypeToFormat(format)
|
|
113
|
+
return normalizedFormat
|
|
114
|
+
? { label: normalizedFormat.toUpperCase(), value: normalizedFormat }
|
|
115
|
+
: null
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async getOutputFormats(url: string): Promise<OutputFormats> {
|
|
120
|
+
if (!this.endpoint) return {}
|
|
121
|
+
if (this.endpoint instanceof WfsEndpoint) {
|
|
122
|
+
this.supportOffset = this.endpoint.supportsStartIndex()
|
|
123
|
+
return this.endpoint.getServiceInfo() as OutputFormats
|
|
124
|
+
} else {
|
|
125
|
+
return (await this.endpoint.getCollectionInfo(
|
|
126
|
+
this.firstCollection
|
|
127
|
+
)) as OutputFormats
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async createEndpoint() {
|
|
132
|
+
if (!this.apiBaseUrl || !this.accessServiceProtocol) return
|
|
133
|
+
if (this.accessServiceProtocol === 'wfs') {
|
|
134
|
+
this.endpoint = new WfsEndpoint(this.apiBaseUrl)
|
|
135
|
+
await (this.endpoint as WfsEndpoint).isReady()
|
|
136
|
+
} else {
|
|
137
|
+
this.endpoint = new OgcApiEndpoint(this.apiBaseUrl)
|
|
138
|
+
this.firstCollection = (await this.endpoint.allCollections)[0].name
|
|
139
|
+
}
|
|
140
|
+
this.endpoint$.next(this.endpoint)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async generateApiQueryUrl(
|
|
144
|
+
offset: string,
|
|
145
|
+
limit: string,
|
|
146
|
+
format: string
|
|
147
|
+
): Promise<string> {
|
|
148
|
+
if (!this.apiBaseUrl || !this.endpoint || !this.apiFeatureType) return ''
|
|
149
|
+
|
|
150
|
+
const options = {
|
|
151
|
+
outputFormat: format,
|
|
152
|
+
startIndex: offset ? Number(offset) : undefined,
|
|
153
|
+
maxFeatures: limit !== '-1' ? Number(limit) : undefined,
|
|
154
|
+
limit: limit !== '-1' ? Number(limit) : limit === '-1' ? -1 : undefined,
|
|
155
|
+
offset: offset !== '' ? Number(offset) : undefined,
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (this.endpoint instanceof WfsEndpoint) {
|
|
159
|
+
options.maxFeatures = limit !== '-1' ? Number(limit) : undefined
|
|
160
|
+
return this.endpoint.getFeatureUrl(this.apiFeatureType, options)
|
|
161
|
+
} else {
|
|
162
|
+
return await this.endpoint.getCollectionItemsUrl(
|
|
163
|
+
this.firstCollection,
|
|
164
|
+
options
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
73
168
|
}
|
|
@@ -12,13 +12,12 @@ import { ApiCardComponent } from './api-card/api-card.component'
|
|
|
12
12
|
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
13
13
|
import { UiLayoutModule } from '../../../../../libs/ui/layout/src'
|
|
14
14
|
import { TranslateModule } from '@ngx-translate/core'
|
|
15
|
-
import { LinkCardComponent } from './link-card/link-card.component'
|
|
16
15
|
import { RelatedRecordCardComponent } from './related-record-card/related-record-card.component'
|
|
17
16
|
import { MetadataContactComponent } from './metadata-contact/metadata-contact.component'
|
|
18
17
|
import { MetadataCatalogComponent } from './metadata-catalog/metadata-catalog.component'
|
|
19
18
|
import { MetadataQualityComponent } from './metadata-quality/metadata-quality.component'
|
|
20
19
|
import { MetadataQualityItemComponent } from './metadata-quality-item/metadata-quality-item.component'
|
|
21
|
-
import {
|
|
20
|
+
import { ErrorComponent } from './error/error.component'
|
|
22
21
|
import { PaginationComponent } from './pagination/pagination.component'
|
|
23
22
|
import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
24
23
|
import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
@@ -31,6 +30,8 @@ import { MaxLinesComponent } from './max-lines/max-lines.component'
|
|
|
31
30
|
import { RecordApiFormComponent } from './record-api-form/record-api-form.component'
|
|
32
31
|
import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
|
|
33
32
|
import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-overlay-preview.component'
|
|
33
|
+
import { UserFeedbackItemComponent } from './user-feedback-item/user-feedback-item.component'
|
|
34
|
+
import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
|
|
34
35
|
|
|
35
36
|
@NgModule({
|
|
36
37
|
imports: [
|
|
@@ -47,6 +48,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
47
48
|
NgOptimizedImage,
|
|
48
49
|
MarkdownParserComponent,
|
|
49
50
|
ThumbnailComponent,
|
|
51
|
+
TimeSincePipe,
|
|
50
52
|
],
|
|
51
53
|
declarations: [
|
|
52
54
|
MetadataInfoComponent,
|
|
@@ -54,13 +56,12 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
54
56
|
DownloadItemComponent,
|
|
55
57
|
DownloadsListComponent,
|
|
56
58
|
ApiCardComponent,
|
|
57
|
-
LinkCardComponent,
|
|
58
59
|
RelatedRecordCardComponent,
|
|
59
60
|
MetadataContactComponent,
|
|
60
61
|
MetadataCatalogComponent,
|
|
61
62
|
MetadataQualityComponent,
|
|
62
63
|
MetadataQualityItemComponent,
|
|
63
|
-
|
|
64
|
+
ErrorComponent,
|
|
64
65
|
PaginationComponent,
|
|
65
66
|
AvatarComponent,
|
|
66
67
|
UserPreviewComponent,
|
|
@@ -68,6 +69,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
68
69
|
PaginationButtonsComponent,
|
|
69
70
|
MaxLinesComponent,
|
|
70
71
|
RecordApiFormComponent,
|
|
72
|
+
UserFeedbackItemComponent,
|
|
71
73
|
ImageOverlayPreviewComponent,
|
|
72
74
|
],
|
|
73
75
|
exports: [
|
|
@@ -76,13 +78,12 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
76
78
|
DownloadItemComponent,
|
|
77
79
|
DownloadsListComponent,
|
|
78
80
|
ApiCardComponent,
|
|
79
|
-
LinkCardComponent,
|
|
80
81
|
RelatedRecordCardComponent,
|
|
81
82
|
MetadataContactComponent,
|
|
82
83
|
MetadataCatalogComponent,
|
|
83
84
|
MetadataQualityComponent,
|
|
84
85
|
MetadataQualityItemComponent,
|
|
85
|
-
|
|
86
|
+
ErrorComponent,
|
|
86
87
|
PaginationComponent,
|
|
87
88
|
ThumbnailComponent,
|
|
88
89
|
AvatarComponent,
|
|
@@ -91,6 +92,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
91
92
|
MaxLinesComponent,
|
|
92
93
|
RecordApiFormComponent,
|
|
93
94
|
MarkdownParserComponent,
|
|
95
|
+
UserFeedbackItemComponent,
|
|
94
96
|
ImageOverlayPreviewComponent,
|
|
95
97
|
],
|
|
96
98
|
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core'
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
3
|
+
import { formatDistance } from 'date-fns'
|
|
4
|
+
import { de, enUS, es, fr, it, nl, pt, sk } from 'date-fns/locale'
|
|
5
|
+
|
|
6
|
+
@Pipe({
|
|
7
|
+
name: 'timeSince',
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class TimeSincePipe implements PipeTransform {
|
|
11
|
+
constructor(private translate: TranslateService) {}
|
|
12
|
+
|
|
13
|
+
transform(value: Date): string {
|
|
14
|
+
if (isNaN(value.getTime())) {
|
|
15
|
+
throw new Error('Invalid Date')
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const maintenant = new Date()
|
|
19
|
+
let locale: Locale
|
|
20
|
+
|
|
21
|
+
switch (this.translate.currentLang) {
|
|
22
|
+
case 'fr':
|
|
23
|
+
locale = fr
|
|
24
|
+
break
|
|
25
|
+
case 'de':
|
|
26
|
+
locale = de
|
|
27
|
+
break
|
|
28
|
+
case 'es':
|
|
29
|
+
locale = es
|
|
30
|
+
break
|
|
31
|
+
case 'it':
|
|
32
|
+
locale = it
|
|
33
|
+
break
|
|
34
|
+
case 'nl':
|
|
35
|
+
locale = nl
|
|
36
|
+
break
|
|
37
|
+
case 'pt':
|
|
38
|
+
locale = pt
|
|
39
|
+
break
|
|
40
|
+
case 'sk':
|
|
41
|
+
locale = sk
|
|
42
|
+
break
|
|
43
|
+
case 'en':
|
|
44
|
+
default:
|
|
45
|
+
locale = enUS
|
|
46
|
+
break
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return formatDistance(value, maintenant, {
|
|
50
|
+
addSuffix: true,
|
|
51
|
+
locale: locale,
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<div
|
|
2
|
+
*ngIf="userFeedbackParent.published"
|
|
3
|
+
class="flex flex-col bg-white rounded w-full"
|
|
4
|
+
[ngClass]="[isAnAnswer ? 'ps-4 ' : 'p-4']"
|
|
5
|
+
>
|
|
6
|
+
<div class="flex flex-row">
|
|
7
|
+
<div class="avatar">
|
|
8
|
+
<img
|
|
9
|
+
class="rounded-full"
|
|
10
|
+
[src]="userFeedbackParent.avatarUrl"
|
|
11
|
+
alt="avatar"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="p-4 flex flex-col">
|
|
15
|
+
<span>{{ userFeedbackParent.authorName }}</span>
|
|
16
|
+
<span> {{ userFeedbackParent.date | timeSince }}</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div data-cy="commentText" class="mt-4 whitespace-pre-line">
|
|
20
|
+
{{ userFeedbackParent.comment }}
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="w-full"
|
|
24
|
+
*ngFor="let userFeedBacksAnswer of userFeedBacksAnswers; let last = last"
|
|
25
|
+
>
|
|
26
|
+
<hr class="-mx-4 my-6" />
|
|
27
|
+
<gn-ui-user-feedback-item
|
|
28
|
+
[userFeedbackParent]="userFeedBacksAnswer"
|
|
29
|
+
[isLastComment]="last"
|
|
30
|
+
></gn-ui-user-feedback-item>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div *ngIf="activeUser" class="mt-2 flex flex-col">
|
|
34
|
+
<hr class="-mx-4 my-4" />
|
|
35
|
+
<div
|
|
36
|
+
id="new-comment-buttons"
|
|
37
|
+
class="flex flex-row gap-2 items-center justify-end"
|
|
38
|
+
>
|
|
39
|
+
<gn-ui-text-area
|
|
40
|
+
[disabled]="isAddUserFeedbackLoading"
|
|
41
|
+
[(value)]="newAnswer"
|
|
42
|
+
(valueChange)="onNewAnswerValueChange()"
|
|
43
|
+
(keyup.control.enter)="publishNewAnswer()"
|
|
44
|
+
[placeholder]="
|
|
45
|
+
'record.metadata.userFeedbacks.newAnswer.placeholder' | translate
|
|
46
|
+
"
|
|
47
|
+
class="grow"
|
|
48
|
+
extraClass="bg-transparent border-0 placeholder-primary-darker text-primary-darker h-9"
|
|
49
|
+
></gn-ui-text-area>
|
|
50
|
+
<div *ngIf="!isAnswerEmpty" class="flex flex-row justify-end">
|
|
51
|
+
<gn-ui-button
|
|
52
|
+
[disabled]="isAddUserFeedbackLoading"
|
|
53
|
+
[type]="'outline'"
|
|
54
|
+
(buttonClick)="publishNewAnswer()"
|
|
55
|
+
[title]="
|
|
56
|
+
'record.metadata.userFeedbacks.newAnswer.buttonTitle' | translate
|
|
57
|
+
"
|
|
58
|
+
extraClass="!p-[0.5em] text-primary-darker border-primary-darker h-9"
|
|
59
|
+
>
|
|
60
|
+
<mat-icon
|
|
61
|
+
class="material-symbols-outlined"
|
|
62
|
+
*ngIf="!isAddUserFeedbackLoading"
|
|
63
|
+
>
|
|
64
|
+
send
|
|
65
|
+
</mat-icon>
|
|
66
|
+
<ng-container *ngIf="isAddUserFeedbackLoading">
|
|
67
|
+
<div class="flex justify-center w-full">
|
|
68
|
+
<gn-ui-spinning-loader></gn-ui-spinning-loader>
|
|
69
|
+
</div>
|
|
70
|
+
</ng-container>
|
|
71
|
+
</gn-ui-button>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|