Skip to content

Commit d1ca092

Browse files
committed
Merge remote-tracking branch 'origin/main' into w2p-94060_Issue-1720_MyDSpace-support-entities
2 parents 7cbac04 + 064dae2 commit d1ca092

448 files changed

Lines changed: 19932 additions & 6799 deletions

File tree

Some content is hidden

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

config/config.example.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,15 @@ languages:
156156
- code: tr
157157
label: Türkçe
158158
active: true
159+
- code: kk
160+
label: Қазақ
161+
active: true
159162
- code: bn
160163
label: বাংলা
161164
active: true
165+
- code: el
166+
label: Ελληνικά
167+
active: true
162168

163169
# Browse-By Pages
164170
browseBy:
@@ -168,6 +174,27 @@ browseBy:
168174
fiveYearLimit: 30
169175
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
170176
defaultLowerLimit: 1900
177+
# If true, thumbnail images for items will be added to BOTH search and browse result lists.
178+
showThumbnails: true
179+
# The number of entries in a paginated browse results list.
180+
# Rounded to the nearest size in the list of selectable sizes on the
181+
# settings menu.
182+
pageSize: 20
183+
184+
communityList:
185+
# No. of communities to list per expansion (show more)
186+
pageSize: 20
187+
188+
homePage:
189+
recentSubmissions:
190+
# The number of item showing in recent submission components
191+
pageSize: 5
192+
# Sort record of recent submission
193+
sortField: 'dc.date.accessioned'
194+
topLevelCommunityList:
195+
# No. of communities to list per page on the home page
196+
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
197+
pageSize: 5
171198

172199
# Item Config
173200
item:
@@ -243,7 +270,7 @@ themes:
243270

244271
# The default bundles that should always be displayed as suggestions when you upload a new bundle
245272
bundle:
246-
- standardBundles: [ ORIGINAL, THUMBNAIL, LICENSE ]
273+
standardBundles: [ ORIGINAL, THUMBNAIL, LICENSE ]
247274

248275
# Whether to enable media viewer for image and/or video Bitstreams (i.e. Bitstreams whose MIME type starts with 'image' or 'video').
249276
# For images, this enables a gallery viewer where you can zoom or page through images.

