invenio-app-rdm 13.0.1__py2.py3-none-any.whl → 14.0.0b0.dev2__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.
Files changed (32) hide show
  1. invenio_app_rdm/__init__.py +1 -1
  2. invenio_app_rdm/administration/records/records.py +9 -7
  3. invenio_app_rdm/config.py +1 -0
  4. invenio_app_rdm/fixtures/pages.py +5 -2
  5. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +2 -2
  6. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +8 -7
  7. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +5 -6
  8. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +9 -13
  9. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +1 -2
  10. invenio_app_rdm/records_ui/views/decorators.py +2 -1
  11. invenio_app_rdm/records_ui/views/deposits.py +10 -3
  12. invenio_app_rdm/records_ui/views/records.py +3 -11
  13. invenio_app_rdm/requests_ui/views/requests.py +4 -3
  14. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +8 -8
  15. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +14 -16
  16. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +1 -2
  17. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +1 -0
  18. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +2 -2
  19. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +15 -14
  20. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +4 -4
  21. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +38 -40
  22. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +5 -5
  23. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -3
  24. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.overrides +7 -0
  25. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.variables +0 -0
  26. invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +76 -4
  27. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/METADATA +30 -100
  28. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/RECORD +32 -30
  29. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/WHEEL +0 -0
  30. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/entry_points.txt +0 -0
  31. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/licenses/LICENSE +0 -0
  32. {invenio_app_rdm-13.0.1.dist-info → invenio_app_rdm-14.0.0b0.dev2.dist-info}/top_level.txt +0 -0
@@ -17,6 +17,6 @@
17
17
  #
18
18
  # See PEP 0440 for details - https://www.python.org/dev/peps/pep-0440
19
19
 
20
- __version__ = "13.0.1"
20
+ __version__ = "14.0.0b0.dev2"
21
21
 
22
22
  __all__ = ("__version__",)
@@ -1,14 +1,14 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2023-2024 CERN.
3
+ # Copyright (C) 2023-2025 CERN.
4
4
  # Copyright (C) 2023 Graz University of Technology.
5
5
  # Copyright (C) 2024 KTH Royal Institute of Technology.
6
6
  #
7
- # invenio-administration is free software; you can redistribute it and/or
7
+ # Invenio-app-rdm is free software; you can redistribute it and/or
8
8
  # modify it under the terms of the MIT License; see LICENSE file for more
9
9
  # details.
10
10
 
11
- """Invenio administration OAI-PMH view module."""
11
+ """Invenio administration records and drafts list views."""
12
12
 
13
13
  from functools import partial
14
14
 
@@ -19,7 +19,7 @@ from invenio_search_ui.searchconfig import search_app_config
19
19
 
20
20
 
21
21
  class RecordAdminListView(AdminResourceListView):
22
- """Configuration for OAI-PMH sets list view."""
22
+ """Configuration for the records list view."""
23
23
 
24
24
  api_endpoint = "/records"
25
25
  name = "records"
@@ -27,10 +27,11 @@ class RecordAdminListView(AdminResourceListView):
27
27
  search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
28
28
  title = _("Records")
29
29
  menu_label = _("Records")
30
- category = _("Records & files")
30
+ category = _("Deposits")
31
31
  icon = "file"
32
32
  template = "invenio_app_rdm/administration/records/records.html"
33
33
  extension_name = "invenio-rdm-records"
34
+ order = 1
34
35
 
35
36
  display_search = True
36
37
  display_delete = False
@@ -103,7 +104,7 @@ class RecordAdminListView(AdminResourceListView):
103
104
 
104
105
 
105
106
  class DraftAdminListView(AdminResourceListView):
106
- """Configuration for OAI-PMH sets list view."""
107
+ """Configuration for the drafts list view."""
107
108
 
108
109
  api_endpoint = "/user/records"
109
110
  name = "drafts"
@@ -111,10 +112,11 @@ class DraftAdminListView(AdminResourceListView):
111
112
  search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
112
113
  title = _("Drafts")
113
114
  menu_label = _("Drafts")
114
- category = _("Records & files")
115
+ category = _("Deposits")
115
116
  icon = "upload"
116
117
  template = "invenio_app_rdm/administration/records/drafts.html"
117
118
  extension_name = "invenio-rdm-records"
119
+ order = 2
118
120
 
119
121
  display_search = True
120
122
  display_delete = False
