invenio-vocabularies 9.1.2__py2.py3-none-any.whl
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.
- invenio_vocabularies/__init__.py +16 -0
- invenio_vocabularies/administration/__init__.py +10 -0
- invenio_vocabularies/administration/views/__init__.py +10 -0
- invenio_vocabularies/administration/views/vocabularies.py +43 -0
- invenio_vocabularies/alembic/17c703ce1eb7_create_names_table.py +54 -0
- invenio_vocabularies/alembic/3ba812d80559_add_internal_name_id.py +36 -0
- invenio_vocabularies/alembic/4a9a4fd235f8_create_vocabulary_schemes.py +37 -0
- invenio_vocabularies/alembic/4f365fced43f_create_vocabularies_tables.py +92 -0
- invenio_vocabularies/alembic/55a700f897b6_add_names_and_afiliations_pid_column.py +96 -0
- invenio_vocabularies/alembic/6312f33645c1_create_affiliations_table.py +54 -0
- invenio_vocabularies/alembic/676dd587542d_create_funders_vocabulary_table.py +58 -0
- invenio_vocabularies/alembic/8ff82dfb0be8_create_vocabularies_branch.py +28 -0
- invenio_vocabularies/alembic/__init__.py +9 -0
- invenio_vocabularies/alembic/af2457652217_drop_unique_constraint_from_internal_id.py +37 -0
- invenio_vocabularies/alembic/e1146238edd3_create_awards_table.py +56 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.eslintrc.yml +11 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.prettierrc +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/package.json +25 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/AwardResults.js +95 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/CustomAwardForm.js +139 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FunderDropdown.js +87 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js +244 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.test.js +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingFieldItem.js +152 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingModal.js +246 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/NoAwardResults.js +37 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/index.js +8 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/i18next.js +36 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/_generatedTranslations.js +66 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/messages.po +97 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/messages.po +88 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/index.js +24 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/messages.po +90 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/package.json +19 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/translations.pot +88 -0
- invenio_vocabularies/cli.py +175 -0
- invenio_vocabularies/config.py +231 -0
- invenio_vocabularies/contrib/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/__init__.py +20 -0
- invenio_vocabularies/contrib/affiliations/affiliations.py +61 -0
- invenio_vocabularies/contrib/affiliations/api.py +13 -0
- invenio_vocabularies/contrib/affiliations/config.py +79 -0
- invenio_vocabularies/contrib/affiliations/datastreams.py +301 -0
- invenio_vocabularies/contrib/affiliations/facets.py +36 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/affiliations/affiliation-v1.0.0.json +63 -0
- invenio_vocabularies/contrib/affiliations/mappings/__init__.py +10 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/models.py +13 -0
- invenio_vocabularies/contrib/affiliations/resources.py +16 -0
- invenio_vocabularies/contrib/affiliations/schema.py +71 -0
- invenio_vocabularies/contrib/affiliations/services.py +15 -0
- invenio_vocabularies/contrib/awards/__init__.py +19 -0
- invenio_vocabularies/contrib/awards/api.py +13 -0
- invenio_vocabularies/contrib/awards/awards.py +96 -0
- invenio_vocabularies/contrib/awards/config.py +59 -0
- invenio_vocabularies/contrib/awards/datastreams.py +372 -0
- invenio_vocabularies/contrib/awards/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/jsonschemas/awards/award-v1.0.0.json +91 -0
- invenio_vocabularies/contrib/awards/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/v7/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/models.py +13 -0
- invenio_vocabularies/contrib/awards/resources.py +16 -0
- invenio_vocabularies/contrib/awards/schema.py +119 -0
- invenio_vocabularies/contrib/awards/serializer.py +47 -0
- invenio_vocabularies/contrib/awards/services.py +15 -0
- invenio_vocabularies/contrib/common/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/datastreams.py +84 -0
- invenio_vocabularies/contrib/common/ror/__init__.py +9 -0
- invenio_vocabularies/contrib/common/ror/datastreams.py +230 -0
- invenio_vocabularies/contrib/funders/__init__.py +19 -0
- invenio_vocabularies/contrib/funders/api.py +13 -0
- invenio_vocabularies/contrib/funders/config.py +78 -0
- invenio_vocabularies/contrib/funders/datastreams.py +97 -0
- invenio_vocabularies/contrib/funders/facets.py +36 -0
- invenio_vocabularies/contrib/funders/funders.py +72 -0
- invenio_vocabularies/contrib/funders/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/jsonschemas/funders/funder-v1.0.0.json +65 -0
- invenio_vocabularies/contrib/funders/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/v7/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/models.py +13 -0
- invenio_vocabularies/contrib/funders/resources.py +16 -0
- invenio_vocabularies/contrib/funders/schema.py +88 -0
- invenio_vocabularies/contrib/funders/serializer.py +33 -0
- invenio_vocabularies/contrib/funders/services.py +15 -0
- invenio_vocabularies/contrib/names/__init__.py +19 -0
- invenio_vocabularies/contrib/names/api.py +13 -0
- invenio_vocabularies/contrib/names/components.py +24 -0
- invenio_vocabularies/contrib/names/config.py +75 -0
- invenio_vocabularies/contrib/names/datastreams.py +483 -0
- invenio_vocabularies/contrib/names/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/names/jsonschemas/names/name-v1.0.0.json +68 -0
- invenio_vocabularies/contrib/names/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/v7/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/models.py +13 -0
- invenio_vocabularies/contrib/names/names.py +80 -0
- invenio_vocabularies/contrib/names/permissions.py +30 -0
- invenio_vocabularies/contrib/names/resources.py +54 -0
- invenio_vocabularies/contrib/names/s3client.py +50 -0
- invenio_vocabularies/contrib/names/schema.py +121 -0
- invenio_vocabularies/contrib/names/services.py +64 -0
- invenio_vocabularies/contrib/subjects/__init__.py +22 -0
- invenio_vocabularies/contrib/subjects/api.py +14 -0
- invenio_vocabularies/contrib/subjects/config.py +90 -0
- invenio_vocabularies/contrib/subjects/datastreams.py +63 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/datastreams.py +101 -0
- invenio_vocabularies/contrib/subjects/facets.py +23 -0
- invenio_vocabularies/contrib/subjects/gemet/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/gemet/datastreams.py +140 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/__init__.py +10 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/subjects/subject-v1.0.0.json +69 -0
- invenio_vocabularies/contrib/subjects/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mesh/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mesh/datastreams.py +48 -0
- invenio_vocabularies/contrib/subjects/models.py +14 -0
- invenio_vocabularies/contrib/subjects/nvs/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/nvs/datastreams.py +114 -0
- invenio_vocabularies/contrib/subjects/resources.py +17 -0
- invenio_vocabularies/contrib/subjects/schema.py +101 -0
- invenio_vocabularies/contrib/subjects/services.py +30 -0
- invenio_vocabularies/contrib/subjects/subjects.py +55 -0
- invenio_vocabularies/datastreams/__init__.py +18 -0
- invenio_vocabularies/datastreams/datastreams.py +239 -0
- invenio_vocabularies/datastreams/errors.py +29 -0
- invenio_vocabularies/datastreams/factories.py +86 -0
- invenio_vocabularies/datastreams/readers.py +448 -0
- invenio_vocabularies/datastreams/tasks.py +115 -0
- invenio_vocabularies/datastreams/transformers.py +130 -0
- invenio_vocabularies/datastreams/writers.py +222 -0
- invenio_vocabularies/datastreams/xml.py +34 -0
- invenio_vocabularies/ext.py +179 -0
- invenio_vocabularies/factories.py +193 -0
- invenio_vocabularies/fixtures.py +52 -0
- invenio_vocabularies/jobs.py +207 -0
- invenio_vocabularies/proxies.py +27 -0
- invenio_vocabularies/records/__init__.py +9 -0
- invenio_vocabularies/records/api.py +53 -0
- invenio_vocabularies/records/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/definitions-v1.0.0.json +30 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/vocabulary-v1.0.0.json +55 -0
- invenio_vocabularies/records/mappings/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v2/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/records/mappings/v7/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/models.py +90 -0
- invenio_vocabularies/records/pidprovider.py +118 -0
- invenio_vocabularies/records/systemfields/__init__.py +16 -0
- invenio_vocabularies/records/systemfields/pid.py +125 -0
- invenio_vocabularies/records/systemfields/relations.py +51 -0
- invenio_vocabularies/resources/__init__.py +23 -0
- invenio_vocabularies/resources/config.py +105 -0
- invenio_vocabularies/resources/resource.py +156 -0
- invenio_vocabularies/resources/schema.py +21 -0
- invenio_vocabularies/resources/serializer.py +39 -0
- invenio_vocabularies/services/__init__.py +19 -0
- invenio_vocabularies/services/components.py +58 -0
- invenio_vocabularies/services/config.py +173 -0
- invenio_vocabularies/services/custom_fields/__init__.py +17 -0
- invenio_vocabularies/services/custom_fields/subject.py +82 -0
- invenio_vocabularies/services/custom_fields/vocabulary.py +96 -0
- invenio_vocabularies/services/facets.py +114 -0
- invenio_vocabularies/services/generators.py +38 -0
- invenio_vocabularies/services/permissions.py +30 -0
- invenio_vocabularies/services/querystr.py +57 -0
- invenio_vocabularies/services/results.py +110 -0
- invenio_vocabularies/services/schema.py +163 -0
- invenio_vocabularies/services/service.py +189 -0
- invenio_vocabularies/services/tasks.py +38 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/subjects.html +23 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabularies-list.html +12 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabulary-details.html +71 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.po +271 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.po +293 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.po +279 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/messages.pot +270 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/views.py +53 -0
- invenio_vocabularies/webpack.py +51 -0
- invenio_vocabularies-9.1.2.dist-info/METADATA +517 -0
- invenio_vocabularies-9.1.2.dist-info/RECORD +337 -0
- invenio_vocabularies-9.1.2.dist-info/WHEEL +6 -0
- invenio_vocabularies-9.1.2.dist-info/entry_points.txt +73 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/AUTHORS.rst +13 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/LICENSE +21 -0
- invenio_vocabularies-9.1.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// This file is part of InvenioVocabularies
|
|
2
|
+
// Copyright (C) 2021-2023 CERN.
|
|
3
|
+
// Copyright (C) 2021 Northwestern University.
|
|
4
|
+
// Copyright (C) 2021 Graz University of Technology.
|
|
5
|
+
//
|
|
6
|
+
// Invenio is free software; you can redistribute it and/or modify it
|
|
7
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
8
|
+
|
|
9
|
+
import { i18next } from "@translations/invenio_vocabularies/i18next";
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { useDrag, useDrop } from "react-dnd";
|
|
12
|
+
import { Button, Icon, Label, List, Ref } from "semantic-ui-react";
|
|
13
|
+
|
|
14
|
+
import FundingModal from "./FundingModal";
|
|
15
|
+
import PropTypes from "prop-types";
|
|
16
|
+
|
|
17
|
+
export const FundingFieldItem = ({
|
|
18
|
+
compKey,
|
|
19
|
+
index,
|
|
20
|
+
fundingItem,
|
|
21
|
+
awardType,
|
|
22
|
+
moveFunding,
|
|
23
|
+
replaceFunding,
|
|
24
|
+
removeFunding,
|
|
25
|
+
searchConfig,
|
|
26
|
+
deserializeAward,
|
|
27
|
+
deserializeFunder,
|
|
28
|
+
computeFundingContents,
|
|
29
|
+
}) => {
|
|
30
|
+
const dropRef = React.useRef(null);
|
|
31
|
+
// eslint-disable-next-line no-unused-vars
|
|
32
|
+
const [_, drag, preview] = useDrag({
|
|
33
|
+
item: { index, type: "award" },
|
|
34
|
+
});
|
|
35
|
+
const [{ hidden }, drop] = useDrop({
|
|
36
|
+
accept: "award",
|
|
37
|
+
hover(item, monitor) {
|
|
38
|
+
if (!dropRef.current) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const dragIndex = item.index;
|
|
42
|
+
const hoverIndex = index;
|
|
43
|
+
|
|
44
|
+
// Don't replace items with themselves
|
|
45
|
+
if (dragIndex === hoverIndex) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (monitor.isOver({ shallow: true })) {
|
|
50
|
+
moveFunding(dragIndex, hoverIndex);
|
|
51
|
+
item.index = hoverIndex;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
collect: (monitor) => ({
|
|
55
|
+
hidden: monitor.isOver({ shallow: true }),
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
let { headerContent, descriptionContent, awardOrFunder } =
|
|
60
|
+
computeFundingContents(fundingItem);
|
|
61
|
+
|
|
62
|
+
// Initialize the ref explicitely
|
|
63
|
+
drop(dropRef);
|
|
64
|
+
return (
|
|
65
|
+
<Ref innerRef={dropRef} key={compKey}>
|
|
66
|
+
<List.Item
|
|
67
|
+
key={compKey}
|
|
68
|
+
className={hidden ? "deposit-drag-listitem hidden" : "deposit-drag-listitem"}
|
|
69
|
+
>
|
|
70
|
+
<List.Content floated="right">
|
|
71
|
+
<FundingModal
|
|
72
|
+
searchConfig={searchConfig}
|
|
73
|
+
onAwardChange={(selectedFunding) => {
|
|
74
|
+
replaceFunding(index, selectedFunding);
|
|
75
|
+
}}
|
|
76
|
+
mode={awardType}
|
|
77
|
+
action="edit"
|
|
78
|
+
trigger={
|
|
79
|
+
<Button size="mini" primary type="button">
|
|
80
|
+
{i18next.t("Edit")}
|
|
81
|
+
</Button>
|
|
82
|
+
}
|
|
83
|
+
deserializeAward={deserializeAward}
|
|
84
|
+
deserializeFunder={deserializeFunder}
|
|
85
|
+
computeFundingContents={computeFundingContents}
|
|
86
|
+
initialFunding={fundingItem}
|
|
87
|
+
/>
|
|
88
|
+
<Button size="mini" type="button" onClick={() => removeFunding(index)}>
|
|
89
|
+
{i18next.t("Remove")}
|
|
90
|
+
</Button>
|
|
91
|
+
</List.Content>
|
|
92
|
+
|
|
93
|
+
<Ref innerRef={drag}>
|
|
94
|
+
<List.Icon name="bars" className="drag-anchor" />
|
|
95
|
+
</Ref>
|
|
96
|
+
<Ref innerRef={preview}>
|
|
97
|
+
<List.Content>
|
|
98
|
+
<List.Header>
|
|
99
|
+
<>
|
|
100
|
+
<span className="mr-5">{headerContent}</span>
|
|
101
|
+
|
|
102
|
+
{awardOrFunder === "award"
|
|
103
|
+
? fundingItem?.award?.number && (
|
|
104
|
+
<Label basic size="mini" className="mr-5">
|
|
105
|
+
{fundingItem.award.number}
|
|
106
|
+
</Label>
|
|
107
|
+
)
|
|
108
|
+
: ""}
|
|
109
|
+
{awardOrFunder === "award"
|
|
110
|
+
? fundingItem?.award?.url && (
|
|
111
|
+
<a
|
|
112
|
+
href={`${fundingItem.award.url}`}
|
|
113
|
+
target="_blank"
|
|
114
|
+
rel="noopener noreferrer"
|
|
115
|
+
aria-label={i18next.t("Open external link")}
|
|
116
|
+
>
|
|
117
|
+
<Icon link name="external alternate" />
|
|
118
|
+
</a>
|
|
119
|
+
)
|
|
120
|
+
: ""}
|
|
121
|
+
</>
|
|
122
|
+
</List.Header>
|
|
123
|
+
<List.Description>
|
|
124
|
+
{descriptionContent ? descriptionContent : <br />}
|
|
125
|
+
</List.Description>
|
|
126
|
+
</List.Content>
|
|
127
|
+
</Ref>
|
|
128
|
+
</List.Item>
|
|
129
|
+
</Ref>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
FundingFieldItem.propTypes = {
|
|
134
|
+
compKey: PropTypes.any,
|
|
135
|
+
index: PropTypes.number,
|
|
136
|
+
fundingItem: PropTypes.object,
|
|
137
|
+
awardType: PropTypes.string,
|
|
138
|
+
moveFunding: PropTypes.func.isRequired,
|
|
139
|
+
replaceFunding: PropTypes.func.isRequired,
|
|
140
|
+
removeFunding: PropTypes.func.isRequired,
|
|
141
|
+
searchConfig: PropTypes.object.isRequired,
|
|
142
|
+
deserializeAward: PropTypes.func.isRequired,
|
|
143
|
+
deserializeFunder: PropTypes.func.isRequired,
|
|
144
|
+
computeFundingContents: PropTypes.func.isRequired,
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
FundingFieldItem.defaultProps = {
|
|
148
|
+
compKey: undefined,
|
|
149
|
+
index: undefined,
|
|
150
|
+
fundingItem: undefined,
|
|
151
|
+
awardType: undefined,
|
|
152
|
+
};
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// This file is part of InvenioVocabularies
|
|
2
|
+
// Copyright (C) 2021-2024 CERN.
|
|
3
|
+
// Copyright (C) 2021 Northwestern University.
|
|
4
|
+
//
|
|
5
|
+
// Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
import { i18next } from "@translations/invenio_vocabularies/i18next";
|
|
9
|
+
import { Formik } from "formik";
|
|
10
|
+
import PropTypes from "prop-types";
|
|
11
|
+
import React, { useState } from "react";
|
|
12
|
+
import {
|
|
13
|
+
EmptyResults,
|
|
14
|
+
Error,
|
|
15
|
+
InvenioSearchApi,
|
|
16
|
+
Pagination,
|
|
17
|
+
ReactSearchKit,
|
|
18
|
+
ResultsLoader,
|
|
19
|
+
SearchBar,
|
|
20
|
+
} from "react-searchkit";
|
|
21
|
+
import { Grid, Modal, Container, Button } from "semantic-ui-react";
|
|
22
|
+
import * as Yup from "yup";
|
|
23
|
+
import { AwardResults } from "./AwardResults";
|
|
24
|
+
import CustomAwardForm from "./CustomAwardForm";
|
|
25
|
+
import { FunderDropdown } from "./FunderDropdown";
|
|
26
|
+
import { NoAwardResults } from "./NoAwardResults";
|
|
27
|
+
|
|
28
|
+
const ModalTypes = {
|
|
29
|
+
STANDARD: "standard",
|
|
30
|
+
CUSTOM: "custom",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const ModalActions = {
|
|
34
|
+
ADD: "add",
|
|
35
|
+
EDIT: "edit",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const StandardSchema = Yup.object().shape({
|
|
39
|
+
selectedFunding: Yup.object().shape({
|
|
40
|
+
funder: Yup.object().shape({
|
|
41
|
+
id: Yup.string().required(),
|
|
42
|
+
}),
|
|
43
|
+
award: Yup.object().shape({
|
|
44
|
+
id: Yup.string().required(),
|
|
45
|
+
}),
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const CustomFundingSchema = Yup.object().shape({
|
|
50
|
+
selectedFunding: Yup.object().shape({
|
|
51
|
+
funder: Yup.object().shape({
|
|
52
|
+
id: Yup.string().required(i18next.t("Funder is required.")),
|
|
53
|
+
}),
|
|
54
|
+
award: Yup.object().shape({
|
|
55
|
+
title: Yup.string(),
|
|
56
|
+
number: Yup.string(),
|
|
57
|
+
url: Yup.string()
|
|
58
|
+
.url(i18next.t("URL must be valid."))
|
|
59
|
+
.test({
|
|
60
|
+
name: "validateUrlDependencies",
|
|
61
|
+
message: i18next.t("URL must be set alongside title or number."),
|
|
62
|
+
test: function testUrl(value) {
|
|
63
|
+
const { title, number } = this.parent;
|
|
64
|
+
|
|
65
|
+
if (value && value !== "" && !title && !number) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return true;
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
}),
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
function FundingModal({
|
|
77
|
+
action,
|
|
78
|
+
mode: initialMode,
|
|
79
|
+
trigger,
|
|
80
|
+
onAwardChange,
|
|
81
|
+
searchConfig,
|
|
82
|
+
deserializeAward,
|
|
83
|
+
deserializeFunder,
|
|
84
|
+
computeFundingContents,
|
|
85
|
+
...props
|
|
86
|
+
}) {
|
|
87
|
+
const [open, setOpen] = useState(false);
|
|
88
|
+
const [mode, setMode] = useState(initialMode);
|
|
89
|
+
const openModal = () => setOpen(true);
|
|
90
|
+
const closeModal = () => {
|
|
91
|
+
setMode(initialMode);
|
|
92
|
+
setOpen(false);
|
|
93
|
+
};
|
|
94
|
+
const onSubmit = (values, formikBag) => {
|
|
95
|
+
formikBag.setSubmitting(false);
|
|
96
|
+
formikBag.resetForm();
|
|
97
|
+
setMode(initialMode);
|
|
98
|
+
closeModal();
|
|
99
|
+
onAwardChange(values.selectedFunding);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const searchApi = new InvenioSearchApi(searchConfig.searchApi);
|
|
103
|
+
const customObject = mode === ModalTypes.CUSTOM ? props.initialFunding : {};
|
|
104
|
+
const initialFunding = {
|
|
105
|
+
selectedFunding: action === ModalActions.EDIT ? customObject : {},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const FundingSchema =
|
|
109
|
+
mode === ModalTypes.CUSTOM ? CustomFundingSchema : StandardSchema;
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<Formik
|
|
113
|
+
initialValues={initialFunding}
|
|
114
|
+
onSubmit={onSubmit}
|
|
115
|
+
validationSchema={FundingSchema}
|
|
116
|
+
validateOnChange={false}
|
|
117
|
+
validateOnBlur={false}
|
|
118
|
+
enableReinitialize
|
|
119
|
+
>
|
|
120
|
+
{({ values, resetForm, handleSubmit }) => (
|
|
121
|
+
<Modal
|
|
122
|
+
role="dialog"
|
|
123
|
+
centered={false}
|
|
124
|
+
onOpen={openModal}
|
|
125
|
+
open={open}
|
|
126
|
+
trigger={React.cloneElement(trigger, {
|
|
127
|
+
"aria-expanded": open,
|
|
128
|
+
"aria-haspopup": "dialog",
|
|
129
|
+
})}
|
|
130
|
+
onClose={closeModal}
|
|
131
|
+
closeIcon
|
|
132
|
+
closeOnDimmerClick={false}
|
|
133
|
+
>
|
|
134
|
+
<Modal.Header as="h2" className="pt-10 pb-10">
|
|
135
|
+
{mode === "standard"
|
|
136
|
+
? i18next.t("Add standard award/grant")
|
|
137
|
+
: i18next.t("Add custom funding")}
|
|
138
|
+
</Modal.Header>
|
|
139
|
+
<Modal.Content>
|
|
140
|
+
{mode === ModalTypes.STANDARD && (
|
|
141
|
+
<ReactSearchKit
|
|
142
|
+
searchApi={searchApi}
|
|
143
|
+
appName="awards"
|
|
144
|
+
urlHandlerApi={{ enabled: false }}
|
|
145
|
+
initialQueryState={searchConfig.initialQueryState}
|
|
146
|
+
>
|
|
147
|
+
<Grid className="m-0">
|
|
148
|
+
<Grid.Row>
|
|
149
|
+
<Grid.Column width={11} floated="left" verticalAlign="middle">
|
|
150
|
+
<SearchBar
|
|
151
|
+
placeholder={i18next.t("Search for awards/grants")}
|
|
152
|
+
autofocus
|
|
153
|
+
actionProps={{
|
|
154
|
+
icon: "search",
|
|
155
|
+
content: null,
|
|
156
|
+
className: "search",
|
|
157
|
+
}}
|
|
158
|
+
/>
|
|
159
|
+
</Grid.Column>
|
|
160
|
+
<Grid.Column width={5} floated="right" textAlign="right">
|
|
161
|
+
<FunderDropdown />
|
|
162
|
+
</Grid.Column>
|
|
163
|
+
</Grid.Row>
|
|
164
|
+
|
|
165
|
+
<Grid.Column width={16} className="pb-0">
|
|
166
|
+
<ResultsLoader>
|
|
167
|
+
<EmptyResults />
|
|
168
|
+
<Error />
|
|
169
|
+
<AwardResults
|
|
170
|
+
deserializeAward={deserializeAward}
|
|
171
|
+
deserializeFunder={deserializeFunder}
|
|
172
|
+
computeFundingContents={computeFundingContents}
|
|
173
|
+
/>
|
|
174
|
+
</ResultsLoader>
|
|
175
|
+
<Container textAlign="center" className="rel-mb-1">
|
|
176
|
+
<Pagination />
|
|
177
|
+
</Container>
|
|
178
|
+
</Grid.Column>
|
|
179
|
+
|
|
180
|
+
<Grid.Column width={16} textAlign="center" className="pt-0 pb-0">
|
|
181
|
+
<NoAwardResults
|
|
182
|
+
switchToCustom={() => {
|
|
183
|
+
resetForm();
|
|
184
|
+
setMode(ModalTypes.CUSTOM);
|
|
185
|
+
}}
|
|
186
|
+
/>
|
|
187
|
+
</Grid.Column>
|
|
188
|
+
</Grid>
|
|
189
|
+
</ReactSearchKit>
|
|
190
|
+
)}
|
|
191
|
+
{mode === ModalTypes.CUSTOM && (
|
|
192
|
+
<CustomAwardForm
|
|
193
|
+
deserializeFunder={deserializeFunder}
|
|
194
|
+
selectedFunding={values.selectedFunding}
|
|
195
|
+
/>
|
|
196
|
+
)}
|
|
197
|
+
</Modal.Content>
|
|
198
|
+
<Modal.Actions>
|
|
199
|
+
<Button
|
|
200
|
+
onClick={() => {
|
|
201
|
+
resetForm();
|
|
202
|
+
closeModal();
|
|
203
|
+
}}
|
|
204
|
+
icon="remove"
|
|
205
|
+
content={i18next.t("Cancel")}
|
|
206
|
+
floated="left"
|
|
207
|
+
/>
|
|
208
|
+
<Button
|
|
209
|
+
onClick={(event) => handleSubmit(event)}
|
|
210
|
+
primary
|
|
211
|
+
icon="checkmark"
|
|
212
|
+
content={
|
|
213
|
+
action === ModalActions.ADD ? i18next.t("Add") : i18next.t("Change")
|
|
214
|
+
}
|
|
215
|
+
/>
|
|
216
|
+
</Modal.Actions>
|
|
217
|
+
</Modal>
|
|
218
|
+
)}
|
|
219
|
+
</Formik>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
FundingModal.propTypes = {
|
|
224
|
+
mode: PropTypes.oneOf(["standard", "custom"]).isRequired,
|
|
225
|
+
action: PropTypes.oneOf(["add", "edit"]).isRequired,
|
|
226
|
+
trigger: PropTypes.object.isRequired,
|
|
227
|
+
onAwardChange: PropTypes.func.isRequired,
|
|
228
|
+
searchConfig: PropTypes.shape({
|
|
229
|
+
searchApi: PropTypes.shape({
|
|
230
|
+
axios: PropTypes.shape({
|
|
231
|
+
headers: PropTypes.object,
|
|
232
|
+
}),
|
|
233
|
+
}).isRequired,
|
|
234
|
+
initialQueryState: PropTypes.object.isRequired,
|
|
235
|
+
}).isRequired,
|
|
236
|
+
deserializeAward: PropTypes.func.isRequired,
|
|
237
|
+
deserializeFunder: PropTypes.func.isRequired,
|
|
238
|
+
computeFundingContents: PropTypes.func.isRequired,
|
|
239
|
+
initialFunding: PropTypes.object,
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
FundingModal.defaultProps = {
|
|
243
|
+
initialFunding: undefined,
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export default FundingModal;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// This file is part of InvenioVocabularies
|
|
2
|
+
// Copyright (C) 2021-2024 CERN.
|
|
3
|
+
// Copyright (C) 2021 Northwestern University.
|
|
4
|
+
//
|
|
5
|
+
// Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
import PropTypes from "prop-types";
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Segment } from "semantic-ui-react";
|
|
11
|
+
import { i18next } from "@translations/invenio_vocabularies/i18next";
|
|
12
|
+
|
|
13
|
+
export function NoAwardResults({ switchToCustom }) {
|
|
14
|
+
return (
|
|
15
|
+
<Segment
|
|
16
|
+
basic
|
|
17
|
+
content={
|
|
18
|
+
<p>
|
|
19
|
+
{i18next.t("Did not find your award/grant? ")}
|
|
20
|
+
<a
|
|
21
|
+
href="/"
|
|
22
|
+
onClick={(e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
switchToCustom();
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
{i18next.t("Add a custom award/grant.")}
|
|
28
|
+
</a>
|
|
29
|
+
</p>
|
|
30
|
+
}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
NoAwardResults.propTypes = {
|
|
36
|
+
switchToCustom: PropTypes.func.isRequired,
|
|
37
|
+
};
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is part of InvenioVocabularies
|
|
2
|
+
// Copyright (C) 2021-2023 CERN.
|
|
3
|
+
// Copyright (C) 2021 Northwestern University.
|
|
4
|
+
//
|
|
5
|
+
// Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
export { FundingField } from "./FundingField";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file is part of InvenioVocabularies
|
|
2
|
+
// Copyright (C) 2023 CERN.
|
|
3
|
+
//
|
|
4
|
+
// Invenio is free software; you can redistribute it and/or modify it
|
|
5
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
6
|
+
|
|
7
|
+
export { FundingField } from "./Funding";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// This file is part of Invenio-vocabularies
|
|
2
|
+
//
|
|
3
|
+
// Invenio-vocabularies is free software; you can redistribute it and/or modify it
|
|
4
|
+
// under the terms of the MIT License; see LICENSE file for more details.
|
|
5
|
+
|
|
6
|
+
import i18n from "i18next";
|
|
7
|
+
|
|
8
|
+
import LanguageDetector from "i18next-browser-languagedetector";
|
|
9
|
+
import { translations } from "./messages";
|
|
10
|
+
import { initReactI18next } from "react-i18next";
|
|
11
|
+
|
|
12
|
+
const options = {
|
|
13
|
+
fallbackLng: "en", // fallback keys
|
|
14
|
+
returnEmptyString: false,
|
|
15
|
+
debug: process.env.NODE_ENV === "development",
|
|
16
|
+
resources: translations,
|
|
17
|
+
keySeparator: false,
|
|
18
|
+
nsSeparator: false,
|
|
19
|
+
// specify language detection order
|
|
20
|
+
detection: {
|
|
21
|
+
order: ["htmlTag"],
|
|
22
|
+
// cache user language off
|
|
23
|
+
caches: [],
|
|
24
|
+
},
|
|
25
|
+
react: {
|
|
26
|
+
// Set empty - to allow html tags convert to trans tags
|
|
27
|
+
// HTML TAG | Trans TAG
|
|
28
|
+
// <span> | <1>
|
|
29
|
+
transKeepBasicHtmlNodesFor: [],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const i18next = i18n.createInstance();
|
|
34
|
+
i18next.use(LanguageDetector).use(initReactI18next).init(options);
|
|
35
|
+
|
|
36
|
+
export { i18next };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
2
|
+
// This file exports all available translations for i18next
|
|
3
|
+
|
|
4
|
+
import TRANSLATE_AR from "./ar/translations.json";
|
|
5
|
+
import TRANSLATE_BG from "./bg/translations.json";
|
|
6
|
+
import TRANSLATE_CA from "./ca/translations.json";
|
|
7
|
+
import TRANSLATE_CS from "./cs/translations.json";
|
|
8
|
+
import TRANSLATE_DA from "./da/translations.json";
|
|
9
|
+
import TRANSLATE_DE from "./de/translations.json";
|
|
10
|
+
import TRANSLATE_EL from "./el/translations.json";
|
|
11
|
+
import TRANSLATE_EN from "./en/translations.json";
|
|
12
|
+
import TRANSLATE_ES from "./es/translations.json";
|
|
13
|
+
import TRANSLATE_ET from "./et/translations.json";
|
|
14
|
+
import TRANSLATE_FA from "./fa/translations.json";
|
|
15
|
+
import TRANSLATE_FR from "./fr/translations.json";
|
|
16
|
+
import TRANSLATE_HR from "./hr/translations.json";
|
|
17
|
+
import TRANSLATE_HU from "./hu/translations.json";
|
|
18
|
+
import TRANSLATE_IT from "./it/translations.json";
|
|
19
|
+
import TRANSLATE_JA from "./ja/translations.json";
|
|
20
|
+
import TRANSLATE_KA from "./ka/translations.json";
|
|
21
|
+
import TRANSLATE_KO from "./ko/translations.json";
|
|
22
|
+
import TRANSLATE_LT from "./lt/translations.json";
|
|
23
|
+
import TRANSLATE_NO from "./no/translations.json";
|
|
24
|
+
import TRANSLATE_PL from "./pl/translations.json";
|
|
25
|
+
import TRANSLATE_PT from "./pt/translations.json";
|
|
26
|
+
import TRANSLATE_RO from "./ro/translations.json";
|
|
27
|
+
import TRANSLATE_RU from "./ru/translations.json";
|
|
28
|
+
import TRANSLATE_SK from "./sk/translations.json";
|
|
29
|
+
import TRANSLATE_SV from "./sv/translations.json";
|
|
30
|
+
import TRANSLATE_TR from "./tr/translations.json";
|
|
31
|
+
import TRANSLATE_UK from "./uk/translations.json";
|
|
32
|
+
import TRANSLATE_ZH_CN from "./zh_CN/translations.json";
|
|
33
|
+
import TRANSLATE_ZH_TW from "./zh_TW/translations.json";
|
|
34
|
+
|
|
35
|
+
export const translations = {
|
|
36
|
+
ar: { translation: TRANSLATE_AR },
|
|
37
|
+
bg: { translation: TRANSLATE_BG },
|
|
38
|
+
ca: { translation: TRANSLATE_CA },
|
|
39
|
+
cs: { translation: TRANSLATE_CS },
|
|
40
|
+
da: { translation: TRANSLATE_DA },
|
|
41
|
+
de: { translation: TRANSLATE_DE },
|
|
42
|
+
el: { translation: TRANSLATE_EL },
|
|
43
|
+
en: { translation: TRANSLATE_EN },
|
|
44
|
+
es: { translation: TRANSLATE_ES },
|
|
45
|
+
et: { translation: TRANSLATE_ET },
|
|
46
|
+
fa: { translation: TRANSLATE_FA },
|
|
47
|
+
fr: { translation: TRANSLATE_FR },
|
|
48
|
+
hr: { translation: TRANSLATE_HR },
|
|
49
|
+
hu: { translation: TRANSLATE_HU },
|
|
50
|
+
it: { translation: TRANSLATE_IT },
|
|
51
|
+
ja: { translation: TRANSLATE_JA },
|
|
52
|
+
ka: { translation: TRANSLATE_KA },
|
|
53
|
+
ko: { translation: TRANSLATE_KO },
|
|
54
|
+
lt: { translation: TRANSLATE_LT },
|
|
55
|
+
no: { translation: TRANSLATE_NO },
|
|
56
|
+
pl: { translation: TRANSLATE_PL },
|
|
57
|
+
pt: { translation: TRANSLATE_PT },
|
|
58
|
+
ro: { translation: TRANSLATE_RO },
|
|
59
|
+
ru: { translation: TRANSLATE_RU },
|
|
60
|
+
sk: { translation: TRANSLATE_SK },
|
|
61
|
+
sv: { translation: TRANSLATE_SV },
|
|
62
|
+
tr: { translation: TRANSLATE_TR },
|
|
63
|
+
uk: { translation: TRANSLATE_UK },
|
|
64
|
+
zh_CN: { translation: TRANSLATE_ZH_CN },
|
|
65
|
+
zh_TW: { translation: TRANSLATE_ZH_TW },
|
|
66
|
+
};
|
invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/messages.po
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Translators:
|
|
3
|
+
# Tibor Simko <tibor.simko@cern.ch>, 2025
|
|
4
|
+
# Bessem Aamira <bessemamira@gmail.com>, 2025
|
|
5
|
+
# Salaheddine Ben Ali <salaheddine.benali@cnudst.tn>, 2025
|
|
6
|
+
#
|
|
7
|
+
msgid ""
|
|
8
|
+
msgstr ""
|
|
9
|
+
"Project-Id-Version: i18next-conv\n"
|
|
10
|
+
"POT-Creation-Date: 2025-07-08T15:47:17.169Z\n"
|
|
11
|
+
"PO-Revision-Date: 2025-05-13 21:01+0000\n"
|
|
12
|
+
"Last-Translator: Salaheddine Ben Ali <salaheddine.benali@cnudst.tn>, 2025\n"
|
|
13
|
+
"Language-Team: Arabic (https://app.transifex.com/inveniosoftware/teams/23537/ar/)\n"
|
|
14
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
15
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
16
|
+
"Language: ar\n"
|
|
17
|
+
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
|
|
18
|
+
"mime-version: 1.0\n"
|
|
19
|
+
|
|
20
|
+
msgid "Search for a funder by name"
|
|
21
|
+
msgstr "البحث على ممول عبر الإسم"
|
|
22
|
+
|
|
23
|
+
msgid "Funder"
|
|
24
|
+
msgstr "مموّل"
|
|
25
|
+
|
|
26
|
+
msgid "Search for funder..."
|
|
27
|
+
msgstr "البحث عن مموّل..."
|
|
28
|
+
|
|
29
|
+
msgid "Additional information"
|
|
30
|
+
msgstr "معلومات إضافية"
|
|
31
|
+
|
|
32
|
+
msgid "optional"
|
|
33
|
+
msgstr "اختياري"
|
|
34
|
+
|
|
35
|
+
msgid "Number"
|
|
36
|
+
msgstr "رقم"
|
|
37
|
+
|
|
38
|
+
msgid "Award/Grant number"
|
|
39
|
+
msgstr "رقم المكافئة/المنحة"
|
|
40
|
+
|
|
41
|
+
msgid "Title"
|
|
42
|
+
msgstr "العنوان"
|
|
43
|
+
|
|
44
|
+
msgid "Award/Grant Title"
|
|
45
|
+
msgstr "عنوان المكافئة/المنحة"
|
|
46
|
+
|
|
47
|
+
msgid "URL"
|
|
48
|
+
msgstr "عنوان URL"
|
|
49
|
+
|
|
50
|
+
msgid "Award/Grant URL"
|
|
51
|
+
msgstr "رابط URL المكافئة/المنحة"
|
|
52
|
+
|
|
53
|
+
msgid "Add"
|
|
54
|
+
msgstr "إضافة"
|
|
55
|
+
|
|
56
|
+
msgid "Add custom"
|
|
57
|
+
msgstr "إضافة إجراء/خاصة"
|
|
58
|
+
|
|
59
|
+
msgid "Edit"
|
|
60
|
+
msgstr "تعديل"
|
|
61
|
+
|
|
62
|
+
msgid "Remove"
|
|
63
|
+
msgstr "حذف"
|
|
64
|
+
|
|
65
|
+
msgid "Open external link"
|
|
66
|
+
msgstr "إفتح رابط خارجي"
|
|
67
|
+
|
|
68
|
+
msgid "Funder is required."
|
|
69
|
+
msgstr "الممول إجباري"
|
|
70
|
+
|
|
71
|
+
msgid "URL must be valid."
|
|
72
|
+
msgstr "يجب أن يكون رابط URL ساري المفعول"
|
|
73
|
+
|
|
74
|
+
msgid "URL must be set alongside title or number."
|
|
75
|
+
msgstr ""
|
|
76
|
+
|
|
77
|
+
msgid "Add standard award/grant"
|
|
78
|
+
msgstr "إضافة مكافئة/منحة متعارف عليها standard"
|
|
79
|
+
|
|
80
|
+
msgid "Add custom funding"
|
|
81
|
+
msgstr "إضافة تمويل مشخّص custom"
|
|
82
|
+
|
|
83
|
+
msgid "Search for awards/grants"
|
|
84
|
+
msgstr "البحث عن مكافأت/منح"
|
|
85
|
+
|
|
86
|
+
msgid "Cancel"
|
|
87
|
+
msgstr "إلغاء"
|
|
88
|
+
|
|
89
|
+
msgid "Change"
|
|
90
|
+
msgstr "غيّر"
|
|
91
|
+
|
|
92
|
+
msgid "Did not find your award/grant? "
|
|
93
|
+
msgstr "لم تجد المكافئة/المنحة الخاصة بك؟"
|
|
94
|
+
|
|
95
|
+
msgid "Add a custom award/grant."
|
|
96
|
+
msgstr "إضافةمكافئة/منحةمشخّصة custom"
|