Skip to content

Commit a5721d2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into issue-3170
2 parents d7e8b87 + ec6940a commit a5721d2

File tree

250 files changed

+9341
-1128
lines changed

Some content is hidden

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

250 files changed

+9341
-1128
lines changed

angular.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858
"input": "src/themes/dspace/styles/theme.scss",
5959
"inject": false,
6060
"bundleName": "dspace-theme"
61-
}
61+
},
62+
"node_modules/leaflet/dist/leaflet.css",
63+
"node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
64+
"node_modules/leaflet.markercluster/dist/MarkerCluster.css"
6265
],
6366
"scripts": [],
6467
"baseHref": "/"

config/config.example.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,25 @@ item:
350350
# Rounded to the nearest size in the list of selectable sizes on the
351351
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
352352
pageSize: 5
353+
# Show the bitstream access status label on the item page
354+
showAccessStatuses: false
353355

354356
# Community Page Config
355357
community:
358+
# Default tab to be shown when browsing a Community. Valid values are: comcols, search, or browse_<field>
359+
# <field> must be any of the configured "browse by" fields, e.g., dateissued, author, title, or subject
360+
# When the default tab is not the 'search' tab, the search tab is moved to the last position
361+
defaultBrowseTab: search
356362
# Search tab config
357363
searchSection:
358364
showSidebar: true
359365

360366
# Collection Page Config
361367
collection:
368+
# Default tab to be shown when browsing a Collection. Valid values are: search, or browse_<field>
369+
# <field> must be any of the configured "browse by" fields, e.g., dateissued, author, title, or subject
370+
# When the default tab is not the 'search' tab, the search tab is moved to the last position
371+
defaultBrowseTab: search
362372
# Search tab config
363373
searchSection:
364374
showSidebar: true
@@ -536,7 +546,6 @@ notifyMetrics:
536546
config: 'NOTIFY.outgoing.delivered'
537547
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
538548

539-
540549
# Live Region configuration
541550
# Live Region as defined by w3c, https://www.w3.org/TR/wai-aria-1.1/#terms:
542551
# Live regions are perceivable regions of a web page that are typically updated as a
@@ -550,3 +559,37 @@ liveRegion:
550559
messageTimeOutDurationMs: 30000
551560
# The visibility of the live region. Setting this to true is only useful for debugging purposes.
552561
isVisible: false
562+
563+
# Geospatial Map display options
564+
geospatialMapViewer:
565+
# Which fields to use for parsing as geospatial points in search maps
566+
# (note, the item page field component allows any field(s) to be used
567+
# and is set as an input when declaring the component)
568+
spatialMetadataFields:
569+
- 'dcterms.spatial'
570+
# Which discovery configuration to use for 'geospatial search', used
571+
# in the browse map
572+
spatialFacetDiscoveryConfiguration: 'geospatial'
573+
# Which filter / facet name to use for faceted geospatial search
574+
# used in the browse map
575+
spatialPointFilterName: 'point'
576+
# Whether item page geospatial metadata should be displayed
577+
# (assumes they are wrapped in a test for this config in the template as
578+
# per the default templates supplied with DSpace for untyped-item and publication)
579+
enableItemPageFields: false
580+
# Whether the browse map should be enabled and included in the browse menu
581+
enableBrowseMap: false
582+
# Whether a 'map view' mode should be included alongside list and grid views
583+
# in search result pages
584+
enableSearchViewMode: false
585+
# The tile provider(s) to use for the map tiles drawn in the leaflet maps.
586+
# (see https://leaflet-extras.github.io/leaflet-providers/preview/) for a full list
587+
tileProviders:
588+
- 'OpenStreetMap.Mapnik'
589+
# Starting centre point for the map, as lat and lng coordinates. This is useful
590+
# to set the centre of the map when the map is first loaded and if there are no
591+
# points, shapes or markers to display.
592+
# Defaults to the centre of Istanbul
593+
defaultCentrePoint:
594+
lat: 41.015137
595+
lng: 28.979530

