Skip to content

Commit 9ca57e9

Browse files
committed
Merge branch 'main' into w2p-101127_browse-by-controlled-vocabulary-7.6.0-next
Conflicts: src/assets/i18n/en.json5
2 parents db8b9f1 + 5a9e9fd commit 9ca57e9

53 files changed

Lines changed: 3993 additions & 1278 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.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@ dspace-angular
413413
│ ├── merge-i18n-files.ts *
414414
│ ├── serve.ts *
415415
│ ├── sync-i18n-files.ts *
416-
│ ├── test-rest.ts *
417-
│ └── webpack.js *
416+
│ └── test-rest.ts *
418417
├── src * The source of the application
419418
│ ├── app * The source code of the application, subdivided by module/page.
420419
│ ├── assets * Folder for static resources

scripts/webpack.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/app/bitstream-page/bitstream-page-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
3-
import { EditBitstreamPageComponent } from './edit-bitstream-page/edit-bitstream-page.component';
43
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
54
import { BitstreamPageResolver } from './bitstream-page.resolver';
65
import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component';
@@ -13,6 +12,7 @@ import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver';
1312
import { BitstreamBreadcrumbResolver } from '../core/breadcrumbs/bitstream-breadcrumb.resolver';
1413
import { BitstreamBreadcrumbsService } from '../core/breadcrumbs/bitstream-breadcrumbs.service';
1514
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
15+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
1616

