Skip to content

Commit f150eae

Browse files
Merged ux-plus-2023_02_x into task/ux-plus-2023_02_x/UXP-141
2 parents c88fe0d + 89091ba commit f150eae

178 files changed

Lines changed: 80685 additions & 29171 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.

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"input": "src/themes/dspace/styles/theme.scss",
7070
"inject": false,
7171
"bundleName": "dspace-theme"
72-
}
72+
},
73+
"./node_modules/leaflet/dist/leaflet.css"
7374
],
7475
"scripts": [],
7576
"baseHref": "/"

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dspace-angular",
3-
"version": "2023.02.05-SNAPSHOT",
3+
"version": "2023.02.06-SNAPHOT",
44
"scripts": {
55
"ng": "ng",
66
"config:watch": "nodemon",
@@ -86,6 +86,7 @@
8686
"@angular/platform-server": "^15.2.8",
8787
"@angular/router": "^15.2.8",
8888
"@babel/runtime": "7.21.0",
89+
"@asymmetrik/ngx-leaflet": "^15.0.0",
8990
"@datadog/browser-rum": "^5.7.0",
9091
"@kolkov/ngx-gallery": "^2.0.1",
9192
"@material-ui/core": "^4.11.0",
@@ -103,6 +104,7 @@
103104
"@swimlane/ngx-charts": "^20.4.1",
104105
"@types/googlemaps": "^3.43.3",
105106
"@types/grecaptcha": "^3.0.4",
107+
"@types/leaflet": "^1.9.12",
106108
"angular-idle-preload": "3.0.0",
107109
"angulartics2": "^12.2.0",
108110
"axios": "^1.6.0",
@@ -116,6 +118,7 @@
116118
"date-fns": "^2.29.3",
117119
"date-fns-tz": "^1.3.7",
118120
"deepmerge": "^4.3.1",
121+
"domino": "^2.1.6",
119122
"ejs": "^3.1.9",
120123
"express": "^4.18.2",
121124
"express-rate-limit": "^5.1.3",
@@ -133,6 +136,7 @@
133136
"jsonschema": "1.4.1",
134137
"jwt-decode": "^3.1.2",
135138
"klaro": "^0.7.18",
139+
"leaflet": "^1.9.4",
136140
"lodash": "^4.17.21",
137141
"lru-cache": "^7.14.1",
138142
"markdown-it": "^13.0.1",
@@ -147,7 +151,6 @@
147151
"ng2-nouislider": "^2.0.0",
148152
"ng2-pdfjs-viewer": "^15.0.0",
149153
"ngx-infinite-scroll": "^15.0.0",
150-
"ngx-openlayers": "0.8.22",
151154
"ngx-pagination": "6.0.3",
152155
"ngx-ui-switch": "^14.0.3",
153156
"nouislider": "^15.7.1",

server.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import * as express from 'express';
2525
import * as ejs from 'ejs';
2626
import * as compression from 'compression';
2727
import * as expressStaticGzip from 'express-static-gzip';
28+
import * as domino from 'domino';
2829
/* eslint-enable import/no-namespace */
2930
import axios from 'axios';
3031
import LRU from 'lru-cache';
@@ -79,6 +80,15 @@ let anonymousCache: LRU<string, any>;
7980
// extend environment with app config for server
8081
extendEnvironmentWithAppConfig(environment, appConfig);
8182

83+
// Create a DOM window object based on the template
84+
const _window = domino.createWindow(indexHtml);
85+
86+
// Assign the DOM window and document objects to the global object
87+
(_window as any).screen = {deviceXDPI: 0, logicalXDPI: 0};
88+
(global as any).window = _window;
89+
(global as any).document = _window.document;
90+
(global as any).navigator = _window.navigator;
91+
8292
// The Express app is exported so that it can be used by serverless Functions.
8393
export function app() {
8494

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import { RequestService } from '../../core/data/request.service';
2727
import { PaginationService } from '../../core/pagination/pagination.service';
2828
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
2929
import { FindListOptions } from '../../core/data/find-list-options.model';
30-
import { UUIDService } from '../../core/shared/uuid.service';
31-
import { getMockUUIDService } from '../../shared/mocks/uuid.service.mock';
3230

3331
describe('EPeopleRegistryComponent', () => {
3432
let component: EPeopleRegistryComponent;
@@ -141,8 +139,7 @@ describe('EPeopleRegistryComponent', () => {
141139
{ provide: FormBuilderService, useValue: builderService },
142140
{ provide: Router, useValue: new RouterStub() },
143141
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) },
144-
{ provide: PaginationService, useValue: paginationService },
145-
{ provide: UUIDService, useValue: getMockUUIDService() }
142+
{ provide: PaginationService, useValue: paginationService }
146143
],
147144
schemas: [NO_ERRORS_SCHEMA]
148145
}).compileComponents();

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { NoContent } from '../../core/shared/NoContent.model';
2323
import { PaginationService } from '../../core/pagination/pagination.service';
2424
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
2525
import { getEPersonEditRoute, getEPersonsRoute } from '../access-control-routing-paths';
26-
import { UUIDService } from '../../core/shared/uuid.service';
2726

2827
@Component({
2928
selector: 'ds-epeople-registry',
@@ -61,7 +60,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
6160
* Pagination config used to display the list of epeople
6261
*/
6362
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
64-
id: this.uuidService.generate(),
63+
id: 'elp',
6564
pageSize: 5,
6665
currentPage: 1
6766
});
@@ -92,8 +91,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
9291
private modalService: NgbModal,
9392
private paginationService: PaginationService,
9493
public requestService: RequestService,
95-
public dsoNameService: DSONameService,
96-
private uuidService: UUIDService) {
94+
public dsoNameService: DSONameService) {
9795
this.currentSearchQuery = '';
9896
this.currentSearchScope = 'metadata';
9997
this.searchForm = this.formBuilder.group(({

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model
3535
import { ActivatedRoute, Router } from '@angular/router';
3636
import { RouterStub } from '../../../shared/testing/router.stub';
3737
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
38-
import { UUIDService } from '../../../core/shared/uuid.service';
39-
import { getMockUUIDService } from '../../../shared/mocks/uuid.service.mock';
4038

4139
describe('EPersonFormComponent', () => {
4240
let component: EPersonFormComponent;
@@ -222,7 +220,6 @@ describe('EPersonFormComponent', () => {
222220
{ provide: EpersonRegistrationService, useValue: epersonRegistrationService },
223221
{ provide: ActivatedRoute, useValue: route },
224222
{ provide: Router, useValue: router },
225-
{ provide: UUIDService, useValue: getMockUUIDService() },
226223
EPeopleRegistryComponent
227224
],
228225
schemas: [NO_ERRORS_SCHEMA]

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email
4040
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
4141
import { ActivatedRoute, Router } from '@angular/router';
4242
import { getEPersonsRoute } from '../../access-control-routing-paths';
43-
import { UUIDService } from '../../../core/shared/uuid.service';
4443

4544
@Component({
4645
selector: 'ds-eperson-form',
@@ -154,7 +153,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
154153
* Pagination config used to display the list of groups
155154
*/
156155
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
157-
id: this.uuidService.generate(),
156+
id: 'gem',
158157
pageSize: 5,
159158
currentPage: 1
160159
});
@@ -198,8 +197,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
198197
private epersonRegistrationService: EpersonRegistrationService,
199198
public dsoNameService: DSONameService,
200199
protected route: ActivatedRoute,
201-
protected router: Router,
202-
private uuidService: UUIDService
200+
protected router: Router
203201
) {
204202
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
205203
this.epersonInitial = eperson;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import { PaginationService } from '../../../../core/pagination/pagination.servic
3030
import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub';
3131
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
3232
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
33-
import { UUIDService } from '../../../../core/shared/uuid.service';
34-
import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock';
3533

3634
describe('MembersListComponent', () => {
3735
let component: MembersListComponent;
@@ -138,7 +136,6 @@ describe('MembersListComponent', () => {
138136
{ provide: Router, useValue: new RouterMock() },
139137
{ provide: PaginationService, useValue: paginationService },
140138
{ provide: DSONameService, useValue: new DSONameServiceMock() },
141-
{ provide: UUIDService, useValue: getMockUUIDService() }
142139
],
143140
schemas: [NO_ERRORS_SCHEMA]
144141
}).compileComponents();

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { NotificationsService } from '../../../../shared/notifications/notificat
2323
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
2424
import { PaginationService } from '../../../../core/pagination/pagination.service';
2525
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
26-
import { UUIDService } from '../../../../core/shared/uuid.service';
2726

2827
/**
2928
* Keys to keep track of specific subscriptions
@@ -102,15 +101,15 @@ export class MembersListComponent implements OnInit, OnDestroy {
102101
* Pagination config used to display the list of EPeople that are result of EPeople search
103102
*/
104103
configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
105-
id: this.uuidService.generate(),
104+
id: 'sml',
106105
pageSize: 5,
107106
currentPage: 1
108107
});
109108
/**
110109
* Pagination config used to display the list of EPerson Membes of active group being edited
111110
*/
112111
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
113-
id: this.uuidService.generate(),
112+
id: 'ml',
114113
pageSize: 5,
115114
currentPage: 1
116115
});
@@ -140,8 +139,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
140139
protected formBuilder: UntypedFormBuilder,
141140
protected paginationService: PaginationService,
142141
protected router: Router,
143-
public dsoNameService: DSONameService,
144-
protected uuidService: UUIDService
142+
public dsoNameService: DSONameService
145143
) {
146144
this.currentSearchQuery = '';
147145
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import { PaginationServiceStub } from '../../../../shared/testing/pagination-ser
3030
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
3131
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
3232
import { EPersonMock2 } from 'src/app/shared/testing/eperson.mock';
33-
import { UUIDService } from '../../../../core/shared/uuid.service';
34-
import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock';
3533

3634
describe('SubgroupsListComponent', () => {
3735
let component: SubgroupsListComponent;
@@ -146,7 +144,6 @@ describe('SubgroupsListComponent', () => {
146144
{ provide: FormBuilderService, useValue: builderService },
147145
{ provide: Router, useValue: routerStub },
148146
{ provide: PaginationService, useValue: paginationService },
149-
{ provide: UUIDService, useValue: getMockUUIDService() }
150147
],
151148
schemas: [NO_ERRORS_SCHEMA]
152149
}).compileComponents();

0 commit comments

Comments
 (0)