package-lock.json

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
"@ngrx/store": "^18.1.1",
115115
"@ngx-translate/core": "^16.0.3",
116116
"@nicky-lenaers/ngx-scroll-to": "^14.0.0",
117+
"@terraformer/wkt": "^2.2.1",
118+
"altcha": "^0.9.0",
117119
"angulartics2": "^12.2.0",
118120
"axios": "^1.7.9",
119121
"bootstrap": "^5.3",
@@ -139,6 +141,9 @@
139141
"json5": "^2.2.3",
140142
"jsonschema": "1.5.0",
141143
"jwt-decode": "^3.1.2",
144+
"leaflet": "^1.9.4",
145+
"leaflet-providers": "^2.0.0",
146+
"leaflet.markercluster": "^1.5.3",
142147
"lodash": "^4.17.21",
143148
"lru-cache": "^7.14.1",
144149
"markdown-it": "^13.0.1",
@@ -149,6 +154,7 @@
149154
"ng2-file-upload": "7.0.1",
150155
"ng2-nouislider": "^2.0.0",
151156
"ngx-infinite-scroll": "^18.0.0",
157+
"ngx-matomo-client": "^6.4.1",
152158
"ngx-pagination": "6.0.3",
153159
"ngx-skeleton-loader": "^9.0.0",
154160
"ngx-ui-switch": "^15.0.0",

src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { TranslateModule } from '@ngx-translate/core';
1010
import { Observable } from 'rxjs';
1111

1212
import { AuthService } from '../../../../../core/auth/auth.service';
13-
import { AccessStatusDataService } from '../../../../../core/data/access-status-data.service';
1413
import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service';
1514
import { AuthorizationDataService } from '../../../../../core/data/feature-authorization/authorization-data.service';
1615
import { RemoteData } from '../../../../../core/data/remote-data';
@@ -22,7 +21,6 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model';
2221
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
2322
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
2423
import { CollectionElementLinkType } from '../../../../../shared/object-collection/collection-element-link.type';
25-
import { AccessStatusObject } from '../../../../../shared/object-collection/shared/badges/access-status-badge/access-status.model';
2624
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
2725
import { createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
2826
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
@@ -44,12 +42,6 @@ describe('ItemAdminSearchResultGridElementComponent', () => {
4442
},
4543
};
4644

47-
const mockAccessStatusDataService = {
48-
findAccessStatusFor(item: Item): Observable<RemoteData<AccessStatusObject>> {
49-
return createSuccessfulRemoteDataObject$(new AccessStatusObject());
50-
},
51-
};
52-
5345
const mockThemeService = getMockThemeService();
5446

5547
function init() {
@@ -74,7 +66,6 @@ describe('ItemAdminSearchResultGridElementComponent', () => {
7466
{ provide: TruncatableService, useValue: mockTruncatableService },
7567
{ provide: BitstreamDataService, useValue: mockBitstreamDataService },
7668
{ provide: ThemeService, useValue: mockThemeService },
77-
{ provide: AccessStatusDataService, useValue: mockAccessStatusDataService },
7869
{ provide: AuthService, useClass: AuthServiceStub },
7970
{ provide: FileService, useClass: FileServiceStub },
8071
{ provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub },

src/app/app-routes.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,20 @@ export const APP_ROUTES: Route[] = [
263263
.then((m) => m.ROUTES),
264264
canActivate: [authenticatedGuard],
265265
},
266+
{
267+
path: 'external-login/:token',
268+
loadChildren: () => import('./external-login-page/external-login-routes').then((m) => m.ROUTES),
269+
},
270+
{
271+
path: 'review-account/:token',
272+
loadChildren: () => import('./external-login-review-account-info-page/external-login-review-account-info-page-routes')
273+
.then((m) => m.ROUTES),
274+
},
275+
{
276+
path: 'email-confirmation',
277+
loadChildren: () => import('./external-login-email-confirmation-page/external-login-email-confirmation-page-routes')
278+
.then((m) => m.ROUTES),
279+
},
266280
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent },
267281
],
268282
},

src/app/app-routing-paths.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,41 @@ export function getBitstreamRequestACopyRoute(item, bitstream): { routerLink: st
3535
};
3636
}
3737