invenio_app_rdm/config.py CHANGED
@@ -1181,6 +1181,7 @@ PAGES_DEFAULT_TEMPLATE = "invenio_app_rdm/default_static_page.html"
1181
1181
 
1182
1182
  PAGES_TEMPLATES = [
1183
1183
  ("invenio_app_rdm/default_static_page.html", "Default"),
1184
+ ("invenio_communities/default_static_page.html", "Community"),
1184
1185
  ]
1185
1186
  """List of available templates for pages."""
1186
1187
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2022-2024 CERN.
3
+ # Copyright (C) 2022-2025 CERN.
4
4
  # Copyright (C) 2025 University of Münster.
5
5
  #
6
6
  # Invenio App RDM is free software; you can redistribute it and/or modify
@@ -68,6 +68,9 @@ class StaticPages(FixtureMixin):
68
68
  ),
69
69
  "lang": lang[0],
70
70
  "description": entry.get("description", ""),
71
- "template_name": current_app.config["PAGES_DEFAULT_TEMPLATE"],
71
+ "template_name": entry.get(
72
+ "template_name",
73
+ current_app.config["PAGES_DEFAULT_TEMPLATE"],
74
+ ),
72
75
  }
73
76
  current_pages_service.create(system_identity, data)
@@ -1,5 +1,5 @@
1
1
  {#
2
- Copyright (C) 2020-2021 CERN.
2
+ Copyright (C) 2020-2025 CERN.
3
3
  Copyright (C) 2020 Northwestern University.
4
4
  Copyright (C) 2021 New York University.
5
5
 
@@ -7,7 +7,7 @@
7
7
  it under the terms of the MIT License; see LICENSE file for more details.
8
8
  #}
9
9
 
10
- <div id="recordCitation" data-record='{{ record_ui | tojson }}'
10
+ <div id="recordCitation" data-record-links='{{ record_ui.links | tojson }}'
11
11
  data-styles='{{ config.get("RDM_CITATION_STYLES") | tojson }}'
12
12
  data-defaultstyle='{{ config.get("RDM_CITATION_STYLES_DEFAULT") | tojson }}'
13
13
  data-include-deleted='{{ include_deleted | tojson }}'>
@@ -1,14 +1,15 @@
1
1
  <div
2
2
  id="sidebar-communities-manage"
3
3
  data-user-communities-memberships='{{ user_communities_memberships | tojson }}'
4
- data-record-community-endpoint="{{ record_ui['links']['communities'] }}"
5
- data-record-community-search-endpoint="{{ record_ui['links']['communities-suggestions'] }}"
6
- data-record-user-community-search-endpoint="{{ record_ui['links']['user-communities-suggestions'] }}"
7
- data-pending-communities-search-config='{{ search_app_rdm_record_requests_config(app_id="InvenioAppRdm.RecordRequests", endpoint=record_ui['links']['requests']) | tojson }}'
8
- data-record-community-search-config='{{ search_app_rdm_record_communities_config(app_id="InvenioAppRdm.RecordCommunitiesSuggestions", endpoint=record_ui['links']["communities-suggestions"]) | tojson }}'
9
- data-record-user-community-search-config='{{ search_app_rdm_record_user_communities_config(app_id="InvenioAppRdm.RecordUserCommunitiesSuggestions", endpoint=record_ui['links']["communities-suggestions"]) | tojson }}'
4
+ data-record-community-endpoint='{{ record_ui["links"]["communities"] }}'
5
+ data-record-community-search-endpoint='{{ record_ui["links"]["communities-suggestions"] }}'
6
+ data-record-community-search-config='{{ search_app_rdm_record_communities_config(app_id="InvenioAppRdm.RecordCommunitiesSuggestions", endpoint=record_ui["links"]["communities-suggestions"]) | tojson }}'
7
+ data-record-user-community-search-endpoint='{{ record_ui["links"]["user-communities-suggestions"] }}'
8
+ data-record-user-community-search-config='{{ search_app_rdm_record_user_communities_config(app_id="InvenioAppRdm.RecordUserCommunitiesSuggestions", endpoint=record_ui["links"]["communities-suggestions"]) | tojson }}'
9
+ data-pending-communities-search-config='{{ search_app_rdm_record_requests_config(app_id="InvenioAppRdm.RecordRequests", endpoint=record_ui["links"]["requests"]) | tojson }}'
10
10
  data-permissions='{{ permissions | tojson }}'
11
- class="sidebar-container"
11
+ data-record='{{ record_ui | tojson }}'
12
+ class='sidebar-container'
12
13
  >
13
14
 
14
15
  <h2 class="ui medium top attached header">{{ _("Communities") }}</h2>
@@ -1,5 +1,5 @@
1
1
  {#
2
- Copyright (C) 2020 CERN.
2
+ Copyright (C) 2020-2025 CERN.
3
3
 
4
4
  Invenio RDM Records is free software; you can redistribute it and/or modify
5
5
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -7,15 +7,14 @@ it under the terms of the MIT License; see LICENSE file for more details.
7
7
  {%- if external_resources -%}
8
8
  <div class="sidebar-container">
9
9
  <h2 class="ui small top attached header">{{ _('External resources')}}</h2>
10
- <div id="external-resource" aria-label="{{ _('External resources') }}" class="ui bottom attached segment rdm-sidebar external resource">
10
+ <dl id="external-resource" aria-label="{{ _('External resources') }}" class="ui bottom attached segment rdm-sidebar external resource details-list">
11
11
 
12
12
  {# dynamically create the list of external resources #}
13
13
  {%- for section, external_resources in external_resources | groupby("content.section") -%}
14
- <h3 class="ui small header">{{ section }}</h3>
15
- <ul class="ui relaxed list no-bullet">
14
+ <dt class="ui tiny header">{{ section }}</dt>
15
+ <ul class="ui list no-bullet m-0">
16
16
 
17
17
  {%- for resource in external_resources -%}
18
-
19
18
  {%- if resource -%}
20
19
  {%- if resource.template -%}
21
20
  {# It's up to the template to render the `resource` as it wishes #}
@@ -50,7 +49,7 @@ it under the terms of the MIT License; see LICENSE file for more details.
50
49
  {%- endfor -%}
51
50
  </ul>
52
51
  {%- endfor -%}
53
- </div>
52
+ </dl>
54
53
  </div>
55
54
  {%- endif -%}
56
55
 
@@ -1,5 +1,5 @@
1
1
  {#
2
- Copyright (C) 2020 CERN.
2
+ Copyright (C) 2020-2025 CERN.
3
3
  Copyright (C) 2020 Northwestern University.
4
4
  Copyright (C) 2021 Graz University of Technology.
5
5
  Copyright (C) 2021 New York University.
@@ -25,11 +25,11 @@
25
25
  <div class="sidebar-container">
26
26
  <h2 class="ui medium top attached header mt-0">{{ _('Rights') }}</h2>
27
27
  <div id="licenses" class="ui segment bottom attached rdm-sidebar">
28
+ <dl class="details-list">
28
29
  {% if rights %}
29
- <h4>License</h4>
30
- <ul class="details-list m-0 p-0">
30
+ <dt class="ui tiny header">License</dt>
31
31
  {%- for license in rights -%}
32
- <li id="license-{{ license.id }}-{{ loop.index }}" class="has-popup">
32
+ <dd id="license-{{ license.id }}-{{ loop.index }}" class="has-popup">
33
33
  <div id="title-{{ license.id }}-{{ loop.index }}"
34
34
  class="license clickable"
35
35
  tabindex="0"
@@ -45,7 +45,6 @@
45
45
  alt="{{ license.id }} icon"/>
46
46
  </span>
47
47
  {% endif %}
48
-
49
48
  <span class="title-text">
50
49
  {{ license.title_l10n }}
51
50
  </span>
@@ -57,7 +56,6 @@
57
56
  >
58
57
  <i role="button" tabindex="0" class="close icon text-muted"
59
58
  aria-label="{{ _('Close') }}"></i>
60
-
61
59
  <div id="license-description-{{ loop.index }}" class="description">
62
60
  <span class="text-muted">
63
61
  {{ license.description_l10n or _('No further description.') }}
@@ -65,18 +63,16 @@
65
63
  {{ license_link(license) }}
66
64
  </div>
67
65
  </div>
68
- </li>
66
+ </dd>
69
67
  {% endfor %}
70
-
71
- </ul>
72
68
  {% endif %}
73
69
  {% if copyrights %}
74
- <h4>Copyrights</h4>
75
- <div id="copyrights">
70
+ <dt class="ui tiny header">Copyright</dt>
71
+ <dd id="copyrights">
76
72
  {{ copyrights }}
77
- </div>
73
+ </dd>
78
74
  {% endif %}
75
+ </dl>
79
76
  </div>
80
-
81
77
  </div>
82
78
  {% endif %}
@@ -1,5 +1,5 @@
1
1
  {#
2
- Copyright (C) 2022-2024 CERN.
2
+ Copyright (C) 2022-2025 CERN.
3
3
 
4
4
  Invenio RDM Records is free software; you can redistribute it and/or modify
5
5
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -17,7 +17,6 @@ it under the terms of the MIT License; see LICENSE file for more details.
17
17
  data-is-draft="{{ is_draft | tojson }}"
18
18
  data-is-preview-submission-request="{{ is_preview_submission_request | tojson }}"
19
19
  data-current-user-id="{{ current_user.id }}"
20
- data-record-owner-id='{{ record_owner_id }}'
21
20
  data-groups-enabled='{{ config.USERS_RESOURCES_GROUPS_ENABLED | tojson }}'
22
21
  {% if config.RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE %}
23
22
  {% include config.RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE %}
@@ -358,7 +358,8 @@ def pass_draft_community(f):
358
358
  comid = request.args.get("community")
359
359
  if comid:
360
360
  community = current_communities.service.read(id_=comid, identity=g.identity)
361
- kwargs["community"] = UICommunityJSONSerializer().dump_obj(
361
+ kwargs["community"] = community
362
+ kwargs["community_ui"] = UICommunityJSONSerializer().dump_obj(
362
363
  community.to_dict()
363
364
  )
364
365
 
@@ -15,6 +15,9 @@ from copy import deepcopy
15
15
 
16
16
  from flask import current_app, g, redirect
17
17
  from flask_login import login_required
18
+ from invenio_communities.communities.resources.serializer import (
19
+ UICommunityJSONSerializer,
20
+ )
18
21
  from invenio_communities.errors import CommunityDeletedError
19
22
  from invenio_communities.proxies import current_communities
20
23
  from invenio_communities.views.communities import render_community_theme_template
@@ -446,7 +449,7 @@ def new_record():
446
449
  @login_required
447
450
  @no_cache_response
448
451
  @pass_draft_community
449
- def deposit_create(community=None):
452
+ def deposit_create(community=None, community_ui=None):
450
453
  """Create a new deposit."""
451
454
  can_create = current_rdm_records.records_service.check_permission(
452
455
  g.identity, "create"
@@ -456,7 +459,7 @@ def deposit_create(community=None):
456
459
 
457
460
  community_theme = None
458
461
  if community is not None:
459
- community_theme = community.get("theme", {})
462
+ community_theme = community_ui.get("theme", {})
460
463
 
461
464
  community_use_jinja_header = bool(community_theme)
462
465
  dashboard_routes = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"]
@@ -479,9 +482,10 @@ def deposit_create(community=None):
479
482
  searchbar_config=dict(searchUrl=get_search_url()),
480
483
  record=new_record(),
481
484
  community=community,
485
+ community_ui=community_ui,
482
486
  community_use_jinja_header=community_use_jinja_header,
483
487
  files=dict(default_preview=None, entries=[], links={}),
484
- preselectedCommunity=community,
488
+ preselectedCommunity=community_ui,
485
489
  files_locked=False,
486
490
  permissions=get_record_permissions(
487
491
  [
@@ -517,6 +521,7 @@ def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
517
521
  ui_serializer = UIJSONSerializer()
518
522
  record = ui_serializer.dump_obj(draft.to_dict())
519
523
 
524
+ community_ui = None
520
525
  community_theme = None
521
526
  community = record.get("expanded", {}).get("parent", {}).get("review", {}).get(
522
527
  "receiver"
@@ -531,6 +536,7 @@ def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
531
536
  id_=community["id"], identity=g.identity
532
537
  )
533
538
  community_theme = community.to_dict().get("theme", {})
539
+ community_ui = UICommunityJSONSerializer().dump_obj(community.to_dict())
534
540
  except CommunityDeletedError:
535
541
  pass
536
542
 
@@ -573,6 +579,7 @@ def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
573
579
  forms_config=form_config,
574
580
  record=record,
575
581
  community=community,
582
+ community_ui=community_ui,
576
583
  community_use_jinja_header=community_use_jinja_header,
577
584
  files=files_dict,
578
585
  searchbar_config=dict(searchUrl=get_search_url()),
@@ -216,19 +216,13 @@ def record_detail(
216
216
  if record is not None and emitter is not None:
217
217
  emitter(current_app, record=record._record, via_api=False)
218
218
 
219
- record_owner = (
220
- record_ui.get("expanded", {})
221
- .get("parent", {})
222
- .get("access", {})
223
- .get("owned_by", {})
224
- )
225
219
  resolved_community, _ = get_record_community(record_ui)
226
- resolved_community = (
220
+ resolved_community_ui = (
227
221
  UICommunityJSONSerializer().dump_obj(resolved_community.to_dict())
228
222
  if resolved_community
229
223
  else None
230
224
  )
231
- theme = resolved_community.get("theme", {}) if resolved_community else None
225
+ theme = resolved_community_ui.get("theme", {}) if resolved_community else None
232
226
 
233
227
  return render_community_theme_template(
234
228
  current_app.config.get("APP_RDM_RECORD_LANDING_PAGE_TEMPLATE"),
@@ -256,11 +250,9 @@ def record_detail(
256
250
  include_deleted=include_deleted,
257
251
  is_draft=is_draft,
258
252
  community=resolved_community,
253
+ community_ui=resolved_community_ui,
259
254
  external_resources=get_external_resources(record),
260
255
  user_avatar=avatar,
261
- record_owner_id=(
262
- record_owner.get("id")
263
- ), # record created with system_identity have not owners e.g demo
264
256
  )
265
257
 
266
258
 
@@ -182,6 +182,7 @@ def user_dashboard_request_view(request, **kwargs):
182
182
  has_record_topic = has_topic and "record" in request["topic"]
183
183
  has_community_topic = has_topic and "community" in request["topic"]
184
184
  is_record_inclusion = request_type == CommunityInclusion.type_id
185
+ request_permissions = request.has_permissions_to(["action_accept"])
185
186
 
186
187
  if has_record_topic:
187
188
  topic = _resolve_topic_record(request)
@@ -209,7 +210,7 @@ def user_dashboard_request_view(request, **kwargs):
209
210
  record_ui=record_ui,
210
211
  record=record,
211
212
  checks=checks,
212
- permissions=topic["permissions"],
213
+ permissions={**topic["permissions"], **request_permissions},
213
214
  is_preview=is_draft, # preview only when draft
214
215
  is_draft=is_draft,
215
216
  is_published=is_published,
@@ -231,7 +232,7 @@ def user_dashboard_request_view(request, **kwargs):
231
232
  user_avatar=avatar,
232
233
  invenio_request=request.to_dict(),
233
234
  request_is_accepted=request_is_accepted,
234
- permissions={},
235
+ permissions={**request_permissions},
235
236
  include_deleted=False,
236
237
  )
237
238
 
@@ -244,7 +245,7 @@ def user_dashboard_request_view(request, **kwargs):
244
245
  user_avatar=avatar,
245
246
  record=record,
246
247
  record_ui=record_ui,
247
- permissions=topic["permissions"],
248
+ permissions={**topic["permissions"], **request_permissions},
248
249
  invenio_request=request.to_dict(),
249
250
  request_is_accepted=request_is_accepted,
250
251
  include_deleted=False,
@@ -24,6 +24,14 @@ export class ViewRecentChanges extends Component {
24
24
  };
25
25
  }
26
26
 
27
+ componentDidMount() {
28
+ this.fetchPreviousRevision();
29
+ }
30
+
31
+ componentWillUnmount() {
32
+ this.cancellableAction && this.cancellableAction.cancel();
33
+ }
34
+
27
35
  async fetchPreviousRevision() {
28
36
  const { resource } = this.props;
29
37
  const {
@@ -60,14 +68,6 @@ export class ViewRecentChanges extends Component {
60
68
  }
61
69
  }
62
70
 
63
- componentDidMount() {
64
- this.fetchPreviousRevision();
65
- }
66
-
67
- componentWillUnmount() {
68
- this.cancellableAction && this.cancellableAction.cancel();
69
- }
70
-
71
71
  handleModalClose = () => {
72
72
  const { actionCancelCallback } = this.props;
73
73
  actionCancelCallback();
@@ -24,20 +24,6 @@ export class RevisionsDiffViewer extends Component {
24
24
  ignoreCaseForKey: false,
25
25
  recursiveEqual: true,
26
26
  });
27
-
28
- this.viewerProps = {
29
- indent: 4,
30
- lineNumbers: true,
31
- highlightInlineDiff: true,
32
- inlineDiffOptions: {
33
- mode: "word",
34
- wordSeparator: " ",
35
- },
36
- hideUnchangedLines: true,
37
- syntaxHighlight: false,
38
- virtual: true,
39
- };
40
-
41
27
  this.state = {
42
28
  currentDiff: undefined,
43
29
  };
@@ -58,13 +44,13 @@ export class RevisionsDiffViewer extends Component {
58
44
  };
59
45
 
60
46
  render() {
61
- const { currentDiff } = this.state;
47
+ const { currentDiff, viewerProps } = this.state;
62
48
 
63
49
  return currentDiff ? (
64
50
  <Grid>
65
51
  <Grid.Column width={16}>
66
52
  <Container fluid>
67
- <Viewer diff={currentDiff} {...this.viewerProps} />
53
+ <Viewer diff={currentDiff} {...viewerProps} />
68
54
  </Container>
69
55
  </Grid.Column>
70
56
  </Grid>
@@ -79,4 +65,16 @@ RevisionsDiffViewer.propTypes = {
79
65
 
80
66
  RevisionsDiffViewer.defaultProps = {
81
67
  diff: {},
68
+ viewerProps: {
69
+ indent: 4,
70
+ lineNumbers: true,
71
+ highlightInlineDiff: true,
72
+ inlineDiffOptions: {
73
+ mode: "word",
74
+ wordSeparator: " ",
75
+ },
76
+ hideUnchangedLines: true,
77
+ syntaxHighlight: false,
78
+ virtual: true,
79
+ },
82
80
  };
@@ -1,12 +1,11 @@
1
1
  /*
2
2
  * This file is part of Invenio.
3
- * Copyright (C) 2023 CERN.
3
+ * Copyright (C) 2023-2025 CERN.
4
4
  *
5
5
  * Invenio is free software; you can redistribute it and/or modify it
6
6
  * under the terms of the MIT License; see LICENSE file for more details.
7
7
  */
8
8
 
9
- import { last } from "lodash";
10
9
  import _get from "lodash/get";
11
10
 
12
11
  const APIRoutesGenerators = {
@@ -796,4 +796,5 @@ RDMDepositForm.defaultProps = {
796
796
  files: null,
797
797
  filesLocked: false,
798
798
  allowEmptyFiles: true,
799
+ useUppy: false,
799
800
  };
@@ -1,5 +1,5 @@
1
1
  // This file is part of InvenioRDM
2
- // Copyright (C) 2023-2024 CERN.
2
+ // Copyright (C) 2023-2025 CERN.
3
3
  //
4
4
  // Invenio App RDM is free software; you can redistribute it and/or modify it
5
5
  // under the terms of the MIT License; see LICENSE file for more details.
@@ -135,7 +135,7 @@ export class CommunitiesManagement extends Component {
135
135
  successActionCallback={this.handleRefresh}
136
136
  recordCommunityEndpoint={recordCommunityEndpoint}
137
137
  permissions={permissions}
138
- record={record}
138
+ recordParent={record.parent}
139
139
  />
140
140
 
141
141
  {!loading && communities?.length > MAX_COMMUNITIES && (
@@ -1,5 +1,5 @@
1
1
  // This file is part of InvenioRDM
2
- // Copyright (C) 2021-2024 CERN.
2
+ // Copyright (C) 2021-2025 CERN.
3
3
  // Copyright (C) 2021 Graz University of Technology.
4
4
  // Copyright (C) 2021 TU Wien
5
5
  //
@@ -28,18 +28,18 @@ export class RecordCitationField extends Component {
28
28
  }
29
29
 
30
30
  componentDidMount() {
31
- const { record, defaultStyle, includeDeleted } = this.props;
32
- this.getCitation(record, defaultStyle, includeDeleted);
33
- }
34
-
35
- componentWillUnmount() {
36
- this.cancellableFetchCitation?.cancel();
31
+ const { recordLinks, defaultStyle, includeDeleted } = this.props;
32
+ this.getCitation(recordLinks, defaultStyle, includeDeleted);
37
33
  }
38
34
 
39
35
  async componentDidUpdate() {
40
36
  await window.MathJax?.typesetPromise();
41
37
  }
42
38
 
39
+ componentWillUnmount() {
40
+ this.cancellableFetchCitation?.cancel();
41
+ }
42
+
43
43
  placeholderLoader = () => {
44
44
  return (
45
45
  <Placeholder>
@@ -56,9 +56,9 @@ export class RecordCitationField extends Component {
56
56
  return <Message negative>{message}</Message>;
57
57
  };
58
58
 
59
- fetchCitation = async (record, style, includeDeleted) => {
59
+ fetchCitation = async (recordLinks, style, includeDeleted) => {
60
60
  const includeDeletedParam = includeDeleted === true ? "&include_deleted=1" : "";
61
- const url = `${record.links.self}?locale=${navigator.language}&style=${style}${includeDeletedParam}`;
61
+ const url = `${recordLinks.self}?locale=${navigator.language}&style=${style}${includeDeletedParam}`;
62
62
  return await http.get(url, {
63
63
  headers: {
64
64
  Accept: "text/x-bibliography",
@@ -66,7 +66,7 @@ export class RecordCitationField extends Component {
66
66
  });
67
67
  };
68
68
 
69
- getCitation = async (record, style, includeDeleted) => {
69
+ getCitation = async (recordLinks, style, includeDeleted) => {
70
70
  this.setState({
71
71
  loading: true,
72
72
  citation: "",
@@ -74,7 +74,7 @@ export class RecordCitationField extends Component {
74
74
  });
75
75
 
76
76
  this.cancellableFetchCitation = withCancel(
77
- this.fetchCitation(record, style, includeDeleted)
77
+ this.fetchCitation(recordLinks, style, includeDeleted)
78
78
  );
79
79
 
80
80
  try {
@@ -95,7 +95,7 @@ export class RecordCitationField extends Component {
95
95
  };
96
96
 
97
97
  render() {
98
- const { styles, record, defaultStyle, includeDeleted } = this.props;
98
+ const { styles, recordLinks, defaultStyle, includeDeleted } = this.props;
99
99
  const { loading, citation, error } = this.state;
100
100
  const citationOptions = styles.map((style) => {
101
101
  return {
@@ -140,7 +140,8 @@ export class RecordCitationField extends Component {
140
140
  options={citationOptions}
141
141
  selection
142
142
  onChange={_debounce(
143
- (event, data) => this.getCitation(record, data.value, includeDeleted),
143
+ (event, data) =>
144
+ this.getCitation(recordLinks, data.value, includeDeleted),
144
145
  500
145
146
  )}
146
147
  />
@@ -155,7 +156,7 @@ export class RecordCitationField extends Component {
155
156
 
156
157
  RecordCitationField.propTypes = {
157
158
  styles: PropTypes.array.isRequired,
158
- record: PropTypes.object.isRequired,
159
+ recordLinks: PropTypes.object.isRequired,
159
160
  defaultStyle: PropTypes.string.isRequired,
160
161
  includeDeleted: PropTypes.bool.isRequired,
161
162
  };
@@ -1,5 +1,5 @@
1
1
  // This file is part of InvenioRDM
2
- // Copyright (C) 2023 CERN.
2
+ // Copyright (C) 2023-2025 CERN.
3
3
  //
4
4
  // InvenioRDM is free software; you can redistribute it and/or modify it
5
5
  // under the terms of the MIT License; see LICENSE file for more details.
@@ -13,9 +13,9 @@ import { RecordCommunitiesSearch } from "./RecordCommunitiesSearch";
13
13
  export class RecordCommunitiesListModal extends Component {
14
14
  constructor(props) {
15
15
  super(props);
16
- const { record } = this.props;
16
+ const { recordParent } = this.props;
17
17
  this.state = {
18
- recordParent: record.parent,
18
+ recordParent: recordParent,
19
19
  };
20
20
  }
21
21
 
@@ -77,7 +77,7 @@ RecordCommunitiesListModal.propTypes = {
77
77
  handleOnClose: PropTypes.func.isRequired,
78
78
  handleOnOpen: PropTypes.func.isRequired,
79
79
  permissions: PropTypes.object.isRequired,
80
- record: PropTypes.object.isRequired,
80
+ recordParent: PropTypes.object.isRequired,
81
81
  };
82
82
 
83
83
  RecordCommunitiesListModal.defaultProps = {