Skip to content

Commit 06774b5

Browse files
Merge remote-tracking branch 'gitHub/dspace-8_x' into task/dspace-8_x/DURACOM-303
2 parents 5d0903e + 2a5d779 commit 06774b5

File tree

61 files changed

+6650
-1352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+6650
-1352
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace
3535
Quick start
3636
-----------
3737

38-
**Ensure you're running [Node](https://nodejs.org) `v16.x` or `v18.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) == `v1.x`**
38+
**Ensure you're running [Node](https://nodejs.org) `v18.x` or `v20.x`, [npm](https://www.npmjs.com/) >= `v10.x` and [yarn](https://yarnpkg.com) == `v1.x`**
3939

4040
```bash
4141
# clone the repo
@@ -90,7 +90,7 @@ Requirements
9090
------------
9191

9292
- [Node.js](https://nodejs.org) and [yarn](https://yarnpkg.com)
93-
- Ensure you're running node `v16.x` or `v18.x` and yarn == `v1.x`
93+
- Ensure you're running node `v18.x` or `v20.x` and yarn == `v1.x`
9494

9595
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
9696

config/config.example.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ssr:
2323
# Determining which styles are critical is a relatively expensive operation; this option is
2424
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2525
inlineCriticalCss: false
26+
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ]
2628
# Whether to enable rendering of Search component on SSR.
2729
# If set to true the component will be included in the HTML returned from the server side rendering.
2830
# If set to false the component will not be included in the HTML returned from the server side rendering.

cypress/e2e/admin-add-new-modals.cy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ describe('Admin Add New Modals', () => {
99

1010
it('Add new Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
1213
cy.get('#sidebar-collapse-toggle').click();
1314

1415
// Click on entry of menu
16+
cy.get('#admin-menu-section-new-title').should('be.visible');
1517
cy.get('#admin-menu-section-new-title').click();
1618

1719
cy.get('a[data-test="menu.section.new_community"]').click();
@@ -22,9 +24,11 @@ describe('Admin Add New Modals', () => {
2224

2325
it('Add new Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
2528
cy.get('#sidebar-collapse-toggle').click();
2629

2730
// Click on entry of menu
31+
cy.get('#admin-menu-section-new-title').should('be.visible');
2832
cy.get('#admin-menu-section-new-title').click();
2933

3034
cy.get('a[data-test="menu.section.new_collection"]').click();
@@ -35,9 +39,11 @@ describe('Admin Add New Modals', () => {
3539

3640
it('Add new Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
42+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
3843
cy.get('#sidebar-collapse-toggle').click();
3944

4045
// Click on entry of menu
46+
cy.get('#admin-menu-section-new-title').should('be.visible');
4147
cy.get('#admin-menu-section-new-title').click();
4248

4349
cy.get('a[data-test="menu.section.new_item"]').click();

cypress/e2e/admin-edit-modals.cy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ describe('Admin Edit Modals', () => {
99

1010
it('Edit Community modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
1213
cy.get('#sidebar-collapse-toggle').click();
1314

1415
// Click on entry of menu
16+
cy.get('#admin-menu-section-edit-title').should('be.visible');
1517
cy.get('#admin-menu-section-edit-title').click();
1618

1719
cy.get('a[data-test="menu.section.edit_community"]').click();
@@ -22,9 +24,11 @@ describe('Admin Edit Modals', () => {
2224

2325
it('Edit Collection modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
2528
cy.get('#sidebar-collapse-toggle').click();
2629

2730
// Click on entry of menu
31+
cy.get('#admin-menu-section-edit-title').should('be.visible');
2832
cy.get('#admin-menu-section-edit-title').click();
2933

3034
cy.get('a[data-test="menu.section.edit_collection"]').click();
@@ -35,9 +39,11 @@ describe('Admin Edit Modals', () => {
3539

3640
it('Edit Item modal should pass accessibility tests', () => {
3741
// Pin the sidebar open
42+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
3843
cy.get('#sidebar-collapse-toggle').click();
3944

4045
// Click on entry of menu
46+
cy.get('#admin-menu-section-edit-title').should('be.visible');
4147
cy.get('#admin-menu-section-edit-title').click();
4248

4349
cy.get('a[data-test="menu.section.edit_item"]').click();

cypress/e2e/admin-export-modals.cy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ describe('Admin Export Modals', () => {
99

1010
it('Export metadata modal should pass accessibility tests', () => {
1111
// Pin the sidebar open
12+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
1213
cy.get('#sidebar-collapse-toggle').click();
1314

1415
// Click on entry of menu
16+
cy.get('#admin-menu-section-export-title').should('be.visible');
1517
cy.get('#admin-menu-section-export-title').click();
1618

1719
cy.get('a[data-test="menu.section.export_metadata"]').click();
@@ -22,9 +24,11 @@ describe('Admin Export Modals', () => {
2224

2325
it('Export batch modal should pass accessibility tests', () => {
2426
// Pin the sidebar open
27+
cy.get('#sidebar-collapse-toggle').trigger('mouseover');
2528
cy.get('#sidebar-collapse-toggle').click();
2629

2730
// Click on entry of menu
31+
cy.get('#admin-menu-section-export-title').should('be.visible');
2832
cy.get('#admin-menu-section-export-title').click();
2933

3034
cy.get('a[data-test="menu.section.export_batch"]').click();

cypress/e2e/item-edit.cy.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ beforeEach(() => {
1313

1414
describe('Edit Item > Edit Metadata tab', () => {
1515
it('should pass accessibility tests', () => {
16+
cy.get('a[data-test="metadata"]').should('be.visible');
1617
cy.get('a[data-test="metadata"]').click();
1718

18-
// Our selected tab should be active
19+
// Our selected tab should be both visible & active
20+
cy.get('a[data-test="metadata"]').should('be.visible');
1921
cy.get('a[data-test="metadata"]').should('have.class', 'active');
2022

2123
// <ds-edit-item-page> tag must be loaded
@@ -34,9 +36,11 @@ describe('Edit Item > Edit Metadata tab', () => {
3436
describe('Edit Item > Status tab', () => {
3537

3638
it('should pass accessibility tests', () => {
39+
cy.get('a[data-test="status"]').should('be.visible');
3740
cy.get('a[data-test="status"]').click();
3841

39-
// Our selected tab should be active
42+
// Our selected tab should be both visible & active
43+
cy.get('a[data-test="status"]').should('be.visible');
4044
cy.get('a[data-test="status"]').should('have.class', 'active');
4145

4246
// <ds-item-status> tag must be loaded
@@ -50,9 +54,11 @@ describe('Edit Item > Status tab', () => {
5054
describe('Edit Item > Bitstreams tab', () => {
5155

5256
it('should pass accessibility tests', () => {
57+
cy.get('a[data-test="bitstreams"]').should('be.visible');
5358
cy.get('a[data-test="bitstreams"]').click();
5459

55-
// Our selected tab should be active
60+
// Our selected tab should be both visible & active
61+
cy.get('a[data-test="bitstreams"]').should('be.visible');
5662
cy.get('a[data-test="bitstreams"]').should('have.class', 'active');
5763

5864
// <ds-item-bitstreams> tag must be loaded
@@ -77,9 +83,11 @@ describe('Edit Item > Bitstreams tab', () => {
7783
describe('Edit Item > Curate tab', () => {
7884

7985
it('should pass accessibility tests', () => {
86+
cy.get('a[data-test="curate"]').should('be.visible');
8087
cy.get('a[data-test="curate"]').click();
8188

82-
// Our selected tab should be active
89+
// Our selected tab should be both visible & active
90+
cy.get('a[data-test="curate"]').should('be.visible');
8391
cy.get('a[data-test="curate"]').should('have.class', 'active');
8492

8593
// <ds-item-curate> tag must be loaded
@@ -93,9 +101,11 @@ describe('Edit Item > Curate tab', () => {
93101
describe('Edit Item > Relationships tab', () => {
94102

95103
it('should pass accessibility tests', () => {
104+
cy.get('a[data-test="relationships"]').should('be.visible');
96105
cy.get('a[data-test="relationships"]').click();
97106

98-
// Our selected tab should be active
107+
// Our selected tab should be both visible & active
108+
cy.get('a[data-test="relationships"]').should('be.visible');
99109
cy.get('a[data-test="relationships"]').should('have.class', 'active');
100110

101111
// <ds-item-relationships> tag must be loaded
@@ -109,9 +119,11 @@ describe('Edit Item > Relationships tab', () => {
109119
describe('Edit Item > Version History tab', () => {
110120

111121
it('should pass accessibility tests', () => {
122+
cy.get('a[data-test="versionhistory"]').should('be.visible');
112123
cy.get('a[data-test="versionhistory"]').click();
113124

114-
// Our selected tab should be active
125+
// Our selected tab should be both visible & active
126+
cy.get('a[data-test="versionhistory"]').should('be.visible');
115127
cy.get('a[data-test="versionhistory"]').should('have.class', 'active');
116128

117129
// <ds-item-version-history> tag must be loaded
@@ -125,9 +137,11 @@ describe('Edit Item > Version History tab', () => {
125137
describe('Edit Item > Access Control tab', () => {
126138

127139
it('should pass accessibility tests', () => {
140+
cy.get('a[data-test="access-control"]').should('be.visible');
128141
cy.get('a[data-test="access-control"]').click();
129142

130-
// Our selected tab should be active
143+
// Our selected tab should be both visible & active
144+
cy.get('a[data-test="access-control"]').should('be.visible');
131145
cy.get('a[data-test="access-control"]').should('have.class', 'active');
132146

133147
// <ds-item-access-control> tag must be loaded
@@ -141,9 +155,11 @@ describe('Edit Item > Access Control tab', () => {
141155
describe('Edit Item > Collection Mapper tab', () => {
142156

143157
it('should pass accessibility tests', () => {
158+
cy.get('a[data-test="mapper"]').should('be.visible');
144159
cy.get('a[data-test="mapper"]').click();
145160

146-
// Our selected tab should be active
161+
// Our selected tab should be both visible & active
162+
cy.get('a[data-test="mapper"]').should('be.visible');
147163
cy.get('a[data-test="mapper"]').should('have.class', 'active');
148164

149165
// <ds-item-collection-mapper> tag must be loaded

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@ngx-translate/core": "^14.0.0",
7979
"@nicky-lenaers/ngx-scroll-to": "^14.0.0",
8080
"angulartics2": "^12.2.0",
81-
"axios": "^1.7.4",
81+
"axios": "^1.7.9",
8282
"bootstrap": "^4.6.1",
8383
"cerialize": "0.1.18",
8484
"cli-progress": "^3.12.0",
@@ -90,7 +90,7 @@
9090
"date-fns-tz": "^1.3.7",
9191
"deepmerge": "^4.3.1",
9292
"ejs": "^3.1.10",
93-
"express": "^4.21.1",
93+
"express": "^4.21.2",
9494
"express-rate-limit": "^5.1.3",
9595
"fast-json-patch": "^3.1.1",
9696
"filesize": "^6.1.0",
@@ -100,13 +100,13 @@
100100
"js-cookie": "2.2.1",
101101
"js-yaml": "^4.1.0",
102102
"json5": "^2.2.3",
103-
"jsonschema": "1.4.1",
103+
"jsonschema": "1.5.0",
104104
"jwt-decode": "^3.1.2",
105105
"klaro": "^0.7.18",
106106
"lodash": "^4.17.21",
107107
"lru-cache": "^7.14.1",
108108
"markdown-it": "^13.0.1",
109-
"mirador": "^3.3.0",
109+
"mirador": "^3.4.2",
110110
"mirador-dl-plugin": "^0.13.0",
111111
"mirador-share-plugin": "^0.16.0",
112112
"morgan": "^1.10.0",
@@ -136,7 +136,7 @@
136136
"@angular/compiler-cli": "^17.3.11",
137137
"@angular/language-service": "^17.3.11",
138138
"@cypress/schematic": "^1.5.0",
139-
"@fortawesome/fontawesome-free": "^6.4.0",
139+
"@fortawesome/fontawesome-free": "^6.7.2",
140140
"@material-ui/core": "^4.12.4",
141141
"@material-ui/icons": "^4.11.3",
142142
"@ngrx/store-devtools": "^17.1.1",
@@ -147,7 +147,7 @@
147147
"@types/grecaptcha": "^3.0.9",
148148
"@types/jasmine": "~3.6.0",
149149
"@types/js-cookie": "2.2.6",
150-
"@types/lodash": "^4.17.13",
150+
"@types/lodash": "^4.17.14",
151151
"@types/node": "^14.14.9",
152152
"@typescript-eslint/eslint-plugin": "^7.2.0",
153153
"@typescript-eslint/parser": "^7.2.0",
@@ -158,7 +158,7 @@
158158
"copy-webpack-plugin": "^6.4.1",
159159
"cross-env": "^7.0.3",
160160
"csstype": "^3.1.3",
161-
"cypress": "^13.16.0",
161+
"cypress": "^13.17.0",
162162
"cypress-axe": "^1.5.0",
163163
"deep-freeze": "0.0.1",
164164
"eslint": "^8.39.0",
@@ -168,12 +168,12 @@
168168
"eslint-plugin-import": "^2.31.0",
169169
"eslint-plugin-import-newlines": "^1.3.1",
170170
"eslint-plugin-jsdoc": "^45.0.0",
171-
"eslint-plugin-jsonc": "^2.6.0",
171+
"eslint-plugin-jsonc": "^2.18.2",
172172
"eslint-plugin-lodash": "^7.4.0",
173173
"eslint-plugin-rxjs": "^5.0.3",
174174
"eslint-plugin-simple-import-sort": "^10.0.0",
175175
"eslint-plugin-unused-imports": "^3.2.0",
176-
"express-static-gzip": "^2.1.8",
176+
"express-static-gzip": "^2.2.0",
177177
"jasmine": "^3.8.0",
178178
"jasmine-core": "^3.8.0",
179179
"jasmine-marbles": "0.9.2",
@@ -195,12 +195,12 @@
195195
"react-copy-to-clipboard": "^5.1.0",
196196
"react-dom": "^16.14.0",
197197
"rimraf": "^3.0.2",
198-
"sass": "~1.80.6",
198+
"sass": "~1.83.1",
199199
"sass-loader": "^12.6.0",
200200
"sass-resources-loader": "^2.2.5",
201201
"ts-node": "^8.10.2",
202202
"typescript": "~5.4.5",
203-
"webpack": "5.96.1",
203+
"webpack": "5.97.1",
204204
"webpack-cli": "^5.1.4",
205205
"webpack-dev-server": "^4.15.1"
206206
}

server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function app() {
218218
* The callback function to serve server side angular
219219
*/
220220
function ngApp(req, res, next) {
221-
if (environment.ssr.enabled) {
221+
if (environment.ssr.enabled && req.method === 'GET' && (req.path === '/' || environment.ssr.paths.some(pathPrefix => req.path.startsWith(pathPrefix)))) {
222222
// Render the page to user via SSR (server side rendering)
223223
serverSideRender(req, res, next);
224224
} else {

src/app/core/shared/browse-definition.model.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { autoserialize } from 'cerialize';
1+
import {
2+
autoserialize,
3+
autoserializeAs,
4+
} from 'cerialize';
25

36
import { BrowseByDataType } from '../../browse-by/browse-by-switcher/browse-by-data-type';
47
import { CacheableObject } from '../cache/cacheable-object.model';
@@ -11,6 +14,9 @@ export abstract class BrowseDefinition extends CacheableObject {
1114
@autoserialize
1215
id: string;
1316

17+
@autoserializeAs('metadata')
18+
metadataKeys: string[];
19+
1420
/**
1521
* Get the render type of the BrowseDefinition model
1622
*/

src/app/core/shared/hierarchical-browse-definition.model.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
autoserialize,
3-
autoserializeAs,
43
deserialize,
54
inheritSerialization,
65
} from 'cerialize';
@@ -33,9 +32,6 @@ export class HierarchicalBrowseDefinition extends BrowseDefinition {
3332
@autoserialize
3433
vocabulary: string;
3534

36-
@autoserializeAs('metadata')
37-
metadataKeys: string[];
38-
3935
get self(): string {
4036
return this._links.self.href;
4137
}

0 commit comments

Comments
 (0)