38+
/**
39+
* Get a bitstream download route with an access token (to provide direct access to a user) added as a query parameter
40+
* @param bitstream the bitstream to download
41+
* @param accessToken the access token, which should match an access_token in the requestitem table
42+
*/
43+
export function getBitstreamDownloadWithAccessTokenRoute(bitstream, accessToken): { routerLink: string, queryParams: any } {
44+
const url = new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString();
45+
const options = {
46+
routerLink: url,
47+
queryParams: {},
48+
};
49+
// Only add the access token if it is not empty, otherwise keep valid empty query parameters
50+
if (hasValue(accessToken)) {
51+
options.queryParams = { accessToken: accessToken };
52+
}
53+
return options;
54+
}
55+
/**
56+
* Get an access token request route for a user to access approved bitstreams using a supplied access token
57+
* @param item_uuid item UUID
58+
* @param accessToken access token (generated by backend)
59+
*/
60+
export function getAccessTokenRequestRoute(item_uuid, accessToken): { routerLink: string, queryParams: any } {
61+
const url = new URLCombiner(getItemModuleRoute(), item_uuid, getAccessByTokenModulePath()).toString();
62+
const options = {
63+
routerLink: url,
64+
queryParams: {
65+
accessToken: (hasValue(accessToken) ? accessToken : undefined),
66+
},
67+
};
68+
return options;
69+
}
70+
71+
export const COAR_NOTIFY_SUPPORT = 'coar-notify-support';
72+
3873
export const HOME_PAGE_PATH = 'home';
3974

4075
export function getHomePageRoute() {
@@ -128,6 +163,11 @@ export function getRequestCopyModulePath() {
128163
return `/${REQUEST_COPY_MODULE_PATH}`;
129164
}
130165

166+
export const ACCESS_BY_TOKEN_MODULE_PATH = 'access-by-token';
167+
export function getAccessByTokenModulePath() {
168+
return `/${ACCESS_BY_TOKEN_MODULE_PATH}`;
169+
}
170+
131171
export const HEALTH_PAGE_PATH = 'health';
132172

133173
export const SUBSCRIPTIONS_MODULE_PATH = 'subscriptions';

src/app/app.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import {
6565
import { ClientCookieService } from './core/services/client-cookie.service';
6666
import { ListableModule } from './core/shared/listable.module';
6767
import { XsrfInterceptor } from './core/xsrf/xsrf.interceptor';
68+
import { LOGIN_METHOD_FOR_DECORATOR_MAP } from './external-log-in/decorators/external-log-in.methods-decorator';
6869
import { RootModule } from './root.module';
6970
import { AUTH_METHOD_FOR_DECORATOR_MAP } from './shared/log-in/methods/log-in.methods-decorator';
7071
import { METADATA_REPRESENTATION_COMPONENT_DECORATOR_MAP } from './shared/metadata-representation/metadata-representation.decorator';
@@ -165,6 +166,7 @@ export const commonAppConfig: ApplicationConfig = {
165166

166167
/* Use models object so all decorators are actually called */
167168
const modelList = models;
169+
const loginMethodForDecoratorMap = LOGIN_METHOD_FOR_DECORATOR_MAP;
168170
const workflowTasks = WORKFLOW_TASK_OPTION_DECORATOR_MAP;
169171
const advancedWorfklowTasks = ADVANCED_WORKFLOW_TASK_OPTION_DECORATOR_MAP;
170172
const metadataRepresentations = METADATA_REPRESENTATION_COMPONENT_DECORATOR_MAP;

0 commit comments

Comments
 (0)