geonetwork-ui 2.4.0-dev.6c8dcba0 → 2.4.0-dev.71a43b38
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/types/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.mjs +2 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +1 -1
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +14 -5
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.mjs +2 -1
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +3 -1
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +12 -4
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +38 -14
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/record/organization.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/model/user.api.model.mjs +1 -1
- package/esm2022/libs/feature/catalog/src/index.mjs +2 -1
- package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +1 -1
- package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +6 -6
- package/esm2022/libs/feature/catalog/src/lib/organization-url.token.mjs +4 -0
- package/esm2022/libs/feature/catalog/src/lib/records/records.service.mjs +4 -6
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +4 -4
- package/esm2022/libs/feature/dataviz/src/lib/feature-dataviz.module.mjs +7 -4
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +6 -4
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +59 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +64 -50
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +17 -35
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +4 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +12 -5
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +12 -6
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +42 -23
- package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +13 -5
- package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +49 -15
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +7 -4
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +8 -12
- package/esm2022/libs/feature/router/src/lib/default/constants.mjs +2 -1
- package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
- package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +9 -2
- package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +8 -1
- package/esm2022/libs/feature/search/src/index.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +7 -4
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +49 -0
- package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
- package/esm2022/libs/feature/search/src/lib/state/selectors.mjs +4 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +7 -3
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +5 -5
- package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +5 -2
- package/esm2022/libs/ui/dataviz/src/lib/figure/figure.component.mjs +5 -8
- package/esm2022/libs/ui/elements/src/index.mjs +1 -2
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/error/error.component.mjs +5 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +7 -7
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +24 -5
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +9 -11
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +59 -26
- package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +28 -0
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +11 -10
- package/esm2022/libs/ui/layout/src/index.mjs +2 -1
- package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +71 -0
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +1 -1
- package/esm2022/libs/ui/search/src/index.mjs +2 -1
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +120 -0
- package/esm2022/libs/ui/widgets/src/index.mjs +1 -2
- package/esm2022/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.mjs +5 -3
- package/esm2022/libs/ui/widgets/src/lib/ui-widgets.module.mjs +1 -6
- package/esm2022/translations/de.json +66 -34
- package/esm2022/translations/en.json +37 -5
- package/esm2022/translations/es.json +37 -5
- package/esm2022/translations/fr.json +38 -6
- package/esm2022/translations/it.json +37 -5
- package/esm2022/translations/nl.json +37 -5
- package/esm2022/translations/pt.json +37 -5
- package/fesm2022/geonetwork-ui.mjs +1187 -688
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/index.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts +31 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +3 -2
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.d.ts +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +3 -2
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +3 -3
- 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 -5
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -7
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/organization.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/record/organization.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts +12 -5
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +4 -3
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +3 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/model/user.api.model.d.ts +1 -1
- package/libs/feature/catalog/src/index.d.ts +1 -0
- package/libs/feature/catalog/src/index.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/organization-url.token.d.ts +3 -0
- package/libs/feature/catalog/src/lib/organization-url.token.d.ts.map +1 -0
- package/libs/feature/catalog/src/lib/records/records.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +1 -0
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +1 -0
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +25 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.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 +6 -6
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +6 -10
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -1
- package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/constants.d.ts +1 -0
- package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.config.d.ts +1 -0
- package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/router.service.d.ts +1 -0
- package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
- package/libs/feature/router/src/lib/default/state/router.facade.d.ts +1 -0
- package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +1 -1
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts +2 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +25 -0
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -0
- package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -0
- package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/selectors.d.ts +1 -0
- package/libs/feature/search/src/lib/state/selectors.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
- package/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.d.ts +2 -2
- package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts +2 -1
- package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts +1 -2
- package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +0 -1
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/error/error.component.d.ts +3 -1
- package/libs/ui/elements/src/lib/error/error.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +5 -1
- package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +19 -19
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +7 -4
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts +11 -0
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -0
- 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/{elements → layout}/src/lib/max-lines/max-lines.component.d.ts +2 -2
- package/libs/ui/layout/src/lib/max-lines/max-lines.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
- package/libs/ui/search/src/index.d.ts +1 -0
- package/libs/ui/search/src/index.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +30 -0
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -0
- package/libs/ui/widgets/src/index.d.ts +0 -1
- package/libs/ui/widgets/src/index.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.d.ts +1 -1
- package/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts +10 -11
- package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.ts +31 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +21 -8
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +1 -0
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +3 -1
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +25 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +81 -21
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +4 -9
- package/src/libs/common/domain/src/lib/model/record/organization.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +13 -6
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +7 -3
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +4 -1
- package/src/libs/common/fixtures/src/lib/organisations.fixture.ts +28 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +8 -0
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetMetadata.api.model.ts +4 -0
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetUploadStatus.api.model.ts +2 -0
- package/src/libs/data-access/gn4/src/openapi/model/user.api.model.ts +1 -1
- package/src/libs/feature/catalog/src/index.ts +1 -0
- package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +0 -1
- package/src/libs/feature/catalog/src/lib/organisations/organisations.component.html +1 -1
- package/src/libs/feature/catalog/src/lib/organisations/organisations.component.ts +2 -2
- package/src/libs/feature/catalog/src/lib/organization-url.token.ts +6 -0
- package/src/libs/feature/catalog/src/lib/records/records.service.ts +6 -8
- package/src/libs/feature/dataviz/src/lib/feature-dataviz.module.ts +2 -1
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +2 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +35 -29
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +1 -0
- package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +19 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +79 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +95 -86
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +7 -22
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +16 -44
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +2 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +11 -4
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +20 -6
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +36 -19
- package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +6 -2
- package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.ts +11 -0
- package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +59 -12
- package/src/libs/feature/record/src/lib/feature-record.module.ts +3 -2
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +42 -31
- package/src/libs/feature/router/src/lib/default/constants.ts +1 -0
- package/src/libs/feature/router/src/lib/default/router.config.ts +1 -0
- package/src/libs/feature/router/src/lib/default/router.service.ts +13 -1
- package/src/libs/feature/router/src/lib/default/state/router.facade.ts +9 -1
- package/src/libs/feature/search/src/index.ts +1 -1
- package/src/libs/feature/search/src/lib/feature-search.module.ts +2 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +2 -2
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +9 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +49 -0
- package/src/libs/feature/search/src/lib/state/search.facade.ts +5 -0
- package/src/libs/feature/search/src/lib/state/selectors.ts +7 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +16 -2
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +8 -6
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.ts +2 -2
- package/src/libs/ui/catalog/src/lib/ui-catalog.module.ts +2 -0
- package/src/libs/ui/dataviz/src/lib/figure/figure.component.html +11 -3
- package/src/libs/ui/dataviz/src/lib/figure/figure.component.ts +3 -7
- package/src/libs/ui/elements/src/index.ts +0 -1
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +29 -29
- package/src/libs/ui/elements/src/lib/error/error.component.html +30 -6
- package/src/libs/ui/elements/src/lib/error/error.component.ts +2 -0
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +22 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +4 -6
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +0 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +23 -19
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +79 -27
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +18 -0
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +27 -0
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +31 -0
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +15 -0
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +38 -0
- 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/max-lines/max-lines.component.css +0 -0
- package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.html +1 -0
- package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.ts +9 -5
- package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -1
- package/src/libs/ui/search/src/index.ts +1 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.css +0 -0
- package/src/libs/{feature → ui}/search/src/lib/results-table/results-table.component.html +8 -8
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +138 -0
- package/src/libs/ui/widgets/src/index.ts +0 -1
- package/src/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.ts +4 -0
- package/src/libs/ui/widgets/src/lib/ui-widgets.module.ts +0 -3
- package/translations/de.json +66 -34
- package/translations/en.json +37 -5
- package/translations/es.json +37 -5
- package/translations/fr.json +38 -6
- package/translations/it.json +37 -5
- package/translations/nl.json +37 -5
- package/translations/pt.json +37 -5
- package/translations/sk.json +38 -6
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +0 -136
- package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +0 -69
- package/esm2022/libs/ui/widgets/src/lib/badge/badge.component.mjs +0 -18
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +0 -36
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +0 -1
- package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +0 -1
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts +0 -7
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts.map +0 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +0 -172
- package/src/libs/ui/widgets/src/lib/badge/badge.component.html +0 -10
- package/src/libs/ui/widgets/src/lib/badge/badge.component.ts +0 -14
- /package/src/libs/feature/{search/src/lib/results-table/results-table.component.css → editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.css} +0 -0
- /package/src/libs/{ui/elements/src/lib/max-lines/max-lines.component.css → feature/search/src/lib/results-table/results-table-container.component.css} +0 -0
- /package/src/libs/ui/{widgets → inputs}/src/lib/badge/badge.component.css +0 -0
|
@@ -5,7 +5,11 @@ import { catchError, map, switchMap } from 'rxjs/operators'
|
|
|
5
5
|
import * as EditorActions from './editor.actions'
|
|
6
6
|
import { EditorService } from '../services/editor.service'
|
|
7
7
|
import { Store } from '@ngrx/store'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
selectRecord,
|
|
10
|
+
selectRecordAlreadySavedOnce,
|
|
11
|
+
selectRecordFieldsConfig,
|
|
12
|
+
} from './editor.selectors'
|
|
9
13
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
10
14
|
|
|
11
15
|
@Injectable()
|
|
@@ -20,28 +24,31 @@ export class EditorEffects {
|
|
|
20
24
|
ofType(EditorActions.saveRecord),
|
|
21
25
|
withLatestFrom(
|
|
22
26
|
this.store.select(selectRecord),
|
|
23
|
-
this.store.select(selectRecordFieldsConfig)
|
|
27
|
+
this.store.select(selectRecordFieldsConfig),
|
|
28
|
+
this.store.select(selectRecordAlreadySavedOnce)
|
|
24
29
|
),
|
|
25
|
-
switchMap(([, record, fieldsConfig]) =>
|
|
26
|
-
this.editorService
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
switchMap(([, record, fieldsConfig, alreadySavedOnce]) =>
|
|
31
|
+
this.editorService
|
|
32
|
+
.saveRecord(record, fieldsConfig, !alreadySavedOnce)
|
|
33
|
+
.pipe(
|
|
34
|
+
switchMap(([record, recordSource]) =>
|
|
35
|
+
of(
|
|
36
|
+
EditorActions.saveRecordSuccess(),
|
|
37
|
+
EditorActions.openRecord({
|
|
38
|
+
record,
|
|
39
|
+
alreadySavedOnce: true,
|
|
40
|
+
recordSource,
|
|
41
|
+
})
|
|
42
|
+
)
|
|
43
|
+
),
|
|
44
|
+
catchError((error) =>
|
|
45
|
+
of(
|
|
46
|
+
EditorActions.saveRecordFailure({
|
|
47
|
+
error: error.message,
|
|
48
|
+
})
|
|
49
|
+
)
|
|
42
50
|
)
|
|
43
51
|
)
|
|
44
|
-
)
|
|
45
52
|
)
|
|
46
53
|
)
|
|
47
54
|
)
|
|
@@ -53,15 +60,14 @@ export class EditorEffects {
|
|
|
53
60
|
)
|
|
54
61
|
)
|
|
55
62
|
|
|
56
|
-
saveRecordDraft$ = createEffect(
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{ dispatch: false }
|
|
63
|
+
saveRecordDraft$ = createEffect(() =>
|
|
64
|
+
this.actions$.pipe(
|
|
65
|
+
ofType(EditorActions.updateRecordField),
|
|
66
|
+
debounceTime(1000),
|
|
67
|
+
withLatestFrom(this.store.select(selectRecord)),
|
|
68
|
+
switchMap(([, record]) => this.editorService.saveRecordAsDraft(record)),
|
|
69
|
+
map(() => EditorActions.draftSaveSuccess())
|
|
70
|
+
)
|
|
65
71
|
)
|
|
66
72
|
|
|
67
73
|
checkHasChangesOnOpen$ = createEffect(() =>
|
|
@@ -26,6 +26,7 @@ export class EditorFacade {
|
|
|
26
26
|
select(EditorSelectors.selectRecordChangedSinceSave)
|
|
27
27
|
)
|
|
28
28
|
recordFields$ = this.store.pipe(select(EditorSelectors.selectRecordFields))
|
|
29
|
+
draftSaveSuccess$ = this.actions$.pipe(ofType(EditorActions.draftSaveSuccess))
|
|
29
30
|
|
|
30
31
|
openRecord(
|
|
31
32
|
record: CatalogRecord,
|
|
@@ -44,6 +44,6 @@ export const selectRecordFields = createSelector(
|
|
|
44
44
|
(state: EditorState) =>
|
|
45
45
|
state.fieldsConfig.map((fieldConfig) => ({
|
|
46
46
|
config: fieldConfig,
|
|
47
|
-
value: state.record?.[fieldConfig.model]
|
|
47
|
+
value: state.record?.[fieldConfig.model] ?? null,
|
|
48
48
|
}))
|
|
49
49
|
)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="flex flex-col gap-3">
|
|
2
|
+
<gn-ui-autocomplete
|
|
3
|
+
[placeholder]="'Search for keywords in all thesaurus'"
|
|
4
|
+
[displayWithFn]="displayWithFn"
|
|
5
|
+
[action]="autoCompleteAction"
|
|
6
|
+
(itemSelected)="handleItemSelection($event)"
|
|
7
|
+
[clearOnSelection]="true"
|
|
8
|
+
[minCharacterCount]="0"
|
|
9
|
+
[allowSubmit]="false"
|
|
10
|
+
></gn-ui-autocomplete>
|
|
11
|
+
<div class="flex gap-2 flex-wrap">
|
|
12
|
+
<gn-ui-badge
|
|
13
|
+
*ngFor="let keyword of control.value; let index = index"
|
|
14
|
+
[removable]="true"
|
|
15
|
+
(badgeRemoveClicked)="removeKeyword(index)"
|
|
16
|
+
>{{ keyword.label }}</gn-ui-badge
|
|
17
|
+
>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
3
|
+
import { FormControl } from '@angular/forms'
|
|
4
|
+
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
5
|
+
import {
|
|
6
|
+
AutocompleteComponent,
|
|
7
|
+
DropdownSelectorComponent,
|
|
8
|
+
UiInputsModule,
|
|
9
|
+
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
10
|
+
import { UiWidgetsModule } from '../../../../../../../../../libs/ui/widgets/src'
|
|
11
|
+
import { map } from 'rxjs'
|
|
12
|
+
import { Keyword } from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
13
|
+
|
|
14
|
+
type AutocompleteItem = { title: string; value: Keyword }
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'gn-ui-form-field-keywords',
|
|
18
|
+
templateUrl: './form-field-keywords.component.html',
|
|
19
|
+
styleUrls: ['./form-field-keywords.component.css'],
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [
|
|
23
|
+
DropdownSelectorComponent,
|
|
24
|
+
UiInputsModule,
|
|
25
|
+
CommonModule,
|
|
26
|
+
UiWidgetsModule,
|
|
27
|
+
AutocompleteComponent,
|
|
28
|
+
],
|
|
29
|
+
})
|
|
30
|
+
export class FormFieldKeywordsComponent {
|
|
31
|
+
@Input() control: FormControl<Keyword[]>
|
|
32
|
+
|
|
33
|
+
displayWithFn = (item: AutocompleteItem) => {
|
|
34
|
+
return `${item.title} (${item.value.thesaurus?.name})`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
autoCompleteAction = (query: string) => {
|
|
38
|
+
return this.platformService
|
|
39
|
+
.searchKeywords(query, ['temporal', 'theme', 'other'])
|
|
40
|
+
.pipe(
|
|
41
|
+
map((keywords) =>
|
|
42
|
+
keywords.map((keyword) => {
|
|
43
|
+
return { title: keyword.label, value: keyword }
|
|
44
|
+
})
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
constructor(private platformService: PlatformServiceInterface) {}
|
|
50
|
+
|
|
51
|
+
handleItemSelection(item: AutocompleteItem) {
|
|
52
|
+
this.addKeyword(item.value)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
addKeyword(keyword: Keyword) {
|
|
56
|
+
const addedKeywords = [...this.control.value, keyword]
|
|
57
|
+
|
|
58
|
+
// remove duplicates from keyword
|
|
59
|
+
const filteredKeywords = addedKeywords.filter((value, index, self) => {
|
|
60
|
+
return (
|
|
61
|
+
index ===
|
|
62
|
+
self.findIndex(
|
|
63
|
+
(t) =>
|
|
64
|
+
t?.label === value?.label &&
|
|
65
|
+
t?.thesaurus?.id === value?.thesaurus?.id &&
|
|
66
|
+
t?.type === value?.type
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
this.control.setValue(filteredKeywords)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
removeKeyword(index: number) {
|
|
75
|
+
const removeKeywords = this.control.value.filter((_, i) => i !== index)
|
|
76
|
+
|
|
77
|
+
this.control.setValue(removeKeywords)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -5,12 +5,17 @@ import {
|
|
|
5
5
|
OnInit,
|
|
6
6
|
} from '@angular/core'
|
|
7
7
|
import { FormControl } from '@angular/forms'
|
|
8
|
-
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
9
8
|
import {
|
|
10
9
|
CheckToggleComponent,
|
|
10
|
+
DropdownChoice,
|
|
11
11
|
DropdownSelectorComponent,
|
|
12
12
|
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
13
13
|
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
14
|
+
import {
|
|
15
|
+
UpdateFrequency,
|
|
16
|
+
UpdateFrequencyCustom,
|
|
17
|
+
} from '../../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
18
|
+
import { firstValueFrom } from 'rxjs'
|
|
14
19
|
|
|
15
20
|
@Component({
|
|
16
21
|
selector: 'gn-ui-form-field-update-frequency',
|
|
@@ -21,26 +26,32 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
|
21
26
|
imports: [CheckToggleComponent, DropdownSelectorComponent, TranslateModule],
|
|
22
27
|
})
|
|
23
28
|
export class FormFieldUpdateFrequencyComponent implements OnInit {
|
|
24
|
-
@Input() control: FormControl
|
|
29
|
+
@Input() control: FormControl<UpdateFrequency>
|
|
30
|
+
|
|
31
|
+
protected choices: DropdownChoice[] = []
|
|
25
32
|
|
|
26
33
|
get planned() {
|
|
27
|
-
return this.control.value !== '
|
|
34
|
+
return typeof this.control.value !== 'string'
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
constructor(private translateService: TranslateService) {}
|
|
31
38
|
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
async ngOnInit() {
|
|
40
|
+
this.choices = await this.getInitialChoices()
|
|
41
|
+
if (typeof this.control.value === 'string') {
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
const updatedTimes = this.control.value.updatedTimes
|
|
45
|
+
const per = this.control.value.per
|
|
46
|
+
// the update frequency is not in the list; make it appear there
|
|
35
47
|
if (updatedTimes && updatedTimes !== 1 && updatedTimes !== 2) {
|
|
36
48
|
this.choices = [
|
|
37
49
|
{
|
|
38
50
|
value: `${per}.${updatedTimes}`,
|
|
39
|
-
label:
|
|
40
|
-
`domain.record.updateFrequency.${per}`,
|
|
41
|
-
{
|
|
51
|
+
label: await firstValueFrom(
|
|
52
|
+
this.translateService.get(`domain.record.updateFrequency.${per}`, {
|
|
42
53
|
count: updatedTimes,
|
|
43
|
-
}
|
|
54
|
+
})
|
|
44
55
|
),
|
|
45
56
|
},
|
|
46
57
|
...this.choices,
|
|
@@ -56,88 +67,86 @@ export class FormFieldUpdateFrequencyComponent implements OnInit {
|
|
|
56
67
|
}
|
|
57
68
|
}
|
|
58
69
|
|
|
59
|
-
get selectedFrequency() {
|
|
70
|
+
get selectedFrequency(): string {
|
|
71
|
+
if (typeof this.control.value === 'string') return null
|
|
60
72
|
const { updatedTimes, per } = this.control.value
|
|
61
73
|
return `${per}.${updatedTimes}`
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
onSelectFrequencyValue(value: unknown) {
|
|
65
77
|
const split = (value as string).split('.')
|
|
66
|
-
this.control.setValue({
|
|
78
|
+
this.control.setValue({
|
|
79
|
+
updatedTimes: Number(split[1]),
|
|
80
|
+
per: split[0] as UpdateFrequencyCustom['per'],
|
|
81
|
+
})
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{
|
|
138
|
-
count: 2,
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
},
|
|
142
|
-
]
|
|
84
|
+
private async getInitialChoices() {
|
|
85
|
+
return [
|
|
86
|
+
{
|
|
87
|
+
value: 'day.1',
|
|
88
|
+
label: await firstValueFrom(
|
|
89
|
+
this.translateService.get('domain.record.updateFrequency.day', {
|
|
90
|
+
count: 1,
|
|
91
|
+
})
|
|
92
|
+
),
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: 'day.2',
|
|
96
|
+
label: await firstValueFrom(
|
|
97
|
+
this.translateService.get('domain.record.updateFrequency.day', {
|
|
98
|
+
count: 2,
|
|
99
|
+
})
|
|
100
|
+
),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: 'week.1',
|
|
104
|
+
label: await firstValueFrom(
|
|
105
|
+
this.translateService.get('domain.record.updateFrequency.week', {
|
|
106
|
+
count: 1,
|
|
107
|
+
})
|
|
108
|
+
),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: 'week.2',
|
|
112
|
+
label: await firstValueFrom(
|
|
113
|
+
this.translateService.get('domain.record.updateFrequency.week', {
|
|
114
|
+
count: 2,
|
|
115
|
+
})
|
|
116
|
+
),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: 'month.1',
|
|
120
|
+
label: await firstValueFrom(
|
|
121
|
+
this.translateService.get('domain.record.updateFrequency.month', {
|
|
122
|
+
count: 1,
|
|
123
|
+
})
|
|
124
|
+
),
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: 'month.2',
|
|
128
|
+
label: await firstValueFrom(
|
|
129
|
+
this.translateService.get('domain.record.updateFrequency.month', {
|
|
130
|
+
count: 2,
|
|
131
|
+
})
|
|
132
|
+
),
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: 'year.1',
|
|
136
|
+
label: await firstValueFrom(
|
|
137
|
+
this.translateService.get('domain.record.updateFrequency.year', {
|
|
138
|
+
count: 1,
|
|
139
|
+
})
|
|
140
|
+
),
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: 'year.2',
|
|
144
|
+
label: await firstValueFrom(
|
|
145
|
+
this.translateService.get('domain.record.updateFrequency.year', {
|
|
146
|
+
count: 2,
|
|
147
|
+
})
|
|
148
|
+
),
|
|
149
|
+
},
|
|
150
|
+
]
|
|
151
|
+
}
|
|
143
152
|
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -68,32 +68,17 @@
|
|
|
68
68
|
</ng-container>
|
|
69
69
|
<ng-container *ngIf="isSimpleField">
|
|
70
70
|
<gn-ui-form-field-simple
|
|
71
|
-
|
|
71
|
+
type="text"
|
|
72
72
|
[control]="formControl"
|
|
73
|
-
[readonly]="
|
|
74
|
-
[invalid]="isFieldInvalid"
|
|
73
|
+
[readonly]="isReadOnly"
|
|
75
74
|
></gn-ui-form-field-simple>
|
|
76
75
|
</ng-container>
|
|
77
|
-
<ng-container *ngIf="isFileField">
|
|
78
|
-
<gn-ui-form-field-file
|
|
79
|
-
[control]="formControl"
|
|
80
|
-
[readonly]="isFieldLocked"
|
|
81
|
-
[invalid]="isFieldInvalid"
|
|
82
|
-
></gn-ui-form-field-file>
|
|
83
|
-
</ng-container>
|
|
84
|
-
<ng-container *ngIf="isArrayField">
|
|
85
|
-
<gn-ui-form-field-array></gn-ui-form-field-array>
|
|
86
|
-
</ng-container>
|
|
87
|
-
<ng-container *ngIf="isObjectField">
|
|
88
|
-
<gn-ui-form-field-object></gn-ui-form-field-object>
|
|
89
|
-
</ng-container>
|
|
90
76
|
<ng-container *ngIf="isSpatialExtentField">
|
|
91
77
|
<gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
|
|
92
78
|
</ng-container>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</div>
|
|
79
|
+
<ng-container *ngIf="isKeywords">
|
|
80
|
+
<gn-ui-form-field-keywords
|
|
81
|
+
[control]="formControl"
|
|
82
|
+
></gn-ui-form-field-keywords>
|
|
83
|
+
</ng-container>
|
|
99
84
|
</ng-template>
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -27,6 +27,8 @@ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.
|
|
|
27
27
|
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
28
28
|
import { FormFieldConfig } from './form-field.model'
|
|
29
29
|
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
30
|
+
import { CatalogRecordKeys } from '../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
31
|
+
import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-keywords.component'
|
|
30
32
|
|
|
31
33
|
@Component({
|
|
32
34
|
selector: 'gn-ui-form-field',
|
|
@@ -51,11 +53,12 @@ import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency
|
|
|
51
53
|
FormFieldSpatialExtentComponent,
|
|
52
54
|
FormFieldFileComponent,
|
|
53
55
|
FormFieldArrayComponent,
|
|
56
|
+
FormFieldKeywordsComponent,
|
|
54
57
|
TranslateModule,
|
|
55
58
|
],
|
|
56
59
|
})
|
|
57
60
|
export class FormFieldComponent {
|
|
58
|
-
@Input() model:
|
|
61
|
+
@Input() model: CatalogRecordKeys
|
|
59
62
|
@Input() config: FormFieldConfig
|
|
60
63
|
@Input() set value(v: unknown) {
|
|
61
64
|
this.formControl.setValue(v, {
|
|
@@ -76,49 +79,6 @@ export class FormFieldComponent {
|
|
|
76
79
|
this.titleInput.nativeElement.children[0].focus()
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
get simpleType() {
|
|
80
|
-
return this.config.type as
|
|
81
|
-
| 'date'
|
|
82
|
-
| 'url'
|
|
83
|
-
| 'text'
|
|
84
|
-
| 'number'
|
|
85
|
-
| 'list'
|
|
86
|
-
| 'toggle'
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
get isSimpleField() {
|
|
90
|
-
return (
|
|
91
|
-
this.config.type === 'text' ||
|
|
92
|
-
this.config.type === 'number' ||
|
|
93
|
-
this.config.type === 'date' ||
|
|
94
|
-
this.config.type === 'list' ||
|
|
95
|
-
this.config.type === 'url' ||
|
|
96
|
-
this.config.type === 'toggle'
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
get isFileField() {
|
|
100
|
-
return this.config.type === 'file'
|
|
101
|
-
}
|
|
102
|
-
get isSpatialExtentField() {
|
|
103
|
-
return this.config.type === 'spatial_extent'
|
|
104
|
-
}
|
|
105
|
-
get isArrayField() {
|
|
106
|
-
return this.config.type === 'array'
|
|
107
|
-
}
|
|
108
|
-
get isObjectField() {
|
|
109
|
-
return this.config.type === 'object'
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
get isFieldOk() {
|
|
113
|
-
return !this.config.locked && !this.config.invalid
|
|
114
|
-
}
|
|
115
|
-
get isFieldLocked() {
|
|
116
|
-
return this.config.locked
|
|
117
|
-
}
|
|
118
|
-
get isFieldInvalid() {
|
|
119
|
-
return !this.config.locked && this.config.invalid
|
|
120
|
-
}
|
|
121
|
-
|
|
122
82
|
get isTitle() {
|
|
123
83
|
return this.model === 'title'
|
|
124
84
|
}
|
|
@@ -137,6 +97,18 @@ export class FormFieldComponent {
|
|
|
137
97
|
get isTemporalExtents() {
|
|
138
98
|
return this.model === 'temporalExtents'
|
|
139
99
|
}
|
|
100
|
+
get isSpatialExtentField() {
|
|
101
|
+
return this.model === 'spatialExtents'
|
|
102
|
+
}
|
|
103
|
+
get isSimpleField() {
|
|
104
|
+
return this.model === 'uniqueIdentifier' || this.model === 'recordUpdated'
|
|
105
|
+
}
|
|
106
|
+
get isReadOnly() {
|
|
107
|
+
return this.model === 'uniqueIdentifier' || this.model === 'recordUpdated'
|
|
108
|
+
}
|
|
109
|
+
get isKeywords() {
|
|
110
|
+
return this.model === 'keywords'
|
|
111
|
+
}
|
|
140
112
|
|
|
141
113
|
get withoutWrapper() {
|
|
142
114
|
return this.model === 'title' || this.model === 'abstract'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export * from './form-field-keywords/form-field-keywords.component'
|
|
1
2
|
export * from './form-field-license/form-field-license.component'
|
|
2
3
|
export * from './form-field-resource-updated/form-field-resource-updated.component'
|
|
3
4
|
export * from './form-field-temporal-extents/form-field-temporal-extents.component'
|
|
4
|
-
|
|
5
5
|
export * from './form-field-simple/form-field-simple.component'
|
|
6
6
|
export * from './form-field-file/form-field-file.component'
|
|
7
7
|
export * from './form-field-rich/form-field-rich.component'
|
|
@@ -15,6 +15,7 @@ import * as fromEditor from './+state/editor.reducer'
|
|
|
15
15
|
import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
|
|
16
16
|
import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
|
|
17
17
|
import { WizardComponent } from './components/wizard/wizard.component'
|
|
18
|
+
import { Gn4PlatformService } from '../../../../../libs/api/repository/src'
|
|
18
19
|
|
|
19
20
|
@NgModule({
|
|
20
21
|
declarations: [
|
|
@@ -39,7 +40,7 @@ import { WizardComponent } from './components/wizard/wizard.component'
|
|
|
39
40
|
EffectsModule.forFeature([EditorEffects]),
|
|
40
41
|
],
|
|
41
42
|
exports: [WizardComponent, WizardSummarizeComponent],
|
|
42
|
-
providers: [EditorFacade],
|
|
43
|
+
providers: [EditorFacade, Gn4PlatformService],
|
|
43
44
|
})
|
|
44
45
|
export class FeatureEditorModule {}
|
|
45
46
|
export * from './models/index'
|
|
@@ -5,21 +5,21 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
|
|
|
5
5
|
{
|
|
6
6
|
model: 'title',
|
|
7
7
|
formFieldConfig: {
|
|
8
|
-
labelKey: '
|
|
8
|
+
labelKey: marker('editor.record.form.metadata.title'),
|
|
9
9
|
type: 'text',
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
model: 'abstract',
|
|
14
14
|
formFieldConfig: {
|
|
15
|
-
labelKey: '
|
|
15
|
+
labelKey: marker('editor.record.form.abstract'),
|
|
16
16
|
type: 'rich',
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
model: 'uniqueIdentifier',
|
|
21
21
|
formFieldConfig: {
|
|
22
|
-
labelKey: '
|
|
22
|
+
labelKey: marker('editor.record.form.unique.identifier'),
|
|
23
23
|
type: 'text',
|
|
24
24
|
locked: true,
|
|
25
25
|
},
|
|
@@ -27,7 +27,7 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
|
|
|
27
27
|
{
|
|
28
28
|
model: 'recordUpdated',
|
|
29
29
|
formFieldConfig: {
|
|
30
|
-
labelKey: '
|
|
30
|
+
labelKey: marker('editor.record.form.record.updated'),
|
|
31
31
|
type: 'text',
|
|
32
32
|
locked: true,
|
|
33
33
|
},
|
|
@@ -61,4 +61,11 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
|
|
|
61
61
|
type: 'list',
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
model: 'keywords',
|
|
66
|
+
formFieldConfig: {
|
|
67
|
+
labelKey: marker('editor.record.form.keywords'),
|
|
68
|
+
type: 'list',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
64
71
|
]
|