cypress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
screenshots/
22
videos/
3+
downloads/

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dspace-angular",
3-
"version": "0.0.0",
3+
"version": "7.4.0-next",
44
"scripts": {
55
"ng": "ng",
66
"config:watch": "nodemon",
@@ -10,7 +10,7 @@
1010
"start:prod": "yarn run build:prod && cross-env NODE_ENV=production yarn run serve:ssr",
1111
"start:mirador:prod": "yarn run build:mirador && yarn run start:prod",
1212
"preserve": "yarn base-href",
13-
"serve": "ng serve --configuration development",
13+
"serve": "ts-node --project ./tsconfig.ts-node.json scripts/serve.ts",
1414
"serve:ssr": "node dist/server/main",
1515
"analyze": "webpack-bundle-analyzer dist/browser/stats.json",
1616
"build": "ng build --configuration development",

scripts/serve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ const appConfig: AppConfig = buildAppConfig();
1010
* Any CLI arguments given to this script are patched through to `ng serve` as well.
1111
*/
1212
child.spawn(
13-
`ng serve --host ${appConfig.ui.host} --port ${appConfig.ui.port} --serve-path ${appConfig.ui.nameSpace} --ssl ${appConfig.ui.ssl} ${process.argv.slice(2).join(' ')}`,
13+
`ng serve --host ${appConfig.ui.host} --port ${appConfig.ui.port} --serve-path ${appConfig.ui.nameSpace} --ssl ${appConfig.ui.ssl} ${process.argv.slice(2).join(' ')} --configuration development`,
1414
{ stdio: 'inherit', shell: true }
1515
);

scripts/test-rest.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ console.log(`...Testing connection to REST API at ${restUrl}...\n`);
2222
if (appConfig.rest.ssl) {
2323
const req = https.request(restUrl, (res) => {
2424
console.log(`RESPONSE: ${res.statusCode} ${res.statusMessage} \n`);
25-
res.on('data', (data) => {
25+
// We will keep reading data until the 'end' event fires.
26+
// This ensures we don't just read the first chunk.
27+
let data = '';
28+
res.on('data', (chunk) => {
29+
data += chunk;
30+
});
31+
res.on('end', () => {
2632
checkJSONResponse(data);
2733
});
2834
});
@@ -35,7 +41,13 @@ if (appConfig.rest.ssl) {
3541
} else {
3642
const req = http.request(restUrl, (res) => {
3743
console.log(`RESPONSE: ${res.statusCode} ${res.statusMessage} \n`);
38-
res.on('data', (data) => {
44+
// We will keep reading data until the 'end' event fires.
45+
// This ensures we don't just read the first chunk.
46+
let data = '';
47+
res.on('data', (chunk) => {
48+
data += chunk;
49+
});
50+
res.on('end', () => {
3951
checkJSONResponse(data);
4052
});
4153
});

server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import { ServerAppModule } from './src/main.server';
4848
import { buildAppConfig } from './src/config/config.server';
4949
import { APP_CONFIG, AppConfig } from './src/config/app-config.interface';
5050
import { extendEnvironmentWithAppConfig } from './src/config/config.util';
51+
import { logStartupMessage } from './startup-message';
5152

5253
/*
5354
* Set path for the browser application's dist folder
@@ -281,6 +282,8 @@ function run() {
281282
}
282283

283284
function start() {
285+
logStartupMessage(environment);
286+
284287
/*
285288
* If SSL is enabled
286289
* - Read credentials from configuration files

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ describe('EPersonFormComponent', () => {
177177

178178
});
179179
groupsDataService = jasmine.createSpyObj('groupsDataService', {
180-
findAllByHref: createSuccessfulRemoteDataObject$(createPaginatedList([])),
180+
findListByHref: createSuccessfulRemoteDataObject$(createPaginatedList([])),
181181
getGroupRegistryRouterLink: ''
182182
});
183183

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
265265
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
266266
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
267267
if (eperson != null) {
268-
this.groups = this.groupsDataService.findAllByHref(eperson._links.groups.href, {
268+
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, {
269269
currentPage: 1,
270270
elementsPerPage: this.config.pageSize
271271
});
@@ -297,7 +297,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
297297
}),
298298
switchMap(([eperson, findListOptions]) => {
299299
if (eperson != null) {
300-
return this.groupsDataService.findAllByHref(eperson._links.groups.href, findListOptions, true, true, followLink('object'));
300+
return this.groupsDataService.findListByHref(eperson._links.groups.href, findListOptions, true, true, followLink('object'));
301301
}
302302
return observableOf(undefined);
303303
})
@@ -554,7 +554,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
554554
*/
555555
private updateGroups(options) {
556556
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
557-
this.groups = this.groupsDataService.findAllByHref(eperson._links.groups.href, options);
557+
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, options);
558558
}));
559559
}
560560
}

src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('MembersListComponent', () => {
5353
activeGroup: activeGroup,
5454
epersonMembers: epersonMembers,
5555
subgroupMembers: subgroupMembers,
56-
findAllByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
56+
findListByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
5757
return createSuccessfulRemoteDataObject$(buildPaginatedList<EPerson>(new PageInfo(), groupsDataServiceStub.getEPersonMembers()));
5858
},
5959
searchByScope(scope: string, query: string): Observable<RemoteData<PaginatedList<EPerson>>> {

src/app/access-control/group-registry/group-form/members-list/members-list.component.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
combineLatest as observableCombineLatest,
1111
ObservedValueOf,
1212
} from 'rxjs';
13-
import { map, mergeMap, switchMap, take } from 'rxjs/operators';
13+
import { defaultIfEmpty, map, mergeMap, switchMap, take } from 'rxjs/operators';
1414
import {buildPaginatedList, PaginatedList} from '../../../../core/data/paginated-list.model';
1515
import { RemoteData } from '../../../../core/data/remote-data';
1616
import { EPersonDataService } from '../../../../core/eperson/eperson-data.service';
@@ -129,7 +129,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
129129
this.subs.set(SubKey.MembersDTO,
130130
this.paginationService.getCurrentPagination(this.config.id, this.config).pipe(
131131
switchMap((currentPagination) => {
132-
return this.ePersonDataService.findAllByHref(this.groupBeingEdited._links.epersons.href, {
132+
return this.ePersonDataService.findListByHref(this.groupBeingEdited._links.epersons.href, {
133133
currentPage: currentPagination.currentPage,
134134
elementsPerPage: currentPagination.pageSize
135135
}
@@ -144,7 +144,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
144144
}
145145
}),
146146
switchMap((epersonListRD: RemoteData<PaginatedList<EPerson>>) => {
147-
const dtos$ = observableCombineLatest(...epersonListRD.payload.page.map((member: EPerson) => {
147+
const dtos$ = observableCombineLatest([...epersonListRD.payload.page.map((member: EPerson) => {
148148
const dto$: Observable<EpersonDtoModel> = observableCombineLatest(
149149
this.isMemberOfGroup(member), (isMember: ObservedValueOf<Observable<boolean>>) => {
150150
const epersonDtoModel: EpersonDtoModel = new EpersonDtoModel();
@@ -153,8 +153,8 @@ export class MembersListComponent implements OnInit, OnDestroy {
153153
return epersonDtoModel;
154154
});
155155
return dto$;
156-
}));
157-
return dtos$.pipe(map((dtos: EpersonDtoModel[]) => {
156+
})]);
157+
return dtos$.pipe(defaultIfEmpty([]), map((dtos: EpersonDtoModel[]) => {
158158
return buildPaginatedList(epersonListRD.payload.pageInfo, dtos);
159159
}));
160160
}))
@@ -171,10 +171,10 @@ export class MembersListComponent implements OnInit, OnDestroy {
171171
return this.groupDataService.getActiveGroup().pipe(take(1),
172172
mergeMap((group: Group) => {
173173
if (group != null) {
174-
return this.ePersonDataService.findAllByHref(group._links.epersons.href, {
174+
return this.ePersonDataService.findListByHref(group._links.epersons.href, {
175175
currentPage: 1,
176176
elementsPerPage: 9999
177-
}, false)
177+
})
178178
.pipe(
179179
getFirstSucceededRemoteData(),
180180
getRemoteDataPayload(),
@@ -274,7 +274,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
274274
}
275275
}),
276276
switchMap((epersonListRD: RemoteData<PaginatedList<EPerson>>) => {
277-
const dtos$ = observableCombineLatest(...epersonListRD.payload.page.map((member: EPerson) => {
277+
const dtos$ = observableCombineLatest([...epersonListRD.payload.page.map((member: EPerson) => {
278278
const dto$: Observable<EpersonDtoModel> = observableCombineLatest(
279279
this.isMemberOfGroup(member), (isMember: ObservedValueOf<Observable<boolean>>) => {
280280
const epersonDtoModel: EpersonDtoModel = new EpersonDtoModel();
@@ -283,8 +283,8 @@ export class MembersListComponent implements OnInit, OnDestroy {
283283
return epersonDtoModel;
284284
});
285285
return dto$;
286-
}));
287-
return dtos$.pipe(map((dtos: EpersonDtoModel[]) => {
286+
})]);
287+
return dtos$.pipe(defaultIfEmpty([]), map((dtos: EpersonDtoModel[]) => {
288288
return buildPaginatedList(epersonListRD.payload.pageInfo, dtos);
289289
}));
290290
}))

0 commit comments

Comments
 (0)