1717
const EDIT_BITSTREAM_PATH = ':id/edit';
1818
const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
@@ -49,7 +49,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
4949
},
5050
{
5151
path: EDIT_BITSTREAM_PATH,
52-
component: EditBitstreamPageComponent,
52+
component: ThemedEditBitstreamPageComponent,
5353
resolve: {
5454
bitstream: BitstreamPageResolver,
5555
breadcrumb: BitstreamBreadcrumbResolver,

src/app/bitstream-page/bitstream-page.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bit
77
import { FormModule } from '../shared/form/form.module';
88
import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module';
99
import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component';
10+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
1011

1112
/**
1213
* This module handles all components that are necessary for Bitstream related pages
@@ -22,6 +23,7 @@ import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstr
2223
declarations: [
2324
BitstreamAuthorizationsComponent,
2425
EditBitstreamPageComponent,
26+
ThemedEditBitstreamPageComponent,
2527
BitstreamDownloadPageComponent,
2628
]
2729
})
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Component } from '@angular/core';
2+
import { EditBitstreamPageComponent } from './edit-bitstream-page.component';
3+
import { ThemedComponent } from '../../shared/theme-support/themed.component';
4+
5+
@Component({
6+
selector: 'ds-themed-edit-bitstream-page',
7+
styleUrls: [],
8+
templateUrl: '../../shared/theme-support/themed.component.html',
9+
})
10+
export class ThemedEditBitstreamPageComponent extends ThemedComponent<EditBitstreamPageComponent> {
11+
protected getComponentName(): string {
12+
return 'EditBitstreamPageComponent';
13+
}
14+
15+
protected importThemedComponent(themeName: string): Promise<any> {
16+
return import(`../../../themes/${themeName}/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component`);
17+
}
18+
19+
protected importUnthemedComponent(): Promise<any> {
20+
return import('./edit-bitstream-page.component');
21+
}
22+
}

src/app/core/shared/search/search.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ export class SearchService implements OnDestroy {
333333
* Send search event to rest api using angularitics
334334
* @param config Paginated search options used
335335
* @param searchQueryResponse The response objects of the performed search
336+
* @param clickedObject Optional UUID of an object a search was performed and clicked for
336337
*/
337-
trackSearch(config: PaginatedSearchOptions, searchQueryResponse: SearchObjects<DSpaceObject>) {
338+
trackSearch(config: PaginatedSearchOptions, searchQueryResponse: SearchObjects<DSpaceObject>, clickedObject?: string) {
338339
const filters: { filter: string, operator: string, value: string, label: string; }[] = [];
339340
const appliedFilters = searchQueryResponse.appliedFilters || [];
340341
for (let i = 0, filtersLength = appliedFilters.length; i < filtersLength; i++) {
@@ -356,6 +357,7 @@ export class SearchService implements OnDestroy {
356357
order: config.sort.direction
357358
},
358359
filters: filters,
360+
clickedObject,
359361
},
360362
});
361363
}

src/app/item-page/edit-item-page/edit-item-page.module.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ import { IdentifierDataComponent } from '../../shared/object-list/identifier-dat
3939
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
4040
import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
4141
import { ItemCurateComponent } from './item-curate/item-curate.component';
42+
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
43+
4244

4345
/**
4446
* Module that contains all components related to the Edit Item page administrator functionality
@@ -67,6 +69,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
6769
ItemPublicComponent,
6870
ItemDeleteComponent,
6971
ItemStatusComponent,
72+
ThemedItemStatusComponent,
7073
ItemRelationshipsComponent,
7174
ItemBitstreamsComponent,
7275
ItemVersionHistoryComponent,
@@ -89,6 +92,9 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
8992
IdentifierDataService,
9093
ObjectValuesPipe
9194
],
95+
exports: [
96+
ItemOperationComponent,
97+
]
9298
})
9399
export class EditItemPageModule {
94100

src/app/item-page/edit-item-page/edit-item-page.routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ItemReinstateComponent } from './item-reinstate/item-reinstate.componen
66
import { ItemPrivateComponent } from './item-private/item-private.component';
77
import { ItemPublicComponent } from './item-public/item-public.component';
88
import { ItemDeleteComponent } from './item-delete/item-delete.component';
9-
import { ItemStatusComponent } from './item-status/item-status.component';
109
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
1110
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
1211
import { ItemMoveComponent } from './item-move/item-move.component';
@@ -42,6 +41,7 @@ import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.gua
4241
import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component';
4342
import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard';
4443
import { ItemCurateComponent } from './item-curate/item-curate.component';
44+
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
4545

4646
/**
4747
* Routing module that handles the routing for the Edit Item page administrator functionality
@@ -67,7 +67,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
6767
},
6868
{
6969
path: 'status',
70-
component: ItemStatusComponent,
70+
component: ThemedItemStatusComponent,
7171
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
7272
canActivate: [ItemPageStatusGuard]
7373
},

src/app/item-page/edit-item-page/item-status/item-status.component.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { RemoteData } from '../../../core/data/remote-data';
99
import { getItemEditRoute, getItemPageRoute } from '../../item-page-routing-paths';
1010
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
1111
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
12-
import { hasValue } from '../../../shared/empty.util';
12+
import { hasValue, isNotEmpty } from '../../../shared/empty.util';
1313
import {
14-
getAllSucceededRemoteDataPayload, getFirstSucceededRemoteData, getRemoteDataPayload,
14+
getAllSucceededRemoteDataPayload, getFirstCompletedRemoteData, getFirstSucceededRemoteData, getRemoteDataPayload,
1515
} from '../../../core/shared/operators';
1616
import { IdentifierDataService } from '../../../core/data/identifier-data.service';
1717
import { Identifier } from '../../../shared/object-list/identifier-data/identifier.model';
@@ -105,12 +105,13 @@ export class ItemStatusComponent implements OnInit {
105105

106106
// Observable for configuration determining whether the Register DOI feature is enabled
107107
let registerConfigEnabled$: Observable<boolean> = this.configurationService.findByPropertyName('identifiers.item-status.register-doi').pipe(
108-
getFirstSucceededRemoteData(),
109-
getRemoteDataPayload(),
110-
map((enabled: ConfigurationProperty) => {
111-
if (enabled !== undefined && enabled.values) {
112-
return true;
108+
getFirstCompletedRemoteData(),
109+
map((rd: RemoteData<ConfigurationProperty>) => {
110+
// If the config property is exposed via rest and has a value set, return it
111+
if (rd.hasSucceeded && hasValue(rd.payload) && isNotEmpty(rd.payload.values)) {
112+
return rd.payload.values[0] === 'true';
113113
}
114+
// Otherwise, return false
114115
return false;
115116
})
116117
);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Component } from '@angular/core';
2+
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
3+
import { ItemStatusComponent } from './item-status.component';
4+
5+
@Component({
6+
selector: 'ds-themed-item-status',
7+
styleUrls: [],
8+
templateUrl: '../../../shared/theme-support/themed.component.html',
9+
})
10+
export class ThemedItemStatusComponent extends ThemedComponent<ItemStatusComponent> {
11+
protected getComponentName(): string {
12+
return 'ItemStatusComponent';
13+
}
14+
15+
protected importThemedComponent(themeName: string): Promise<any> {
16+
return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-status/item-status.component`);
17+
}
18+
19+
protected importUnthemedComponent(): Promise<any> {
20+
return import('./item-status.component');
21+
}
22+
23+
}

0 commit comments

Comments
 (0)