diff --git a/cypress/e2e/item-template.cy.ts b/cypress/e2e/item-template.cy.ts new file mode 100644 index 0000000000..5f5b21a16a --- /dev/null +++ b/cypress/e2e/item-template.cy.ts @@ -0,0 +1,15 @@ +const ADD_TEMPLATE_ITEM_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/itemtemplate'); + +describe('Item Template', () => { + beforeEach(() => { + cy.visit(ADD_TEMPLATE_ITEM_PAGE); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should load properly', () => { + cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible'); + }); +}); diff --git a/docker/README.md b/docker/README.md index d0cee3f52a..64d8ddc2c5 100644 --- a/docker/README.md +++ b/docker/README.md @@ -20,7 +20,7 @@ the Docker compose scripts in this 'docker' folder. ### Dockerfile -This Dockerfile is used to build a *development* DSpace 7 Angular UI image, published as 'dspace/dspace-angular' +This Dockerfile is used to build a *development* DSpace Angular UI image, published as 'dspace/dspace-angular' ``` docker build -t dspace/dspace-angular:latest . @@ -46,11 +46,11 @@ A default/demo version of this image is built *automatically*. ## 'docker' directory - docker-compose.yml - - Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker. + - Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace REST instance will also be started in Docker. - docker-compose-rest.yml - - Runs a published instance of the DSpace 7 REST API - persists data in Docker volumes + - Runs a published instance of the DSpace REST API - persists data in Docker volumes - docker-compose-ci.yml - - Runs a published instance of the DSpace 7 REST API for CI testing. The database is re-populated from a SQL dump on each startup. + - Runs a published instance of the DSpace REST API for CI testing. The database is re-populated from a SQL dump on each startup. - cli.yml - Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container. - cli.assetstore.yml @@ -71,7 +71,7 @@ docker-compose -f docker/docker-compose.yml build This command provides a quick way to start both the frontend & backend from this single codebase ``` -docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d ``` Keep in mind, you may also start the backend by cloning the 'DSpace/DSpace' GitHub repository separately. See the next section. @@ -86,14 +86,14 @@ _The system will be started in 2 steps. Each step shares the same docker network From 'DSpace/DSpace' clone (build first as needed): ``` -docker-compose -p d7 up -d +docker-compose -p d8 up -d ``` NOTE: More detailed instructions on starting the backend via Docker can be found in the [Docker Compose instructions for the Backend](https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/README.md). From 'DSpace/dspace-angular' clone (build first as needed) ``` -docker-compose -p d7 -f docker/docker-compose.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml up -d ``` At this point, you should be able to access the UI from http://localhost:4000, @@ -107,19 +107,19 @@ This allows you to run the Angular UI in *production* mode, pointing it at the d ``` docker-compose -f docker/docker-compose-dist.yml pull docker-compose -f docker/docker-compose-dist.yml build -docker-compose -p d7 -f docker/docker-compose-dist.yml up -d +docker-compose -p d8 -f docker/docker-compose-dist.yml up -d ``` ## Ingest test data from AIPDIR Create an administrator ``` -docker-compose -p d7 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en +docker-compose -p d8 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en ``` Load content from AIP files ``` -docker-compose -p d7 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli +docker-compose -p d8 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli ``` ## Alternative Ingest - Use Entities dataset @@ -127,12 +127,12 @@ _Delete your docker volumes or use a unique project (-p) name_ Start DSpace with Database Content from a database dump ``` -docker-compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/db.entities.yml up -d +docker-compose -p d8 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/db.entities.yml up -d ``` Load assetstore content and trigger a re-index of the repository ``` -docker-compose -p d7 -f docker/cli.yml -f docker/cli.assetstore.yml run --rm dspace-cli +docker-compose -p d8 -f docker/cli.yml -f docker/cli.assetstore.yml run --rm dspace-cli ``` ## End to end testing of the REST API (runs in GitHub Actions CI). @@ -140,5 +140,5 @@ _In this instance, only the REST api runs in Docker using the Entities dataset. This command is only really useful for testing our Continuous Integration process. ``` -docker-compose -p d7ci -f docker/docker-compose-ci.yml up -d +docker-compose -p d8ci -f docker/docker-compose-ci.yml up -d ``` diff --git a/docker/docker-compose-ci.yml b/docker/docker-compose-ci.yml index 07993e20c6..fef7330ba1 100644 --- a/docker/docker-compose-ci.yml +++ b/docker/docker-compose-ci.yml @@ -33,6 +33,7 @@ services: # Tell Statistics to commit all views immediately instead of waiting on Solr's autocommit. # This allows us to generate statistics in e2e tests so that statistics pages can be tested thoroughly. solr__D__statistics__P__autoCommit: 'false' + LOGGING_CONFIG: /dspace/config/log4j2-container.xml image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}" depends_on: - dspacedb @@ -60,15 +61,19 @@ services: # NOTE: This is customized to use our loadsql image, so that we are using a database with existing test data dspacedb: container_name: dspacedb + image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest-loadsql}" environment: # This LOADSQL should be kept in sync with the LOADSQL in # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml # This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data LOADSQL: https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql PGDATA: /pgdata - image: dspace/dspace-postgres-pgcrypto:loadsql + POSTGRES_PASSWORD: dspace networks: - dspacenet + ports: + - published: 5432 + target: 5432 stdin_open: true tty: true volumes: @@ -105,6 +110,8 @@ services: cp -r /opt/solr/server/solr/configsets/statistics/* statistics precreate-core qaevent /opt/solr/server/solr/configsets/qaevent cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent + precreate-core suggestion /opt/solr/server/solr/configsets/suggestion + cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion exec solr -f volumes: assetstore: diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index e1577ec837..6267b32bbe 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -29,8 +29,9 @@ services: # __D__ => "-" (e.g. google__D__metadata => google-metadata) # dspace.dir, dspace.server.url, dspace.ui.url and dspace.name dspace__P__dir: /dspace - dspace__P__server__P__url: http://localhost:8080/server - dspace__P__ui__P__url: http://localhost:4000 + # Uncomment to set a non-default value for dspace.server.url or dspace.ui.url + # dspace__P__server__P__url: http://localhost:8080/server + # dspace__P__ui__P__url: http://localhost:4000 dspace__P__name: 'DSpace Started with Docker Compose' # db.url: Ensure we are using the 'dspacedb' image for our database db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace' @@ -39,6 +40,7 @@ services: # proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests # from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above. proxies__P__trusted__P__ipranges: '172.23.0' + LOGGING_CONFIG: /dspace/config/log4j2-container.xml image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}" depends_on: - dspacedb @@ -50,6 +52,7 @@ services: stdin_open: true tty: true volumes: + # Keep DSpace assetstore directory between reboots - assetstore:/dspace/assetstore # Ensure that the database is ready BEFORE starting tomcat # 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep @@ -65,9 +68,11 @@ services: # DSpace database container dspacedb: container_name: dspacedb + # Uses a custom Postgres image with pgcrypto installed + image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}" environment: PGDATA: /pgdata - image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}" + POSTGRES_PASSWORD: dspace networks: - dspacenet ports: @@ -113,6 +118,8 @@ services: cp -r /opt/solr/server/solr/configsets/statistics/* statistics precreate-core qaevent /opt/solr/server/solr/configsets/qaevent cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent + precreate-core suggestion /opt/solr/server/solr/configsets/suggestion + cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion exec solr -f volumes: assetstore: diff --git a/src/app/core/submission/submission-json-patch-operations.service.spec.ts b/src/app/core/submission/submission-json-patch-operations.service.spec.ts index 76e487400b..dd98b5de57 100644 --- a/src/app/core/submission/submission-json-patch-operations.service.spec.ts +++ b/src/app/core/submission/submission-json-patch-operations.service.spec.ts @@ -17,6 +17,9 @@ describe('SubmissionJsonPatchOperationsService', () => { const rdbService = {} as RemoteDataBuildService; const halEndpointService = {} as HALEndpointService; + const uuid = '91ecbeda-99fe-42ac-9430-b9b75af56f78'; + const href = 'https://rest.api/some/self/link?with=maybe&a=few&other=parameters'; + function initTestService() { return new SubmissionJsonPatchOperationsService( requestService, @@ -36,4 +39,16 @@ describe('SubmissionJsonPatchOperationsService', () => { expect((service as any).patchRequestConstructor).toEqual(SubmissionPatchRequest); }); + describe(`getRequestInstance`, () => { + it(`should add a parameter to embed the item to the request URL`, () => { + const result = (service as any).getRequestInstance(uuid, href); + const resultURL = new URL(result.href); + expect(resultURL.searchParams.get('embed')).toEqual('item'); + + // if we delete the embed item param, it should be identical to the original url + resultURL.searchParams.delete('embed', 'item'); + expect(href).toEqual(resultURL.toString()); + }); + }); + }); diff --git a/src/app/core/submission/submission-json-patch-operations.service.ts b/src/app/core/submission/submission-json-patch-operations.service.ts index 16d74b2bf8..8d454ae211 100644 --- a/src/app/core/submission/submission-json-patch-operations.service.ts +++ b/src/app/core/submission/submission-json-patch-operations.service.ts @@ -8,6 +8,7 @@ import { RequestService } from '../data/request.service'; import { JsonPatchOperationsService } from '../json-patch/json-patch-operations.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { SubmitDataResponseDefinitionObject } from '../shared/submit-data-response-definition.model'; +import { URLCombiner } from '../url-combiner/url-combiner'; /** * A service that provides methods to make JSON Patch requests. @@ -26,4 +27,20 @@ export class SubmissionJsonPatchOperationsService extends JsonPatchOperationsSer super(); } + /** + * Return an instance for RestRequest class + * + * @param uuid + * The request uuid + * @param href + * The request href + * @param body + * The request body + * @return Object + * instance of PatchRequestDefinition + */ + protected getRequestInstance(uuid: string, href: string, body?: any): SubmissionPatchRequest { + return new this.patchRequestConstructor(uuid, new URLCombiner(href, '?embed=item').toString(), body); + } + } diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts index e51b053cb4..677a601b9d 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts @@ -24,8 +24,8 @@ import { import { BehaviorSubject, combineLatest as observableCombineLatest, - EMPTY, Observable, + of, Subscription, } from 'rxjs'; import { @@ -188,7 +188,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy { const lazyProvider$: Observable> = lazyDataService(this.dataServiceMap, this.dsoType, this.parentInjector); return lazyProvider$; } else { - return EMPTY; + return of(this.updateDataService); } } diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.html b/src/app/shared/search/search-labels/search-label/search-label.component.html index 2269771de1..d35494b591 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.html +++ b/src/app/shared/search/search-labels/search-label/search-label.component.html @@ -1,7 +1,9 @@ - - {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} - + + {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} + + diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.scss b/src/app/shared/search/search-labels/search-label/search-label.component.scss new file mode 100644 index 0000000000..601f57d407 --- /dev/null +++ b/src/app/shared/search/search-labels/search-label/search-label.component.scss @@ -0,0 +1,3 @@ +.badge { + white-space: inherit; +} diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts index b24ff13826..0be52d38c6 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts @@ -26,6 +26,7 @@ import { stripOperatorFromFilterValue } from '../../search.utils'; @Component({ selector: 'ds-search-label', templateUrl: './search-label.component.html', + styleUrls: ['./search-label.component.scss'], standalone: true, imports: [RouterLink, AsyncPipe, TranslateModule], }) diff --git a/src/app/shared/search/search-labels/search-labels.component.scss b/src/app/shared/search/search-labels/search-labels.component.scss index c48cd57304..348c46571d 100644 --- a/src/app/shared/search/search-labels/search-labels.component.scss +++ b/src/app/shared/search/search-labels/search-labels.component.scss @@ -1,3 +1,10 @@ :host { line-height: 1; -} \ No newline at end of file + .labels { + margin: 0 calc(-1 * var(--bs-spacer)/8); + ds-search-label { + display: inline-block; + padding: 0 calc(var(--bs-spacer)/8); + } + } +} diff --git a/src/app/shared/search/search.component.html b/src/app/shared/search/search.component.html index d12780981b..adb164e799 100644 --- a/src/app/shared/search/search.component.html +++ b/src/app/shared/search/search.component.html @@ -96,8 +96,8 @@ [inPlaceSearch]="inPlaceSearch" [searchPlaceholder]="searchFormPlaceholder | translate"> -
-
+
+
diff --git a/src/robots.txt.ejs b/src/robots.txt.ejs index cd5e228b3a..f6dc7fa5cb 100644 --- a/src/robots.txt.ejs +++ b/src/robots.txt.ejs @@ -16,6 +16,8 @@ Disallow: /submit Disallow: /workspaceitems Disallow: /profile Disallow: /workflowitems +# Crawlers should be able to access entity pages, but not the facet search links present on entity pages +Disallow: /entities/*?f # Optionally uncomment the following line ONLY if sitemaps are working # and you have verified that your site is being indexed correctly. diff --git a/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts index efd896cfc8..bf7f379cda 100644 --- a/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts +++ b/src/themes/custom/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.ts @@ -3,10 +3,11 @@ import { NgIf, } from '@angular/common'; import { Component } from '@angular/core'; -import { RouterModule } from '@angular/router'; +import { RouterLink } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { BrowseByTaxonomyComponent as BaseComponent } from '../../../../../app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component'; +import { BrowseByComponent } from '../../../../../app/shared/browse-by/browse-by.component'; import { ThemedBrowseByComponent } from '../../../../../app/shared/browse-by/themed-browse-by.component'; import { ThemedComcolPageBrowseByComponent } from '../../../../../app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; import { ComcolPageContentComponent } from '../../../../../app/shared/comcol/comcol-page-content/comcol-page-content.component'; @@ -31,15 +32,16 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive'; ComcolPageHeaderComponent, ComcolPageLogoComponent, NgIf, - RouterModule, ThemedComcolPageHandleComponent, ComcolPageContentComponent, DsoEditMenuComponent, ThemedComcolPageBrowseByComponent, - VocabularyTreeviewComponent, + BrowseByComponent, TranslateModule, ThemedLoadingComponent, ThemedBrowseByComponent, + VocabularyTreeviewComponent, + RouterLink, ], }) export class BrowseByTaxonomyComponent extends BaseComponent { diff --git a/src/themes/custom/app/collection-page/collection-page.component.ts b/src/themes/custom/app/collection-page/collection-page.component.ts index e96676181c..4023e8479e 100644 --- a/src/themes/custom/app/collection-page/collection-page.component.ts +++ b/src/themes/custom/app/collection-page/collection-page.component.ts @@ -43,7 +43,6 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp ComcolPageContentComponent, ErrorComponent, NgIf, - RouterOutlet, ThemedLoadingComponent, TranslateModule, ViewTrackerComponent, @@ -55,6 +54,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp DsoEditMenuComponent, ThemedComcolPageBrowseByComponent, ObjectCollectionComponent, + RouterOutlet, ], }) /** diff --git a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts index f69fcc868c..e3cc24d1dd 100644 --- a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts +++ b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts @@ -11,6 +11,7 @@ import { ThemedDsoEditMetadataComponent } from '../../../../../app/dso-shared/ds import { AlertComponent } from '../../../../../app/shared/alert/alert.component'; import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component'; import { VarDirective } from '../../../../../app/shared/utils/var.directive'; +import { DsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/dso-edit-metadata.component'; @Component({ selector: 'ds-themed-edit-item-template-page', @@ -20,6 +21,7 @@ import { VarDirective } from '../../../../../app/shared/utils/var.directive'; standalone: true, imports: [ ThemedDsoEditMetadataComponent, + DsoEditMetadataComponent, RouterLink, AsyncPipe, VarDirective, diff --git a/src/themes/custom/app/community-page/community-page.component.ts b/src/themes/custom/app/community-page/community-page.component.ts index d73a1dece1..56cd54c5c3 100644 --- a/src/themes/custom/app/community-page/community-page.component.ts +++ b/src/themes/custom/app/community-page/community-page.component.ts @@ -6,7 +6,10 @@ import { ChangeDetectionStrategy, Component, } from '@angular/core'; -import { RouterModule } from '@angular/router'; +import { + RouterModule, + RouterOutlet, +} from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { CommunityPageComponent as BaseComponent } from '../../../../app/community-page/community-page.component'; @@ -50,6 +53,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp AsyncPipe, ViewTrackerComponent, VarDirective, + RouterOutlet, RouterModule, ], }) diff --git a/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts b/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts index a3204a3155..6160a2d451 100644 --- a/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts +++ b/src/themes/custom/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.ts @@ -1,6 +1,15 @@ +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component'; +import { ErrorComponent } from '../../../../../../../app/shared/error/error.component'; +import { ThemedLoadingComponent } from '../../../../../../../app/shared/loading/themed-loading.component'; +import { ObjectCollectionComponent } from '../../../../../../../app/shared/object-collection/object-collection.component'; +import { VarDirective } from '../../../../../../../app/shared/utils/var.directive'; @Component({ selector: 'ds-themed-community-page-sub-collection-list', @@ -8,6 +17,15 @@ import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../ styleUrls: ['../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.scss'], // templateUrl: './community-page-sub-collection-list.component.html', templateUrl: '../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.html', + imports: [ + ObjectCollectionComponent, + ErrorComponent, + ThemedLoadingComponent, + NgIf, + TranslateModule, + AsyncPipe, + VarDirective, + ], standalone: true, }) export class CommunityPageSubCollectionListComponent extends BaseComponent { diff --git a/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts b/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts index ac334902a3..3b5a9a73a7 100644 --- a/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts +++ b/src/themes/custom/app/forgot-password/forgot-password-email/forgot-email.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; import { ThemedRegisterEmailFormComponent } from 'src/app/register-email-form/themed-registry-email-form.component'; import { ForgotEmailComponent as BaseComponent } from '../../../../../app/forgot-password/forgot-password-email/forgot-email.component'; +import { RegisterEmailFormComponent } from '../../../../../app/register-email-form/register-email-form.component'; @Component({ selector: 'ds-themed-forgot-email', @@ -11,7 +12,7 @@ import { ForgotEmailComponent as BaseComponent } from '../../../../../app/forgot templateUrl: '../../../../../app/forgot-password/forgot-password-email/forgot-email.component.html', standalone: true, imports: [ - ThemedRegisterEmailFormComponent, + RegisterEmailFormComponent, ThemedRegisterEmailFormComponent, ], }) /** diff --git a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts index 3be7a67b62..9656e7b85c 100644 --- a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts +++ b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts @@ -18,8 +18,8 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi standalone: true, imports: [ TranslateModule, - ProfilePageSecurityFormComponent, BrowserOnlyPipe, + ProfilePageSecurityFormComponent, AsyncPipe, NgIf, ], diff --git a/src/themes/custom/app/header/header.component.ts b/src/themes/custom/app/header/header.component.ts index 857e125a09..0f92104e45 100644 --- a/src/themes/custom/app/header/header.component.ts +++ b/src/themes/custom/app/header/header.component.ts @@ -1,3 +1,7 @@ +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; import { RouterLink } from '@angular/router'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; @@ -9,6 +13,7 @@ import { HeaderComponent as BaseComponent } from '../../../../app/header/header. import { ThemedSearchNavbarComponent } from '../../../../app/search-navbar/themed-search-navbar.component'; import { ThemedAuthNavMenuComponent } from '../../../../app/shared/auth-nav-menu/themed-auth-nav-menu.component'; import { ImpersonateNavbarComponent } from '../../../../app/shared/impersonate-navbar/impersonate-navbar.component'; +import { LangSwitchComponent } from '../../../../app/shared/lang-switch/lang-switch.component'; /** * Represents the header with the logo and simple navigation @@ -20,7 +25,7 @@ import { ImpersonateNavbarComponent } from '../../../../app/shared/impersonate-n // templateUrl: 'header.component.html', templateUrl: '../../../../app/header/header.component.html', standalone: true, - imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule], + imports: [RouterLink, ThemedLangSwitchComponent, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule, AsyncPipe, NgIf], }) export class HeaderComponent extends BaseComponent { } diff --git a/src/themes/custom/app/home-page/home-page.component.ts b/src/themes/custom/app/home-page/home-page.component.ts index 6a3acaa032..a7efe0ad84 100644 --- a/src/themes/custom/app/home-page/home-page.component.ts +++ b/src/themes/custom/app/home-page/home-page.component.ts @@ -2,6 +2,7 @@ import { AsyncPipe, NgClass, NgIf, + NgTemplateOutlet, } from '@angular/common'; import { Component } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; @@ -12,6 +13,7 @@ import { HomePageComponent as BaseComponent } from '../../../../app/home-page/ho import { RecentItemListComponent } from '../../../../app/home-page/recent-item-list/recent-item-list.component'; import { ThemedTopLevelCommunityListComponent } from '../../../../app/home-page/top-level-community-list/themed-top-level-community-list.component'; import { SuggestionsPopupComponent } from '../../../../app/notifications/suggestions-popup/suggestions-popup.component'; +import { ConfigurationSearchPageComponent } from '../../../../app/search-page/configuration-search-page.component'; import { ThemedConfigurationSearchPageComponent } from '../../../../app/search-page/themed-configuration-search-page.component'; import { ThemedSearchFormComponent } from '../../../../app/shared/search-form/themed-search-form.component'; import { PageWithSidebarComponent } from '../../../../app/shared/sidebar/page-with-sidebar.component'; @@ -24,7 +26,7 @@ import { ViewTrackerComponent } from '../../../../app/statistics/angulartics/dsp // templateUrl: './home-page.component.html' templateUrl: '../../../../app/home-page/home-page.component.html', standalone: true, - imports: [ThemedHomeNewsComponent, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ThemedConfigurationSearchPageComponent, SuggestionsPopupComponent, PageWithSidebarComponent, HomeCoarComponent], + imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent], }) export class HomePageComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-page.component.ts b/src/themes/custom/app/item-page/simple/item-page.component.ts index 8817d8333d..7daa65287a 100644 --- a/src/themes/custom/app/item-page/simple/item-page.component.ts +++ b/src/themes/custom/app/item-page/simple/item-page.component.ts @@ -44,11 +44,11 @@ import { ViewTrackerComponent } from '../../../../../app/statistics/angulartics/ ItemVersionsComponent, ErrorComponent, ThemedLoadingComponent, - NotifyRequestsStatusComponent, - QaEventNotificationComponent, TranslateModule, AsyncPipe, NgIf, + NotifyRequestsStatusComponent, + QaEventNotificationComponent, ], }) export class ItemPageComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts b/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts index e558cc6e42..ce56724e4a 100644 --- a/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts +++ b/src/themes/custom/app/item-page/simple/item-types/publication/publication.component.ts @@ -1,4 +1,7 @@ -import { CommonModule } from '@angular/common'; +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -39,26 +42,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the templateUrl: '../../../../../../../app/item-page/simple/item-types/publication/publication.component.html', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [ - CommonModule, - ThemedResultsBackButtonComponent, - MiradorViewerComponent, - ThemedItemPageTitleFieldComponent, - DsoEditMenuComponent, - MetadataFieldWrapperComponent, - ThemedThumbnailComponent, - ThemedMediaViewerComponent, - ThemedFileSectionComponent, - ItemPageDateFieldComponent, - ThemedMetadataRepresentationListComponent, - GenericItemPageFieldComponent, - RelatedItemsComponent, - ItemPageAbstractFieldComponent, - TranslateModule, - ItemPageUriFieldComponent, - CollectionsComponent, - RouterLink, - ], + imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, RelatedItemsComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule], }) export class PublicationComponent extends BaseComponent { diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts index d9b5fabc0f..aeae9a519a 100644 --- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts +++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts @@ -1,4 +1,7 @@ -import { CommonModule } from '@angular/common'; +import { + AsyncPipe, + NgIf, +} from '@angular/common'; import { ChangeDetectionStrategy, Component, @@ -38,25 +41,7 @@ import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/the templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [ - CommonModule, - ThemedItemPageTitleFieldComponent, - DsoEditMenuComponent, - MetadataFieldWrapperComponent, - ThemedThumbnailComponent, - ThemedMediaViewerComponent, - ThemedFileSectionComponent, - ItemPageDateFieldComponent, - ThemedMetadataRepresentationListComponent, - GenericItemPageFieldComponent, - TranslateModule, - MiradorViewerComponent, - ThemedResultsBackButtonComponent, - CollectionsComponent, - RouterLink, - ItemPageUriFieldComponent, - ItemPageAbstractFieldComponent, - ], + imports: [NgIf, ThemedResultsBackButtonComponent, MiradorViewerComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMediaViewerComponent, ThemedFileSectionComponent, ItemPageDateFieldComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, ItemPageAbstractFieldComponent, ItemPageUriFieldComponent, CollectionsComponent, RouterLink, AsyncPipe, TranslateModule], }) export class UntypedItemComponent extends BaseComponent { } diff --git a/src/themes/custom/app/login-page/login-page.component.ts b/src/themes/custom/app/login-page/login-page.component.ts index 68a36b182d..6120eab3da 100644 --- a/src/themes/custom/app/login-page/login-page.component.ts +++ b/src/themes/custom/app/login-page/login-page.component.ts @@ -3,6 +3,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { ThemedLogInComponent } from 'src/app/shared/log-in/themed-log-in.component'; import { LoginPageComponent as BaseComponent } from '../../../../app/login-page/login-page.component'; +import { LogInComponent } from '../../../../app/shared/log-in/log-in.component'; /** * This component represents the login page @@ -14,7 +15,7 @@ import { LoginPageComponent as BaseComponent } from '../../../../app/login-page/ // templateUrl: './login-page.component.html' templateUrl: '../../../../app/login-page/login-page.component.html', standalone: true, - imports: [ThemedLogInComponent ,TranslateModule], + imports: [LogInComponent, ThemedLogInComponent ,TranslateModule], }) export class LoginPageComponent extends BaseComponent { } diff --git a/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts b/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts index d54028438a..39156a0ac7 100644 --- a/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts +++ b/src/themes/custom/app/my-dspace-page/my-dspace-page.component.ts @@ -40,11 +40,11 @@ import { ThemedSearchComponent } from '../../../../app/shared/search/themed-sear imports: [ ThemedSearchComponent, MyDSpaceNewSubmissionComponent, - MyDspaceQaEventsNotificationsComponent, - SuggestionsNotificationComponent, AsyncPipe, RoleDirective, NgIf, + SuggestionsNotificationComponent, + MyDspaceQaEventsNotificationsComponent, ], }) export class MyDSpacePageComponent extends BaseComponent { diff --git a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index 0aae9add75..f0e2ebd502 100644 --- a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -1,7 +1,15 @@ +import { + AsyncPipe, + NgComponentOutlet, + NgFor, + NgIf, +} from '@angular/common'; import { Component } from '@angular/core'; +import { RouterLinkActive } from '@angular/router'; import { ExpandableNavbarSectionComponent as BaseComponent } from '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component'; import { slide } from '../../../../../app/shared/animations/slide'; +import { VarDirective } from '../../../../../app/shared/utils/var.directive'; /** * Represents an expandable section in the navbar @@ -14,6 +22,7 @@ import { slide } from '../../../../../app/shared/animations/slide'; styleUrls: ['../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.scss'], animations: [slide], standalone: true, + imports: [VarDirective, RouterLinkActive, NgComponentOutlet, NgIf, NgFor, AsyncPipe], }) export class ExpandableNavbarSectionComponent extends BaseComponent { } diff --git a/src/themes/custom/app/profile-page/profile-page.component.ts b/src/themes/custom/app/profile-page/profile-page.component.ts index b5d7583079..54ea8bb7b5 100644 --- a/src/themes/custom/app/profile-page/profile-page.component.ts +++ b/src/themes/custom/app/profile-page/profile-page.component.ts @@ -23,13 +23,13 @@ import { VarDirective } from '../../../../app/shared/utils/var.directive'; imports: [ ProfilePageMetadataFormComponent, ProfilePageSecurityFormComponent, - SuggestionsNotificationComponent, AsyncPipe, TranslateModule, ProfilePageResearcherFormComponent, VarDirective, NgIf, NgForOf, + SuggestionsNotificationComponent, ], }) /** diff --git a/src/themes/custom/app/register-page/register-email/register-email.component.ts b/src/themes/custom/app/register-page/register-email/register-email.component.ts index 7296e1eebb..adb18ebc86 100644 --- a/src/themes/custom/app/register-page/register-email/register-email.component.ts +++ b/src/themes/custom/app/register-page/register-email/register-email.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import { ThemedRegisterEmailFormComponent } from 'src/app/register-email-form/themed-registry-email-form.component'; +import { RegisterEmailFormComponent } from '../../../../../app/register-email-form/register-email-form.component'; import { RegisterEmailComponent as BaseComponent } from '../../../../../app/register-page/register-email/register-email.component'; @Component({ @@ -11,7 +12,7 @@ import { RegisterEmailComponent as BaseComponent } from '../../../../../app/regi templateUrl: '../../../../../app/register-page/register-email/register-email.component.html', standalone: true, imports: [ - ThemedRegisterEmailFormComponent, + RegisterEmailFormComponent, ThemedRegisterEmailFormComponent, ], }) /** diff --git a/src/themes/custom/app/shared/browse-by/browse-by.component.ts b/src/themes/custom/app/shared/browse-by/browse-by.component.ts index e1016f4bee..34c0bf965a 100644 --- a/src/themes/custom/app/shared/browse-by/browse-by.component.ts +++ b/src/themes/custom/app/shared/browse-by/browse-by.component.ts @@ -30,8 +30,7 @@ import { StartsWithLoaderComponent } from '../../../../../app/shared/starts-with fadeInOut, ], standalone: true, - imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, - ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent], + imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule, StartsWithLoaderComponent], }) export class BrowseByComponent extends BaseComponent { } diff --git a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts index e9666fcdf3..38e5c78815 100644 --- a/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/themes/custom/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -1,6 +1,7 @@ import { AsyncPipe, NgForOf, + NgIf, } from '@angular/common'; import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; @@ -30,6 +31,7 @@ import { ComcolPageBrowseByComponent as BaseComponent } from '../../../../../app RouterLinkActive, TranslateModule, AsyncPipe, + NgIf, ], }) export class ComcolPageBrowseByComponent extends BaseComponent {} diff --git a/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts b/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts index 33ff0844d3..ce9c192723 100644 --- a/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts +++ b/src/themes/custom/app/shared/lang-switch/lang-switch.component.ts @@ -1,5 +1,5 @@ import { - NgForOf, + NgFor, NgIf, } from '@angular/common'; import { Component } from '@angular/core'; @@ -15,7 +15,7 @@ import { LangSwitchComponent as BaseComponent } from '../../../../../app/shared/ // templateUrl: './lang-switch.component.html', templateUrl: '../../../../../app/shared/lang-switch/lang-switch.component.html', standalone: true, - imports: [NgIf, NgbDropdownModule, NgForOf, TranslateModule], + imports: [NgIf, NgbDropdownModule, NgFor, TranslateModule], }) export class LangSwitchComponent extends BaseComponent { } diff --git a/src/themes/custom/app/shared/loading/loading.component.ts b/src/themes/custom/app/shared/loading/loading.component.ts index 8bd9dba45a..891381e77e 100644 --- a/src/themes/custom/app/shared/loading/loading.component.ts +++ b/src/themes/custom/app/shared/loading/loading.component.ts @@ -1,3 +1,4 @@ +import { NgIf } from '@angular/common'; import { Component } from '@angular/core'; import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loading/loading.component'; @@ -9,6 +10,7 @@ import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loa templateUrl: '../../../../../app/shared/loading/loading.component.html', // templateUrl: './loading.component.html' standalone: true, + imports: [NgIf], }) export class LoadingComponent extends BaseComponent { diff --git a/src/themes/custom/app/shared/object-list/object-list.component.ts b/src/themes/custom/app/shared/object-list/object-list.component.ts index e78d3dd996..f94c31aeb0 100644 --- a/src/themes/custom/app/shared/object-list/object-list.component.ts +++ b/src/themes/custom/app/shared/object-list/object-list.component.ts @@ -22,10 +22,7 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi styleUrls: ['../../../../../app/shared/object-list/object-list.component.scss'], // templateUrl: './object-list.component.html' templateUrl: '../../../../../app/shared/object-list/object-list.component.html', - imports: [ - PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, - ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe, - ], + imports: [PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe], standalone: true, })