geonetwork-ui 2.2.0 → 2.3.0-dev.139106e0
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/index.mjs +5 -5
- package/esm2022/libs/api/metadata-converter/src/lib/base.converter.mjs +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/find-converter.mjs +15 -0
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.converter.mjs +52 -0
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +8 -4
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/index.mjs +4 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/index.mjs +2 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +123 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +116 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +138 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/index.mjs +2 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +242 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +58 -62
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/individual-name.mjs +18 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.mjs +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/role.mapper.mjs +48 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.mjs +18 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/update-frequency.mapper.mjs +64 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +75 -58
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +76 -14
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +4 -4
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.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/service/data.service.mjs +2 -2
- 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-object/form-field-object.component.mjs +11 -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.component.mjs +107 -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/feature-editor.module.mjs +10 -10
- package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +8 -8
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +6 -2
- 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 +72 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +7 -3
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +12 -7
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +52 -25
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +12 -49
- 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/map-view/map-view.component.mjs +6 -2
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +15 -15
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
- 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 +3 -3
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +6 -5
- package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
- 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/ui-inputs.module.mjs +10 -23
- package/esm2022/libs/ui/layout/src/index.mjs +6 -5
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
- 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 +20 -0
- package/esm2022/translations/en.json +20 -0
- package/esm2022/translations/es.json +20 -0
- package/esm2022/translations/fr.json +20 -0
- package/esm2022/translations/it.json +20 -0
- package/esm2022/translations/nl.json +20 -0
- package/esm2022/translations/pt.json +20 -0
- package/fesm2022/geonetwork-ui.mjs +4464 -3180
- 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/index.d.ts +4 -4
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/{metadata-base.mapper.d.ts → base.converter.d.ts} +3 -3
- package/libs/api/metadata-converter/src/lib/base.converter.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/find-converter.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/find-converter.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/{gn4.metadata.mapper.d.ts → gn4.converter.d.ts} +5 -5
- package/libs/api/metadata-converter/src/lib/gn4/gn4.converter.d.ts.map +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/gn4/index.d.ts +4 -0
- package/libs/api/metadata-converter/src/lib/gn4/index.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/index.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/index.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts +9 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +20 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +21 -0
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/index.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/iso19139/index.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts +11 -0
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +34 -6
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/individual-name.d.ts +8 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/individual-name.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/role.mapper.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/update-frequency.mapper.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +39 -3
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +14 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +2 -2
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -4
- package/libs/common/domain/src/lib/model/record/metadata.model.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/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/{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-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/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +8 -3
- 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/models/fields.model.d.ts +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +23 -0
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/feature-map.module.d.ts +2 -1
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts +2 -0
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +10 -5
- 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/map/src/lib/utils/map-utils.service.d.ts +2 -3
- package/libs/feature/map/src/lib/utils/map-utils.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/map-view/map-view.component.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/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/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 +20 -20
- package/libs/ui/inputs/src/index.d.ts +0 -1
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.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/ui-inputs.module.d.ts +26 -33
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +5 -4
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
- 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 +2 -2
- package/src/libs/api/metadata-converter/src/index.ts +4 -4
- package/src/libs/api/metadata-converter/src/lib/{metadata-base.mapper.ts → base.converter.ts} +2 -2
- package/src/libs/api/metadata-converter/src/lib/find-converter.ts +16 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +32 -5
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +11 -4
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +33 -7
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +580 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/{gn4.metadata.mapper.ts → gn4.converter.ts} +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +9 -3
- package/src/libs/api/metadata-converter/src/lib/gn4/index.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +176 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +329 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +513 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +327 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +121 -82
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/individual-name.ts +20 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +175 -95
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +84 -16
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +2 -2
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -4
- 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 +1 -1
- 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/{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-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/{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/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.html +28 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +121 -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/models/fields.model.ts +1 -1
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +27 -16
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +5 -1
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +36 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +80 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +2 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +8 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.ts +5 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +10 -3
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +60 -32
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +17 -61
- 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/map-view/map-view.component.ts +5 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
- 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/image-overlay-preview/image-overlay-preview.component.html +1 -1
- 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 +1 -1
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
- package/src/libs/ui/inputs/src/index.ts +0 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
- 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/ui-inputs.module.ts +3 -19
- package/src/libs/ui/layout/src/index.ts +5 -4
- 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/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 +20 -0
- package/translations/en.json +20 -0
- package/translations/es.json +20 -0
- package/translations/fr.json +20 -0
- package/translations/it.json +20 -0
- package/translations/nl.json +20 -0
- package/translations/pt.json +20 -0
- package/translations/sk.json +20 -0
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +0 -52
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +0 -14
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/role.mapper.mjs +0 -48
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/status.mapper.mjs +0 -18
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/update-frequency.mapper.mjs +0 -64
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +0 -130
- package/esm2022/libs/api/metadata-converter/src/lib/metadata-base.mapper.mjs +0 -14
- 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/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/role.mapper.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/status.mapper.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/update-frequency.mapper.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts +0 -4
- package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +0 -1
- package/libs/api/metadata-converter/src/lib/metadata-base.mapper.d.ts.map +0 -1
- 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/api/metadata-converter/src/lib/iso19139/converter.ts +0 -196
- 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.ts +0 -80
- /package/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/keyword.mapper.d.ts +0 -0
- /package/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/role.mapper.d.ts +0 -0
- /package/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/status.mapper.d.ts +0 -0
- /package/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/update-frequency.mapper.d.ts +0 -0
- /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/api/metadata-converter/src/lib/iso19139/{codelists → utils}/keyword.mapper.ts +0 -0
- /package/src/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/role.mapper.ts +0 -0
- /package/src/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/status.mapper.ts +0 -0
- /package/src/libs/api/metadata-converter/src/lib/iso19139/{codelists → utils}/update-frequency.mapper.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 → 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 → 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 → 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 → 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.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.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.css +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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { NotificationsService } from '../notifications.service'
|
|
4
|
+
import { NotificationComponent } from '../../../../../../libs/ui/elements/src'
|
|
5
|
+
import {
|
|
6
|
+
animate,
|
|
7
|
+
keyframes,
|
|
8
|
+
style,
|
|
9
|
+
transition,
|
|
10
|
+
trigger,
|
|
11
|
+
} from '@angular/animations'
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'gn-ui-notifications-container',
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [CommonModule, NotificationComponent],
|
|
17
|
+
templateUrl: './notifications-container.component.html',
|
|
18
|
+
styleUrls: ['./notifications-container.component.css'],
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
animations: [
|
|
21
|
+
trigger('enterExit', [
|
|
22
|
+
transition(':enter', [
|
|
23
|
+
animate(
|
|
24
|
+
'150ms',
|
|
25
|
+
keyframes([
|
|
26
|
+
style({ transform: 'scale(1)', opacity: 0 }),
|
|
27
|
+
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
28
|
+
style({ transform: 'scale(1)', opacity: 1 }),
|
|
29
|
+
])
|
|
30
|
+
),
|
|
31
|
+
]),
|
|
32
|
+
transition(':leave', [
|
|
33
|
+
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
34
|
+
]),
|
|
35
|
+
]),
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
export class NotificationsContainerComponent {
|
|
39
|
+
constructor(protected notificationsService: NotificationsService) {}
|
|
40
|
+
|
|
41
|
+
trackById(index: number, notification: { id: number }) {
|
|
42
|
+
return notification.id
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core'
|
|
2
|
+
import { NotificationContent } from './notification.model'
|
|
3
|
+
import { BehaviorSubject } from 'rxjs'
|
|
4
|
+
|
|
5
|
+
type NotificationWithIdentity = NotificationContent & { id: number }
|
|
6
|
+
|
|
7
|
+
@Injectable({
|
|
8
|
+
providedIn: 'root',
|
|
9
|
+
})
|
|
10
|
+
export class NotificationsService {
|
|
11
|
+
notifications$ = new BehaviorSubject<NotificationWithIdentity[]>([])
|
|
12
|
+
|
|
13
|
+
showNotification(content: NotificationContent, timeoutMs?: number) {
|
|
14
|
+
const id = Math.floor(Math.random() * 1000000)
|
|
15
|
+
this.notifications$.next([...this.notifications$.value, { ...content, id }])
|
|
16
|
+
if (typeof timeoutMs === 'undefined') return
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
this.removeNotificationById(id)
|
|
19
|
+
}, timeoutMs)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
removeNotificationById(id: number) {
|
|
23
|
+
this.notifications$.next(
|
|
24
|
+
this.notifications$.value.filter((n) => n.id !== id)
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -188,7 +188,11 @@ export class MapViewComponent implements OnInit, OnDestroy {
|
|
|
188
188
|
link.type === 'service' &&
|
|
189
189
|
link.accessServiceProtocol === 'wmts'
|
|
190
190
|
) {
|
|
191
|
-
return
|
|
191
|
+
return of({
|
|
192
|
+
url: link.url.toString(),
|
|
193
|
+
type: MapContextLayerTypeEnum.WMTS,
|
|
194
|
+
name: link.name,
|
|
195
|
+
})
|
|
192
196
|
} else if (
|
|
193
197
|
(link.type === 'service' &&
|
|
194
198
|
(link.accessServiceProtocol === 'wfs' ||
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
[title]="formats.join(', ')"
|
|
51
51
|
>
|
|
52
52
|
<span
|
|
53
|
-
class="badge-btn min-w-[45px] text-sm text-white px-2
|
|
53
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
|
|
54
54
|
[style.background-color]="getBadgeColor(formats[0])"
|
|
55
55
|
*ngIf="formats[0]"
|
|
56
56
|
>
|
|
57
57
|
{{ formats[0] }}
|
|
58
58
|
</span>
|
|
59
59
|
<span
|
|
60
|
-
class="badge-btn min-w-[45px] text-sm text-white px-2
|
|
60
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
|
|
61
61
|
[style.background-color]="getBadgeColor(formats[1])"
|
|
62
62
|
*ngIf="formats[1]"
|
|
63
63
|
>
|
|
64
64
|
{{ formats[1] }}
|
|
65
65
|
</span>
|
|
66
|
-
<div class="
|
|
66
|
+
<div class="shrink-0" *ngIf="formats.slice(2).length > 0">
|
|
67
67
|
<span>+{{ formats.slice(2).length }}</span>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[title]="organisation.name"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
|
-
class="
|
|
7
|
+
class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
|
|
8
8
|
>
|
|
9
9
|
<gn-ui-thumbnail
|
|
10
10
|
class="relative h-full w-full"
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
>
|
|
14
14
|
</gn-ui-thumbnail>
|
|
15
15
|
</div>
|
|
16
|
-
<div class="px-3 pb-2 capitalize flex flex-col
|
|
16
|
+
<div class="px-3 pb-2 capitalize flex flex-col grow overflow-hidden">
|
|
17
17
|
<span
|
|
18
|
-
class="
|
|
18
|
+
class="shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
|
|
19
19
|
data-cy="organizationName"
|
|
20
20
|
>
|
|
21
21
|
{{ organisation.name }}</span
|
|
22
22
|
>
|
|
23
23
|
<p
|
|
24
|
-
class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0
|
|
24
|
+
class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 grow shrink-1 overflow-hidden"
|
|
25
25
|
data-cy="organizationDesc"
|
|
26
26
|
>
|
|
27
27
|
{{ organisation.description }}
|
|
28
28
|
</p>
|
|
29
|
-
<div class="
|
|
29
|
+
<div class="shrink-0 text-primary opacity-50 flex leading-6">
|
|
30
30
|
<mat-icon class="material-symbols-outlined text-primary opacity-50 mr-1"
|
|
31
31
|
>folder_open
|
|
32
32
|
</mat-icon>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * from './lib/ui-elements.module'
|
|
2
|
-
export * from './lib/metadata-info/metadata-info.component'
|
|
3
|
-
export * from './lib/metadata-contact/metadata-contact.component'
|
|
4
|
-
export * from './lib/metadata-catalog/metadata-catalog.component'
|
|
5
|
-
export * from './lib/metadata-quality/metadata-quality.component'
|
|
6
|
-
export * from './lib/metadata-quality-item/metadata-quality-item.component'
|
|
7
|
-
export * from './lib/search-results-error/search-results-error.component'
|
|
8
|
-
export * from './lib/thumbnail/thumbnail.component'
|
|
9
|
-
export * from './lib/content-ghost/content-ghost.component'
|
|
10
|
-
export * from './lib/pagination-buttons/pagination-buttons.component'
|
|
11
1
|
export * from './lib/api-card/api-card.component'
|
|
12
2
|
export * from './lib/avatar/avatar.component'
|
|
13
3
|
export * from './lib/content-ghost/content-ghost.component'
|
|
14
4
|
export * from './lib/download-item/download-item.component'
|
|
15
5
|
export * from './lib/downloads-list/downloads-list.component'
|
|
6
|
+
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
|
16
7
|
export * from './lib/link-card/link-card.component'
|
|
8
|
+
export * from './lib/markdown-editor/markdown-editor.component'
|
|
9
|
+
export * from './lib/markdown-parser/markdown-parser.component'
|
|
10
|
+
export * from './lib/max-lines/max-lines.component'
|
|
11
|
+
export * from './lib/metadata-catalog/metadata-catalog.component'
|
|
12
|
+
export * from './lib/metadata-contact/metadata-contact.component'
|
|
13
|
+
export * from './lib/metadata-info/metadata-info.component'
|
|
14
|
+
export * from './lib/metadata-quality-item/metadata-quality-item.component'
|
|
15
|
+
export * from './lib/metadata-quality/metadata-quality.component'
|
|
16
|
+
export * from './lib/pagination-buttons/pagination-buttons.component'
|
|
17
17
|
export * from './lib/pagination/pagination.component'
|
|
18
|
+
export * from './lib/record-api-form/record-api-form.component'
|
|
18
19
|
export * from './lib/related-record-card/related-record-card.component'
|
|
19
20
|
export * from './lib/search-results-error/search-results-error.component'
|
|
21
|
+
export * from './lib/thumbnail/thumbnail.component'
|
|
22
|
+
export * from './lib/ui-elements.module'
|
|
20
23
|
export * from './lib/user-preview/user-preview.component'
|
|
21
|
-
export * from './lib/
|
|
22
|
-
export * from './lib/record-api-form/record-api-form.component'
|
|
23
|
-
export * from './lib/markdown-parser/markdown-parser.component'
|
|
24
|
-
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
|
24
|
+
export * from './lib/notification/notification.component'
|
package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*ngIf="imageUrl"
|
|
7
7
|
[showContent]="imageUrl !== undefined"
|
|
8
8
|
data-cy="record-thumbnail"
|
|
9
|
-
class="
|
|
9
|
+
class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
|
|
10
10
|
>
|
|
11
11
|
<gn-ui-thumbnail
|
|
12
12
|
class="relative h-full w-full"
|
|
@@ -1,25 +1,4 @@
|
|
|
1
1
|
<div class="h-full flex flex-col">
|
|
2
|
-
<div class="flex-none w-full flex flex-row items-center">
|
|
3
|
-
<p class="flex-none font-bold">{{ label }}</p>
|
|
4
|
-
<div class="flex-1 flex justify-end items-center">
|
|
5
|
-
<gn-ui-button
|
|
6
|
-
[extraClass]="getButtonExtraClass()"
|
|
7
|
-
(buttonClick)="togglePreview()"
|
|
8
|
-
>
|
|
9
|
-
<span class="material-symbols-outlined mr-1 icon-small">{{
|
|
10
|
-
preview ? 'visibility' : 'visibility_off'
|
|
11
|
-
}}</span>
|
|
12
|
-
{{ preview ? 'WYSIWYG' : 'Markdown' }}
|
|
13
|
-
</gn-ui-button>
|
|
14
|
-
<span
|
|
15
|
-
class="material-symbols-outlined m-2 icon-small"
|
|
16
|
-
[matTooltip]="tooltip"
|
|
17
|
-
matTooltipPosition="above"
|
|
18
|
-
>
|
|
19
|
-
help
|
|
20
|
-
</span>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
2
|
<p class="flex-none mb-2 font-medium text-sm text-gray-900">
|
|
24
3
|
{{ helperText }}
|
|
25
4
|
</p>
|
|
@@ -31,26 +31,13 @@ import { MatTooltipModule } from '@angular/material/tooltip'
|
|
|
31
31
|
],
|
|
32
32
|
})
|
|
33
33
|
export class MarkdownEditorComponent {
|
|
34
|
-
@Input()
|
|
35
|
-
@Input() tooltip?: string
|
|
34
|
+
@Input() preview = false
|
|
36
35
|
@Input() helperText?: string
|
|
37
36
|
@Input() placeholder: string
|
|
38
37
|
@Input() textContent: string
|
|
39
38
|
@Output() textContentChanged: EventEmitter<string> =
|
|
40
39
|
new EventEmitter<string>()
|
|
41
40
|
|
|
42
|
-
preview = false
|
|
43
|
-
|
|
44
|
-
getButtonExtraClass() {
|
|
45
|
-
return `${
|
|
46
|
-
this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
|
|
47
|
-
} rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
togglePreview() {
|
|
51
|
-
this.preview = !this.preview
|
|
52
|
-
}
|
|
53
|
-
|
|
54
41
|
textContentChangedHandler(textContent: string) {
|
|
55
42
|
this.textContent = textContent
|
|
56
43
|
this.textContentChanged.emit(this.textContent)
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="p-[16px] flex flex-row gap-[16px] items-start border border-gray-200 shadow-md rounded bg-background"
|
|
3
|
+
>
|
|
4
|
+
<div
|
|
5
|
+
role="alert"
|
|
6
|
+
class="rounded-full text-white p-[6px] w-[32px] h-[32px] flex shrink-0"
|
|
7
|
+
[ngClass]="{
|
|
8
|
+
'bg-red-500': type === 'error',
|
|
9
|
+
'bg-yellow-500': type === 'warning',
|
|
10
|
+
'bg-green-500': type === 'success',
|
|
11
|
+
'bg-blue-500': type === 'info'
|
|
12
|
+
}"
|
|
13
|
+
[ngSwitch]="type"
|
|
14
|
+
>
|
|
15
|
+
<mat-icon class="material-symbols-outlined !w-[18px] !h-[18px] text-[20px]">
|
|
16
|
+
<ng-container *ngSwitchCase="'success'">check_circle</ng-container>
|
|
17
|
+
<ng-container *ngSwitchCase="'info'">info</ng-container>
|
|
18
|
+
<ng-container *ngSwitchCase="'warning'">warning</ng-container>
|
|
19
|
+
<ng-container *ngSwitchCase="'error'">error</ng-container>
|
|
20
|
+
</mat-icon>
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="flex flex-col items-start gap-[4px] pt-[3px] grow shrink overflow-hidden"
|
|
24
|
+
>
|
|
25
|
+
<div class="font-bold text-[16px] text-gray-900">
|
|
26
|
+
{{ title }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="text-[14px] text-gray-800">
|
|
29
|
+
{{ text }}
|
|
30
|
+
</div>
|
|
31
|
+
<a
|
|
32
|
+
href
|
|
33
|
+
*ngIf="closeMessage"
|
|
34
|
+
class="text-[14px] gn-ui-link"
|
|
35
|
+
(click)="handleClose($event)"
|
|
36
|
+
>
|
|
37
|
+
{{ closeMessage }}
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
<gn-ui-button
|
|
41
|
+
type="light"
|
|
42
|
+
class="shrink-0"
|
|
43
|
+
(buttonClick)="handleClose()"
|
|
44
|
+
[style.--gn-ui-button-padding]="0"
|
|
45
|
+
[style.--gn-ui-button-width]="'21px'"
|
|
46
|
+
[style.--gn-ui-button-height]="'21px'"
|
|
47
|
+
>
|
|
48
|
+
<mat-icon class="material-symbols-outlined text-[22px] !w-[21px] !h-[21px]"
|
|
49
|
+
>close</mat-icon
|
|
50
|
+
>
|
|
51
|
+
</gn-ui-button>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
} from '@angular/core'
|
|
8
|
+
import { CommonModule } from '@angular/common'
|
|
9
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
10
|
+
import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'gn-ui-notification',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [CommonModule, MatIconModule, ButtonComponent],
|
|
16
|
+
templateUrl: './notification.component.html',
|
|
17
|
+
styleUrls: ['./notification.component.css'],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class NotificationComponent {
|
|
21
|
+
@Input() type: 'info' | 'warning' | 'error' | 'success' = 'info'
|
|
22
|
+
@Input() title: string
|
|
23
|
+
@Input() text: string
|
|
24
|
+
@Input() closeMessage?: string
|
|
25
|
+
@Output() notificationClose = new EventEmitter<void>()
|
|
26
|
+
|
|
27
|
+
handleClose(event?: Event) {
|
|
28
|
+
event?.preventDefault()
|
|
29
|
+
this.notificationClose.emit()
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
</button>
|
|
15
15
|
</div>
|
|
16
|
-
<div class="flex flex-row flex-wrap justify-between
|
|
16
|
+
<div class="flex flex-row flex-wrap justify-between grow gap-5">
|
|
17
17
|
<div class="flex flex-col gap-3">
|
|
18
18
|
<p class="text-[14px]" translate>record.metadata.api.form.limit</p>
|
|
19
19
|
<div class="flex flex-row items-center gap-2">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
1
2
|
import {
|
|
2
3
|
ChangeDetectionStrategy,
|
|
3
4
|
Component,
|
|
@@ -18,20 +19,21 @@ export const THUMBNAIL_PLACEHOLDER = new InjectionToken<string>(
|
|
|
18
19
|
'thumbnail-placeholder'
|
|
19
20
|
)
|
|
20
21
|
|
|
22
|
+
type FitOptions = 'cover' | 'contain' | 'scale-down'
|
|
21
23
|
type ThumbnailImageObject = {
|
|
22
24
|
url: string
|
|
23
|
-
fit?:
|
|
25
|
+
fit?: FitOptions
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
const DEFAULT_PLACEHOLDER =
|
|
27
29
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5gkNDCUFYjA1nwAAA1pJREFUeNrtnW2TmjAURh8CLlTdrmun///3tZ22+zLuYlehH7jsMGogwRiiec4MM44K6D3x3hAwAIQQQgghhJDYSM5cPwNQAMgBpACUg22GTg2gArAD8A9AKY+9CsgALAF8YRsGALwDeAWw9yGgALCKoKWP+WU8iwxjUsudLBj83sZciIiPSwhoWz7pJ5dUZFQXlEXOZ/DNeTBt3JnhBpc9aacGsOn0BuoIUk3b+5trGnEC4B7Ak4sUlInRU+wB/JbgVxG18KrTBc01EmYmcTFJQUVPy/9zTh/4BthLDOqeenB2DdBtZBN58LsSNpcUoEtTJWM/GIvMhQDde9j6h2OhXAjo6/2Q/lgkLgSQC0IBFEABZEKyiaQv5AAv7fSlS+lPVxRwOXTnEtoTPAs04yfRHGMoz8F/HOiaJfKeggLc78dmOHsVS33y9SUXsDuLlsg6FOAw/fhYhwI0pJ7WoQASpoC9p3UoQEPpaR0K0LCB3fB1e6KfAhxRweAKgQ5PsQxJ+CzCJYC/A7+EWt4TzVCE77GgEsBPHA/G7QBswcE4b+noVRZ2QxkCCqAAQgEUQCiAAggFUAChAAogFEABhAJcfT9FAdOxQuB/ML9lAfdo/qWYy2MK8EiO5mrrliUCvdIudAEzWWzQzWuxwjRnAK9WwAzAWhZTCe3l7cryNQrQBL/txZhKGGrlwc36ogIPfvdzfhuQsDDM80EVZXUFwe+mEJ2EOwBfLfYTTFFWVxL8Qwl3nedSye1jjhEyCjAPflfCWiScU1iDKMrqyoJ/KOFxRDf1sCg/xCxgTPC7EnIHn6GYsiirKw2+ayYryorBn7YoKwb/qCgntywg1OBPdqSsGPyTRXnp07gvPgD8AAl6KIICCAVQAAlLwOg5MSNi9NyqJgKqAHpQoZNZxs5KgG7SDN7AZzgWOxcCtprn5/wVfLb+uWXsrASUPXlvHbmETGKQjBVgMitVJTuaaQS2t/GoEMeE3onEor2jlK4RvwN4G1u9T4n6zp6PMTWAXzCYdCq12OCOhdeYZzT3mIErAW1Fr+HmNOAt82KSesYIAJoRzR2aIVumo+Ms8WwT/HOOZlM0Y+Zzxv2zp/gCTzfzPOyGtdfgp7LEcDvbvSxbWXg/HUIIIYQQQogx/wHLoX7NoCMFPwAAAABJRU5ErkJggg=='
|
|
28
30
|
|
|
29
|
-
type FitOptions = 'cover' | 'contain' | 'scale-down'
|
|
30
|
-
|
|
31
31
|
@Component({
|
|
32
32
|
selector: 'gn-ui-thumbnail',
|
|
33
33
|
templateUrl: './thumbnail.component.html',
|
|
34
34
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
+
standalone: true,
|
|
36
|
+
imports: [CommonModule],
|
|
35
37
|
})
|
|
36
38
|
export class ThumbnailComponent implements OnInit, OnChanges {
|
|
37
39
|
@Input() thumbnailUrl: string | string[]
|
|
@@ -46,6 +46,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
46
46
|
FormsModule,
|
|
47
47
|
NgOptimizedImage,
|
|
48
48
|
MarkdownParserComponent,
|
|
49
|
+
ThumbnailComponent,
|
|
49
50
|
],
|
|
50
51
|
declarations: [
|
|
51
52
|
MetadataInfoComponent,
|
|
@@ -61,7 +62,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
61
62
|
MetadataQualityItemComponent,
|
|
62
63
|
SearchResultsErrorComponent,
|
|
63
64
|
PaginationComponent,
|
|
64
|
-
ThumbnailComponent,
|
|
65
65
|
AvatarComponent,
|
|
66
66
|
UserPreviewComponent,
|
|
67
67
|
GnUiLinkifyDirective,
|
|
@@ -11,7 +11,6 @@ export * from './lib/button/button.component'
|
|
|
11
11
|
export * from './lib/viewport-intersector/viewport-intersector.component'
|
|
12
12
|
export * from './lib/check-toggle/check-toggle.component'
|
|
13
13
|
export * from './lib/ui-inputs.module'
|
|
14
|
-
export * from './lib/form-field'
|
|
15
14
|
export * from './lib/copy-text-button/copy-text-button.component'
|
|
16
15
|
export * from './lib/drag-and-drop-file-input/drag-and-drop-file-input.component'
|
|
17
16
|
export * from './lib/navigation-button/navigation-button.component'
|
|
@@ -15,7 +15,7 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
|
|
|
15
15
|
standalone: true,
|
|
16
16
|
})
|
|
17
17
|
export class ButtonComponent {
|
|
18
|
-
private btnClass
|
|
18
|
+
private btnClass = 'gn-ui-btn-default'
|
|
19
19
|
|
|
20
20
|
@Input() set type(
|
|
21
21
|
value: 'primary' | 'secondary' | 'default' | 'outline' | 'light'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Directive, HostListener, Output, EventEmitter } from '@angular/core'
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[gnUiFilesDrop]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class FilesDropDirective {
|
|
8
|
+
@Output() dragFilesOver: EventEmitter<boolean> = new EventEmitter()
|
|
9
|
+
@Output() dropFiles: EventEmitter<File[]> = new EventEmitter()
|
|
10
|
+
|
|
11
|
+
dragEnterCounter = 0
|
|
12
|
+
|
|
13
|
+
@HostListener('dragenter', ['$event'])
|
|
14
|
+
_onDragEnter(event: DragEvent) {
|
|
15
|
+
event.preventDefault()
|
|
16
|
+
this.dragEnterCounter++
|
|
17
|
+
this.dragFilesOver.emit(true)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@HostListener('dragover', ['$event'])
|
|
21
|
+
_onDragOver(event: DragEvent) {
|
|
22
|
+
event.preventDefault()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@HostListener('dragleave', ['$event'])
|
|
26
|
+
_onDragLeave(event: DragEvent) {
|
|
27
|
+
event.preventDefault()
|
|
28
|
+
this.dragEnterCounter = Math.max(0, this.dragEnterCounter - 1)
|
|
29
|
+
if (this.dragEnterCounter === 0) {
|
|
30
|
+
this.dragFilesOver.emit(false)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@HostListener('drop', ['$event'])
|
|
35
|
+
_onDrop(event: DragEvent) {
|
|
36
|
+
event.preventDefault()
|
|
37
|
+
this.dragEnterCounter = 0
|
|
38
|
+
this.dragFilesOver.emit(false)
|
|
39
|
+
|
|
40
|
+
const files = Array.from(event.dataTransfer.files)
|
|
41
|
+
if (files.length > 0) {
|
|
42
|
+
this.dropFiles.emit(files)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<ng-container *ngIf="previewUrl; then withImage; else withoutImage">
|
|
2
|
+
</ng-container>
|
|
3
|
+
|
|
4
|
+
<ng-template #withImage>
|
|
5
|
+
<div class="w-full h-full flex flex-col gap-2">
|
|
6
|
+
<div class="flex-1 group relative">
|
|
7
|
+
<img
|
|
8
|
+
class="w-full h-full object-cover border-2 border-gray-300 rounded-lg"
|
|
9
|
+
[alt]="altText"
|
|
10
|
+
loading="lazy"
|
|
11
|
+
[src]="previewUrl"
|
|
12
|
+
/>
|
|
13
|
+
<gn-ui-button
|
|
14
|
+
[extraClass]="
|
|
15
|
+
'bg-gray-200 absolute right-2 bottom-2 invisible group-hover:visible'
|
|
16
|
+
"
|
|
17
|
+
(buttonClick)="handleDelete()"
|
|
18
|
+
>
|
|
19
|
+
<mat-icon class="material-symbols-outlined">delete</mat-icon>
|
|
20
|
+
</gn-ui-button>
|
|
21
|
+
</div>
|
|
22
|
+
<input
|
|
23
|
+
*ngIf="showAltTextInput"
|
|
24
|
+
type="text"
|
|
25
|
+
class="py-3 px-2 border-2 border-gray-300 rounded-lg text-sm font-medium"
|
|
26
|
+
[placeholder]="'input.image.altTextPlaceholder' | translate"
|
|
27
|
+
[value]="altText"
|
|
28
|
+
(change)="handleAltTextChange($event)"
|
|
29
|
+
/>
|
|
30
|
+
<div class="flex flex-row gap-2">
|
|
31
|
+
<gn-ui-button
|
|
32
|
+
[extraClass]="'bg-gray-200 font-bold'"
|
|
33
|
+
(buttonClick)="handleDelete()"
|
|
34
|
+
>
|
|
35
|
+
<mat-icon class="material-symbols-outlined me-1">delete</mat-icon>
|
|
36
|
+
{{ 'input.image.delete' | translate }}
|
|
37
|
+
</gn-ui-button>
|
|
38
|
+
<gn-ui-button
|
|
39
|
+
*ngIf="!showAltTextInput"
|
|
40
|
+
[extraClass]="'bg-gray-200 font-bold'"
|
|
41
|
+
(buttonClick)="toggleAltTextInput()"
|
|
42
|
+
>
|
|
43
|
+
<mat-icon class="material-symbols-outlined me-1">add</mat-icon>
|
|
44
|
+
{{ 'input.image.displayAltTextInput' | translate }}
|
|
45
|
+
</gn-ui-button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</ng-template>
|
|
49
|
+
|
|
50
|
+
<ng-template #withoutImage>
|
|
51
|
+
<div class="w-full h-full flex flex-col gap-2">
|
|
52
|
+
<label
|
|
53
|
+
gnUiFilesDrop
|
|
54
|
+
class="block flex-1 border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center gap-4"
|
|
55
|
+
(dragFilesOver)="handleDragFilesOver($event)"
|
|
56
|
+
(dropFiles)="handleDropFiles($event)"
|
|
57
|
+
>
|
|
58
|
+
<div class="w-14 h-14 rounded-md bg-gray-200 grid">
|
|
59
|
+
<mat-icon
|
|
60
|
+
*ngIf="!dragFilesOver && !uploadProgress && !uploadError"
|
|
61
|
+
class="material-symbols-outlined place-self-center text-blue-500"
|
|
62
|
+
>image</mat-icon
|
|
63
|
+
>
|
|
64
|
+
<mat-icon
|
|
65
|
+
*ngIf="dragFilesOver && !uploadProgress && !uploadError"
|
|
66
|
+
class="material-symbols-outlined place-self-center text-blue-500"
|
|
67
|
+
>add_box</mat-icon
|
|
68
|
+
>
|
|
69
|
+
<div *ngIf="uploadProgress">
|
|
70
|
+
<mat-progress-spinner
|
|
71
|
+
class="place-self-center"
|
|
72
|
+
[diameter]="56"
|
|
73
|
+
[mode]="'determinate'"
|
|
74
|
+
[value]="uploadProgress"
|
|
75
|
+
></mat-progress-spinner>
|
|
76
|
+
<span
|
|
77
|
+
class="text-sm font-medium relative inline-block width-[30px] bottom-[40px] left-[15px]"
|
|
78
|
+
>
|
|
79
|
+
{{ uploadProgress }}%
|
|
80
|
+
</span>
|
|
81
|
+
</div>
|
|
82
|
+
<mat-icon
|
|
83
|
+
*ngIf="uploadError"
|
|
84
|
+
class="material-symbols-outlined place-self-center text-rose-500"
|
|
85
|
+
>broken_image</mat-icon
|
|
86
|
+
>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="flex flex-col items-center gap-1">
|
|
89
|
+
<p class="font-medium">{{ getPrimaryText() | translate }}</p>
|
|
90
|
+
<p
|
|
91
|
+
class="text-sm"
|
|
92
|
+
[class]="
|
|
93
|
+
uploadProgress || uploadError
|
|
94
|
+
? 'font-bold text-blue-500 cursor-pointer'
|
|
95
|
+
: 'font-medium text-gray-500'
|
|
96
|
+
"
|
|
97
|
+
(click)="handleSecondaryTextClick()"
|
|
98
|
+
>
|
|
99
|
+
{{ getSecondaryText() | translate }}
|
|
100
|
+
</p>
|
|
101
|
+
</div>
|
|
102
|
+
<input
|
|
103
|
+
type="file"
|
|
104
|
+
class="hidden"
|
|
105
|
+
(change)="handleFileInput($event)"
|
|
106
|
+
[disabled]="showUrlInput || uploadProgress || uploadError"
|
|
107
|
+
/>
|
|
108
|
+
</label>
|
|
109
|
+
<div *ngIf="!showUrlInput" class="flex-none">
|
|
110
|
+
<gn-ui-button
|
|
111
|
+
[extraClass]="'bg-gray-200 font-bold'"
|
|
112
|
+
(buttonClick)="displayUrlInput()"
|
|
113
|
+
>
|
|
114
|
+
<mat-icon class="material-symbols-outlined me-1">link</mat-icon>
|
|
115
|
+
{{ 'input.image.displayUrlInput' | translate }}
|
|
116
|
+
</gn-ui-button>
|
|
117
|
+
</div>
|
|
118
|
+
<div *ngIf="showUrlInput" class="flex-none flex flex-col gap-2">
|
|
119
|
+
<div class="h-2"></div>
|
|
120
|
+
<div class="flex gap-2 items-center">
|
|
121
|
+
<div class="flex-1 flex rounded-lg">
|
|
122
|
+
<span
|
|
123
|
+
class="material-symbols-outlined px-4 inline-flex items-center min-w-fit rounded-s-lg border-2 border-e-0 border-gray-300"
|
|
124
|
+
>link</span
|
|
125
|
+
>
|
|
126
|
+
<input
|
|
127
|
+
type="text"
|
|
128
|
+
class="py-3 ps-1 block w-full border-2 border-s-0 border-e-0 border-gray-300 text-sm font-medium"
|
|
129
|
+
placeholder="https://exemple.com/image.jpg"
|
|
130
|
+
(change)="handleUrlChange($event)"
|
|
131
|
+
/>
|
|
132
|
+
<gn-ui-button
|
|
133
|
+
class="px-1 inline-flex items-center min-w-fit rounded-e-lg border-2 border-s-0 border-gray-300 text-white"
|
|
134
|
+
[extraClass]="
|
|
135
|
+
urlInputValue && !downloadError ? 'bg-blue-500' : 'bg-gray-500'
|
|
136
|
+
"
|
|
137
|
+
[disabled]="!urlInputValue || downloadError"
|
|
138
|
+
(buttonClick)="downloadUrl()"
|
|
139
|
+
>
|
|
140
|
+
<mat-icon class="material-symbols-outlined">arrow_upward</mat-icon>
|
|
141
|
+
</gn-ui-button>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</ng-template>
|